Search Results

Search found 10025 results on 401 pages for 'state restoration'.

Page 91/401 | < Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >

  • C# .net updates versus compile time debugging. How to stop the oddities?

    - by Fox Diller
    Are we reduced to ClickOnce to manage our application state for our users? We use Visual Patch currently. When our users update (we reproduced this) we get errors from the updated versions to our compiled versions. Since our developer state is not 'updated' with Visual Patch how can we monitor and eventual squash the various System.MethodNotFound, and System.NullReferenceException in our updated versions of our application?

    Read the article

  • what does synchronization mean in hibernate..

    - by abc
    i read that upon session.flush() The data will be synchronized (but not committed) when session.flush() is called what is synchronized with what.. whether it is DB state that will come to memory by querying or memory state will be copied to Db ? clarify this plz..

    Read the article

  • Validation - Data Integrity

    - by Thomas
    A table can only store 10 records in a particular state, 10 users over 30 years for example, the others must be less than 30 years. It is a business rule and as such should be respected. How to ensure that state? Think: multiple users accessing this table.

    Read the article

  • Check services at startup of SQL Server

    - by SQL DBA
    I am trying to check the state of services when SQL Server is started. I am using xp_cmdshell and 'sc query SQLServerAgent | FIND "STATE"' for example to load the output to a global temp table. It works when SQL Server has already started but does not work when the proc is set to autoexec, via sp_procoption.

    Read the article

  • ASP.net MVC View Creation

    - by nettguy
    I heard that ASP.net MVC does not maintain View State.So,here is my question I have an MVC -View which has forward and backward html button.When i click forward and again click backward ,how can i maintain html control state then?

    Read the article

  • Merge Function In Entity FrameWork?

    - by Ahmed
    In NHibernate there is a merge function that does the following: if there is a persistent instance with the same identifier currently associated with the session, copy the state of the given object onto the persistent instance if there is no persistent instance currently associated with the session, try to load it from the database, or create a new persistent instance the persistent instance is returned Is this possible in EF? I mean this part : copy the state of the given object onto the persistent instance. And if i used ApplyCurrentValues it seemes to be as update behavior or not?

    Read the article

  • All is working except if($_POST['submit']=='Update')

    - by user1319909
    I have a working registration and login system. I am trying to create a form where a user can add product registration info (via mysql update). I can't seem to get the db to actually update the fields. What am I missing here?!? <?php define('INCLUDE_CHECK',true); require 'connect.php'; require 'functions.php'; // Those two files can be included only if INCLUDE_CHECK is defined session_name('tzLogin'); // Starting the session session_set_cookie_params(2*7*24*60*60); // Making the cookie live for 2 weeks session_start(); if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe']) { // If you are logged in, but you don't have the tzRemember cookie (browser restart) // and you have not checked the rememberMe checkbox: $_SESSION = array(); session_destroy(); // Destroy the session } if(isset($_GET['logoff'])) { $_SESSION = array(); session_destroy(); header("Location: index_login3.php"); exit; } if($_POST['submit']=='Login') { // Checking whether the Login form has been submitted $err = array(); // Will hold our errors if(!$_POST['username'] || !$_POST['password']) $err[] = 'All the fields must be filled in!'; if(!count($err)) { $_POST['username'] = mysql_real_escape_string($_POST['username']); $_POST['password'] = mysql_real_escape_string($_POST['password']); $_POST['rememberMe'] = (int)$_POST['rememberMe']; // Escaping all input data $row = mysql_fetch_assoc(mysql_query("SELECT * FROM electrix_users WHERE usr='{$_POST['username']}' AND pass='".md5($_POST['password'])."'")); if($row['usr']) { // If everything is OK login $_SESSION['usr']=$row['usr']; $_SESSION['id'] = $row['id']; $_SESSION['email'] = $row['email']; $_SESSION['first'] = $row['first']; $_SESSION['last'] = $row['last']; $_SESSION['address1'] = $row['address1']; $_SESSION['address2'] = $row['address2']; $_SESSION['city'] = $row['city']; $_SESSION['state'] = $row['state']; $_SESSION['zip'] = $row['zip']; $_SESSION['country'] = $row['country']; $_SESSION['product1'] = $row['product1']; $_SESSION['serial1'] = $row['serial1']; $_SESSION['product2'] = $row['product2']; $_SESSION['serial2'] = $row['serial2']; $_SESSION['product3'] = $row['product3']; $_SESSION['serial3'] = $row['serial3']; $_SESSION['rememberMe'] = $_POST['rememberMe']; // Store some data in the session setcookie('tzRemember',$_POST['rememberMe']); } else $err[]='Wrong username and/or password!'; } if($err) $_SESSION['msg']['login-err'] = implode('<br />',$err); // Save the error messages in the session header("Location: index_login3.php"); exit; } else if($_POST['submit']=='Register') { // If the Register form has been submitted $err = array(); if(strlen($_POST['username'])<4 || strlen($_POST['username'])>32) { $err[]='Your username must be between 3 and 32 characters!'; } if(preg_match('/[^a-z0-9\-\_\.]+/i',$_POST['username'])) { $err[]='Your username contains invalid characters!'; } if(!checkEmail($_POST['email'])) { $err[]='Your email is not valid!'; } if(!count($err)) { // If there are no errors $pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6); // Generate a random password $_POST['email'] = mysql_real_escape_string($_POST['email']); $_POST['username'] = mysql_real_escape_string($_POST['username']); $_POST['first'] = mysql_real_escape_string($_POST['first']); $_POST['last'] = mysql_real_escape_string($_POST['last']); $_POST['address1'] = mysql_real_escape_string($_POST['address1']); $_POST['address2'] = mysql_real_escape_string($_POST['address2']); $_POST['city'] = mysql_real_escape_string($_POST['city']); $_POST['state'] = mysql_real_escape_string($_POST['state']); $_POST['zip'] = mysql_real_escape_string($_POST['zip']); $_POST['country'] = mysql_real_escape_string($_POST['country']); // Escape the input data mysql_query(" INSERT INTO electrix_users(usr,pass,email,first,last,address1,address2,city,state,zip,country,regIP,dt) VALUES( '".$_POST['username']."', '".md5($pass)."', '".$_POST['email']."', '".$_POST['first']."', '".$_POST['last']."', '".$_POST['address1']."', '".$_POST['address2']."', '".$_POST['city']."', '".$_POST['state']."', '".$_POST['zip']."', '".$_POST['country']."', '".$_SERVER['REMOTE_ADDR']."', NOW() )"); if(mysql_affected_rows($link)==1) { send_mail( '[email protected]', $_POST['email'], 'Your New Electrix User Password', 'Thank you for registering at www.electrixpro.com. Your password is: '.$pass); $_SESSION['msg']['reg-success']='We sent you an email with your new password!'; } else $err[]='This username is already taken!'; } if(count($err)) { $_SESSION['msg']['reg-err'] = implode('<br />',$err); } header("Location: index_login3.php"); exit; } if($_POST['submit']=='Update') { { mysql_query(" UPDATE electrix_users(product1,serial1,product2,serial2,product3,serial3) WHERE usr='{$_POST['username']}' VALUES( '".$_POST['product1']."', '".$_POST['serial1']."', '".$_POST['product2']."', '".$_POST['serial2']."', '".$_POST['product3']."', '".$_POST['serial3']."', )"); if(mysql_affected_rows($link)==1) { $_SESSION['msg']['upd-success']='Thank you for registering your Electrix product'; } else $err[]='So Sad!'; } if(count($err)) { $_SESSION['msg']['upd-err'] = implode('<br />',$err); } header("Location: index_login3.php"); exit; } if($_SESSION['msg']) { // The script below shows the sliding panel on page load $script = ' <script type="text/javascript"> $(function(){ $("div#panel").show(); $("#toggle a").toggle(); }); </script>'; } ?>

    Read the article

  • How to generate dynamic Timers

    - by Jeeva
    I'm developing a web based game application using flex. I'm placing images dynamically inside a canvas . Whenever i place an image it should change it state after a period of time. For example after 2 mins it should change it state. The time has to be calculated for each image after i place the image. How shall i handle this.

    Read the article

  • getting bordering US states (php)

    - by Peter Ehrlich
    HI need to be able to select a state and be given a list of the bordering states. Does anyone have or know of code already done for this? If I have to write it myself, what would be the best way - possibly a mysql database of borders (two state columns for each row), and then select matching?

    Read the article

  • MSI not running the current version of the code in .NET Setup project.

    - by Swami
    I'm not sure what happened, but my installer is in a weird state--when I install my MSI, it doesn't seem to be running the current version of the code (I'm using Custom Actions). I verified it by placing some MessageBox.Shows and sure enough, they are not popping up. It's possible I may have had a few unsuccessful installs previously which may have put the installer in a bad state...but how do I go about resolving this? Thanks...

    Read the article

  • How does IIS persist a user's identity from page to page?

    - by Rising Star
    Web pages are, by nature, state-less objects. When you click from page to page in an ASP.net application, each request for a page is treated as a brand-new request. We use things like cookies, session-variables, and query strings to maintain state from page to page. When you log in to an ASP.net web application using Windows Authentication, how does IIS persist your identity between pages?

    Read the article

  • .NET: Start a thread as suspended

    - by Ikaso
    In unmanaged code you can create a thread in suspended state. In .NET Framework I can't find this option. Is it because the Thread constructor puts the thread in a suspended state? Is there other reasons why this is not supported?

    Read the article

  • Zend_Registry: real life examples

    - by takeshin
    Do you find Zend_Registry useful? For which tasks it should be used? For which not? Global state for variables is not a good practice. Main objects may have global state injected via $front->setParam('paramName', $object), so what's the purpose of Zend_Registry?.

    Read the article

  • Is there a way to efficiently yield every file in a directory containing millions of files?

    - by Josh Smeaton
    I'm aware of os.listdir, but as far as I can gather, that gets all the filenames in a directory into memory, and then returns the list. What I want, is a way to yield a filename, work on it, and then yield the next one, without reading them all into memory. Is there any way to do this? I worry about the case where filenames change, new files are added, and files are deleted using such a method. Some iterators prevent you from modifying the collection during iteration, essentially by taking a snapshot of the state of the collection at the beginning, and comparing that state on each move operation. If there is an iterator capable of yielding filenames from a path, does it raise an error if there are filesystem changes (add, remove, rename files within the iterated directory) which modify the collection? There could potentially be a few cases that could cause the iterator to fail, and it all depends on how the iterator maintains state. Using S.Lotts example: filea.txt fileb.txt filec.txt Iterator yields filea.txt. During processing, filea.txt is renamed to filey.txt and fileb.txt is renamed to filez.txt. When the iterator attempts to get the next file, if it were to use the filename filea.txt to find it's current position in order to find the next file and filea.txt is not there, what would happen? It may not be able to recover it's position in the collection. Similarly, if the iterator were to fetch fileb.txt when yielding filea.txt, it could look up the position of fileb.txt, fail, and produce an error. If the iterator instead was able to somehow maintain an index dir.get_file(0), then maintaining positional state would not be affected, but some files could be missed, as their indexes could be moved to an index 'behind' the iterator. This is all theoretical of course, since there appears to be no built-in (python) way of iterating over the files in a directory. There are some great answers below, however, that solve the problem by using queues and notifications. Edit: The OS of concern is Redhat. My use case is this: Process A is continuously writing files to a storage location. Process B (the one I'm writing), will be iterating over these files, doing some processing based on the filename, and moving the files to another location. Edit: Definition of valid: Adjective 1. Well grounded or justifiable, pertinent. (Sorry S.Lott, I couldn't resist). I've edited the paragraph in question above.

    Read the article

  • How to break out of a loop depending on a CheckBox Checked value while the loop is running?

    - by Rayner Vaz
    Lets say I want to call a function repeatedly if the user selects a CheckBox named "repeat" but the calls to the function should stop as soon as the user 'unchecks' the CheckBox. I tried using the 'Checked', 'Click' and 'Tap' event of the CheckBox but once the loop starts, it does not sense any changes in the checkbox's state. I even tried using a loop inside another button's _Click method, but then that creates a lock on the Button's 'pressed' state. Any ideas/alternate suggestions?

    Read the article

  • Why should Java ThreadLocal variables be static

    - by kellyfj
    I was reading that JavaDoc for Threadlocal here http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ThreadLocal.html and it says "ThreadLocal instances are typically private static fields in classes that wish to associate state with a thread (e.g., a user ID or Transaction ID). " But my question is why did they choose to make it static (typically) - it makes it a bit confusing to have "per thread" state but its static?

    Read the article

  • Filtering Linux command output

    - by Raajkumar
    Hi, I need to get a row based on column value just like querying a database. I have a command output like this, Name ID Mem VCPUs State Time(s) Domain-0 0 15485 16 r----- 1779042.1 prime95-01 512 1 -b---- 61.9 Here I need to list only those rows where state is "r". Something like this, Domain-0 0 15485 16 r----- 1779042.1 I have tried using "grep" and "awk" but still I am not able to succeed. Please help me on this issue. Regards, Raaj

    Read the article

  • What compliance and legal clearances are required to use Google MAP API with Iphone Apps?

    - by Sak
    We are using 2 following google services, we need to talk to google folks if we need to do some additional stuff to fulfill the conditions: Reverse Geocoding APIs: For getting city and state from the iphone's geocodes (latitudes and longitudes) Doing a Local Business Search: based on city and state Also is it mandatory to embade Google maps with iphone apps while using these Google Maps APS?:

    Read the article

  • When to use new layouts and when to use new activities?

    - by cmdfrg
    I'm making a game in Android and I'm trying to add a set of menu screens. Each screen takes up the whole display and has various transitions available to other screens. As a rough summary, the menu screens are: Start screen Difficult select screen Game screen. Pause screen. Game over screen. And there are several different ways you can transition between screen: 1 - 2 2 - 3 3 - 4 (pause game) 4 - 1 (exit game) 4 - 3 (resume game) 3 - 5 (game ends) Obviously, I need some stored state when moving between screens, such as the difficulty level select when starting a game and what the player's score is when the game over screen is shown. Can anyone give me some advice for the easiest way to implement the above screens and transitions in Android? All the create/destroy/pause/resume methods make me nervous about writing brittle code if I'm not careful. I'm not fond of using an Activity for each screen. It seems too heavy weight, having to pass data around using intents seems like a real pain and each screen isn't a useful module by itself. As the "back" button doesn't always go back to the previous screen either, my menu layout doesn't seem to fit the activity model well. At the moment, I'm representing each screen as an XML layout file and I have one activity. I set the different buttons on each layout to call setContentView to update the screen the main activity is showing (e.g. the pause button changes the layout to the pause screen). The activity holds onto all the state needed (e.g. the current difficulty level and the game high score), which makes it easy to share data between screens. This seems roughly similar to the LunarLander sample, except I'm using multiple screens. Does what I have at the moment sound OK or am I not doing things the typical Android way? Is there a class I can use (e.g. something like ViewFlipper) that could make my life easier? By the way, my game screen is implemented as a SurfaceView that stores the game state. I need the state in this view to persist between calls to setContentView (e.g. to resume from paused). Is the right idea to create the game view when the activity starts, keep a reference to it and then use this reference with setContentView whenever I want the game screen to appear?

    Read the article

  • How can I prevent javascript errors in my selenium tests from hanging my build system?

    - by lowellk
    We are having a problem with our selenium tests which run in IE on a virtual machine. Whenever there is a javascript error, a popup shows up and puts our system into a 'stuck' state - a user has to go clear that and restart the selenium test run. Is there a way to prevent the javascript error popup from putting the system into its stuck state? Would setting window.error be of any help here?

    Read the article

  • In a given Json, search for the particular given string based on key, return true if found, else false Using jQuery/Javascript

    - by NaanuManu
    Given JSON String/object {"selectAll":false,"include":{"country_197":{"id":"197","data_type":"country","name":"Singapore","desc":"","parent_key_id":"all_all","status":""},"country_100":{"id":"100","data_type":"country","name":"India","desc":"","parent_key_id":"all_all","status":""}},"exclude":{"state_2":{"id":"2","data_type":"state","name":"Andhra Pradesh","desc":"","parent_key_id":"country_100","status":""}}} Given search string is: country_100 Required : Have to search for country_100 in Given JSON String/object by key parent_key_id Ex: searching country_100 is found : {"selectAll":false,"include":{"country_197":{"id":"197","data_type":"country","name":"Singapore","desc":"","parent_key_id":"all_all","status":""},"country_100":{"id":"100","data_type":"country","name":"India","desc":"","parent_key_id":"all_all","status":""}},"exclude":{"state_2":{"id":"2","data_type":"state","name":"Andhra Pradesh","desc":"","parent_key_id":"**country_100**","status":""}}} So return True, else return false please help me in finding a solution.

    Read the article

  • Error during data UPDATE in php

    - by Piyush
    $sql = "UPDATE tblprofile SET name = '$membername' , f_h_name = '$fathername', maritalS = '$mstatus' , dob = '$dob' , occupation = '$occupation' , nominee = '$nominee' , address1 = '$address1' , address2 = '$address2', city = '$city', district = '$district', state = '$state', pin = '$areapin', mobile = '$mobileno', email = '$email', PANno = '$panno', bankname = '$bankname', branch = '$branch', accountno = '$accountno' WHERE userId = '$_SESSION['UserId']' "; //line 212 if(mysql_query($sql)) { echo "Updation Done."; } Error comes in browser : Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\303\saveEditProfile.php on line 212

    Read the article

< Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >