Search Results

Search found 5472 results on 219 pages for 'jack low'.

Page 22/219 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • ASP.NET MVC 2 RC2 Routing - How to clear low-level values when using ActionLink to refer to a higher

    - by Gary McGill
    [NOTE: I'm using ASP.NET MVC2 RC2.] I have URLs like this: /customer/123/order/456/item/index /customer/123/order/456/item/789/edit My routing table lists the most-specific routes first, so I've got: // customer/123/order/456/item/789/edit routes.MapRoute( "item", // Route name "customer/{customerId}/order/{orderId}/item/{itemId}/{action}", // URL with parameters new { controller = "Items", action = "Details" }, // Parameter defaults new { customerId = @"\d+", orderId = @"\d+", itemId = @"\d+" } // Constraints ); // customer/123/order/456/item/index routes.MapRoute( "items", // Route name "customer/{customerId}/order/{orderId}/item/{action}", // URL with parameters new { controller = "Items", action = "Index" }, // Parameter defaults new { customerId = @"\d+", orderId = @"\d+" } // Constraints ); When I'm in the "Edit" page, I want a link back up to the "Index" page. So, I use: ActionLink("Back to Index", "index") However, because there's an ambient order ID, this results in the URL: /Customer/123/Order/456/Item/789/Index ...whereas I want it to "forget" the order ID and just use: /Customer/123/Order/456/Item/Index I've tried overriding the order ID like so: ActionLink("Back to Index", "index", new { orderId=string.empty }) ...but that doesn't work. How can I persuade ActionLink to "forget" the order ID?

    Read the article

  • What can cause Windows to unhook a low level (global) keyboard hook?

    - by Davy8
    We have some global keyboard hooks installed via SetWindowsHookEx with WH_KEYBOARD_LL that appear to randomly get unhooked by Windows. We verified that they hook was no longer attached because calling UnhookWindowsHookEx on the handle returns false. (Also verified that it returns true when it was working properly) There doesn't seem to be a consistent repro, I've heard that they can get unhooked due to timeouts or exceptions getting thrown, but I've tried both just letting it sit on a breakpoint in the handling method for over a minute, as well as just throwing a random exception (C#) and it still appears to work. In our callback we quickly post to another thread, so that probably isn't the issue. I've read about solutions in Windows 7 for setting the timeout higher in the registry because Windows 7 is more aggressive about the timeouts apparently (we're all running Win7 here, so not sure if this occurs on other OS's) , but that doesn't seem like an ideal solution. I've considered just having a background thread running to refresh the hook every once in a while, which is hackish, but I don't know of any real negative consequences of doing that, and it seems better than changing a global Windows registry setting. Any other suggestions or solutions? The delegates are not being GC'd since they're static members, which is one cause that I've read about.

    Read the article

  • Low noise sites to keep track of news related to computers & programming?

    - by Sridhar Ratnakumar
    I am aware of sites like Slashdot and Ars Technica. Unfortunately they publish way too many articles per day. Ars Technical: 100 posts per week Slashdot: 179 posts per week And I prefer not to waste my attention over reading about 180 posts (even if I were to skim) every week. Is there a site that provides only important news - excluding not-so-important news items like top 6 iPad apps that someone is dying to try out (but haven't done yet; still thinks their readers/advertisers care about it)?

    Read the article

  • I would like to build an app that alerts me when road traffic is high or low. Where can I get the r

    - by MedicineMan
    I'm sitting at work, waiting for traffic to die down. The thought occurred to me. I know when I want to go home, why don't I have an app that watches traffic for me? I also know that there are a lot of smart people on stackoverflow. Where can I get live traffic data for the san francisco bay area region? The data source should be timely, accurate, and as high resolution as possible. I would like to build an app on top of a service, rather than watch google maps or watch another website. I would prefer that I not have to scrape the data, but I have been know to do this in the past when no other option exists.

    Read the article

  • Can SHA-1 algorithm be computed on a stream? With low memory footprint?

    - by raoulsson
    I am looking for a way to compute SHA-1 checksums of very large files without having to fully load them into memory at once. I don't know the details of the SHA-1 implementation and therefore would like to know if it is even possible to do that. If you know the SAX XML parser, then what I look for would be something similar: Computing the SHA-1 checksum by only always loading a small part into memory at a time. All the examples I found, at least in Java, always depend on fully loading the file/byte array/string into memory. If you even know implementations (any language), then please let me know!

    Read the article

  • How do I handle a low job offer for an entry level position?

    - by user229269
    Hi guys! I recently graduated with MS in CS and I am excited because I just received a job offer from a company I really like for an entry-level sw engineer position. The thing is that, although the salary is not my priority and I care way more about gaining experience, their offer unfortunately is way below of what I expected. Actually after I did some research I realized that, comparing to the average salary range for the entry-level sw engineering positions in my area (one of the most expensive areas in the US) supposedly [X - Y]$ (where X is the lowest average and Y the highest), their offer is 20% below X! I wouldnt have a problem accepting an offer around X but this one is even lower than the lowest. Can I counter offer the X which is 20% more than what they offered me but at the same time is the minimum average? -- And mind you that I didnt even take under consideration the fact that I hold a MS degree which in many cases yields to a 5-10% more pay.

    Read the article

  • Opinions on Dual-Salt authentication for low sensitivity user accounts?

    - by Heleon
    EDIT - Might be useful for someone in the future... Looking around the bcrypt class in php a little more, I think I understand what's going on, and why bcrypt is secure. In essence, I create a random blowfish salt, which contains the number of crypt rounds to perform during the encryption step, which is then hashed using the crypt() function in php. There is no need for me to store the salt I used in the database, because it's not directly needed to decrypt, and the only way to gain a password match to an email address (without knowing the salt values or number of rounds) would be to brute force plain text passwords against the hash stored in the database using the crypt() function to verify, which, if you've got a strong password, would just be more effort than it's worth for the user information i'm storing... I am currently working on a web project requiring user accounts. The application is CodeIgniter on the server side, so I am using Ion Auth as the authentication library. I have written an authentication system before, where I used 2 salts to secure the passwords. One was a server-wide salt which sat as an environment variable in the .htaccess file, and the other was a randomly generated salt which was created at user signup. This was the method I used in that authentication system for hashing the password: $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //create a random string to be used as the random salt for the password hash $size = strlen($chars); for($i = 0; $i < 22; $i++) { $str .= $chars[rand(0, $size - 1)]; } //create the random salt to be used for the crypt $r_blowfish_salt = "$2a$12$" . $str . "$"; //grab the website salt $salt = getenv('WEBSITE_SALT'); //combine the website salt, and the password $password_to_hash = $pwd . $salt; //crypt the password string using blowfish $password = crypt($password_to_hash, $r_blowfish_salt); I have no idea whether this has holes in it or not, but regardless, I moved over to Ion Auth for a more complete set of functions to use with CI. I noticed that Ion only uses a single salt as part of its hashing mechanism (although does recommend that encryption_key is set in order to secure the database session.) The information that will be stored in my database is things like name, email address, location by country, some notes (which will be recommended that they do not contain sensitive information), and a link to a Facebook, Twitter or Flickr account. Based on this, i'm not convinced it's necessary for me to have an SSL connection on the secure pages of my site. My question is, is there a particular reason why only 1 salt is being used as part as the Ion Auth library? Is it implied that I write my own additional salting in front of the functionality it provides, or am I missing something? Furthermore, is it even worth using 2 salts, or once an attacker has the random salt and the hashed password, are all bets off anyway? (I assume not, but worth checking if i'm worrying about nothing...)

    Read the article

  • Can I prevent Flash's Input Events from stacking up when my framerate low?

    - by Matt W
    My Flash game targets 24 fps, but slows to 10 on slower machines. This is fine, except Flash decides to throttle the queue of incoming MouseEvent and KeyboardEvents, and they stack up and the Events fall behind. Way behind. It's so bad that, at 10 fps, if I spam the Mouse and Keyboard for a few seconds not much happens, then, after I stop, the game seems to play itself for the next 5 seconds as the Events trickle in. Spooky, I know. Does anyone know a way around this? I basically need to say to Flash, "I know you think we're falling behind, but throttling the input events won't help. Give them to me as soon as you get them, please."

    Read the article

  • Application shows low memory warning and crashes while loading images?

    - by Bhoomi
    I am using following code for loading images from server using following code.When i scroll UITableView application crashes. AsynchrohousImageView class .m file - (void)dealloc { [connection cancel]; //in case the URL is still downloading [connection release]; [data release]; [_imageView release]; [_activityIndicator release]; [super dealloc]; } - (void)loadImageFromURL:(NSURL*)url defaultImageName:(NSString *)defaultImageName showDefaultImage:(BOOL)defaultImageIsShown showActivityIndicator:(BOOL)activityIndicatorIsShown activityIndicatorRect:(CGRect)activityIndicatorRect activityIndicatorStyle:(UIActivityIndicatorViewStyle)activityIndicatorStyle { if (connection!=nil) { [connection release]; } if (data!=nil) { [data release]; } if ([[self subviews] count]>0) { [[[self subviews] objectAtIndex:0] removeFromSuperview]; // } if (defaultImageIsShown) { self.imageView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:defaultImageName]] autorelease]; } else { self.imageView = [[[UIImageView alloc] init] autorelease]; } [self addSubview:_imageView]; _imageView.frame = self.bounds; [_imageView setNeedsLayout]; [self setNeedsLayout]; if (activityIndicatorIsShown) { self.activityIndicator = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:activityIndicatorStyle] autorelease]; [self addSubview:_activityIndicator]; _activityIndicator.frame = activityIndicatorRect; _activityIndicator.center = CGPointMake(_imageView.frame.size.width/2, _imageView.frame.size.height/2); [_activityIndicator setHidesWhenStopped:YES]; [_activityIndicator startAnimating]; } NSURLRequest* request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; } - (void)connection:(NSURLConnection *)theConnection didReceiveData:(NSData *)incrementalData { if (data==nil) { data = [[NSMutableData alloc] initWithCapacity:2048]; } [data appendData:incrementalData]; } - (void)connectionDidFinishLoading:(NSURLConnection*)theConnection { [connection release]; connection=nil; _imageView.image = [UIImage imageWithData:data]; if (_activityIndicator) { [_activityIndicator stopAnimating]; } [data release]; data=nil; } - (UIImage*) image { UIImageView* iv = [[self subviews] objectAtIndex:0]; return [iv image]; } In ViewController Class Which loads image - (UITableViewCell *)tableView:(UITableView *)tV cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *reuseIdentifier =@"CellIdentifier"; ListCell *cell = (ListCell *)[tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; if (cell==nil) { cell = [[ListCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; NSMutableDictionary *dicResult = [arrResults objectAtIndex:indexPath.row]; NSURL *url=[NSURL URLWithString:[dicResult objectForKey:@"Image"]]; AsynchronousImageView *asyncImageView = [[AsynchronousImageView alloc] initWithFrame:CGRectMake(5, 10,80,80)]; [asyncImageView loadImageFromURL:url defaultImageName:@"DefaultImage.png" showDefaultImage:NO showActivityIndicator:YES activityIndicatorRect:CGRectMake(5, 10,30,30) activityIndicatorStyle:UIActivityIndicatorViewStyleGray]; // load our image with URL asynchronously [cell.contentView addSubview:asyncImageView]; // cell.imgLocationView.image = [UIImage imageNamed:[dicResult valueForKey:@"Image"]]; [asyncImageView release]; } if([arrResults count]==1) { UITableViewCell *cell1=[tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; if(cell1==nil) cell1=[[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier] autorelease]; NSMutableDictionary *dicResult = [arrResults objectAtIndex:0]; cell1.textLabel.text=[dicResult valueForKey:@"NoResults"]; return cell1; } else { NSMutableDictionary *dicResult = [arrResults objectAtIndex:indexPath.row]; NSString *title = [NSString stringWithFormat:@"%@ Bedrooms-%@", [dicResult valueForKey:KEY_NUMBER_OF_BEDROOMS],[dicResult valueForKey:KEY_PROPERTY_TYPE]]; NSString *strAddress = [dicResult valueForKey:KEY_DISPLAY_NAME]; NSString *address = [strAddress stringByReplacingOccurrencesOfString:@", " withString:@"\n"]; NSString *price = [dicResult valueForKey:KEY_PRICE]; NSString *distance = [dicResult valueForKey:KEY_DISTANCE]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.lblTitle.text = title; cell.lblAddress.text = address; if ([price length]>0) { cell.lblPrice.text = [NSString stringWithFormat:@"£%@",price]; }else{ cell.lblPrice.text = @""; } if ([distance length]>0) { cell.lblmiles.text = [NSString stringWithFormat:@"%.2f miles",[distance floatValue]]; }else{ cell.lblmiles.text = @""; } } return cell; } How can i resolve this? I have attached heapshot analysis screen shot of it.Here non Object consumes so much of memory what is that?

    Read the article

  • Will C++/CLI give me control over low-level devices like audio?

    - by schmoopy
    I was wondering - how much limitation is there to C++/CLI compared to classic C++ (chuckle) - I was wanting to write an application that I cannot do with c# -- I was wanting to be able to connect to the PC's audio device and detect audio (for example) - Is this something I can do with C++/CLI? I have tried using NAudio with c#, but i have been able to do this. What other advantages would C++/CLI or C++ give me over c#?

    Read the article

  • Are there free, low cost, or open source tools for matching name/address data?

    - by luiscolorado
    This question is related to Tools for matching name/address data. There is a number commercial tools provided by SAS, Oracle, Microsoft, etc., that allow to de-duplicate or merging names of individuals or companies coming from multiple sources. However, after reading the answers to the question mentioned before, I wondered why a seemingly interesting problem didn't receive any answers mentioning open source projects that could tackle the problem. Are you aware of any open source projects or algorithms to implement the so called "record linking", "record merging", or "clustering"?

    Read the article

  • How to catch this low level MySQL (?) error in PHP/Magento

    - by andnil
    When I'm executing the following statement in Magento with a really large $sku, the execution terminates without any errors thrown what so ever. There are no errors in either Magento's, Apache's or PHP's error logs. Mage::getModel('catalog/product')-loadByAttribute('sku', $sku); Question: How do I catch the error? I've tried to set custom error handlers, and for testing purposes I've also managed to trigger error situations where each of the error handler functions are invoked. But when running the previously mentioned Magento code with a large $sku, none of the error handling functions are executed. error_reporting( -1 ); set_error_handler( array( 'Error', 'captureNormal' ) ); set_exception_handler( array( 'Error', 'captureException' ) ); register_shutdown_function( array( 'Error', 'captureShutdown' ) ); For completeness, this is the $sku I'm passing to loadByAttribute(). (The sku is invalid, but that is not the issue) 1- 9685 0102046|1- 9685 1212100|1- 9685 1212092|1- 9685 1212096|1- 9685 1102100|1- 9685 1102108|1- 9685 1102112|1- 9685 1102092|1- 9685 0102048|1- 9685 0102054|1- 9685 0102056|1- 9685 0102058|1- 9685 1212104|1- 9685 1212108|1- 9685 0212058|1- 9685 0104050|1- 9685 0212050|1- 9685 0212056|1- 9685 0212044|1- 9685 0212048|1- 9685 0212052|1- 9685 0212054|1- 9685 1102104|1- 9685 1102124 Any insight into this matter is much appreciated! Update: Upon further investigation, this is the exact point in the code where execution terminates. when the foreach is executed I guess Magento goes into MySQL world and starts loading up data from the database. \Mage\Catalog\Model\Abstract.php public function loadByAttribute($attribute, $value, $additionalAttributes = '*') { $collection = $this->getResourceCollection() ->addAttributeToSelect($additionalAttributes) ->addAttributeToFilter($attribute, $value) ->setPage(1,1); foreach ($collection as $object) { // <--------------- HERE return $object; } return false; } Note, I'm ONLY interested in finding out how to properly CATCH these kinds of errors, not "fix" the logic. This is so that I can present a proper error message to the user. The example above with the malformed sku is contrived and I have no desire to make my Magento app work with those erroneous skus.

    Read the article

  • Low-overhead way to access the memory space of a traced process?

    - by vovick
    Hello all. I'm looking for an efficient way to access(for both read and write operations) the memory space of my ptraced child process. The size of blocks being accessed may vary from several bytes up to several megabytes in size, so using the ptrace call with PTRACE_PEEKDATA and PTRACE_POKEDATA which read only one word at a time and switch context every time they're called seems like a pointless waste of resources. The only one alternative solution I could find, though, was the /proc/<pid>/mem file, but it has long since been made read only. Is there any other (relatively simple) way to do that job? The ideal solution would be to somehow share the address space of my child process with its parent and then use the simple memcpy call to copy data I need in both directions, but I have no clues how to do it and where to begin. Any ideas?

    Read the article

  • No voice on front headphone port.

    - by asdacap
    I have a strange problem. It just happen recently, when I accidentally unplug my headphone. But I unplugged it before and nothing happen. Basically now, when I use my headphone through front jack, when playing videos, I can't hear voice. Only background music. Using kde sound setup, pressing front left and front right test button, result in a mono sound. No distinction between right and left. This only happen with front jack. Rear jack is working fine.

    Read the article

  • Cannot start ubuntu-desktop

    - by Jack
    I am mainly a Windows technician and am trying to install ubuntu server. Everything worked fine and I can log in using the shell but when I installed ubuntu-desktop it just refuses to start? I did try startx and I get the message "server already running" I tried "start gdm" (what is this supposed to do?) and it comes back with "Job is already running: gdm" I know that the server version is not really for ubuntu-desktop but all our other servers are like that and I want it, is there any help out there? Ps. the server is running on a VM install that my IT department made for me and I connect to the machine shell using "Tera Ter Web 3.1" Thank you Jack

    Read the article

  • Internet Explorer stores working data under %TEMP% instead of normal locations

    - by SWB
    Internet Explorer normally stores its working data in various special locations. For example: Cookies - %APPDATA%\Microsoft\Windows\Cookies History - %LOCALAPPDATA%\Microsoft\Windows\History Cache - %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files However, for some reason, Internet Explorer occasionally stops using the normal locations and instead creates new folders under %TEMP% and/or %TEMP%\Low for this data. For example: Cookies - %TEMP%\Cookies %TEMP%\Low\Cookies History - %TEMP%\History %TEMP%\Low\History Cache - %TEMP%\Temporary Internet Files %TEMP%\Low\Temporary Internet Files Why does Internet Explorer do this, and how can make it use the normal locations again?

    Read the article

  • a question on common lisp

    - by kostas
    Hello people, I'm getting crazy with a small problem here, I keep getting an error and I cant seem to figure out why, the code is supposed to change the range of a list, so if we give it a list with values (1 2 3 4) and we want to change the range in 11 to fourteen the result would be (11 12 13 14) the problem is that the last function called scale-list will give back an error saying: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) anybody has a clue why? I use aquamacs as an editor thanks in advance ;;finds minimum in a list (defun minimum(list) (car (sort list #'<))) ;;finds maximum in a list (defun maximum(list) (car (sort list #'>))) ;;calculates the range of a list (defun range(list) (- (maximum list) (minimum list))) ;;this codes scales a value from a list (defun scale-value(list low high n) (+ (/ (* (- (nth (- n 1) list) (minimum list)) (- high low)) (range list)) low)) ;and this code is supposed to scale the whole list (defun scale-list(list low high n) (unless (= n 0) (cons (scale-value list low high n) (scale-list list low high (- n 1))))) (scale-list '(0.1 0.3 0.5 0.9) 20 30 4)

    Read the article

  • Python: does it make sense to refactor this check into it's own method?

    - by Jeff Fry
    I'm still learning python. I just wrote this method to determine if a player has won a game of tic-tac-toe yet, given a board state like:'[['o','x','x'],['x','o','-'],['x','o','o']]' def hasWon(board): players = ['x', 'o'] for player in players: for row in board: if row.count(player) == 3: return player top, mid, low = board for i in range(3): if [ top[i],mid[i],low[i] ].count(player) == 3: return player if [top[0],mid[1],low[2]].count(player) == 3: return player if [top[2],mid[1],low[0]].count(player) == 3: return player return None It occurred to me that I check lists of 3 chars several times and could refactor the checking to its own method like so: def check(list, player): if list.count(player) == 3: return player ...but then realized that all that really does is change lines like: if [ top[i],mid[i],low[i] ].count(player) == 3: return player to: if check( [top[i],mid[i],low[i]], player ): return player ...which frankly doesn't seem like much of an improvement. Do you see a better way to refactor this? Or in general a more Pythonic option? I'd love to hear it!

    Read the article

  • Multiplying matrices: error: expected primary-expression before 'struct'

    - by justin
    I am trying to write a program that is supposed to multiply matrices using threads. I am supposed to fill the matrices using random numbers in a thread. I am compiling in g++ and using PTHREADS. I have also created a struct to pass the data from my command line input to the thread so it can generate the matrix of random numbers. The sizes of the two matrices are also passed in the command line as well. I keep getting: main.cpp:7: error: expected primary-expression before 'struct' my code @ line 7 =: struct a{ int Arow; int Acol; int low; int high; }; My inpust are : Sizes of two matrices ( 4 arguments) high and low ranges in which o generate the random numbers between. Complete code: [headers] using namespace std; void *matrixACreate(struct *); void *status; int main(int argc, char * argv[]) { int Arow = atoi(argv[1]); // Matrix A int Acol = atoi(argv[2]); // WxX int Brow = atoi(argv[3]); // Matrix B int Bcol = atoi(argv[4]); // XxZ, int low = atoi(argv[5]); // Range low int high = atoi(argv[6]); struct a{ int Arow; // Matrix A int Acol; // WxX int low; // Range low int high; }; pthread_t matrixAthread; //pthread_t matrixBthread; pthread_t runner; int error, retValue; if (Acol != Brow) { cout << " This matrix cannot be multiplied. FAIL" << endl; return 0; } error = pthread_create(&matrixAthread, NULL, matrixACreate, struct *a); //error = pthread_create(&matrixAthread, NULL, matrixBCreate, sendB); retValue = pthread_join(matrixAthread, &status); //retValue = pthread_join(matrixBthread, &status); return 0; } void matrixACreate(struct * a) { struct a *data = (struct a *) malloc(sizeof(struct a)); data->Arow = Arow; data->Acol = Acol; data->low = low; data->high = high; int range = ((high - low) + 1); cout << Arow << endl<< Acol << endl; }// just trying to print to see if I am in the thread

    Read the article

  • Convert 2 char into 1 int

    - by Leo
    I have 2 chars: HIGH and LOW and I'd like to convert them to an int corresponding to HIGH + the 2 left bits from LOW. I tried somethine like : char *HIGH; char *LOW; HIGH = 152; LOW = 12; int result; result += (LOW + 6); result += (LOW + 7)*2; result += HIGH*4; result += (HIGH + 1)*8; result += (HIGH + 2)*16; result += (HIGH + 3)*32; result += (HIGH + 4)*64; result += (HIGH + 5)*128; result += (HIGH + 6)*256; result += (HIGH + 7)*512; return result; But it doesn't work and I don't understand why.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >