Search Results

Search found 18766 results on 751 pages for 'me again'.

Page 72/751 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • Returning user data for forms that have errors in when using ModelForms

    - by Sevenearths
    forms.py from django.forms import ModelForm from client.models import ClientDetails, ClientAddress, ClientPhone from snippets.UKPhoneNumberForm import UKPhoneNumberField class ClientDetailsForm(ModelForm): class Meta: model = ClientDetails class ClientAddressForm(ModelForm): class Meta: model = ClientAddress class ClientPhoneForm(ModelForm): number = UKPhoneNumberField() class Meta: model = ClientPhone views.py from django.shortcuts import render_to_response, redirect from django.template import RequestContext from client.forms import ClientDetailsForm, ClientAddressForm, ClientPhoneForm def new_client_view(request): formDetails = ClientDetailsForm(initial={'marital_status':'u'}) formAddress = ClientAddressForm() formHomePhone = ClientPhoneForm(initial={'phone_type':'home'}) formWorkPhone = ClientPhoneForm(initial={'phone_type':'work'}) formMobilePhone = ClientPhoneForm(initial={'phone_type':'mobi'}) return render_to_response('client/new_client.html', {'formDetails': formDetails, 'formAddress': formAddress, 'formHomePhone': formHomePhone, 'formWorkPhone': formWorkPhone, 'formMobilePhone': formMobilePhone}, context_instance=RequestContext(request)) (the new_client.html is nothing special) How should I write views.py so that if the user's data raises an error, instead of showing them the form again with the errors in but none of their original data, it shows them the form again with the errors AND their original data?

    Read the article

  • jquery show hidden div

    - by Fahad
    Firstly, I'm sort of embarrassed asking about this, so many people have already asked this question but even after having gone through so many posts, I'm unable to achieve what I want. Basically, a div, initially hidden, has to be displayed on a button click. I tried hiding the div using display:none and hide() and then displaying it using show(), toggle(), and css("display","block"). Using all sorts of combinations of the above, I was still unable to get the result. Code: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link href="css/smoothness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css" /> <script src="jQuery/jquery-1.8.3.min.js" type="text/javascript"></script> <script src="jQuery/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $('#one').hide(); $('#Button1').click(function () { $('#one').toggle(500); }); }); </script> </head> <body> <form id="form1" runat="server"> <div id="one" style="height: 20px;width:200px; background-color: Red; "> </div> <asp:Button ID="Button1" runat="server" Text="Show" /> </form> </body> </html> On button click, the div is shown for a brief second before it disappears again. The same thing happens if I use show() instead of toggle() in the above code. Again the same thing if I set style="display:none" to the div instead of using hide() and then use show() or toggle(). I also tried using $('#one').css("display","block"); but again, the same result. Can anyone please tell me where I'm going wrong. Just started learning jQuery and it is really frustrating when something apparently so simple will not work. Thanks in advance. :)

    Read the article

  • Expression Blend 3 (Silverlight) gives me nothing on project compile

    - by Buginator
    When I press F5 the project compiles, and the new web page launches. However, the silverlight control loads (the standard load counter counts to 100%) but then the whole control just disappear. Only the left default menu bar (feedback etc) is visible. It's a very small project, my first actually. This also happened earlier today, but then I removed each thing one at a time and found that it was some radio buttons that caused it. I deleted them and remade them and it ran fine again. Now the same thing happened again, but it is something else, not sure yet. The question is; is this a familiar bug or am I just doing something wrong? My code-behind consist mostly of visibility changes, around 20 lines of code.

    Read the article

  • How can a client try to reconnect to a server after a first failed try with WCF?

    - by djerry
    Hey guys, I'm using a client - server app. When a client starts, he gets a login-screen. When the server is not up yet, the call to the server will throw an exception which i catch (EndpointNotFoundException). I show a messagebox telling the user the server is offline. When he tries to reconnect again, it will throw another exception (CommunicationObjectFaultedException), even though the server is online. When a new client starts then, he can connect to the server. But the client who attempted before, still gets the error. My question now is how can the first client login after a failed first try without having to start his program again. So i want to clear the communicationchannel of its faulted state or something like that. Thanks in advance.

    Read the article

  • How do Ruby and Python implement their interactive consoles?

    - by sxa
    When implementing the interpreter for my programming language I first thought of a simple console window which allows the user to enter some code which is then executed as a standalone program as a shell. But there are severe problems: If every line of code the user enters is handled as a standalone program, it has to go through the tokenizer and parser and is then just executed by the interpreter - what about functions then? How can the Python/Ruby interactive consoles (IDLE, irb) "share" the code? How is the code entered handled? Example: >> def x: >> print("Blah") >> >> x() Where is the function stored so it can be called at any time again? How can the interactive console take everything entered as obviously one program without executing everything over and over again?

    Read the article

  • php $_REQUEST data is only half-decoded

    - by hackmaster.a
    I am retrieving a url via querystring. I need to pass it again to the next page. When I retrieve it the first time, using $_REQUEST['url'], only the slashes are decoded, e.g: http://example.com/search~S10?/Xllamas&searchscope=10&SORT=D/Xllamas&searchscope=10&SORT=D&SUBKEY=llamas/51%2C64%2C64%2CB/browse The php docs page for urldecode advises against decoding request data, and says that it will already be decoded. I need it either completely decoded, so I can encode it again without double-encoding some parts, or not decoded at all. I'm not sure why my experience of this data is incongruous with the php docs. Appreciate any help or pointers to same!!

    Read the article

  • Core data storage is repeated...

    - by Kamlesh
    Hi all, I am trying to use Core Data in my application and I have been succesful in storing data into the entity.The data storage is done in the applicationDidFinishLaunchingWithOptions() method.But when I run the app again,it again gets saved.So how do I check if the data is already present or not?? Here is the code(Saving):-`NSManagedObjectContext *context = [self managedObjectContext]; NSManagedObject *failedBankInfo = [NSEntityDescription insertNewObjectForEntityForName:@"FailedBankInfo" inManagedObjectContext:context]; [failedBankInfo setValue:@"Test Bank" forKey:@"name"]; [failedBankInfo setValue:@"Testville" forKey:@"city"]; [failedBankInfo setValue:@"Testland" forKey:@"state"]; NSError *error; if (![context save:&error]) { NSLog(@"Whoops, couldn't save: %@", [error localizedDescription]); } (Retrieving):- NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"FailedBankInfo" inManagedObjectContext:context]; [fetchRequest setEntity:entity]; NSArray *fetchedObjects = [context executeFetchRequest:fetchRequest error:&error]; for (NSManagedObject *info in fetchedObjects) { NSLog(@"Name: %@", [info valueForKey:@"name"]); } `

    Read the article

  • How to reset input field in the iframe?

    - by user244394
    Hi! I have a search input field on the header of the page and when searched the result are displayed in an iframe, which also has the search input box on the iframe. Problem is how do I go about reseting the input value in the iframe search input field? It seem to remember the old search from the header, so when you do a search again in the iframe it display the last search, instead of the new search keyword. You have to refresh or clear the search again to make the search work correctly. Thanks in advance

    Read the article

  • How do I trigger specific parts of a storyboard in WPF?

    - by George
    I have several grids in my window. I have created a storyboard that moves them left by x pixels when a button is clicked. I want to make it so that when the button is clicked again those grids move another x pixels, however I'm unable to find out how to do this as it's not a common task on tutorials. I have tried creating a second storyboard to do this, however that won't work as then the grids will be back at their starting positions. One solution might be to create a third set of keyframes after the first two sets, and somehow pause the animation when it gets there, and resumes it again when the button is clicked, however I'm not sure how to pause a storyboard when it reaches a keyframe. This would also make reversing the grids difficult (using this approach http://social.msdn.microsoft.com/forums/en-US/wpf/thread/ac54de71-f750-4940-91a2-231810308727/), as I'd like to make another button make the grids go the other way.

    Read the article

  • JSF Servlet Arch Help needed.

    - by abc
    i want a mechanism in my web app as described below: user will enter mydomain.com/CompanyName , depending upon the CompanyNameit will show its logo and its customized page, and i will take that parsed parameter in session again upon each request i will compare the parsed CompanyName and one stored in session , and if they matched then application will show the requested page with user's data.else it will be redirected to login page. and the main thing is i want this thing in JSF arch. i tried taking a servlet that will resolve all request and it will parse and then will dispatch the request to prefered servlet,but problem is it goes in loop as again it resolves to the same controller servlet,

    Read the article

  • Manually force touch points to reset in Windows 8?

    - by loyalpenguin
    Hi I developed a HTML5/JAVASCRIPT app that is supported using advertisement for the Win8 store. I just by chance happened to notice that if you touch the screen, drag your finger over the advertisement, and release your finger on top of the advertisement that the specific touch is not released and instead when you touch again it registers as a separate touch. This has caused my app to behave expectantly when the user interacts with the app using touch. I wanted to know if it was possible to force the touches to reset so that when the user touches the screen again it is always using "Touch(0)".

    Read the article

  • How to interact between GameCanvas and LCDUI elements on J2ME?

    - by Santiago
    The thing is I writing a J2ME program that fisrt of all show a "menu" using graphics interface (GameCanvas) and when the user select one item, I need to setCurrent that item (ex. a List), but when return from the List (it could be because the user push a Command "Menu" Item) I need to show the menu again. The real problem when the menu show again, the keyPressed() listener of gamecanvas object stop working. Basically I have: A Midlet object with: GameCanvas object instance A List object instance I don't understand how that works, I didn't find tutorial that share low and high graphics-level APIs on one Midlet.

    Read the article

  • Passing Data from Usercontrol to controller

    - by nitinkhanna
    Hi, I am new to MVC, and trying something and got stuck somewhere in between. I have a user control there I have three textbox html type(ID, Lastname, firstname) and a submit buttom. I set the button like <input type="button" value="Search" onclick="location.href='<%= Url.Action("action", "controller") %>'" /> I have called this usercontrol on some view through <%= Html.Partial("ucName") %> Now on pressing that button(on user control) I need to pass the data from these textboxes to controller again to some specific action(Http Post action). By using this data I want to do some database interaction and storing the result in a dataset and pass this data set to same view again to show up in some Grid. I know the first part in conventional Asp.net can be done by raising the event through delegate but don't know how to do that in MVC.

    Read the article

  • Auto save changed text in richtextbox to database

    - by user2519407
    I have created one simple note taking application in jquery & php. Current functionality is like when user clicks save button it sends a ajax request with complete data to update it in db(mysql). All works well. But now I want to auto save only changed text while user typing. I don't want to send entire text to server again and again in text change event. It should send only text which has changed. For Ex: This is saved text. When user continues typing. This is saved text. Unsaved text.. It should be able to send only "Unsaved text.." to server to update in db. How can i implement this in jquery & server side script.? Any Idea..?

    Read the article

  • Why do sockets not die when server dies? Why does a socket die when server is alive?

    - by Roman
    I try to play with sockets a bit. For that I wrote very simple "client" and "server" applications. Client: import java.net.*; public class client { public static void main(String[] args) throws Exception { InetAddress localhost = InetAddress.getLocalHost(); System.out.println("before"); Socket clientSideSocket = null; try { clientSideSocket = new Socket(localhost,12345,localhost,54321); } catch (ConnectException e) { System.out.println("Connection Refused"); } System.out.println("after"); if (clientSideSocket != null) { clientSideSocket.close(); } } } Server: import java.net.*; public class server { public static void main(String[] args) throws Exception { ServerSocket listener = new ServerSocket(12345); while (true) { Socket serverSideSocket = listener.accept(); System.out.println("A client-request is accepted."); } } } And I found a behavior that I cannot explain: I start a server, than I start a client. Connection is successfully established (client stops running and server is running). Then I close the server and start it again in a second. After that I start a client and it writes "Connection Refused". It seems to me that the server "remember" the old connection and does not want to open the second connection twice. But I do not understand how it is possible. Because I killed the previous server and started a new one! I do not start the server immediately after the previous one was killed (I wait like 20 seconds). In this case the server "forget" the socket from the previous server and accepts the request from the client. I start the server and then I start the client. Connection is established (server writes: "A client-request is accepted"). Then I wait a minute and start the client again. And server (which was running the whole time) accept the request again! Why? The server should not accept the request from the same client-IP and client-port but it does!

    Read the article

  • Log4j: Issues about the FallbackErrorHandler

    - by rdogpink
    I am working on a client-server-application and wanted to implement a flexible Loggingframework, so I chose log4j, which doesn´t really evolve anymore, but it is still handy framework. Because the Logging happens along the network, i wanted a solution for the case, that the network drive isn´t available, so the Logger has to change its destination file(s). Now I wanted to use the FallbackErrorHandler (configured with a XML-File) from the Log4j-library and the implementation worked: When my network drive isn´t available, it switches to a local Logfile, so no logging should be lost. But I headded two problems since yesterday and couldn´t figure or find out, how to solve it. No return to initial Logging Configuration: When the network drive is on again and the Logger could write to the old destinations, log4j still logs at the local drive and I can´t figure out, how to notify the original (primary) Logger to start again. I also tried to attach a second Appender to the ErrorHandler, which should mirror the failed primary Logger, that it tries to write on the network destination and when the network is on again, it logs in both files, on the local and on the network drive. But unfortunately it didn´t work out, I only got a failure message that the ErrorHandler-content doesn´t fit. log4j:WARN The content of element type "errorHandler" must match "(param*,root-ref?,logger-ref*,appender-ref?)". This is the responsible code. <appender name="TraceAppender" class="org.apache.log4j.DailyRollingFileAppender"> <!-- The second appender-ref "TestAppender" leads to the error. --> <errorHandler class="org.apache.log4j.varia.FallbackErrorHandler"> <logger-ref ref="com.idoh"/> <appender-ref ref="TraceFallbackAppender"/> <appender-ref ref="TestAppender"/> </errorHandler> <param name="datePattern" value=".yyyy-MM-dd" /> <param name="file" value="logs/Trace.txt" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-6r %d{HH:mm:ss,SSS} [%t] %-5p - %m%n"/> </layout> </appender> So, how could I trigger log4j to reset to initial configuration or hold a second appender parallel to the "Local-Logger". My Application should work by itself and shouldn´t have to be restarted often. First Error message is swallowed: I recognized, that the first message, which leads to the switching between the primary logger and the FallbackErrorHandler (for example a logging-request to a readonly-File), is swallowed, so neither the primary logger logs it (because it can´t) nor the backup-Logger knows what it missed. So anybody else ran in this problem and could solve it? Or has any suggestions?

    Read the article

  • Is it safe to display user input as input values without sanitation?

    - by Svish
    Say we have a form where the user types in various info. We validate the info, and find that something is wrong. A field is missing, invalid email, et cetera. When displaying the form to the user again I of course don't want him to have to type in everything again so I want to populate the input fields. Is it safe to do this without sanitation? If not, what is the minimum sanitation that should be done first? And to clearify: It would of course be sanitized before being for example added to a database or displayed elsewhere on the site.

    Read the article

  • (Re)Enabling JavaScript debugger in IE7 with Visual Studio 2008

    - by masterik
    Visual Studio 2008 comes with nice javascript debugging features. But I have played a little with NetBeans debugger wich has installed an ugly Script Debugger from Microsoft to my IE... Normally IE should ask what do I want to use for debugging, but now I can't start debugging with Visual Studio, the Script Debugger is started automatically... After uninstalling the Script Debugger I can't debug in IE at all. Even attaching to iexplore.exe process doesn't helps... Has installed the Script Debugger again... :((((( How can I get back my Visual Studio debugging working in IE again?

    Read the article

  • What happens if a file I want to commit to SVN is updated so often I don't manage to do a merge quic

    - by sharptooth
    Consider a situation. I want to commit a changed file to SVN and see that someone else committed the same file after I checked it out, so I have to "update" and merge changes. While I'm doing that someone commits the same file again, so when I try to commit the merged file I have to update again. Now if other users commit often enough it looks like I will never be able to commit my changes. Is that really so? How is this problem solved in real development environments?

    Read the article

  • Asp.Net Impersonation Fails On First Try But Succeeds on Second

    - by KevDog
    We are using RDLC's in a Asp.net web application. For reasons beyond our understanding, the first call to the database server fails with the following error: An error has occurred during report processing. Cannot open database "TryParkingIt2" requested by the login. The login failed. Login failed for user 'EXTRANET\OurServerNameHere$'. Run the report again, it works. Huh? Update Click the button the first time, it fails. Click the button again, it works. The account being impersonated is a domain account.

    Read the article

  • How to show login screen only for the first time when app launches

    - by Jaw Ali
    I want to launch the login screen when first time app launches other wise app work simple but problem is that again again it goes to login screen. here is the code which i am using in didFininsh I want the user show go to login screen first time only and next time it should show splitViewController [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES],@"firstLaunch",nil]]; if ([[NSUserDefaults standardUserDefaults] boolForKey:@"firstLaunch"]) { [self.window addSubview:[splitViewController view]]; LoginViewController *targetController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; targetController.modalPresentationStyle = UIModalPresentationFullScreen; [self.splitViewController presentViewController:targetController animated:YES completion:nil]; } else { [self.window addSubview:[splitViewController view]]; } // my comment[window addSubview:splitViewController.view]; [window makeKeyAndVisible]; return YES;

    Read the article

  • jQuery: selecting by class after class change by .addClass() or .attr()

    - by Sosh
    I have some jQuery code something like this: $(document).ready(function() { $("img.off").click(function() { alert('on'); $(this).attr('class', 'on'); }); $("img.on").click(function() { alert('off'); $(this).attr('class', 'off'); }); }); The selector works fine for images that have the class name defined in the original HTML document, however after manipulating the class name with jQuery, the img item will not respond to selectors using it's new class. In other words, running the above code, if you click an 'off' img, it will trigger the first function, and change the class to 'on'. However, clicking this image again does not trigger the second function (as I would have expected), but rather triggers the first again. It's as if the selector is reading the old DOM rather than the updated version. What am I doing wrong here? Firefox 3.6.3 - jQuery 1.4.2

    Read the article

  • POSIX Threads and signal masks

    - by Max
    Is there a way to change the signal mask of a thread from another thread? I am supposed to write a multithreaded C application that doesn't use mutex, semaphores and condition variables, only signals. So it would look like something like this: The main Thread sends SIGUSR1 to its process and and one of the 2 threads (not including the main thread), will respond to the signal and block SIGUSR1 from the sigmask and sleep. Then the main thread sends SIGUSR1 again, the other thread will respond, block SIGUSR1 from its sigmask, unblock SIGUSR1 from the other threads sigmask, so it will respond to SIGUSR1 again. So essentially whenever the main thread sends SIGUSR1 the two other threads swap between each other. Can somebody help?

    Read the article

  • Why sockets does not die when server dies? Why socket dies when server is alive?

    - by Roman
    I try to play with sockets a bit. For that I wrote very simple "client" and "server" applications. Client: import java.net.*; public class client { public static void main(String[] args) throws Exception { InetAddress localhost = InetAddress.getLocalHost(); System.out.println("before"); Socket clientSideSocket = null; try { clientSideSocket = new Socket(localhost,12345,localhost,54321); } catch (ConnectException e) { System.out.println("Connection Refused"); } System.out.println("after"); if (clientSideSocket != null) { clientSideSocket.close(); } } } Server: import java.net.*; public class server { public static void main(String[] args) throws Exception { ServerSocket listener = new ServerSocket(12345); while (true) { Socket serverSideSocket = listener.accept(); System.out.println("A client-request is accepted."); } } } And I found a behavior that I cannot explain: I start a server, than I start a client. Connection is successfully established (client stops running and server is running). Then I close the server and start it again in a second. After that I start a client and it writes "Connection Refused". It seems to me that the server "remember" the old connection and does not want to open the second connection twice. But I do not understand how it is possible. Because I killed the previous server and started a new one! I do not start the server immediately after the previous one was killed (I wait like 20 seconds). In this case the server "forget" the socket from the previous server and accepts the request from the client. I start the server and then I start the client. Connection is established (server writes: "A client-request is accepted"). Then I wait a minute and start the client again. And server (which was running the whole time) accept the request again! Why? The server should not accept the request from the same client-IP and client-port but it does!

    Read the article

  • prevent using functions before initialization, constructors-like in C

    - by Hernán Eche
    This is the way I get to prevent funA,funB,funC, etc.. for being used before init #define INIT_KEY 0xC0DE //any number except 0, is ok static int initialized=0; int Init() { //many init task initialized=INIT_KEY; } int funA() { if (initialized!=INIT_KEY) return 1 //.. } int funB() { if (initialized!=INIT_KEY) return 1 //.. } int funC() { if (initialized!=INIT_KEY) return 1 //.. } The problem with this approach is that if some of those function is called within a loop so "if (initialized!=INIT_KEY)" is called again, and again, although it's not necessary. It's a good example of why constructors are useful haha, If it were an object I would be sure that when was created initialization was called, but in C, I don't know how to do it. Any other ideas are welcome!

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >