Search Results

Search found 2312 results on 93 pages for 'whats your favourite'.

Page 54/93 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • which is best algorithm?

    - by Lopa
    Consider two algorithms A and B which solve the same problem, and have time complexities (in terms of the number of elementary operations they perform) given respectively by a(n) = 9n+6 b(n) = 2(n^2)+1 (i) Which algorithm is the best asymptotically? (ii) Which is the best for small input sizes n, and for what values of n is this the case? (You may assume where necessary that n0.) i think its 9n+6. guys could you please help me with whether its right or wrong?? and whats the answer for part b. what exactly do they want?

    Read the article

  • New line and returns ignored in setMessageBody

    - by Magic Bullet Dave
    Am I doing something dumb? I can pre-fill and email ok but the "\r\n" is ignored in the emailBody: - (void) sendEventInEmail { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; NSString *emailSubject = [eventDictionary objectForKey:EVENT_NAME_KEY]; [picker setSubject:emailSubject]; // Fill out the email body text NSString *iTunesLink = @"http://itunes.apple.com/gb/app/whats-on-reading/id347859140?mt=8"; // Link to iTune App link NSString *content = [eventDictionary objectForKey:@"Description"]; NSString *emailBody = [NSString stringWithFormat:@"%@\r\nSent using <a href = '%@'>What's On Reading</a> for the iPhone.", content, iTunesLink]; [picker setMessageBody:emailBody isHTML:YES]; picker.navigationBar.barStyle = UIBarStyleBlack; [self presentModalViewController:picker animated:YES]; [picker release]; } Regards Dave

    Read the article

  • IE9 syntax on jquery crossbrowser with jsonp and FF, Chrome

    - by Andrew Walker
    I have the following code and i have a problem in ensuring part of it is used when a IE browser is used, and remove it when any other browser is used: $.ajax({ url: 'http://mapit.mysociety.org/areas/'+ulo, type: 'GET', cache: false, crossDomain: true, dataType: 'jsonp', success: function(response) { This works fine in IE9 because I have put the dataType as jsonp. But this will not work on Chrome or FF. So I need to remove the dataType. I tried this: <!--[IF IE]> dataType: 'jsonp', <![endif]--> But it did not work. It's worth noting, it does not need the dataType set when in FF or Chrome as it's json. Whats the correct syntax to have this work ? Thanks Andrew

    Read the article

  • C# WebClient only downloads partial html

    - by H4mm3rHead
    Hi, I am working on some scraping app, i wanted to try to get it to work but ran into a problem. I have replaced the original scraping destination in the below code with googles webpage, just for testing. It seems that my download doesnt get everything, i note that the body and the html tags are missing their close tags. How do i get it to download everything? Whats wrong with my sample code: string filename = "test.html"; WebClient client = new WebClient(); string searchTerm = HttpUtility.UrlEncode(textBox2.Text); client.QueryString.Add("q", searchTerm); client.QueryString.Add("hl", "en"); string data = client.DownloadString("http://www.google.com/search"); StreamWriter writer = new StreamWriter(filename, false, Encoding.Unicode); writer.Write(data); writer.Flush(); writer.Close();

    Read the article

  • UIScrollView on iPad isnt working

    - by Magician Software
    Hi There, can anyone tell me what I am doing wrong. I am trying to load a UIScrollView in a UIView. I am using IB to load the items and what not. the come I am using in the ViewController isnt working. :( I have it under the ViewDidLoad - (void)viewDidLoad { [scrollView setScrollEnabled:YES]; [scrollView setContentSize:CGSizeMake(768, 1300)]; } Whats wrong with it. It builds fine. While I am asking, how do you set the scroll view to strech when the iPad is rotated? Thanks for your help

    Read the article

  • GnuPG + Webservice + ASP.NET

    - by Karol Bladek
    Hi! I'm exhausted. I have installed GnuPG and exported secret key, and two public keys (my own and one of my client) from another instance of GnuPG. I try to configure 'my encrypting/decrypting' method on the local machine. When I run encrypting method from a little console application it works good. When I run this (same! - with the same body) method from my webservice on my local machine ... I have an ExitCode = 2. Happy in fact of catching the error message, but unhappy with their body. "gpg: no default secret key: secret key not available gpg: XXXXXXXXXXXXXXXX.xml: sign+encrypt failed: secret key not available" What should I do? Whats wrong? Best regards, Karol Bladek

    Read the article

  • Help with C++ Boost::regex

    - by Youssef
    Hello everybody, I'm trying to get all words inside a string using Boost::regex in C++. Here's my input : "Hello there | network - bla bla hoho" using this code : regex rgx("[a-z]+",boost::regex::perl|boost::regex::icase); regex_search(input, result, rgx); for(unsigned int j=0; j I only get the first word "Hello".. whats wrong with my code ? result.size() returns 1. thank you.

    Read the article

  • Failed to resolve include text for file:SQLServer.ttinclude

    - by bigred
    I updated to the version 3.0.0.3. Dragged the new ActiveRecord directory in VS08, and added the newer dll. I'm not sure whats going on yet. When I try to compile the project I get that error. My SVN server just lost my old version, so I'll have to download the older Subsonic version and see if that fixes the problem. I have no clue what I did wrong in the configuration as I updated to 3.0.0.3. (still a new users so I couldn't post a photo, but here a link to the error) link text

    Read the article

  • c# Xml ADD A XML NODE AS A CHILD TO A PARTICULAR OTHER NODE

    - by kacalapy
    i have an xml doc with a structure like this: below is supposed to be XML but i dont know how to format it so it will show correct so i used [ ] instead of the typical < [Book] [Title title="Door Three"/] [Author name ="Patrick"/] [/Book] [Book] [Title title="Light"/] [Author name ="Roger"/] [/Book] i want to be able to PROGRAMMATICALY add xml nodes to this xml in a particular place. lets say i wanted to add a Link node as a child to the author node where the name is Roger (or whatever dynamic value is passed in here). i think its best if the function containing this logic is passed a param for the name to add an xml node under, please advise and whats the code i need to add xml nodes to a certain place in the xml? now i am using .AppendChild() method but it doesn't allow for me to specify a parent node to add under... thanks all.

    Read the article

  • php random array

    - by user295189
    I am trying to get a random array like this srand((float) microtime() * 10000000); $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand($input, 2); echo $input[$rand_keys[0]] . "\n"; echo $input[$rand_keys[1]] . "\n"; it shows 2 numbers randomly if I have $rand_keys = array_rand($input, 2);$rand_keys = array_rand($input, 5); but since I want all 5 to show it doesnt work. whats causing that. I need to use array_rand. thanks

    Read the article

  • PhysX for massive performance via GPU ?

    - by devdude
    I recently compared some of the physics engine out there for simulation and game development. Some are free, some are opensource, some are commercial (1 is even very commercial $$$$). Havok, Ode, Newton (aka oxNewton), Bullet, PhysX and "raw" build-in physics in some 3D engines. At some stage I came to conclusion or question: Why should I use anything but NVidia PhysX if I can make use of its amazing performance (if I need it) due to GPU processing ? With future NVidia cards I can expect further improvement independent of the regular CPU generation steps. The SDK is free and it is available for Linux as well. Of course it is a bit of vendor lock-in and it is not opensource. Whats your view or experience ? If you would start right now with development, would you agree with the above ? cheers

    Read the article

  • ERD Design help meeded

    - by Mobi
    Hello guyz, I am new to ERD and stuff.Earlier i was drawing an erd that issued me some problems. the name of two entities in focus is "Bus" and "Passenger".What shall be the relationship between them. I think it should be many to many since one passenger can travel in many buses and a bus can give ride to many passengers.But one of my friend insisted that its a one-to-many relationship(A bus can have many passengers but a passenger can travel in only one bus).Plz let me know what's right. Also , whats the relationship between a class,students. Any help is appreciated.

    Read the article

  • How does .NET determine the week in a TimeZoneInfo.TransitionTime ?

    - by Travis Brooks
    Greetings I'm trying to do some DateTime math for various time zones and I wanted to take daylight savings into account. Lets say I have a TimeZoneInfo and i've determined the appropriate AdjustmentRule for a given DateTime. Lets also say the particular TimeZoneInfo i'm dealing with is specified as rule.DaylightTransitionStart.IsFixedDateRule == false, so I need to figure out if the given DateTime falls within the start/end TransitionTime.Week values. This is where I'm getting confused, what is .NET considering as a "week"? My first thought was it probably used something like DayOfWeek thisMarksWeekBoundaries = Thread.CurrentThread.CurrentUICulture.DateTimeFormat.FirstDayOfWeek; and went through the calendar assigning days to week, incrementing week every time it crossed a boundary. But, if I do this for May 2010 there are 6 week boundary buckets, and the max valid value for TransitionTime.Week is 5 so this can't be right. Whats the right way to slice up May 2010?

    Read the article

  • Replace text in folder names

    - by dannyb
    How can I replace the same text in folder names in linux? Say I have "Photos_Jun", "Photos_July", "Photos_Aug", etc. whats the simplest way I can rename them like "Photos Jun", "Photos July", etc (basically I want to replace the underscore with a space " ". I have about 200 of these folders. I was looking at solution: http://stackoverflow.com/questions/1836563/how-can-i-easily-bulk-rename-files-with-perl It looks like what im looking for however, I dont know how to make a regular expression to match folders that are alphanumeric followed by a "_". All files have non-numeric names, so I think [a-zA-Z] is the right way to start. perl -e 'foreach $f (glob("File\\ Name*")) { $nf = $f; $nf =~ s/(\d+)$/sprintf("%03d",$1)/e; print `mv \"$f\" \"$nf\"`;}' Thanks for any help!

    Read the article

  • How do I render 3d model into directshow virtual camera output

    - by Mr Bell
    I want to provide a virtual webcam via DirectShow that will use the video feed from an existing camera running some tracking software against it to find the users face and then overlay a 3d model oriented just that it appears to move the users face. I am using a third party api to do the face tracking and thats working great. I get position and rotation data from that api. My question is whats the best way to render the 3d model and get into the video feed and out to direct show? I am using c++ on windows xp.

    Read the article

  • Visual Studio Code Metrics and the Maintainability index of switch case

    - by pee2002
    Hi there! As a person who loves to follow the best practices, If i run code metrics (right click on project name in solution explorer and select "Calculate Code Metrics" - Visual Studio 2010) on: public static string GetFormFactor(int number) { string formFactor = string.Empty; switch (number) { case 1: formFactor = "Other"; break; case 2: formFactor = "SIP"; break; case 3: formFactor = "DIP"; break; case 4: formFactor = "ZIP"; break; case 5: formFactor = "SOJ"; break; } return formFactor; } It Gives me a Maintainability index of 61 (of course this is insignificant if you have only this, but if you use an utility like class whos philosophy is doing stuff like that, your utility class will have the maintainability index much worst..) Whats the solution for this?

    Read the article

  • BLOB Reading via IHttpAsyncHandler

    - by shaniirfan
    Hi, I am storing images in SQL Server 2000 database (BLOB type). There is a web page in my ASP.NET application which need to show a lot images to the end user and i want to handle browser's requests for images through a IHttpAsyncHandler. I found a similer post on codeproject "Asynchronous HTTP Handler for Asynchronous BLOB DataReader." But for some reasons, page get freeze upon completion of "BeginProcessRequest" method and "EndProcessRequest" method never get call. Can anyone look at this post and let me know whats wrong in that post? OR what i need to do to complete this task (BLOB Reading via IHttpAsyncHandler)?

    Read the article

  • constructor in Perl with an array(OOPS)

    - by superstar
    whats the difference between these two 'new' constructors in perl? 1) sub new { my $class = shift; my $self = {}; $self->{firstName} = undef; $self->{lastName} = undef; $self->{PEERS} = []; bless ($self, $class); return $self; } 2) sub new { my $class = shift; my $self = { _firstName => shift, _lastName => shift, _ssn => shift, }; bless $self, $class; return $self; } I am using the 2nd one so far, but i need to implement the arrays in perl? can you suggest a way to do it with the 2nd 'new' constructor

    Read the article

  • Outputing struct to NSLog for debugging?

    - by fuzzygoat
    I am just curious, is there a way to print via NSLog the contents of a struct? id <MKAnnotation> mp = [annotationView annotation]; MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance([mp coordinate], 350, 350); I am trying to output whats in [mp coordinate] for debugging. . EDIT_001: I cracked it, well unless there is another way. id <MKAnnotation> mp = [annotationView annotation]; CLLocationCoordinate2D location = [mp coordinate]; NSLog(@"LAT: %f LON: %f", location.latitude, location.longitude); many thanks gary

    Read the article

  • Ellipse Drawing WPF Animation

    - by widmayer
    I am developing a control that is a rectangle area and will draw an ellipse in the rectangle area when a trigger occurs. This control will be able to host other controls like, textbox's, buttons, etc. so the circle will be drawn around them when triggered. I want the circle being drawn as an animation like you were circling the inner controls with a pen. My question is whats the best way to accomplish this. I've been doing some research and I could use WPF animation or I could use GDI+ to accomplish the tasks. I am new to WPF animation so that is why I am asking the question.

    Read the article

  • Php code not executing - dies out when trying to create an object of class - no error displayed

    - by Ali
    I'm having some problems with this piece of code. I've included a class declaration and trying to create an object of that class but my code dies out. It doesn't seem to be an include issue as all the files are being included even the files called for inclusion within the class file itself. However the object is not created - I tried to put an echo statement in the __construct function but nothing it just doesn't run infact doesn't create the object and the code won't continue from there - plus no error is reported or displayed and I have error reporting set to E_ALL and display errors set to true WHats happening here :(

    Read the article

  • Caching videos but of 0 Size

    - by Ahsan
    Hi everyone, i have recently install cachevideos on linux with squid, its working but when it caches the video the video is just of 0 bytes in size, in the videocache.log file something like this appears 2011-02-08 19:46:37,235 INFO 192.168.1.5 - REQUEST - http://www.youtube.com/get_video?tmi=1&noflv=1&video_id=HfgZnBaHbt8&t=vjVQa1PpcFN0gQqMeI0xmahi0fFgDO5n59r4VrXgQmM=&el=detailpage&asv=3&fmt=34 2011-02-08 19:46:38,529 INFO 192.168.1.5 HfgZnBaHbt8 DOWNLOAD YOUTUBE 0 Video was downloaded and cached. on my localhost/videocache/youtube , i can see the file but its of 0 bytes and when i access the file from browser , in the videocache directory it tells me that video has been served from cache, but how come i can be assure that a 0 byte video is cached! Whats the problem please help me i am atlost!! the help at cachevideo.com is not working because their security captcha cant be displayed and thus i am unable to contact anywhere!! Please help me out!!

    Read the article

  • Ideas on collaborating with small number of people

    - by Mark Szymanski
    Hi, I am collaborating with someone on a project and currently use Skype for collaboration. I like it because we can be on a call to say things that are hard to say by typing out. We can share our screens so we can help with code writing. And we can use the text chat to copy-paste code between each other. We also use Subversion for version control. I just wanted to know what other people used for collaborating with others so I could see whats out there to use. Thanks!

    Read the article

  • jQuery plug-in with additional methods.

    - by Kieron
    I've a jQuery plug-in that operates on some ULs, adding and removing classes etc. During the life-cycle of the page, I'll need to add/ remove some classes in code, and as my plug-in needs to perform some additional operations when this happens I came up with the following: // This is the initialiser method... $.fn.objectBuilder = function (options) {...}; // These are the two new methods I need. $.fn.objectBuilder.setSelected(element) {...}; $.fn.objectBuilder.removeSelected() {...}; I'd then like to call them like this: $("#ob1").objectbuilder.removeSelected(); Any thoughts? Thanks, Kieron edit I suppose what I'm asking is, whats the best way of adding additional methods to a jQuery plug-in where it'll have access to the root object, in this case #obj when the method is called.

    Read the article

  • drawRect context Error

    - by user361228
    Hi, I heard that a lot of people get a context error by not using drawRect Now I have this: - (void)drawRect:(CGRect)rect { NSLog(@"drawRect: Starts"); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0); CGContextSetLineWidth(context, 3.0); CGContextMoveToPoint(context, lineStart.x, lineStart.y); CGContextAddLineToPoint(context, lineEnd.x, lineEnd.y); CGContextStrokePath(context); } Error: <Error>: CGContextSetRGBStrokeColor: invalid context Which had work on previous programs, but not on this one. Whats different: I have a view controller, which calls this UIView: -(void)createLine:(CGPoint)start:(CGPoint)end { NSLog(@"createLine: Starts"); lineEnd = start; lineStart = end; self = [super initWithFrame:drawRect:CGRectMake(fmin(lineStart.x, lineEnd.x), fmin(lineStart.y, lineEnd.y), fabs(lineStart.x - lineEnd.x), fabs(lineStart.y - lineEnd.y))]; } This is my first question, and I am not sure how much info code I should be putting here so be easy on me :D Thanks

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >