Daily Archives

Articles indexed Monday April 26 2010

Page 14/110 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Does a Category applied to NSString also apply to NSCFString via the "toll-free bridge"?

    - by half_brick
    We're integrating a library into an iPhone app which appears to use the google toolbox for iPhone internally. The google toolbox adds a method gtm_stringBySanitizingAndEscapingForXML to NSString. The problem is, whenever we attempt to make a call to this library we get [NSCFString gtm_stringBySanitizingAndEscapingForXML]: unrecognized selector sent to instance 0x272478 So it appears the library is calling that method on a NSCFString, to which the category does not apply. So... is it the case that the category will not apply across the toll-free bridge to CoreFoundation classes? If that's the case then we at least know why it's blowing up. Figuring out how to fix it is a different matter.

    Read the article

  • What am i doing wrong with this in asp.net-mvc?

    - by Pandiya Chendur
    I gave this in my site.master <li><%= Html.ActionLink("Material", "Index", "Material")%></li> But my link doesnt seem to get my material controller Index method... I have this in my global asax file, public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Material", action = "Index", id = "" } ); } My controller: public class MaterialController : Controller { // // GET: /Material/ Material material = new Material(); public ActionResult Index() { var materials = material.FindAllMaterials(); return View(); } } What am i doing wrong.... When i click the link i get The resource cannot be found. error.. Any suggestion...

    Read the article

  • MS SQL Query Question

    - by Lp1
    Running MS SQL 2008, and I am definitely a new SQL user. I have a table that has 4 columns: EmpNum, User, Action, Updatetime A user logs into, and out of a system, it is registered in the database. For example, if user1 logs into the system, then out 5 minutes later, a simple query (select * from update) would look like: EmpNum User Action Updatetime 1 User1 I 2010-01-01 23:00:00:000 1 User1 O 2010-01-01 23:05:00:000 I'm trying to query the Empnum, User, Action, I(in time), O(out time), and the total time. Any help or a point in the right direction, and I would be eternally grateful. :)

    Read the article

  • Android Location Error

    - by Christopher
    I've singled out my problem to a few lines of code lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L, 5.0f, this); lat = location.getLatitude(); lng = location.getLongitude(); //lat = new Double(40.431682); //lng = new Double(-74.2021819); pLocation = new GeoPoint((int)(lat * 1000000), (int)(lng * 1000000)); My onLocationChanged if you were wondering public void onLocationChanged(Location location) { if (location != null) { lat = location.getLatitude(); lng = location.getLongitude(); pLocation = new GeoPoint((int)(lat * 1000000), (int)(lng * 1000000)); } } My application crashes if I try to get the LastKnownLocation But it works fine if I feed it a Location manually I have no idea currently whats wrong

    Read the article

  • How is this statement making sense? (Sun's naming convention for Java variables)

    - by polygenelubricants
    I've been quoting this segment from Sun's document for the past few days, and only now do I stop and think about what it's saying, and I can't make sense out of it. Please keep in mind that English is not my first language. Naming conventions Variables: Except for variables, all instance, class, and class constants are in mixed case with a lowercase first letter. How is this making sense? Isn't this saying that class names are in mixed case with a lowercase first letter? Like I should name it class myClass? And class constants are also in mixed case with a lowercase first letter? Like I should name it Integer.maxValue? And is it really saying anything about how variables themselves should be named? Am I not parsing this properly or is this actually a blatant error?

    Read the article

  • AsyncTask Threading Rule - Can it really only be used once?

    - by stormin986
    In the documentation on AsyncTask it gives the following as a rule related to threading: The task can be executed only once (an exception will be thrown if a second execution is attempted.) All this means is that you have to create a new instance of the class every time you want to use it, right? In other words, it must be done like this: new DownloadFilesTask().execute(url1, url2, url3); new DownloadFilesTask().execute(url4, url5, url6); Or conversely, you can NOT do the following: DownloadFilesTask dfTask = new DownloadFilesTask(); dfTask().execute(url1, url2, url3); dfTask().execute(url4, url5, url6); Can someone verify this is an accurate interpretation? I realize I pretty much just answered this for myself as I was typing this out... But it wasn't immediately obvious to me so I think this would be useful to have posted nonetheless.

    Read the article

  • GCC Dynamic library building problem

    - by Sirish Kumar
    I am new to linux, while compiling with dynamic library I am getting the segmentationfault error. I have two files ctest1.c void ctest1(int *i) { *i =10; } ctest2.c void ctest2(int *i) { *i =20; } I have compiled both files to a shared library named libtest.so using following command gcc -shared -W1,-soname,libtest.so.1 -o libtest.so.1.0.1 ctest1.o ctest2.o -lc And I have wrote another program prog.c which uses functions exported by this library prog.c #include void (ctest1)(int); void (ctest2)(int*); int main() { int a; ctest1(&a); printf("%d",a); return 0; } And when I have built the executable with following command gcc -Wall prog.c -L. -o prog But when I run the generated executable I get the SegmentationFault error. When I checked the header of prog with ldd it shows linux-vdso.so.1 = (0x00007f99dff000) libc.so.6 = /lib64/libc.so.6 (0x0007feeaa8c1000) /lib64/ld-linux-x86-64.so.2 (0x00007feeaac1c000) Can somebody tell what is the problem

    Read the article

  • returning a pointed to an object within a std::vector

    - by memC
    I have a very basic question on returning a reference to an element of a vector . There is a vector vec that stores instances of class Foo. I want to access an element from this vector . ( don't want to use the vector index) . How should I code the method getFoo here? #include<vector> #include<stdio.h> #include<iostream> #include<math.h> using namespace std; class Foo { public: Foo(){}; ~Foo(){}; }; class B { public: vector<Foo> vec; Foo* getFoo(); B(){}; ~B(){}; }; Foo* B::getFoo(){ int i; vec.push_back(Foo()); i = vec.size() - 1; // how to return a pointer to vec[i] ?? return vec.at(i); }; int main(){ B b; b = B(); int i = 0; for (i = 0; i < 5; i ++){ b.getFoo(); } return 0; }

    Read the article

  • how can stop creating duplicates in camera roll while using UISaveVideoAtPathToSavedPhotosAlbum to s

    - by srikanth rongali
    I have a video in applications documents folder. I need it to be saved in camera roll. So, I used UISaveVideoAtPathToSavedPhotosAlbum method to save it in camera roll. It's working and I can see the video added to camera roll. But, the problem is every time I execute the application with same video(with same file name), it is added another time in camera roll instead of replacing the old one. So, it is creating the duplicates of the video. How can I make the application work like if a video is present in camera roll and again added with same file name, then old one is replaced by new video.

    Read the article

  • Is there any way to tweak / rotate mouse orientation? Any applications? Registry edits?

    - by calbar
    I've got a very frustrating issue with my new Logitech Marathon Mouse M705. It is absolutely perfect for what I need, with the exception that it tracks on an angle for some reason. What I mean is when you slide the cursor to the left, it trends upward - when you slide to the right, it trends down. Moving the cursor along a flat horizontal line is no longer a natural motion - you need to fight what I suspect is a mechanical error of some kind. Unfortunately, I've already exchanged this mouse once and tested both on different Windows 7 and Mac OS machines - the problem continues to occur. So is there a software solution for me? I'm incredibly surprised there is no simple way to adjust the orientation... How can every mouse manufacturer possibly adjust their hardware to track to everyone's tastes? What about those who need to flip orientation a full 90 or 180 degrees? I only need to adjust mine a few degrees, but I'm sure that need has arisen as well. Anyway, I'm running the latest SetPoint drivers (6.00) on Windows 7 and there are no orientation options available. I've checked out uberOptions (http://uberoptions.net/) and the M705 isn't supported yet (with the last version update over 6 months ago). MAF Mouse (http://www.maf-soft.de/mafmouse/) instructions are a very strange series of mouse clicks to activate? This app also seems a little overkill and costs $$ (which I'm willing to pay as a last resort). Is there no universal registry value for mouse orientation? How about for SetPoint drivers specifically? I've done a simple search in regedit without any luck. An XML file somewhere? Anything?? Thanks a million for any help - it's driving me nuts!

    Read the article

  • What jquery book you would recommend for a beginner?

    - by Pandiya Chendur
    I googled for some books on jquery and i got these Jquery Books from learningjquery.com and some video series from net.tutsplus.com and certainly some tutorials from Learningjquery.com for beginner... But still a good book would do a lot in my learing... Any books that you would recommend for beginner in jquery to have a crack at it?

    Read the article

  • Is there a Designer for MFC in Visual Studio like for windows forms in .NET?

    - by claws
    I'm a .NET programmer. I've never developed anything in MFC. Currently I had to write a C++ application (console) for some image processing task. I finished writing it. But the point is I need to design GUI also for this. Well, there won't be anything complex. Just a window with few Buttons, RadioButtons, Check Boxes, PicturesBox & few sliders. thats it. I'm using VS 2008 and was expecting a .NET style form designer. Just to test, I created a MFC project (with all default configuration) and these files were created by default: ChildFrm.cpp MainFrm.cpp mfc.cpp mfcDoc.cpp mfcView.cpp stdafx.cpp Now, I'm unable to find a Designer. There is no View Designer. I've opened all the above *.cpp and in the code editor right clicked to see "Designer View". ToolBox is just empty because I'm in code editor mode. When I built the project. This is the window I get. How to open a designer?

    Read the article

  • Access to Perl's empty angle "<>" operator from an actual filehandle?

    - by Ryan Thompson
    I like to use the nifty perl feature where reading from the empty angle operator <> magically gives your program UNIX filter semantics, but I'd like to be able to access this feature through an actual filehandle (or IO::Handle object, or similar), so that I can do things like pass it into subroutines and such. Is there any way to do this? This question is particularly hard to google, because searching for "angle operator" and "filehandle" just tells me how to read from filehandles using the angle operator.

    Read the article

  • SQL Server Query Question

    - by Lp1
    Running SQL Server 2008, and I am definitely a new SQL user. I have a table that has 4 columns: EmpNum, User, Action, Updatetime A user logs into, and out of a system, it is registered in the database. For example, if user1 logs into the system, then out 5 minutes later, a simple query (select * from update) would look like: EmpNum User Action Updatetime 1 User1 I 2010-01-01 23:00:00:000 1 User1 O 2010-01-01 23:05:00:000 I'm trying to query the Empnum, User, Action, I(in time), O(out time), and the total time.

    Read the article

  • autoresizingMask changes the size of the UILabel being drawn, just by being set

    - by Kojiro
    I have some custom UITableViewCells that are made programmatically as needed, I want these to resize. However, when I add autoresizingMasks to the UILabels in the cells, they all seem to stretch wider while anchoring to the left side. // This works fine UILabel *aField = [[UILabel alloc] initWithFrame:CGRectMake(60, 2, tableView.frame.size.width - 83, 21)]; UILabel *bField = [[UILabel alloc] initWithFrame:CGRectMake(60, 20, tableView.frame.size.width - 154, 21)]; UILabel *cField = [[UILabel alloc] initWithFrame:CGRectMake(0, 2, tableView.frame.size.width, 21)]; UILabel *dField = [[UILabel alloc] initWithFrame:CGRectMake(tableView.frame.size.width - 116, 11, 93, 21)]; UILabel *eField = [[UILabel alloc] initWithFrame:CGRectMake(tableView.frame.size.width - 116, 11, 93, 21)]; // But when I add this, it draws like the tableview is actually much wider than it really is aField.autoresizingMask = UIViewAutoresizingFlexibleWidth; bField.autoresizingMask = carrierField.autoresizingMask; cField.autoresizingMask = UIViewAutoresizingFlexibleWidth; dField.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; eField.autoresizingMask = priceField.autoresizingMask; So when the bottom section of code doesn't exist, everything works as expected, but when it does, a lot of the labels start falling off the right side or being stretched to where their centers are far to the right. Am I overlooking something simple?

    Read the article

  • What's the best webserver software for video?

    - by sopppas
    Hi, we have a collection of FLV files, to be displayed by FlowPlayer flash-app in a website. The scripts and handling of data are done with Apache/MySQL/PHP. As the video files are static files they should be served by a more static oriented webserver like lighttpd or nginx, like it's done with photos. What's the best webserver for serving video? A static files oriented webserver should be good? thanks in advance regards, rui

    Read the article

  • UIModalPresentationFormSheet and MPMoviePlayer on iPhone/iPad OS 3.2?

    - by user325699
    I have a UIModalPresentationFormSheet which has a movie player inside of it. When the user hits the button to play it in full screen, my UIModalPresentationFormSheet is still there ontop of the video while it's playing in full screen, behind the window and behind the shadow. What do I need to do to get rid of the dim so the video is playing in fullscreen with being able to select buttons and not having an annoying dim ontop of it?

    Read the article

  • Password Manager that allows syncing accross platforms

    - by lexu
    I use OS X, Linux, Solaris and windows for work and from home. There are good tools that allow me to manage the many logins/passwords required platform independently. But mostly they expect me to carry a thumb-drive around or require direct access to a central location (a sky drive in the cloud). The thumb-drive is too easily lost (= synchronized backup needed), the central location not always reachable/ mountable. Besides company policy rightly prevents this often. Is there a tool that allows me to add passwords locally and then syncs it's DB with the "mother-ship" later. Or is there another approach that you use, that solves my problem? EDIT My question is more about "synchronize" than cross platform. I've evaluated (=read feature list) some good cross platform tools, but need one that does the synchronizing for me. By synchronize I mean "merge two versions" not "replace (hopefully) old file with new." I'm not sure I'm always disciplined/awake enough to prevent data loss. UPDATE Lifehacker just posted that AgileSolutions now have a beta version of 1Password for Windows.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >