Search Results

Search found 316 results on 13 pages for 'erik escobedo'.

Page 10/13 | < Previous Page | 6 7 8 9 10 11 12 13  | Next Page >

  • What is the difference between Thread.Sleep(timeout) and ManualResetEvent.Wait(timeout)?

    - by Erik Forbes
    Both Thread.Sleep(timeout) and resetEvent.Wait(timeout) cause execution to pause for at least timeout milliseconds, so is there a difference between them? I know that Thread.Sleep causes the thread to give up the remainder of its time slice, thus possibly resulting in a sleep that lasts far longer than asked for. Does the Wait(timeout) method of a ManualResetEvent object have the same problem?

    Read the article

  • Displaying success/failure messages from hidden iframe submit

    - by Erik Nelson
    I'm using the hidden iframe method to submit a form with a file upload field. I want to display a message back on the page using javascript and I'm not sure how to do this. If this was just a form with text fields I'd do an AJAX post and respond with a message I'd display in my callback function. I'm just not sure how to accomplish this same task with the hidden iframe method since it is a standard form post.

    Read the article

  • WPF. How do I create many LIstViews with the same look.

    - by Erik Z
    I've defined a listview in my recent project and realized that I will be using more listviews looking exactly the same and having the same solumns. Since I'm new to WPF am I curious of teh best way to do this. Is it to create a usercontrol? Use styles? I've tried to use styles but it didnt work the way I was hoping. I tried to set the "View" property using style, like this. <Style x:Key="ListViewStyle" TargetType="{x:Type ListView}"> <Setter Property="View"> <ListView.View> <GridView> But it didnt work so I'm asking for your opinion?! Thanks.

    Read the article

  • How can I get the main thread to sleep while waiting for a delgate to be called?

    - by Erik B
    Consider a class with these methods: - (id) initWithFrame: (CGRect) frame { if (!(self = [super init])) return nil; webView = [[UIWebView alloc] initWithFrame:frame]; [webView setDelegate:self]; lock = [[NSConditionLock alloc] initWithCondition:LOCK_WAIT]; return self; } - (void) setHTML: (NSString *) html { [lock lockWhenCondition:LOCK_WAIT]; [webView loadHTMLString:html baseURL:nil]; [lock unlock]; } - (void)webViewDidFinishLoad:(UIWebView *)aWebView { [lock lockWhenCondition:LOCK_WAIT]; // Locking to be able to unlock and change the condition. [lock unlockWithCondition:LOCK_GO]; } - (NSString *) stringByEvaluatingJavaScriptFromString: (NSString *) jsCommand { [lock lockWhenCondition:LOCK_GO]; return [webView stringByEvaluatingJavaScriptFromString:jsCommand]; [lock unlock]; } Let's call this class SynchronousUIWebView. From the main thread I execute: webView = [[SynchronousUIWebView alloc] initWithFrame:frame]; [webView setHTML:html]; [webView stringByEvaluatingJavaScriptFromString:jsCommand]; The problem seems to be that the delegate is not called until I leave the current call stack, which I don't since I'm waiting for the delegate call to happen, aka deadlock. To me it seems like the delegate call is pushed to a queue that is called when the current call is done. So the question is can I modify this behavior? Note: The reason this is needed is that I can't execute the JavaScript until the HTML has loaded.

    Read the article

  • tricky SQL when joining

    - by Erik
    I've two tables, shows and objects. I want to print out the latest objects, and the shownames for them. Right now I'm doing it this way: SELECT MAX(objects.id) as max_id, shows.name, shows.id FROM shows, objects WHERE shows.id = objects.showId GROUP BY shows.name however, if I also want to fetch the episode of the object I can't put it like SELECT object.episode [...], because then wont automatically select the object which is MAX(objects.id), so my question is how to do that? If you haven't already figured out my tables they're like this: Shows id name and also: Objects id name episode season showId Using MySQL. Thanks!

    Read the article

  • Sanitizing CSS in Rails

    - by Erik
    Hello! I want to allow the users of a web app that I'm building to write their own CSS in order to customize their profile page. However I am aware of this opening up for many security risks, i e background: url('javascript:alert("Got your cookies! " + document.cookies'). Hence I am looking for a solution to sanitize the CSS while still allowing as much CSS functionality as possible for my users. So my questions if anyone anyone knows of a gem or a plugin to handles this? I've googled my brains out already so any tips would be really appreciated!

    Read the article

  • How do I place a unique ID in my PHP confirmation page?

    - by Erik
    I have a PHP script that emails me the results from a form that generates a unique ID number. The PHP script executes a confirmation page. I'm trying to place the unique ID on the confirmation page: quote_confirm.php. I already tried this in the conformation page: <?php $prefix = 'LPFQ'; $uniqid = $prefix . uniqid(); $QuoteID = strtoupper($uniqid); ."<tr><td class=\"label\"><strong>Quote ID:</strong></td><td>".$QuoteID."</td></tr>\n"

    Read the article

  • Using an SHA1 with Microsoft CAPI

    - by Erik Jõgi
    I have an SHA1 hash and I need to sign it. The CryptSignHash() method requires a HCRYPTHASH handle for signing. I create it and as I have the actual hash value already then set it: CryptCreateHash(cryptoProvider, CALG_SHA1, 0, 0, &hash); CryptSetHashParam(hash, HP_HASHVAL, hashBytes, 0); The hashBytes is an array of 20 bytes. However the problem is that the signature produced from this HCRYPTHASH handle is incorrect. I traced the problem down to the fact that CAPI actually doesn't use all 20 bytes from my hashBytes array. For some reason it thinks that SHA1 is only 4 bytes. To verify this I wrote this small program: HCRYPTPROV cryptoProvider; CryptAcquireContext(&cryptoProvider, NULL, NULL, PROV_RSA_FULL, 0); HCRYPTHASH hash; HCRYPTKEY keyForHash; CryptCreateHash(cryptoProvider, CALG_SHA1, keyForHash, 0, &hash); DWORD hashLength; CryptGetHashParam(hash, HP_HASHSIZE, NULL, &hashLength, 0); printf("hashLength: %d\n", hashLength); And this prints out hashLength: 4 ! Can anyone explain what I am doing wrong or why Microsoft CAPI thinks that SHA1 is 4 bytes (32 bits) instead of 20 bytes (160 bits).

    Read the article

  • jQuery selectable list items

    - by Erik Elkins
    I want to be able to get information about the selected item in the ordered list whose ID is #selectable. The below code returns the ID #selectable, I'm looking for the id of the item I just selected. $('#selectable').selectable({ selected: function (event, ui) { alert($(this).attr('id').toString()); } }); Any ideas?

    Read the article

  • Nesting forms in CakePHP

    - by Erik
    I am wondering if there's a way in CakePHP to nest multiple models in a form? What I'm trying to accomplish is to make a form for creating Posts that will also contain fields for adding Images (separate model) that will automatically be connected to the created post. Something similar to Ruby on Rails ** accept_nested_attributes_for**.

    Read the article

  • How to access a list in OCaml

    - by Erik
    I want to write a function that could check every item in a list is true or false. If at least one element is false, it will return true, so that: assert_eq "checkFalse [true; false; true]" (checkFalse [true; true; true]) false; assert_eq "checkFalse [false; false]" (checkFalse [false; true]) true; I am an absolute beginner in OCaml and I don't know how to approach this. I tried using a for loop, something like: let rec checkFalse (bools: bool list) : bool = for i = 0 to bools.length do if bools.length == false then false else... (I don't know how to continue) Then it said "Unbound record field...." I also tried using find like: if (find false bools != Not_found) then true else false But my ways did not work. I came from a Java background. Thank you very much!

    Read the article

  • Firefox, prevent rendering between javascript statements.

    - by Erik
    I'm trying to create some kind of zoom around the mouse cursor feature on my website which ultimately runs these two lines (+ the same for height/scrollTop). canvas.style.width = someValue; canvas.parentNode.scrollLeft = someOtherValue; The problem is that in firefox(3.6) the page is re-rendered directly after the first row has been executed and since the view is depending on both values this means that every time i recalculate the view firefox will will render an invalid view before the correct one, in other words creating flicker. I've tried swapping the two rows but get the same problem. In chrome, opera and IE this doesn't happen. Both lines are executed before any rendering is done. Is there any way to lock the rendering manually, maybe something like this? document.disableRendering(); //fantasy function canvas.style.width = someValue; canvas.parentNode.scrollLeft = someOtherValue; document.enableRendering(); //fantasy function

    Read the article

  • Anyone who actually got Tycho to work?

    - by Erik Nordinder
    I'm trying to get Tycho working with m2eclipse. Problem is that all I find are outdated sites and old versions to download. I've found my way to hxxp://github.com/sonatype/sonatype-tycho and downloaded the source. Problem is that the guide at https://docs.sonatype.org/display/TYCHO/BuildingTycho isn't of much help. When trying to build I run into an error message saying I'm using invalid syntax..... And there seems to be nowhere to ask for further guidance. So are there anyone out there who actually got this working? Or got a better alternative for continuous integration / automatic build solution for eclipse plug-ins?

    Read the article

  • How to log messages to a log file in a specific path from a bash script

    - by Erik
    How do you log messages to a log file in a specific path from a bash script? A naive implementation would be commands like: echo My message >>/my/custom/path/to/my_script.log But this probably has many disadvantages (no log rotation for example). I could use the 'logger' command, but it does not support logs in custom paths as far as I know and is not easy to configure if you have lots of bash scripts that could use a custom log file. In a scripting language like Ruby all this is quite easy: https://github.com/rudionrails/yell/wiki/101-the-datefile-adapter I could also make my own logger command based on this ruby library and call it from my bash scripts, but I guess there is already a well known solution that provides similar behavior for shell scripts?

    Read the article

  • Append a parent element to arrays in PHP for a foreach loop

    - by Erik Berger
    print_r of $data = json_decode($src, true); returns data that looks like this: Array ( [0] => Array ( [var1] => blah [var2] => foo ) [1] => Array ( [var1] => lorem [var2] => ipsum ) // goes down to [1936] ) I want to build an html table that shows var1 and var2 next to each other in the same row. I know do to this I need a foreach statement like foreach($data['items'] as $item) but the problem I think I am having is that my many arrays aren't the child of one thing like 'items', right? I looked into array_push but couldn't figure it out. Can someone help my orphaned parentless arrays?

    Read the article

  • How to make a secure login using UDID or device token?

    - by Erik B
    So I'm making an app where I want the users to be able add, edit and rate content, but I do not want to force them to register. Instead I was planning on just using their device id or device token to identify them. I'm planning on making both an iPhone and Android version, so I'm looking for a general solution, but the iPhone version has higher priority, so an iPhone specific solution would also be welcome. The problem is that I don't want just anyone to be able to use my web service by sending a phony device id or someone else's device id. How would the client prove to the server that it is providing the correct device id?

    Read the article

  • Using an SHA1 with Micrsoft CAPI

    - by Erik Jõgi
    Hello, I have an SHA1 hash and I need to sign it. The CryptSignHash() method requires a HCRYPTHASH handle for signing. I create it and as I have the actual hash value already then set it: CryptCreateHash(cryptoProvider, CALG_SHA1, 0, 0, &hash); CryptSetHashParam(hash, HP_HASHVAL, hashBytes, 0); The hashBytes is an array of 20 bytes. However the problem is that the signature produced from this HCRYPTHASH handle is incorrect. I traced the problem down to the fact that CAPI actually doesn't use all 20 bytes from my hashBytes array. For some reason it thinks that SHA1 is only 4 bytes. To verify this I wrote this small program: HCRYPTPROV cryptoProvider; CryptAcquireContext(&cryptoProvider, NULL, NULL, PROV_RSA_FULL, 0); HCRYPTHASH hash; HCRYPTKEY keyForHash; CryptCreateHash(cryptoProvider, CALG_SHA1, keyForHash, 0, &hash); DWORD hashLength; CryptGetHashParam(hash, HP_HASHSIZE, NULL, &hashLength, 0); printf("hashLength: %d\n", hashLength); And this prints out hashLength: 4 ! Can anyone explain what I am doing wrong or why Microsoft CAPI thinks that SHA1 is 4 bytes (32 bits) instead of 20 bytes (160 bits). Thank you.

    Read the article

  • Partitioning a table in mysql after creation

    - by erik
    I have a table with a bunch of data already in it. I know how to create a partitioned table or alter an already existing partitioned table, but can I add partitions to a table after it has been created, has data in it, without losing the data? The other option is to dump all the data, recreate the table with the partitions and then insert it all back it. Is that the only way? Thanks.

    Read the article

  • Wordpress loginform

    - by Erik Larsson
    Hello, I have created a loginform that is displayed on the front page. Everything works fine except one thing, if you log in with bad information you get redirected to wp-login.php and the error message pans out there. What i want is so the error message displays at the form on my front page. Is there way of doing this?

    Read the article

  • Options for displaying OG groups a node is published for on node page?

    - by Erik Töyrä
    What I want I have several OG groups in which content can be published. I would like to display which OG groups a node has been published for when viewing the node page. Like in "This page is published for: Department A, Department B." The code snipped below shows the data I have in the $node object in node.tpl.php. This data is generated by the OG module. Extracted data from $node ... [og_groups] => Array ( [993] => 993 [2078] => 2078 ) [og_groups_both] => Array ( [993] => Department A [2078] => Department B ) ... I know I could loop through the og_groups_both array in node.tpl.php and generate the output from there, but it feels like a quite dirty solution. The ideal solution would be to have a $og_groups variable in node.tpl.php, similiar to how $submitted is used in node.tpl.php (see below). Example of how $submitted is used <?php if ($submitted): ?> <div class="submitted"><?php print $submitted; ?></div> <?php endif; ?> Should I use hook_load() in a custom module to insert the new variable $og_groups in $node? What options do I have and which solution would you recommend?

    Read the article

  • Does Java Mac OSX native look and feel respect UIManager font changes?

    - by Erik Lickerman
    I have a java applet and the only look and feel that works properly is the native mac one. I wanted to make the fonts a bit larger and tried using the standard UIManager methods UIManager.put("Label.font", new Font("Georgia", Font.PLAIN, 18)); This produces no change. It does not throw an exception, of course. Does anyone know if the native mac look and feel ignores these? I know there are specific ways to make controls different sizes on mac but these only seem to make them smaller. You cannot make the controls larger than regular.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13  | Next Page >