Search Results

Search found 108 results on 5 pages for 'ethan leroy'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • it takes 2 seconds to compile a hello world C++ project in netbeans (windows)

    - by Ethan
    I used code:blocks as the C++ IDE on Windows. I switched to netbeans 6.8 (with C/C++ plugin, MinGW, MSYS) recently, because netbeas have the nice feature of "checking syntax errors when typing" (same as working on Java or PHP projects). But the painful thing is that, it takes 2 seconds to compile a simple hello world project in netbeans. Any trick to make it as fast as code:blocks, or at least make the compiling time no more than 0.5 second?

    Read the article

  • Surprising IPhone leak

    - by Ethan
    Hey guys, So I'm running instruments on my app, and getting a leak that I could have sworn I was doing right. + (NSMutableArray *)decode:(NSDictionary *)encoded_faculty_array { NSArray *faculty_id_data = [encoded_faculty_array objectForKey:@"faculty_id"]; NSArray *faculty_first_name = [encoded_faculty_array objectForKey:@"first_name"]; NSArray *faculty_last_name = [encoded_faculty_array objectForKey:@"last_name"]; NSMutableArray* faculty_array = [[NSMutableArray alloc] init]; for(int a = 0; a < [faculty_id_data count]; a++) { Faculty *new_fac = [[Faculty alloc] initWithFacultyId:[Dearray clean:[faculty_id_data objectAtIndex:a] withDefault:@"0"] andFirstName:[Dearray clean:[faculty_first_name objectAtIndex:a] withDefault:@"Name not found"] andLastName:[Dearray clean:[faculty_last_name objectAtIndex:a] withDefault:@" "] andBio:nil andDegrees:nil andTitle:nil]; [faculty_array addObject:new_fac]; [new_fac release]; } [faculty_array autorelease]; return faculty_array; } It's reporting a leak on new_fac. I released it immediately after I called it though. Any idea what could be causing that problem? Thanks.

    Read the article

  • Firefox and Chrome do not support cross-domian ajax by default?

    - by Ethan
    The following code works as expected in IE8 and Safari4, but not work in Firefox3.6 and Chrome. All browsers are on Windows. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <script type="text/javascript"> $(function() { $('#tabs').tabs(); }); </script> </head> <body> <div id="tabs"> <ul> <li><a href="http://www.google.com/">Google</a></li> <li><a href="http://www.msn.com/">MSN</a></li> </ul> </div> </body> </html> Seems that Firefox and Chrome do not support cross-domian ajax by default, right? Is there any easy way to turn on cross-domian ajax in Firefox and Chrome?

    Read the article

  • How can I kill MySQL queries every 60 seconds in Windows?

    - by Ethan Allen
    I want to check my MySQL server every minute and kill queries that have run longer than 150 seconds. The main reason I want to do this is because I don't want queries from certain people to lock up the DB for everyone else. I know this is not the ultimate solution to the problem, but at least it's a fallback in case something goes wrong with a query. I don't have a slave DB (this is just an at-home project). I'd like to schedule a script to run that does this for me. I'm unfamiliar with Perl or Ruby and I need it done on my Windows 2008 Server box. I've looked into creating a simple cmd line script, but that doesn't seem to be possible. I know currently I can do something like this but I have to do it manually: mysqladmin processlist mysqladmin kill Anyone have any ideas or examples on how I could do this?

    Read the article

  • case-insensitive matching in xpath?

    - by Ethan
    For example, for the xml below <CATALOG> <CD title="Empire Burlesque"/> <CD title="empire burlesque"/> <CD title="EMPIRE BURLESQUE"/> <CD title="EmPiRe BuRLeSQuE"/> <CD title="Others"/> <CATALOG> How to match the first 4 records with xpath like //CD[@title='empire burlesque']. Is there xpath function to do this? Other solutions like PHP function are also accepted.

    Read the article

  • Is there a jquery plugin for table paginnation and sorting support via ajax call?

    - by Ethan
    I am looking for a jquery plugin for table paginnation and sorting (and search/filtering hopefully). Datasource could be obtained locally or via ajax call. Hopefully comes with most of the features of this script: http://www.leigeber.com/2009/11/advanced-javascript-table-sorter/ Here is the demo of this script: http://sandbox.leigeber.com/tinytablev3/index.html The problem with this script is that it only support local datasource.

    Read the article

  • Sinatra Routing Exceptions

    - by Ethan Turkeltaub
    I want to be able to do the following: get '/:slug' do haml :page end get '/administration' do haml :admin end Is there a way that I can have get '/:slug' do have an exception for /administration? I realize you can do this with if else statements: get '/:slug' do if params[:slug] == 'administration' haml :admin else haml :page end end But that isn't very clean looking. Is there a way to have an exception to routes?

    Read the article

  • ipad subview not loading before code is executing

    - by ethan Criss
    I have a command that should be loading a subview before a particular piece of time intensive code executes. However the command runs, the timely code executes and then the subview shows up. Is there anything I can do to fix this problem? progressViewController = [[ProgressView alloc] initWithNibName:@"ProgressView" bundle:[NSBundle mainBundle]]; [self.view addSubview:[progressViewController view]]; NSString *name=@"guy"; NSString *encodedName =[[NSString alloc] init]; int asci; for(int i=0; i < [name length]; i++) { //NSLog(@"1"); asci = [name characterAtIndex:i]; NSString *str = [NSString stringWithFormat:@"%d,", asci]; encodedName =[encodedName stringByAppendingFormat: str]; } NSString *urlString = [NSString stringWithFormat:@"someurl.com"]; NSURL *theUrl = [[NSURL alloc] initWithString:urlString]; NSString *result=[NSString stringWithContentsOfURL:theUrl]; result = [result substringFromIndex:61]; result = [result substringToIndex:[result length] - 20]; NSLog(result); outLab.text=result; [[progressViewController view] removeFromSuperview];

    Read the article

  • How can I have centered text and right-aligned image in the same element?

    - by Ethan
    I have some th elements with text in them that should be centered and they also contain images: The up/down arrow graphic is a separate image. My question is, what is the simplest reliable way to position that image over to the right side of the th element while keeping the text centered? I'm open to using jQuery/JavaScript if there's a reasonably simple way to do it. One caveat: I need the up/down graphic to be a separate image, not part of the header background. <th> Title <img src='/images/sort_unsorted.jpg' /> </th>

    Read the article

  • Generating SQL for website

    - by Ethan
    I am working on a webapplication How can i create SQL for the following Database Information User information Username - String Password - String Admin or Client - boolean Last login – Date/Time LogItem typeLogItem – String (Page name?) hitCount – int View PageURL UserID Transaction User – String DateTimeStamp SKU – int Purchase-boolean TransactionID-int Inventory information Sku number - int Item description - String Price to customer - double Count - in

    Read the article

  • how to handle JavaScript objects with colons in key names?

    - by Ethan
    There is a syntax error in the following code: <!DOCTYPE html> <html> <body> Hello World! <script type="text/javascript"> var obj = {'a:b': '1'}; alert(obj.a:b); // syntax error </script> </body> </html> So how to handle JavaScript objects with colons in key names? I have to do this because I need to handle a feed in jsonp format from a remote server which I do not have control over, and there are colons in the key names of the returned jsonp (because the jsonp is converted from XML with namespaces in tags).

    Read the article

  • How can I get a set of radio buttons to accept NULL (nothing checked)?

    - by Ethan
    I'm working on a Rails application where I have some a set of two radio buttons where users can click "yes" or "no". The MySQL DB column created by the ActiveRecord migration is a tinyint. If the user doesn't click either radio button I want MySQL to store NULL. (The column allows NULL.) And when they come back to edit the data, neither button should be checked. What's happening is that ActiveRecord is storing 0 and then when I come back the "No" button is checked. Rails 2.3.5 Form code (I'm using Haml): = f.radio_button( :model_attribute, true ) Yes = f.radio_button( :model_attribute, false ) No (In retrospect it probably would have been better to use a single checkbox, but it would be difficult to change that now.)

    Read the article

  • IE6 + IE7 CSS problem with overflow hidden

    - by googletorp
    So I have created a slider for a homepage, that slides some images with a title and teaser text using jQuery. Everything works fine, and I went to check IE and found that IE 6 and 7 kills my slider css completely. I can't figure out why, but for some reason I can't hide the non active slides with overflow: hidden; I've tried tweaking the css back and forth, but haven't been able to figure out what's causing the problem. I've recreated the problem in a more isolated html page. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="da" dir="ltr"> <head> <style> body { width: 900px; } .column-1 { width: 500px; float: left; } .column-2 { width: 200px; float: left; } .column-3 { width: 200px; float: left; } h4 { font-size: 16px; margin: 0 0 5px; } p { margin: 5px 0; } ul { margin: 0; padding: 0; width: 2000px; left: -499px; overflow: hidden; position: relative; } li { list-style: none; display: block; float: left; } .item-list { overflow: hidden; width: 499px; } img { display: block; } .infobox { background: black; padding: 10px 13px; margin-top: -74px; height: 54px; width: 473px; color: white; position: absolute; } .first { display: block; } </style> </head> <body> <div class="column-1"> <div class="item-list clearfix"> <ul> <li class="first"> <div class="node-slide"> <img src="http://www.hanselman.com/blog/content/binary/lolcats-funny-pictures-leroy-jenkins.jpg" /> <div class="infobox"> <h4>Title 1</h4> <p>Teaser 1</p> </div> </div> </li> <li> <div class="slide"> <img src="http://www.hanselman.com/blog/content/binary/lolcats-funny-pictures-leroy-jenkins.jpg" /> <div class="infobox"> <h4>Title 2</h4> <p>Teaser 2</p> </div> </div> </li> <li class="last"> <div class="slide"> <img src="http://www.hanselman.com/blog/content/binary/lolcats-funny-pictures-leroy-jenkins.jpg" /> <div class="infobox"> <h4>Title 3</h4> <p>Teaser 3</p> </div> </div> </li> </ul> </div> </div> <div class="column-2"> ... </div> <div class="column-3"> ... </div> </body> </html> Any ideas as to why IE wont hide images outside div with class item-list?

    Read the article

  • IE6 + IE7 CSS problem with overflow: hidden; - position: relative; combo.

    - by googletorp
    So I have created a slider for a homepage, that slides some images with a title and teaser text using jQuery. Everything works fine, and I went to check IE and found that IE 6 and 7 kills my slider css completely. I can't figure out why, but for some reason I can't hide the non active slides with overflow: hidden; I've tried tweaking the css back and forth, but haven't been able to figure out what's causing the problem. I've recreated the problem in a more isolated html page. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="da" dir="ltr"> <head> <style> body { width: 900px; } .column-1 { width: 500px; float: left; } .column-2 { width: 200px; float: left; } .column-3 { width: 200px; float: left; } ul { width: 2000px; left: -499px; position: relative; } li { list-style: none; display: block; float: left; } .item-list { overflow: hidden; width: 499px; } </style> </head> <body> <div class="column-1"> <div class="item-list clearfix"> <ul> <li class="first"> <div class="node-slide"> <img src="http://www.hanselman.com/blog/content/binary/lolcats-funny-pictures-leroy-jenkins.jpg" /> <div class="infobox"> <h4>Title 1</h4> <p>Teaser 1</p> </div> </div> </li> <li> <div class="slide"> <img src="http://www.hanselman.com/blog/content/binary/lolcats-funny-pictures-leroy-jenkins.jpg" /> <div class="infobox"> <h4>Title 2</h4> <p>Teaser 2</p> </div> </div> </li> <li class="last"> <div class="slide"> <img src="http://www.hanselman.com/blog/content/binary/lolcats-funny-pictures-leroy-jenkins.jpg" /> <div class="infobox"> <h4>Title 3</h4> <p>Teaser 3</p> </div> </div> </li> </ul> </div> </div> <div class="column-2"> ... </div> <div class="column-3"> ... </div> </body> </html> I've tracked down that it is the ul { position: relative; } on the ul element that is causing the overflow: hidden not to work, but why that is, I don't know. Also this is needed to make the slider javascript work using the left attribute on the ul to slide it. Any ideas as to how you can fix this is most welcome.

    Read the article

  • Compiler error: Variable or field declared void [closed]

    - by ?? ?
    i get some error when i try to run this, could someone please tell me the mistakes, thank you! [error: C:\Users\Ethan\Desktop\Untitled1.cpp In function `int main()': 25 C:\Users\Ethan\Desktop\Untitled1.cpp variable or field `findfactors' declared void 25 C:\Users\Ethan\Desktop\Untitled1.cpp initializer expression list treated as compound expression] #include<iostream> #include<cmath> using namespace std; void prompt(int&, int&, int&); int gcd(int , int , int );//3 input, 3 output void findfactors(int , int , int, int, int&, int&);//3 input, 2 output void display(int, int, int, int, int);//5 inputs int main() { int a, b, c; //The coefficients of the quadratic polynomial int ag, bg, cg;//value of a, b, c after factor out gcd int f1, f2; //The two factors of a*c which add to be b int g; //The gcd of a, b, c prompt(a, b, c);//Call the prompt function g=gcd(a, b, c);//Calculation of g void findfactors(a, b, c, f1, f2);//Call findFactors on factored polynomial display(g, f1, f2, a, c);//Call display function to display the factored polynomial system("PAUSE"); return 0; } void prompt(int& num1, int& num2, int& num3) //gets 3 ints from the user { cout << "This program factors polynomials of the form ax^2+bx+c."<<endl; while(num1==0) { cout << "Enter a value for a: "; cin >> num1; if(num1==0) { cout<< "a must be non-zero."<<endl; } } while(num2==0 && num3==0) { cout << "Enter a value for b: "; cin >> num2; cout << "Enter a value for c: "; cin >> num3; if(num2==0 && num3==0) { cout<< "b and c cannot both be 0."<<endl; } } } int gcd(int num1, int num2, int num3) { int k=2, gcd=1; while (k<=num1 && k<=num2 && k<=num3) { if (num1%k==0 && num2%k==0 && num3%k==0) gcd=k; k++; } return gcd; } void findFactors(int Ag, int Bg, int Cg,int& F1, int& F2) { int y=Ag*Cg; int z=sqrt(abs(y)); for(int i=-z; i<=z; i++) //from -sqrt(|y|) to sqrt(|y|) { if(i==0)i++; //skips 0 if(y%i==0) //if i is a factor of y { if(i+y/i==Bg) //if i and its partner add to be b F1=i, F2=y/i; else F1=0, F2=0; } } } void display(int G, int factor1, int factor2, int A, int C) { int k=2, gcd1=1; while (k<=A && k<=factor1) { if (A%k==0 && factor1%k==0) gcd1=k; k++; } int t=2, gcd2=1; while (t<=factor2 && t<=C) { if (C%t==0 && factor2%t==0) gcd2=t; t++; } cout<<showpos<<G<<"*("<<gcd1<<"x"<<gcd2<<")("<<A/gcd1<<"x"<<C/gcd2<<")"<<endl; }

    Read the article

  • Mouse works only in some applications

    - by Zbee
    Recently my mouse has been buggy (actually one of the reasons I'm switching from Windows 8.1) (I say mouse, but I mean mice, I've tried several). It will work just fine, but when I try to click in the unity launcher to switch to a program such as Terminal it won't work. If I then use alt+tab to switch to Terminal I cannot click in the still-exposed Firefox to switch to that, AND it will change the mouse cursor to show things in Firefox as if I was still focused on the window (show the hand when hovering over a link). But if I then try to type in Firefox, thinking Terminal is now just shown over all windows, it types in Terminal. In Windows 8.1 I had a similar problem, I would run a program, but would only be able to use my mouse in it to click and right-click and everything for about 20 seconds before it would stop responding. NOTE: my mouse still moves around, I just can't click and sometimes it won't even register as hovering over something. I'm currently on Ubuntu 14.04 and the other OS is Windows 8.1. Any help is appreciated, Ethan

    Read the article

  • Why does my program crash when given negative values?

    - by Wayfarer
    Alright, I am very confused, so I hope you friends can help me out. I'm working on a project using Cocos2D, the most recent version (.99 RC 1). I make some player objects and some buttons to change the object's life. But the weird thing is, the code crashes when I try to change their life by -5. Or any negative value for that matter, besides -1. NSMutableArray *lifeButtons = [[NSMutableArray alloc] init]; CCTexture2D *buttonTexture = [[CCTextureCache sharedTextureCache] addImage:@"Button.png"]; LifeChangeButtons *button = nil; //top left button = [LifeChangeButtons lifeButton:buttonTexture ]; button.position = CGPointMake(50 , size.height - 30); [button buttonText:-5]; [lifeButtons addObject:button]; //top right button = [LifeChangeButtons lifeButton:buttonTexture ]; button.position = CGPointMake(size.width - 50 , size.height - 30); [button buttonText:1]; [lifeButtons addObject:button]; //bottom left button = [LifeChangeButtons lifeButton:buttonTexture ]; button.position = CGPointMake(50 , 30); [button buttonText:5]; [lifeButtons addObject:button]; //bottom right button = [LifeChangeButtons lifeButton:buttonTexture ]; button.position = CGPointMake(size.width - 50 , 30); [button buttonText:-1]; [lifeButtons addObject:button]; for (LifeChangeButtons *theButton in lifeButtons) { [self addChild:theButton]; } This is the code that makes the buttons. It simply makes 4 buttons, puts them in each corner of the screen (size is the screen) and adds their life change ability, 1,-1,5, or -5. It adds them to the array and then goes through the array at the end and adds all of them to the screen. This works fine. Here is my code for the button class: (header file) // // LifeChangeButtons.h // Coco2dTest2 // // Created by Ethan Mick on 3/14/10. // Copyright 2010 Wayfarer. All rights reserved. // #import "cocos2d.h" @interface LifeChangeButtons : CCSprite <CCTargetedTouchDelegate> { NSNumber *lifeChange; } @property (nonatomic, readonly) CGRect rect; @property (nonatomic, retain) NSNumber *lifeChange; + (id)lifeButton:(CCTexture2D *)texture; - (void)buttonText:(int)number; @end Implementation file: // // LifeChangeButtons.m // Coco2dTest2 // // Created by Ethan Mick on 3/14/10. // Copyright 2010 Wayfarer. All rights reserved. // #import "LifeChangeButtons.h" #import "cocos2d.h" #import "CustomCCNode.h" @implementation LifeChangeButtons @synthesize lifeChange; //Create the button +(id)lifeButton:(CCTexture2D *)texture { return [[[self alloc] initWithTexture:texture] autorelease]; } - (id)initWithTexture:(CCTexture2D *)atexture { if ((self = [super initWithTexture:atexture])) { //NSLog(@"wtf"); } return self; } //Set the text on the button - (void)buttonText:(int)number { lifeChange = [NSNumber numberWithInt:number]; NSString *text = [[NSString alloc] initWithFormat:@"%d", number]; CCLabel *label = [CCLabel labelWithString:text fontName:@"Times New Roman" fontSize:20]; label.position = CGPointMake(35, 20); [self addChild:label]; } - (CGRect)rect { CGSize s = [self.texture contentSize]; return CGRectMake(-s.width / 2, -s.height / 2, s.width, s.height); } - (BOOL)containsTouchLocation:(UITouch *)touch { return CGRectContainsPoint(self.rect, [self convertTouchToNodeSpaceAR:touch]); } - (void)onEnter { [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES]; [super onEnter]; } - (void)onExit { [[CCTouchDispatcher sharedDispatcher] removeDelegate:self]; [super onExit]; } - (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event { CGPoint touchPoint = [touch locationInView:[touch view]]; touchPoint = [[CCDirector sharedDirector] convertToGL:touchPoint]; if ( ![self containsTouchLocation:touch] ) return NO; NSLog(@"Button touch event was called returning yes. "); //this is where we change the life to each selected player NSLog(@"Test1"); NSMutableArray *tempArray = [[[UIApplication sharedApplication] delegate] selectedPlayerObjects]; NSLog(@"Test2"); for (CustomCCNode *aPlayer in tempArray) { NSLog(@"we change the life by %d.", [lifeChange intValue]); [aPlayer changeLife:[lifeChange intValue]]; } NSLog(@"Test3"); return YES; } - (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event { CGPoint touchPoint = [touch locationInView:[touch view]]; touchPoint = [[CCDirector sharedDirector] convertToGL:touchPoint]; NSLog(@"You moved in a button!"); } - (void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event { NSLog(@"You touched up in a button"); } @end Now, This function: - (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event Is where all the shit goes down. It works for all of the buttons except the -5 one. And then, it gets to: NSLog(@"we change the life by %d.", [lifeChange integerValue]); And it crashes at that statement. It only crashes when given anything less than -1. -1 works, but nothing smaller does. Here is the code in the CustomCCNode Class, "changeLife" that is being called. - (void)changeLife:(int)lifeChange { NSLog(@"change life in Custom Class was called"); NSLog(@"wtf is lifechange: %d", lifeChange); life += lifeChange; lifeString = [[NSString alloc] initWithFormat:@"%d",life]; [text setString:lifeString]; } Straight forward, but when the NSnumber is -5, it doesn't even get called, it crashes at the NSlog statement. So... what's up with that?

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >