Search Results

Search found 361 results on 15 pages for 'erik philips'.

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

  • Change DIV background color for all inputs in form

    - by Erik
    I have a form with 20 input fields. Each input field is inside a DIV I have a script that changes the background color of the DIV via keyup function along with two other DIV tags. Rather than duplicating the script 20 times for each DIV and Input, is it possible to re-write the script to do all DIV's and their Inputs? <script> $(document).ready(function(){ $("#id").keyup(function() { if($("#id").val().length > 0) $("#in1, #nu1, #lw1, #id").css("background-color", "#2F2F2F").css("color", "#FFF"); else { if($("#id").val().length == 0) $("#in1, #nu1, #lw1, #id").css("background-color", "#E8E8E8").css("color", "#000"); } }); }); </script>

    Read the article

  • Wordpress Widget auto activate

    - by Erik Larsson
    Hello! Im new att widgets, but i have manage to write my own widget and get it to display correctly in my theme. The only problem i have now is that i want the widget to "auto activate" in the sidebar. So when the theme is installed on any wordpress installation the widget should be active so the user dosent need to drag it to the sidebar in admin. Is that possible?

    Read the article

  • Translate C# code into AST?

    - by Erik Forbes
    Is it currently possible to translate C# code into an Abstract Syntax Tree? Edit: some clarification; I don't necessarily expect the compiler to generate the AST for me - a parser would be fine, although I'd like to use something "official." Lambda expressions are unfortunately not going to be sufficient given they don't allow me to use statement bodies, which is what I'm looking for.

    Read the article

  • Why is NavigationHandler.handleNavigation() not forwarding to view ID?

    - by Erik Hermansen
    Inside of a phase listener class that runs during the "RESTORE_VIEW" phase, I have some code like this: public void afterPhase(PhaseEvent event) { FacesContext fc = event.getFacesContext(); NavigationHandler nh = fc.getApplication().getNavigationHandler(); nh.handleNavigation(fc, null, "/a/specific/path/to/a/resource.jspx"); } Navigation to the new URL doesn't work here. The request made will just receive a response from the original JSPX that was navigated to. Code like this works fine: public void afterPhase(PhaseEvent event) { FacesContext fc = event.getFacesContext(); NavigationHandler nh = fc.getApplication().getNavigationHandler(); nh.handleNavigation(fc, null, "OUTCOME_DEFINED_IN_FACES_CONFIG_XML"); } Also the first snippet will work with an IceFaces Faces provider, but not Sun JSF 1.2 which is what I need to use. Is there something I can do to fix the code so it is possible to forward to specific URLs?

    Read the article

  • How do I design a Wizard-based system with SoC in mind?

    - by Erik Forbes
    I'm building a Windows Forms system (in C# if it matters to anyone) that provides an application automation service. As this application is targeted at users who are not computer savvy, I've decided to break up the functions of the application into various tasks, and provide these tasks via a wizard UI. I'd like to avoid coupling the views and view engine (from which the Wizard will be built) to the automation engine. The problem I'm having is that the automation engine, which runs on a separate thread while it does its thing, needs to report status information back to the user, as well as listen for cancel or pause events from the user. Since I don't want the view engine or the automation engine to rely on each other, I'm having a hard time figuring out how to provide for this information conduit. Any insights into this issue I'm having would be greatly appreciated. I've been wracking my brain for a couple weeks now on this point, and I really don't want to give up and just couple everything together. If anyone needs additional details to help come up with some sort of idea please let me know and I'll be happy to provide them.

    Read the article

  • how to attach window.close to cntrl+w keypress event in a xul window?

    - by Erik Vold
    I have a XUL window, and I want the cntrl+w hotkey to close the window, but when I attach: window.addEventListener("keypress", function(ev) { GM_log("onkeypress handler: \n" + "keyCode property: " + ev.keyCode + "\n" + "which property: " + ev.which + "\n" + "charCode property: " + ev.charCode + "\n" + "Character Key Pressed: " + String.fromCharCode(ev.charCode) + "\n"); }, true); to the page, it treats pressing 'w' and 'cntrl+w' the same, charCode 119.. how can I determine that cntrl+w was pressed so that I may window.close() ?

    Read the article

  • Is there a good date/time API available for Scala?

    - by Erik Engbrecht
    I'm looking for something akin to JodaTime or JSR 310 for Scala that leverages nice Scala features such as operator overloading and doesn't rely on implicit conversions (I have an irrational fear of implicit conversions). I'm aware of http://github.com/jorgeortiz85/scala-time, but it just pimps JodaTime with implicits.

    Read the article

  • Javascript Callback when variable is set to X

    - by Erik
    Hey everyone, Have an issue I can't seem to wrap my head around. I'm wanting to write a generic javascript function that will accept a variable and a callback, and continue to execute until that variable is something other than false. For example, the variable SpeedFeed.user.sid is false until something else happens in the code, but I don't want to execute a particular callback until it has been set. The call: SpeedFeed.helper_ready(SpeedFeed.user.sid, function(){ alert(SpeedFeed.user.sid); // Run function that requires sid to be set. }); The function: helper_ready: function(vtrue, callback){ if(vtrue != false){ callback(); } else { setTimeout(function(){ SpeedFeed.helper_ready(vtrue, callback); }, SpeedFeed.apiCheckTime); } } The issue I've narrowed it down to appears to be that because in the setTimeout I call vtrue instead of the actual SpeedFeed.user.sid, it's going to be set to false always. I realize I could write a specific function for each time that just evaluates the SpeedFeed.user.sid, but I'd like to have a generic method that I could use throughout the application. Thanks for any insight :)

    Read the article

  • Hash Digest / Array Comparison in C#

    - by Erik Karulf
    Hi All, I'm writing an application that needs to verify HMAC-SHA256 checksums. The code I currently have looks something like this: static bool VerifyIntegrity(string secret, string checksum, string data) { // Verify HMAC-SHA256 Checksum byte[] key = System.Text.Encoding.UTF8.GetBytes(secret); byte[] value = System.Text.Encoding.UTF8.GetBytes(data); byte[] checksum_bytes = System.Text.Encoding.UTF8.GetBytes(checksum); using (var hmac = new HMACSHA256(key)) { byte[] expected_bytes = hmac.ComputeHash(value); return checksum_bytes.SequenceEqual(expected_bytes); } } I know that this is susceptible to timing attacks. Is there a message digest comparison function in the standard library? I realize I could write my own time hardened comparison method, but I have to believe that this is already implemented elsewhere.

    Read the article

  • How to feed data over STDIN to multiple external commands in ruby.

    - by Erik
    This question is a bit like my previous (answered) question: How to run multiple external commands in the background in ruby. But, in this case I am looking for a way to feed ruby strings over STDIN to external processes, something like this (the code below is not valid but illustrates my goal): #!/usr/bin/ruby str1 = 'In reality a relatively large string.....' str2 = 'Another large string' str3 = 'etc..' spawn 'some_command.sh', :stdin => str1 spawn 'some_command.sh', :stdin => str2 spawn 'some_command.sh', :stdin => str3 Process.waitall

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

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