Search Results

Search found 1911 results on 77 pages for 'james howell'.

Page 58/77 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Linq To Sql Entity Updated from Trigger

    - by James Helms
    I have a Table called Address. I have a Trigger for insert on that table that does some spacial calculations on the address that determines what neighborhood boundaries it is in. address = new Address { Street = this.Street, City = this.City, State = this.State, ZipCode = this.ZipCode, latitude = this.Latitude, longitude = this.Longitude, YearBuilt = this.YearBuilt, LotSize = this.LotSize, FinishedSize = this.FinishedSize, Bedrooms = this.Bedrooms, Bathrooms = this.Bathrooms, UseCode = this.UseCode, HOA = this.HOA, UpdateDate = DateTime.Now }; db.AddToAddresses(address); db.SaveChanges(); In the database i can clearly see that the Trigger ran and updated the neighborhoodID in the address table for the row. I tried to just reload that record to get the assigned id like this: address = (from a in db.Addresses where a.AddressID == address.AddressID select a).First(); In the debugger i can clearly see that the address.AddressID is correct, entity doesn't update in memory. Is there any work around for this?

    Read the article

  • I just discovered why all ASP.Net websites are slow, and I am trying to work out what to do about it

    - by James
    I just discovered that every request in an ASP.Net web application gets a Session lock at the begging of a request, and then releases it at the end of the request!!! I mean, WTF Microsoft! In case the implication is lost on you, as it was from me at first, this basically means the following: Anytime an ASP.Net webpage is taking a long time to load (maybe due to a slow database call or whatever), and the user decides they want to navigate to a different page because they are tired of waiting, THEY CANT! The ASP.Net session lock forces the new page request to wait until the original request has finished its painfully slow load. Arrrgh. Anytime an UpdatePanel is loading slowly, and the user decides to navigate to a different page before the UpdadePanel has finished updating... THEY CANT! The ASP.Net session lock forces the new page request to wait until the original request has finished its painfully slow load. Double Arrrgh! So what are the options? So far I have come up with: Implement a Custom SessionStateDataStore, which ASP.Net supports. I haven't found too many out there to copy, and it seems kind of high risk and easy to mess up. Keep track of all requests in progress, and if a request comes in from the same user, cancel the original request. Seems kind of extreme, but it would work (I think) Don't user Session! When I need some kind of state for the user, I could just user Cache instead, and key items on the authenticated user's name, or some such thing. Again seems kind of extreme I really can't believe that the ASP.Net Microsoft team would have left such a huge performance bottleneck in the framework at version 4.0! Am I missing something obvious? How hard would it be to use a ThreadSafe collection for the Session? Arrrrghhhhhh. Any advice much appreciated.

    Read the article

  • how to avoid jQuery UI draggable from also triggering click event

    - by James Tauber
    A have a large div (a map) that is draggable via jQuery UI draggable. The div has child divs which are clickable. My problem is that if you drag the map, on mouse up, the click event is fired on whatever child div you started the drag from. How do I stop the mouse up from triggering the click event if its part of a drag (as opposed to someone just clicking without a drag, in which case the click event is desired).

    Read the article

  • NotificationCenter Widget Failed To Use CoreLocation

    - by James Ye
    I'm writing a notification center widget, and it had to use location information. In normal apps I use CoreLocation and it works fine. But in my widget, I tried to locationServicesEnabled but it didn't go to the callback functions, and the authorizationStatus is always kCLAuthorizationStatusNotDetermined, and the authorize setting didn't show up in Setting - location service. I already set the delegate to the class. The system's Yahoo weather widget can auto locating and it uses CoreLocation too, so the widget do have ability to use location service. Why CoreLocation doesn't work on my widget?

    Read the article

  • PHP Form - Empty input enter this text - Validation

    - by James Skelton
    No doubt very simple question for someone with php knowledge. I have a form with a datepicker, all is fine when a user has selected a date the email is send with: Date: 2012 04 10 But i would like if the user has skipped this and left blank (as i have not made this required) to send as: Date: Not Entered (<-- Or something) Instead at the minute of course it reads: Date: Form input <input type="text" class="form-control" id="datepicker" name="datepicker" size="50" value="Date Of Wedding" /> This is the validator $(document).ready(function(){ //validation contact form $('#submit').click(function(event){ event.preventDefault(); var fname = $('#name').val(); var validInput = new RegExp(/^[a-zA-Z0-9\s]+$/); var email = $('#email').val(); var validEmail = new RegExp(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/); var message = $('#message').val(); if(fname==''){ showError('<div class="alert alert-danger">Please enter your name.</div>', $('#name')); $('#name').addClass('required'); return;} if(!validInput.test(fname)){ showError('<div class="alert alert-danger">Please enter a valid name.</div>', $('#name')); $('#name').addClass('required'); return;} if(email==''){ showError('<div class="alert alert-danger">Please enter an email address.</div>', $('#email')); $('#email').addClass('required'); return;} if(!validEmail.test(email)){ showError('<div class="alert alert-danger">Please enter a valid email.</div>', $('#email')); $('#email').addClass('required'); return;} if(message==''){ showError('<div class="alert alert-danger">Please enter a message.</div>', $('#message')); $('#message').addClass('required'); return;} // setup some local variables var request; var form = $(this).closest('form'); // serialize the data in the form var serializedData = form.serialize(); // fire off the request to /contact.php request = $.ajax({ url: "contact.php", type: "post", data: serializedData }); // callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ $('.contactWrap').show( 'slow' ).fadeIn("slow").html(' <div class="alert alert-success centered"><h3>Thank you! Your message has been sent.</h3></div> '); }); // callback handler that will be called on failure request.fail(function (jqXHR, textStatus, errorThrown){ // log the error to the console console.error( "The following error occured: "+ textStatus, errorThrown ); }); }); //remove 'required' class and hide error $('input, textarea').keyup( function(event){ if($(this).hasClass('required')){ $(this).removeClass('required'); $('.error').hide("slow").fadeOut("slow"); } }); // show error showError = function (error, target){ $('.error').removeClass('hidden').show("slow").fadeIn("slow").html(error); $('.error').data('target', target); $(target).focus(); console.log(target); console.log(error); return; } });

    Read the article

  • how to execute any function in jquery after few seconds on the click of any link

    - by james Bond
    I have struts2 jquery grid where on click of a row I am calling a jQuery function for performating a struts2 action. My code is running fine. I want to perform my jQuery function after delay of a few seconds. How can I do this? <script type="text/javascript"> //assume this code is working fine on rowselect from my jquery grid, New Updation in it is "i want to execute or load the url after few seconds" $(function(){ $.subscribe('rowselect', function(event,data) { var param = (event.originalEvent.id); $("#myAdvanceDivBoxx").load('<s:url action='InsertbooksToSession' namespace='/admin/setups/secure/jspHomepage/bookstransaction'/>'+"?bid="+event.originalEvent.id); }); }); </script> What i tried is the below code but am unable to get the output which i am looking for: <script type="text/javascript"> $(function(){ $.subscribe('rowselect', function(event,data) { var param = (event.originalEvent.id); $("#myAdvanceDivBoxx").load('<s:url action='InsertbooksToSession' namespace='/admin/setups/secure/jspHomepage/bookstransaction'/>'+"?bid="+event.originalEvent.id); }).delay(9000); }); </script>

    Read the article

  • How can I get rails to not render escaped quotes as \&quot;

    - by James
    In my layout I have <% @current_user.popups.each do |p| %> <% content_for :script do %> <%= "$(document).ready ( function() { $.jGrowl(\"#{p.message}\", { sticky: true }) });" %> <% end %> <% end %> And then in the script section I have <%= yield :script %> The problem is that this renders the escaped quotes as \&quot; and javascript doesn't like this. How can I stop this from happening? Or is there another approach to this? I can't use single quotes because I'd like to have some html in the message. I'd appreciate any help.

    Read the article

  • How do I completely disable caching in Cakephp?

    - by James Lamiell
    So I opened the cache floodgates in my Cakephp app and now I want to close them... I've done pretty everything I can: delete all files in the tmp folder (but not the folders), turned 'Cache.disable' on in the core.php file in my app, have tried clearing the cache from within some controllers with clearCache() and Cache::clear() (but I suspect this doesn't work because it's not loading the controller -- due to caching). I've pretty much effectively halted my development process just because caching won't turn off. Anyone have some ideas that I could try? I'm starting to think it may be within the browser or maybe my hosting service, but it's probably just Cakephp messing with me.

    Read the article

  • Using a model to represent the overall state of a view

    - by James P.
    Is there a standard practise for representing the state of a user interface that is not linked to a single Component? For example, a Swing interface could have a series of tabs with a constraint that a single tab should only be displayed once per a given entity type (this could be represented as a HashSet). Or a message could give the result of the last operation carried out. Or a JPanel could be linked to a single entity instance for editing purposes.

    Read the article

  • How do I use a MySQL subquery to count the number of rows in a foreign table?

    - by James Skidmore
    I have two tables, users and reports. Each user has no, one, or multiple reports associated with it, and the reports table has a user_id field. I have the following query, and I need to add to each row a count of how many reports the user has: SELECT * FROM users LIMIT 1, 10 Do I need to use a subquery, and if so, how can I use it efficently? The reports table has thousands and thousands of rows.

    Read the article

  • What is the explanation for "warning: assuming that the loop is not infinite"

    - by James Morris
    I had just taken the decision to change as many variables from unsigned to int and upon recompiling the code in question, was greeted by this warning message: freespace_state.c:203: warning: assuming that the loop is not infinite The line in question: for (x = startx; x <= endx; ++x, ++xptr) This loop is 60 lines of code (inc white space/brackets etc), and has a goto within it, and at least one occurrence of continue. In this case, I think I am appreciative that GCC is assuming this loop is not infinite, because, it should never loop indefinitely. What is GCC trying to tell me here?

    Read the article

  • jQuery. Treat a string as a HTML document?

    - by James Jeffery
    I'm not sure if I worded the title correctly. Basically is it possible to treat a string as HTML as if it was on the page? So I can use $("#elem") and all the other jQuery functions? The HTML is loaded into a string from an ajax request and stored in a string. Instead of using regular expressions to access the data needed is it possible to use jQuery functions? ajaxTextResponse.$("#telephone"); I know the above won't work, but you see what I am getting at. Thanks

    Read the article

  • How to style just one type of input field without also affecting other input types with CSS

    - by James
    Is there a way to write style rules that will only influence text fields. Suppose I have the following: <div id="helloDiv"> <input type="text" name="something" /><br /> <input type="checkbox" name="somethingElse" /><br /> <input type="submit" name="go" /> </div> div#helloDiv input { border: 1px solid red; } The problem with the above CSS rule is that it will affect ALL input fields not just input text but also radio buttons, submit buttons, etc. So is there a cross browser solution to affect just one type of input field within a div or other page element (without resorting to assigning the input fields styles individually).

    Read the article

  • global applied stylesheet link on debian box

    - by James
    Hi there, Having some trouble identifying what is wrong with my link to an external CSS stylesheet... I am using a debian box to host some things... including a file i am accessing page.py which is located in /var/www/cgi-bin. I need this page to link to a css file which currently has the pathname /var/www/styles.css. Now I know I could link as: <link rel="stylesheet" href="**../styles.css**" type="text/css"> and the problem is solved but I would rather have a 'global' link, that I can use in other py files elsewhere in my filesystem and they will all point to /var/www/styles.css The information I have searched suggests that <link rel="stylesheet" href="**/var/www/styles.css**" type="text/css"> should work fine... but it doesn't. I have tried multiple combinations of everything I know but it doesn't seem to link as I would expect. Can anyone point me in the right direction?

    Read the article

  • Help with redirect and query strings

    - by James
    I'm a total novice at mod rewrite so I'll try and present my question as clearly as possible: I'm trying to create a url redirect of the following (static) affiliate url that can append it self to any product links after using a query string: affiliate url: hxxp://clk.affilite.com/fs-bin/click?id=aFb*BBBBBpQ&subid=&offerid=9999.2&type=5&tmpid=9999&RD_PARM1= product url: hxxp:// example.domain.com What I want to achieve is redirecting the affiliate code as below and being able to add dynamic product urls after as the following examples show: rewritten affiliate url: hxxp://domain.com/go affiliate url + product url: hxxp://domain.com/go?=http://example.domain.com redirects to: hxxp://clk.affilite.com/fs-bin/click?id=aFb*BBBBBpQ&subid=&offerid=9999.2&type=5&tmpid=9999&RD_PARM1=http://example.domain.com

    Read the article

  • Need Insight - What is the best practice for syncing up a production database that will be used on a

    - by james
    I have a site set up using CakePHP and MySQL and I want to work on a test database without disrupting my live site in case something goes wrong. I have another busy site, but my test site runs off the live database which can be occasionally nerve wracking. What do I do if I change a table name in the test db and I want it changed in the live database? Or if I remove a record from the test database. Is there a way to diff the changes? How do I even merge those changes? How does this interfere with live user edits and things of that nature? Hopefully some of you working devs can share some insight!

    Read the article

  • Flip Vertices Array

    - by James
    Hi, I have an array of position vertices that make up a 2D polygon. Vector2[] _chassisConcaveVertices = { new Vector2(5.122f, 0.572f), new Vector2(3.518f, 0.572f), new Vector2(3.458f, 0.169f), new Vector2(2.553f, 0.169f), new Vector2(2.013f, 0.414f), new Vector2(0.992f, 0.769f), new Vector2(0.992f, 1.363f), new Vector2(5.122f, 1.363f), }; What algorithm can I use to modify the positions so the resultant polygon is flipped? I need to flip the polygon both horizontally and vertically.

    Read the article

  • How would I go about implementing a stopwatch with different speeds?

    - by James
    Ideally I would like to have something similar to the Stopwatch class but with an extra property called Speed which would determine how quickly the timer changes minutes. I am not quite sure how I would go about implementing this. Edit Since people don't quite seem to understand why I want to do this. Consider playing a soccer game, or any sport game. The halfs are measured in minutes, but the time-frame in which the game is played is significantly lower i.e. a 45 minute half is played in about 2.5 minutes.

    Read the article

  • What is user gcc's purpose in requesting code possibly like this?

    - by James Morris
    In the question between syntax, are there any equal function the user gcc is requesting only what I can imagine to be the following code: #include <stdio.h> #include <string.h> /* estimated magic values */ #define MAXFUNCS 8 #define MAXFUNCLEN 3 int the_mainp_compare_func(char** mainp) { char mainp0[MAXFUNCS][MAXFUNCLEN] = { 0 }; char mainp1[MAXFUNCS][MAXFUNCLEN] = { 0 }; char* psrc, *pdst; int i = 0; int func = 0; psrc = mainp[0]; printf("scanning mainp[0] for functions...\n"); while(*psrc) { if (*psrc == '\0') break; else if (*psrc == ',') ++psrc; else { mainp0[func][0] = *psrc++; if (*psrc == ',') { mainp0[func][1] = '\0'; psrc++; } else if (*psrc !='\0') { mainp0[func][1] = *psrc++; mainp0[func][2] = '\0'; } printf("function: '%s'\n", mainp0[func]); } ++func; } printf("\nscanning mainp[1] for functions...\n"); psrc = mainp[1]; func = 0; while(*psrc) { if (*psrc == '\0') break; else if (*psrc == ',') ++psrc; else { mainp1[func][0] = *psrc++; if (*psrc == ',') { mainp1[func][1] = '\0'; psrc++; } else if (*psrc !='\0') { mainp1[func][1] = *psrc++; mainp1[func][2] = '\0'; } printf("function: '%s'\n", mainp1[func]); } ++func; } printf("\ncomparing functions in '%s' with those in '%s'\n", mainp[0], mainp[1] ); int func2; func = 0; while (*mainp0[func] != '\0') { func2 = 0; while(*mainp1[func2] != '\0') { printf("comparing %s with %s\n", mainp0[func], mainp1[func2]); if (strcmp(mainp0[func], mainp1[func2++]) == 0) return 1; /* not sure what to return here */ } ++func; } /* no matches == failure */ return -1; /* not sure what to return on failure */ } int main(int argc, char** argv) { char* mainp[] = { "P,-Q,Q,-R", "R,A,P,B,F" }; if (the_mainp_compare_func(mainp) == 1) printf("a match was found, but I don't know what to do with it!\n"); else printf("no match found, and I'm none the wiser!\n"); return 0; } My question is, what is it's purpose?

    Read the article

  • Php pi help... (Loops)

    - by James Rattray
    Is this iteration the best? (Pi^2)/12 = 1 - 1/4 + 1/9 - 1/16 + 1/25 etc. -For converging faster? If not please answer with the iteration -preferably in the form above (an example) -not a splat of algebra ... I'm doing this to find Pi to 1,000,000,000 places online.

    Read the article

  • cron stops running when processing multiple items

    - by James
    Cron stops running (no visible error) after a few hours when I add more than 5 jobs in my cron tab. Each job runs every minute (polls a webpage for information which takes 1 second). I tried putting all of my php jobs in a shell script and called this shell script instead but the same problem occurs. Cron stops running, no error in the log file, no error email sent out either. Anyone encountered this before? Where/how canI debug this?

    Read the article

  • Would it be useful to change java to support both static and dynamic types?

    - by James A. N. Stauffer
    What if a Java allow both static and dynamic types. That might allow the best of both worlds. i.e.: String str = "Hello"; var temp = str; temp = 10; temp = temp * 5; Would that be possible? Would that be beneficial? Do any languages currently support both and how well does it work out? Here is a better example (generics can't be used but the program does know the type): var username = HttpServletRequest.getSession().getAttribute("username");//Returns a String if(username.length() == 0) { //Error }

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >