Search Results

Search found 8471 results on 339 pages for 'bad boy'.

Page 25/339 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • [PHP] DOMDocument load on a page returning 400 Bad Request status

    - by PeteWilliams
    Hiya, I'm trying to use the Last.fm API for an application I'm creating, but am having some problems with validation. If an API request gives an error it returns a code and message in the response XML like this: <lfm status="failed"> <error code="6">No user with that name</error> </lfm> However, the request also returns an HTTP status of 400 (or in some cases 403) which DOMDocument considers an error and so then refuses to parse the XML. Is there any way round this, so that I can retrieve the error code and message? Thanks Pete

    Read the article

  • Abstract Factory Using Generics: Is Explicitly Converting a Specified Type to Generic a Bad Practice

    - by Merritt
    The question's title says it all. I like how it fits into the rest of my code, but does it smell? public interface IFoo<T> { T Bar { get; set; } } public class StringFoo : IFoo<string> { public string Bar { get; set; } } public static class FooFactory { public static IFoo<T> CreateFoo<T>() { if (typeof(T) == typeof(string)) { return new StringFoo() as IFoo<T>; } throw new NotImplementedException(); } } UPDATE: this is sort of a duplicate of Is the StaticFactory in codecampserver a well known pattern?

    Read the article

  • Blackberry JDE generating bad .jad file (does not match compiled .cod file)

    - by matkas
    I Have a BB application that gets compiled into 3 siblings cod file. ( actualy one cod fil contaning 3 sub cod files). app.cod |--app.cod |--app-1.cod |--app-2.cod which is normal. the jad refers to those 3 inner .cod files. Now I have add some feature to my app, it is getting a little bit bigger. the jad now refers to 4 inner .cod files. but there is still 3 inside the app.cod that is generated. so I now still have app.cod |--app.cod |--app-1.cod |--app-2.cod but with the jad refering to app.cod app-1.cod app-2.cod AND app-3.cod. what is wrong the my compiled program? is it a bug from the JDE? I am using JDE 4.5.

    Read the article

  • Bad temperature sensors on Foxconn motherboard?

    - by Gawain
    I have a system with a Foxconn V400 series motherboard and AMD Athlon 3000+ processor. Ever since I got it a few years ago the fans (particularly the CPU fan) have been really loud. So recently I installed SpeedFan to see why they were running so fast. SpeedFan reported the CPU temperature to be 32C, and one motherboard sensor at about 26C. But the other two motherboard sensors were reporting 78C and 64C respectively. Naturally the fans were both maxed out because of this, with the CPU fan at 5800rpm and the case fan at 2400rpm. I opened the case and everything inside was literally cool to the touch, with the exception of the CPU heatsink which was slightly warm, but nowhere near 78C. It seems like the temperature sensors are either defective or being read incorrectly. Is there some way I can decrease my fan noise without risking damage to my processor? Some way to ignore those two temp sensors? Any help would be greatly appreciated.

    Read the article

  • EXC_BAD_ACCESS on startAsynchronous request using ASIFormDataRequest

    - by user280556
    I am getting EXC_BAD_ACCESS on the Line: [asiUsernameRequest startAsynchronous]; in this code. Spent hours trying to figure it out, but no solution. Any idea? NSString *usernameValue = (NSString*)usernameField.text; NSLog(@"username selected: %@", usernameValue); NSURL *url = [NSURL URLWithString:@"http://www.mywebsite.com/api/usernameCheck"]; //ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; asiUsernameRequest = [[[ASIFormDataRequest alloc] initWithURL:url] retain]; [asiUsernameRequest setPostValue:usernameValue forKey:@"username"]; NSArray *objects = [NSArray arrayWithObjects:@"usernameCheck", nil]; NSArray *keys = [NSArray arrayWithObjects:@"action", nil]; asiUsernameRequest.userInfo = [NSDictionary dictionaryWithObjects:objects forKeys:keys]; [asiUsernameRequest setDelegate:self]; [asiUsernameRequest startAsynchronous];

    Read the article

  • TFS2010: Single Server Deployment wizard, Bad sharepoint URLs

    - by josecortesp
    Hello Everyone I just installed TFS2010, and set it up with the single server wizard. It installed me Sharepoint Services an let everything working pretty well. But, the sharepoint URLs it generates from the Server name "server". As my setup is without a domain, the URLs work okay only from the server computer, not from the others. I have to give access to LAN clients, and Internet Clients, both connected thought my Public Ip. How can I change those sharepoint IPs from TFS to be generated From the IP, not from the Server's name?? Thanks in advance

    Read the article

  • IntelliJ bad plugin how to start

    - by Shawn
    Hi I have just started using IntelliJ again and have version 9. I just installed the Mecurial plugin and now the ide won't start anymore. Has an error of Fatal error initializing class com.intellij.openapi.actionSystem.ActionManager: java.lang.VerifyError: class com.dcx.hg.MercurialVcs overrides final method getName.()Ljava/lang/String; I now know that I should be using the plugin hg4idea Is there a way I can remove this plugin so I can start the ide, I am sure there must be.. Thanks in advance.

    Read the article

  • NOOB Memory Problem - EXC_BAD_ACCESS

    - by Michael Bordelon
    I have been banging my head against the wall for a couple days and need some help. I have a feeling that I am doing something really silly here, but I cannot find the issue. This is the controller for a table view. I put the SQL in line to simplify it as part of the troubleshooting of this error. Normally, it would be in an accessor method in a model class. It gets through the SQL read just fine. Finds the two objects, loads them into the todaysWorkout array and then builds the cells for the table view. The table view actually comes up on the scree and then it throws the EXC_BAD_ACCESS. I ran instruments and it shows the following: 0 CFString Malloc 1 00:03.765 0x3946470 176 Foundation -[NSPlaceholderString initWithFormat:locale:arguments:] 1 CFString Autorelease 00:03.765 0x3946470 0 Foundation NSRecordAllocationEvent 2 CFString CFRelease 0 00:03.767 0x3946470 0 Bring It -[WorkoutViewController viewDidLoad] 3 CFString Zombie -1 00:03.917 0x3946470 0 Foundation NSPopAutoreleasePool Here is the source code for the controller. I left it all in there just in case there is something extraneous causing the problem. I sincerely appreciate any help I can get: #import "WorkoutViewController.h" #import "MoveListViewController.h" #import "Profile.h" static sqlite3 *database = nil; @implementation WorkoutViewController @synthesize todaysWorkouts; @synthesize woNoteCell; @synthesize bi; //@synthesize woSwitchCell; - (void)viewDidLoad { [super viewDidLoad]; bi = [[BIUtility alloc] init]; todaysWorkouts = [[NSMutableArray alloc] init]; NSString *query; sqlite3_stmt *statement; //open the database if (sqlite3_open([[BIUtility getDBPath] UTF8String], &database) != SQLITE_OK) { sqlite3_close(database); NSAssert(0, @"Failed to opendatabase"); } query = [NSString stringWithFormat:@"SELECT IWORKOUT.WOINSTANCEID, IWORKOUT.WORKOUTID, CWORKOUTS.WORKOUTNAME FROM CWORKOUTS JOIN IWORKOUT ON IWORKOUT.WORKOUTID = CWORKOUTS.WORKOUTID AND DATE = '%@'", [BIUtility todayDateString]]; if (sqlite3_prepare_v2(database, [query UTF8String], -1, &statement, nil) == SQLITE_OK) { while (sqlite3_step(statement) == SQLITE_ROW) { Workout *wo = [[Workout alloc] init]; wo.woInstanceID = sqlite3_column_int(statement, 0); wo.workoutID = sqlite3_column_int(statement, 1); wo.workoutName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 2)]; [todaysWorkouts addObject:wo]; [wo release]; } sqlite3_finalize(statement); } if(database) sqlite3_close(database); [query release]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //todaysWorkouts = [BIUtility todaysScheduledWorkouts]; static NSString *noteCellIdentifier = @"NoteCellIdentifier"; UITableViewCell *cell; if (indexPath.section < ([todaysWorkouts count])) { cell = [tableView dequeueReusableCellWithIdentifier:@"OtherCell"]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier: @"OtherCell"] autorelease]; cell.accessoryType = UITableViewCellAccessoryNone; } if (indexPath.row == 0) { Workout *wo = [todaysWorkouts objectAtIndex:indexPath.section]; [cell.textLabel setText:wo.workoutName]; } else { [cell.textLabel setText:@"Completed?"]; [cell.textLabel setFont:[UIFont fontWithName:@"Arial" size:15]]; [cell.textLabel setTextColor:[UIColor blueColor]]; } } else { cell = (NoteCell *)[tableView dequeueReusableCellWithIdentifier:noteCellIdentifier]; if (cell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"NoteCell" owner:self options:nil]; cell = [nib objectAtIndex:0]; } } return cell; //[cell release]; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; if (indexPath.section < ([todaysWorkouts count]) && (row == 0)) { MoveListViewController *moveListController = [[MoveListViewController alloc] initWithStyle:UITableViewStylePlain]; moveListController.workoutID = [[todaysWorkouts objectAtIndex:indexPath.section] workoutID]; moveListController.workoutName = [[todaysWorkouts objectAtIndex:indexPath.section] workoutName]; moveListController.woInstanceID = [[todaysWorkouts objectAtIndex:indexPath.section] woInstanceID]; NSLog(@"Workout Selected: %@", [[todaysWorkouts objectAtIndex:indexPath.section] workoutName]); Bring_ItAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.workoutNavController pushViewController:moveListController animated:YES]; } else { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; if (indexPath.section < ([todaysWorkouts count]) && (row == 1)) { if (cell.accessoryType == UITableViewCellAccessoryNone) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } else { cell.accessoryType = UITableViewCellAccessoryNone; } } } [tableView deselectRowAtIndexPath:indexPath animated:YES]; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger h = 35; return h; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return ([todaysWorkouts count] + 1); //return ([todaysWorkouts count]); } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (section < ([todaysWorkouts count])) { return 2; } else { return 1; } } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { if (section < ([todaysWorkouts count])) { return @"Workout"; } else { return @"How Was Your Workout?"; } } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [todaysWorkouts release]; [bi release]; [super dealloc]; } @end

    Read the article

  • How should I compensate for a bad WSDL?

    - by Brabster
    I've come across several examples of SOAP-based web services where automated tooling fails to build a client that works. Investigating these examples leads me to believe that the WSDL the service uses to describe itself doesn't quite match the service that's being provided. Maybe a wrong type somewhere, a different data structure - something. I'm unsure what the most appropriate response is - if we assume that the obvious one (get the provider to fix their stuff) isn't available. Some options I can think of: Make a fixed WSDL? Hack the generated code? Any other options? No good options? What good experiences have people had? What works in a real environment? Thanks

    Read the article

  • cuda/thrust: Trying to sort_by_key 2.8GB of data in 6GB of gpu RAM throws bad_alloc

    - by Sven K
    I have just started using thrust and one of the biggest issues I have so far is that there seems to be no documentation as to how much memory operations require. So I am not sure why the code below is throwing bad_alloc when trying to sort (before the sorting I still have 50% of GPU memory available, and I have 70GB of RAM available on the CPU)--can anyone shed some light on this? #include <thrust/device_vector.h> #include <thrust/sort.h> #include <thrust/random.h> void initialize_data(thrust::device_vector<uint64_t>& data) { thrust::fill(data.begin(), data.end(), 10); } #define BUFFERS 3 int main(void) { size_t N = 120 * 1024 * 1024; char line[256]; try { std::cout << "device_vector" << std::endl; typedef thrust::device_vector<uint64_t> vec64_t; // Each buffer is 900MB vec64_t c[3] = {vec64_t(N), vec64_t(N), vec64_t(N)}; initialize_data(c[0]); initialize_data(c[1]); initialize_data(c[2]); std::cout << "initialize_data finished... Press enter"; std::cin.getline(line, 0); // nvidia-smi reports 48% memory usage at this point (2959MB of // 6143MB) std::cout << "sort_by_key col 0" << std::endl; // throws bad_alloc thrust::sort_by_key(c[0].begin(), c[0].end(), thrust::make_zip_iterator(thrust::make_tuple(c[1].begin(), c[2].begin()))); std::cout << "sort_by_key col 1" << std::endl; thrust::sort_by_key(c[1].begin(), c[1].end(), thrust::make_zip_iterator(thrust::make_tuple(c[0].begin(), c[2].begin()))); } catch(thrust::system_error &e) { std::cerr << "Error: " << e.what() << std::endl; exit(-1); } return 0; }

    Read the article

  • OpenGL Vertex Buffer Object code giving bad output.

    - by Matthew Mitchell
    Hello. My Vertex Buffer Object code is supposed to render textures nicely but instead the textures are being rendered oddly with some triangle shapes. What happens - http://godofgod.co.uk/my_files/wrong.png What is supposed to happen - http://godofgod.co.uk/my_files/right.png This function creates the VBO and sets the vertex and texture coordinate data: extern "C" GLuint create_box_vbo(GLdouble size[2]){ GLuint vbo; glGenBuffers(1,&vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo); GLsizeiptr data_size = 8*sizeof(GLdouble); GLdouble vertices[] = {0,0, 0,size[1], size[0],0, size[0],size[1]}; glBufferData(GL_ARRAY_BUFFER, data_size, vertices, GL_STATIC_DRAW); data_size = 8*sizeof(GLint); GLint textcoords[] = {0,0, 0,1, 1,0, 1,1}; glBufferData(GL_ARRAY_BUFFER, data_size, textcoords, GL_STATIC_DRAW); return vbo; } Here is some relavant code from another function which is supposed to draw the textures with the VBO. glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glColor4d(1,1,1,a/255); glBindTexture(GL_TEXTURE_2D, texture); glTranslated(offset[0],offset[1],0); glBindBuffer(GL_ARRAY_BUFFER, vbo); glVertexPointer(2, GL_DOUBLE, 0, 0); glEnableClientState(GL_VERTEX_ARRAY); glTexCoordPointer (2, GL_INT, 0, 0); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 1, 3); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, 0); I would have hoped for the code to use the first three coordinates (top-left,bottom-left,top-right) and the last three (bottom-left,top-right,bottom-right) to draw the triangles with the texture data correctly in the most efficient way. I don't see why triangles should make it more efficient but apparently that's the way to go. It, of-course, fails for some reason. I am asking what is broken but also am I going about it in the right way generally? Thank you.

    Read the article

  • iPhone: Accessing Composite Name in AddressBook Causes EXC_BAD_ACCESS

    - by Fyrian
    Hi everyone. I'm new to iPhone development and have a question I hope someone can help me with. I have a programmer working on an iPhone app for me and when I run the app in the simulator, it works great. But when I try to run it on my actual iPhone, I get a EXC_BAD_ACCESS error and the app locks up. Looking at the debugger, it's referencing the following code in my MainController as the problem: -(void)loadAddressBook{ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; addressBookLoaded=1; [AddressbookRecord readAllContactTable:[self getDBPath]]; ABAddressBookRef addressBook = ABAddressBookCreate(); for(NSUInteger i=1;i<=ABAddressBookGetPersonCount(addressBook);i++) { ABRecordRef myPerson =ABAddressBookGetPersonWithRecordID (addressBook,(ABRecordID)(i)); NSString *name = (NSString*)ABRecordCopyCompositeName(myPerson); //save in database AddressbookRecord *addObj = [[AddressbookRecord alloc] initWithPrimaryKey:0]; addObj.ClientName=name; [addObj addNewContactEntry]; } addressBookLoaded=2; [pool release]; } More specifically, it points to this specific line as the problem: NSString *name =(NSString*)ABRecordCopyCompositeName(myPerson); My programmer can't seem to figure out what the problem is since he can't replicate it on his end. Does anyone have any ideas what would cause this problem??? Thanks!

    Read the article

  • Repair bad character due to encoding problem

    - by remi bourgarel
    Hi all, Recently we had an encoding problem in our system : If we had the string "æ" in our db ,it became "æ" on our web pages. Now this problem is solved, but the problem is that now we have a lot of "æ" in our database : users didn't see and validate pre-filled form with these characters. I found that If you read in utf 8 C3A6 you'll get "æ", if you read it in ascii you'll get "æ". It's strange because if I execute "select convert(varbinary(40),N'æ'),convert(varbinary(40),'æ')" I don't have the same result... Do you have any idea on how I can fix my database (ie change all "æ" to "æ") ? thx

    Read the article

  • Flex Spark TitleWindow bad redraw on dragging

    - by praksant
    Hi, I have a problem with redrawing in flex 4. I have a spark titleWindow, and if i drag it faster, it looks like it's mask is one frame late after the component. it's easily visible with 1pixel thin border, because it becomes invisible even with slower movement. You can try it here (what is not my page, but it's easier to show you here than uploading example): http://flexponential.com/2010/01/10/resizable-titlewindow-in-flex-4/ If you move in direction up, you see disappearing top border. in another directions it's not that sensitive as it has wide shadow, and it's not very visible on shadow. On my computer i see it on every spark TitleWindow i have found on google, although it's much less visible with less contrast skins, without borders or with shadows. Do you see it there? i had never this problem with halo components. It's doing the same thing with different skins. I tried to delete masks from skin, cache component, skin even an application as bitmap with no success. I also turned on redraw regions in flash player, and it looks like it's one frame late after titlewindow too. Does anyone know why is it doing this or how can i prevent it? Thank you UPDATE: no answers? really?

    Read the article

  • I write bad wave files using Java

    - by Cliff
    I'm writing out wave files in Java using AudioInputStream output = new AudioInputStream(new ByteArrayInputStream(rawPCMSamples), new AudioFormat(22000,16,1,true,false), rawPCMSamples.length) AudioSystem.write(output, AudioFileFormat.Type.WAVE, new FileOutputStream('somefile.wav')) And I get what appears to be corrupt wave files on OSX. They won't play from Finder however using the same code behind a servlet writing directly to the response stream and setting the Content-Type to audio/wave seems to play fine in quicktime. What gives?

    Read the article

  • iPhone app throwing EXC_BAD_ACCESS with dictionary from contents of file

    - by Mark Szymanski
    I have the code NSArray *paths = [[NSArray alloc] initWithArray:NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)]; NSString *docsDirectory = [[NSString alloc] initWithString:[paths objectAtIndex:0]]; NSLog(@"This app's documents directory: %@",docsDirectory); NSString *docsDirectoryWithPlist = [[NSString alloc] initWithFormat:@"%@/Stuff.plist", docsDirectory]; BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:docsDirectoryWithPlist isDirectory:NO]; if (fileExists) { chdir([docsDirectory UTF8String]); NSMutableDictionary *readDict = [[NSMutableDictionary alloc] initWithContentsOfFile:@"Stuff.plist"]; in an application's applicationDidFinishLaunching method and whenever it gets to the last line it crashes, throwing EXC_BAD_ACCESS along the way. Thanks in advance!

    Read the article

  • Reverting after a merge, bad idea?

    - by Clean
    Hi, I'm a newcomer to subversion. Recently, I've done some development in two different branches, where one of the branches was a branch of the other branch. I've merged down some changes from the first branch down to the trunk. However, when trying to merge down changes from the other branch to trunk, everything went haywire. That is, I've had a lot of conflicts, some of which I resolved (but not commited) and some of which are not. What worse is, a lot of the changes I made to the branch were for some reason not merged into the trunk. Now, my only question is, can I just do a revert on my working copy to return the trunk into its previous state? That is, will I mess something up by doing this? My taught is to start all over again and do it more carefully "by hand". Thanx!

    Read the article

  • DateTime::Astro::Sunrise is giving bad values

    - by BozoJoe
    Using the example code included in the man page for DateTime::Astro::Sunrise I'm getting back ~14:00 for the sunrise and ~2:00 for the sunset. my machine's time and timezone are set correctly (AFAIK) Am I reading something wrong? 2am and 2pm are just so brutually wrong.

    Read the article

  • wamp server not working? or bad php code

    - by lclaud
    I have this PHP code: <?php $username="root"; $password="******";// censored out $database="bazadedate"; mysql_connect("127.0.0.1",$username,$password); // i get unknown constant localhost if used instead of the loopback ip @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM backup"; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; $raspuns=""; while ($i < $num) { $data=mysql_result($result,$i,"data"); $suma=mysql_result($result,$i,"suma"); $cv=mysql_result($result,$i,"cv"); $det=mysql_result($result,$i,"detaliu"); $raspuns = $raspuns."#".$data."#".$suma."#".$cv."#".$det."@"; $i++; } echo "<b> $raspuns </b>"; mysql_close(); ?> And it should return a single string containing all data from the table. But it says "connection reset when loading page". the log is : [Tue Jun 15 16:20:31 2010] [notice] Parent: child process exited with status 255 -- Restarting. [Tue Jun 15 16:20:31 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations [Tue Jun 15 16:20:31 2010] [notice] Server built: Dec 10 2008 00:10:06 [Tue Jun 15 16:20:31 2010] [notice] Parent: Created child process 2336 [Tue Jun 15 16:20:31 2010] [notice] Child 2336: Child process is running [Tue Jun 15 16:20:31 2010] [notice] Child 2336: Acquired the start mutex. [Tue Jun 15 16:20:31 2010] [notice] Child 2336: Starting 64 worker threads. [Tue Jun 15 16:20:31 2010] [notice] Child 2336: Starting thread to listen on port 80. [Tue Jun 15 16:20:35 2010] [notice] Parent: child process exited with status 255 -- Restarting. [Tue Jun 15 16:20:35 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations [Tue Jun 15 16:20:35 2010] [notice] Server built: Dec 10 2008 00:10:06 [Tue Jun 15 16:20:35 2010] [notice] Parent: Created child process 1928 [Tue Jun 15 16:20:35 2010] [notice] Child 1928: Child process is running [Tue Jun 15 16:20:35 2010] [notice] Child 1928: Acquired the start mutex. [Tue Jun 15 16:20:35 2010] [notice] Child 1928: Starting 64 worker threads. [Tue Jun 15 16:20:35 2010] [notice] Child 1928: Starting thread to listen on port 80. Any idea why it outputs nothing?

    Read the article

  • Random directions, with no repeat.. (Bad Description)

    - by Neurofluxation
    Hey there, So I'm knocking together a random pattern generation thing. My code so far: int permutes = 100; int y = 31; int x = 63; while (permutes > 0) { int rndTurn = random(1, 4); if (rndTurn == 1) { y = y - 1; } //go up if (rndTurn == 2) { y = y + 1; } //go down if (rndTurn == 3) { x = x - 1; } //go right if (rndTurn == 4) { x = x + 1; } //go left setP(x, y, 1); delay(250); } My question is, how would I go about getting the code to not go back on itself? e.g. The code says "Go Left" but the next loop through it says "Go Right", how can I stop this? NOTE: setP turns a specific pixel on. Cheers peoples!

    Read the article

  • Singleton array deallocated? EXC_BAD_ACCESS

    - by lclaud
    Ok, so I have this singleton object and in it is an array that needs to be shown in a tableview. The thing is that it deallocates and after the first show, i get EXC_BAD_ACCESS in cellForRowAtIndexPath - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [[dataBase shareddataBase].dateActive count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"celula"]; int i; i=indexPath.row; if (cell==nil) { cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"celula"]; } count sent to dealocated instance of CFArray .. in cellForRowAtIndexPath.. WHAT is deallocating it? why? it's declarea as an NSMutableArray and has a (nonatomic,retain) property defined .. if ((i<[[dataBase shareddataBase].dateActive count])&&(i>=0)) { NSDictionary *d=[[dataBase shareddataBase].dateActive objectAtIndex:i]; cell.textLabel.text=[d objectForKey:@"detaliu"]; } return cell; }

    Read the article

  • EXC_BAD_ACCESS when I change moviePlayer contentURL

    - by Bruno
    Hello, In few words, my application is doing that : 1) My main view (MovieListController) has some video thumbnails and when I tap on one, it displays the moviePlayer (MoviePlayerViewController) : MovieListController.h : @interface MoviePlayerViewController : UIViewController <UITableViewDelegate>{ UIView *viewForMovie; MPMoviePlayerController *player; } @property (nonatomic, retain) IBOutlet UIView *viewForMovie; @property (nonatomic, retain) MPMoviePlayerController *player; - (NSURL *)movieURL; @end MovieListController.m : MoviePlayerViewController *controllerTV = [[MoviePlayerViewController alloc] initWithNibName:@"MoviePlayerViewController" bundle:nil]; controllerTV.delegate = self; controllerTV.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController: controllerTV animated: YES]; [controllerTV release]; 2) In my moviePlayer, I initialize the video I want to play MoviePlayerViewController.m : @implementation MoviePlayerViewController @synthesize player; @synthesize viewForMovie; - (void)viewDidLoad { NSLog(@"start"); [super viewDidLoad]; self.player = [[MPMoviePlayerController alloc] init]; self.player.view.frame = self.viewForMovie.bounds; self.player.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [self.viewForMovie addSubview:player.view]; self.player.contentURL = [self movieURL]; } - (void)dealloc { NSLog(@"dealloc TV"); [player release]; [viewForMovie release]; [super dealloc]; } -(NSURL *)movieURL { NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"FR_Tribord_Surf camp_100204" ofType:@"mp4"]; if (moviePath) { return [NSURL fileURLWithPath:moviePath]; } else { return nil; } } - It's working good, my movie is display My problem : When I go back to my main view : - (void) returnToMap: (MoviePlayerViewController *) controller { [self dismissModalViewControllerAnimated: YES]; } And I tap in a thumbnail to display again the moviePlayer (MoviePlayerViewController), I get a *Program received signal: “EXC_BAD_ACCESS”.* In my debugger I saw that it's stopping on the thread "main" : // // main.m // MoviePlayer // // Created by Eric Freeman on 3/27/10. // Copyright Apple Inc 2010. All rights reserved. // #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); //EXC_BAD_ACCESS [pool release]; return retVal; } If I comment self.player.contentURL = [self movieURL]; it's working, but when I let it, iI have this problem. I read that it's due to null pointer or memory problem but I don't understand why it's working the first time and not the second time. I release my object in dealloc method. Thanks for your help ! Bruno.

    Read the article

  • Bad event on java panel

    - by LucaB
    Hi I have a java panel with 4 buttons. When I click on of these buttons, a new frame appears and the first is hidden with setVisibile(false). On that new window, I have another button, but when i click it, I got the event corresponding to the fourth button of the first window. Clicking the button again does the trick, but of course this is not acceptable. Am I missing something? I just show the frames with nameOfTheFrame.setVisible(true); and I have MouseListeners on every button. The code of the last button is simply: System.exit(0); EDIT Sample code: private void btn_joinGamePressed(java.awt.event.MouseEvent evt) { GraphicsTools.getInstance().getCreateGame().setVisible(false); GraphicsTools.getInstance().getMainPanel().setVisible(false); GraphicsTools.getInstance().getRegistration().setVisible(true); } GraphicsTools is a Singleton.

    Read the article

  • Is it bad to have multiple return statements?

    - by scot
    Hi, I have a code somethg like below: int method(string a ,int b , int c){ if(cond1) return -1; if(cond2 || cond3) return 3; if(cond1 && cond2) return 0; else return -999; } Does it perform badly when compared to having multiple if else and have single return?

    Read the article

  • iframe for ad loading good or bad?

    - by Cedar Jensen
    According to Yahoo's "Best Practices for Speeding Up your Site", the pros for using iframes: Helps with slow third-party content like badges and ads Download scripts in parallel but the cons are: Costly even if blank Blocks page onload I want to use an iframe to load ads using the technique mentioned on this site: http://meanderingpassage.com/2007/08/15/keeping-javascript-widgets-from-controlling-your-blog/ Does using this technique mean that as soon as the html contents requested by the iframe are returned to the client, it will load the ad script, potentially blocking the rest of the page's rendering and downloading? Or will the iframe request get processed concurrently while rest of the document is downloaded and rendered?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >