Search Results

Search found 6694 results on 268 pages for 'wait states'.

Page 11/268 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Error Log states that I have MySQL connect error, yet script runs fine

    - by rob - not a robber
    Hello All, First, thanks for all the help I've received so far from StackOverflow. I've learned much. Once again, I'm posing a rudimentary question that I've searched on, but cannot find the exact answer to. Here or on PHP.net. It's sort of like what this guy asked, but not exactly: http://stackoverflow.com/questions/288603/mysql-throwing-query-error-yet-finishing-query-just-fine-why So, I saw my errorlog ballooning up when I checked my site directory and opened to notice that a bunch of errors have been recorded since I wrote this new Admin area. I know something is obviously awry with my scripting for the error to be thrown, but the weird thing is, the script actually runs through and pulls all the data I need without breaking. The log contains: PHP Warning: mysql_query() [function.mysql-query]: Access denied for user 'someuser'@'localhost' (using password: NO) in /home/mysite/adminconsole.php on line 15 I don't get that because that very line is where I setup my connection... the exact same way I do it everywhere else on the site with no problem. After that error, I have these thrown at the same time [09-Apr-2010 08:44:18] PHP Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/mysite/adminconsole.php on line 15 [09-Apr-2010 08:44:18] PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mysite/adminconsole.php on line 16 From what I read in the other guys thread, the problem is the contents of the query maybe? Maybe my query is malformed? Thanks so much for any guidance you can provide. -Rob

    Read the article

  • Android AlertDialog wait for result in calling activity

    - by insanesam
    I am trying to use an AlertDialog in my app to select the quantity of an item. The problem is that the activity that calls the AlertDialog doesn't wait for it to update the item before it adds it to the SQLite Database and change intents. At the moment, the QuantitySelector (AlertDialog) appears, then disappears straight away and changes the MealActivity class (which is just a ListView that reads from the database) through the intent change with an update to the database with quantity 0. I need the Activity to wait for the AlertDialog to close before it updates the database. What would be the correct way of implementing this? Here is some code for you: QuantitySelector (which runs the alertdialog): public class QuantitySelector{ protected static final int RESULT_OK = 0; private Context _context; private DatabaseHandler db; private HashMap<String, Double> measures; private Item item; private View v; private EditText quan; private NumberPicker pick; private int value; private Quantity quantity; /** * Function calls the quantity selector AlertDialog * @param _c: The application context * @param item: The item to be added to consumption * @return The quantity that is consumed */ public void select(Context _c, Item item, Quantity quantity){ this._context = _c; this.item = item; this.quantity = quantity; db = new DatabaseHandler(_context); //Get the measures to display createData(); //Set up the custom view LayoutInflater inflater = LayoutInflater.from(_context); v = inflater.inflate(R.layout.quantity_selector, null); //Set up the input fields quan = (EditText) v.findViewById(R.id.quantityNumber); pick = (NumberPicker) v.findViewById(R.id.numberPicker1); //Set up the custom measures into pick pick.setMaxValue(measures.size()-1); pick.setDisplayedValues(measures.keySet().toArray(new String[0])); //Start the alert dialog runDialog(); } public void createData(){ measures = new HashMap<String, Double>(); //Get the measurements from the database if(item!=null){ measures.putAll(db.getMeasures(item)); } //Add grams as the default measurement if(!measures.keySet().contains("grams")){ //Add grams as a standard measure measures.put("grams", 1.0); } } public void runDialog(){ AlertDialog dialog = new AlertDialog.Builder(_context).setTitle("Select Quantity") .setView(v) .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { //Change the consumption to the new quantity if(!quan.getText().toString().matches("")){ value = Integer.parseInt(quan.getText().toString()); //Check if conversion from other units is needed String s[] = pick.getDisplayedValues(); String a = s[pick.getValue()]; //Convert the chosen measure back to grams if(!a.equals("grams")){ for(String m : measures.keySet()){ if(m==a){ value = (int) (value * measures.get(m)); } } } } quantity.setQuantity(value); dialog.dismiss(); } }) .setNegativeButton("Cancel", null).create(); dialog.show(); } } The method from favouritesAdapter (which calls the alertdialog): add.setOnClickListener(new OnClickListener(){ public void onClick(View arg0) { QuantitySelector q = new QuantitySelector(); Quantity quan = new Quantity(); q.select(_context, db.getItem(p.getID()), quan); db.addConsumption(p.getID(), p.getFavouriteShortName(), quan.getQuantity(), "FAVOURITE"); Intent intent = new Intent(_context,MealActivity.class); _context.startActivity(intent); } }); All help is appreciated :)

    Read the article

  • How do I resolve the config error which states a machine to application error

    - by waterfalrain
    I imported a website made in visual studio express 2008 to visual studio express 2010. When I run the home page I get the following error: "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS." When I looked up the meaning of this on Google I read their needed to be a change to the configuration of the virtual directory. Another suggestion was to change the web config files . T Were these suggestions correct? If so how do I emplement them so that I can view these website pages on my local machine.

    Read the article

  • Passing data between states PHP

    - by esryl
    So I am using Limonade PHP which has a RESTful design which emulates PUT, POST, DELETE routes for create, update, delete. I am trying to develop some form validation which is going well. The major problem I am facing though is how to return my filtered data (which has failed validation) back to repopulate the create or edit form. How would this be done? I currently have for creating a page: /admin/page/new -> GET function /admin/page -> POST function + validate + pass, update db + fail, add errors to flash, redirect to /admin/page/mew It all falls down as I do not know how to populate the /admin/page/new with the invalid, but filtered data.

    Read the article

  • Flash FLVPlayback states

    - by rob5408
    I'm writing my own class to manage a skin for an FLVPlayback component. It works 90% of the time, but sometimes the state get really messed up. Specifically, the video is playing, meaning I can see it play and the VideoEvent.PLAYHEAD_UPDATE event is firing, but when I poll the FLVPlayback component about its playing property, it returns false. I assume this may be because 'buffering' is kind of a subset of 'playing', but I cannot confirm this in the documentation. I guess another way to ask this question is, "Does the FLVPlayback component ever buffer while it is in a stopped state?"

    Read the article

  • Android: changing drawable states of option menu items seems to have side-effects

    - by pjv
    In my onCreateOptionsMenu() I have basically the following: public boolean onCreateOptionsMenu(Menu menu) { menu.add(Menu.NONE, MENU_ITEM_INSERT, Menu.NONE, R.string.item_menu_insert).setShortcut('3', 'a').setIcon(android.R.drawable.ic_menu_add); PackageManager pm = getPackageManager(); if(pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS)){ menu.add(Menu.NONE, MENU_ITEM_SCAN_ADD, Menu.NONE, ((Collectionista.DEBUG)?"DEBUG Scan and add item":getString(R.string.item_menu_scan_add))).setShortcut('4', 'a').setIcon(android.R.drawable.ic_menu_add); } ... } And in onPrepareOptionsMenu among others the following: final boolean scanAvailable = ScanIntent.isInstalled(this); final MusicCDItemScanAddTask task = new MusicCDItemScanAddTask(this); menu.findItem(MENU_ITEM_SCAN_ADD).setEnabled(scanAvailable && (tasks == null || !existsTask(task))); As you see, two options items have the same drawable set (android.R.drawable.ic_menu_add). Now, if in onPrepareOptionsMenu the second menu item gets disabled, its label and icon become gray, but also the icon of the first menu item becomes gray, while the label of that fist menu item stays black and it remains clickable. What is causing this crosstalk between the two icons/drawables? Shouldn't the system handle things like mutate() in this case? I've included a screenshot:

    Read the article

  • getting a gridview and dropdownlist to remember their states after navigate away and back button scr

    - by nat
    hi i have a page filling a gridview which is all working fine. the grid is basically the result of a search .. the filters for which are a number of dropdowns and a couple of textboxes the data from the grid and dropdowns are saved in the session and the whole page lives inside an updatepanel when i navigate away from the page (as it happens by clicking a link inside the grid) and then back button to it, all the droppers are back to their unselected values and the grid is nowhere to be seen.. i understand that this is because of the scriptmanager doesnt do 'standard' postbacks so the browser doesnt realise what has happened. however i have set the EnableHistory to true in the scriptmanager is there an easy way to get this to remember without dropping the updatepanel/scriptmanager? also to complicate things further the scriptmanger /updatepanel is actually in a master page. so not really sure how i can get the navigate bits to work in the scriptmanager.. clearly i am a bit confuised and any help that someone could provide would be happily received thanks nat

    Read the article

  • GridView's ItemContainerStyle and selection states

    - by Roberto Casadei
    I'm trying to change the appearance of gridview items when they are selected. (Before, I used a trick with an IsSelected property in the ViewModel object bound to the containing grid and a bool-to-color converter, but I recognize that it is bad) To do so, I do: <GridView ItemContainerStyle="{StaticResource GridViewItemContainerStyle}" ...> ... and <Style x:Key="GridViewItemContainerStyle" TargetType="GridViewItem"> <Setter Property="Background" Value="Red" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="GridViewItem"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Background)" Storyboard.TargetName="itemGrid"> <DiscreteObjectKeyFrame KeyTime="0" Value="Black"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="SelectionStates"> <VisualState x:Name="UnselectedSwiping"/> <VisualState x:Name="UnselectedPointerOver"/> <VisualState x:Name="Selecting"/> <VisualState x:Name="Selected"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.Background)" Storyboard.TargetName="itemGrid"> <DiscreteObjectKeyFrame KeyTime="0" Value="White"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="SelectedSwiping"/> <VisualState x:Name="Unselecting"/> <VisualState x:Name="Unselected"/> <VisualState x:Name="SelectedUnfocused"/> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid ... x:Name="itemGrid"> <!-- HERE MY DATA TEMPLATE --> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> When I run the app, the items are Black (as in the "normal" state). But selecting them does not turn them into White. Where am I wrong? Moreover, it there a way to set "ItemContainerStyle" without having it to "overwrite" the "ItemTemplate" ???

    Read the article

  • Switching Javascript Function states

    - by webzide
    Dear experts, I would like to implement a API of Javascript that sort of resemble a light switch. For instance, there are two buttons on the actual HTML page act as the UI. Both of the buttons have event handlers that invokes a different function. Each function have codes that act like a state, for instance. button1.onclick=function (){ $("div").click( //code effects 2 ) } button2.onclick=function (){ $("div").click( //Code effects 2 ) } I the code works fine on the surface but the 2 state functions overlap. the effects is going to take place for the rest of the way until the next reload of the document. Basically what I want to achieve is that when 1 button is clicked, it will switch "OFF" the state of function invoked by the other button and vice versa. Thus, the effects achieved are unique are not overlapped. Is there anyway to achieve this or could any experts point me to the right direction. Thanks in advance.

    Read the article

  • Visually [Diagrams/movies] Display events and states of System using old logs of Application to trac

    - by singh
    Hi In My Application many process runs. Having multiple threads in each process. Whenever any bug comes, I have to analyze thousands of lines of logs to know exact root-cause. I am thinking of an idea, Please guide me if it is feasible and good enough Each log have Process name , Thread id , and Time stamp along with message. If I can create a intelligence to capture what is happing with time and display in a movie which user can view it like a normal video. Forward – backward etc. It will help to reach root cause fast and bug tracing will become easy. Please guide me on library in c++ using which I can draw diagrams and display as movie

    Read the article

  • MSVC++ 6.0: Fatal error C1509 "Too many exception handler states in function"

    - by sep332
    I'm working on a project that uses a lot of generated files for a GUI. After some recent updates, I get this error. If I remove some controls (the new ones or some old ones, doesn't seem to matter which), the error goes away. I've temporarily worked around the problem, but I'd like a more permanent solution. I've seen mentioned on the web that there's a fix for this in VS.Net 2003, but I can't find anything for 6.0. Does anyone know of a hotfix or service pack that fixes this?

    Read the article

  • Switching function states

    - by webzide
    Dear experts, I would like to implement a API of Javascript that sort of resemble a light switch. For instance, there are two buttons on the actual HTML page act as the UI. Both of the buttons have event handlers that invokes a different function. Each function have codes that act like a state, for instance. button1.onclick=function (){ $("div").click( //code effects 2 ) } button2.onclick=function (){ $("div").click( //Code effects 2 ) } I the code works fine on the surface but the 2 state functions overlap. the effects is going to take place for the rest of the way until the next reload of the document. Basically what I want to achieve is that when 1 button is clicked, it will switch "OFF" the state of function invoked by the other button and vice versa. Thus, the effects achieved are unique are not overlapped. Is there anyway to achieve this or could any experts point me to the right direction. Thanks in advance.

    Read the article

  • [newbie]Webservice - Threads - close if no active threads, if any activen, then wait till its compl

    - by Raj
    Hi I have an ASP.Net webservice running. When the system date changes, i want to close all the threads and restart them again, if the thread/s aren't doing any work. If any of the thread/s is in the process of doing some work(active threads), then i need to wait till the current thread/s complete its process and then close. This will prevent from aborting any current process. Any ideas on how i can perform such a task? Thanks PS:I am new to ASP.NET and Multithreading.

    Read the article

  • SQL Server Full-Text Search: Hung processes with MSSEARCH wait type

    - by CheeseInPosition
    We have a SQL Server 2005 SP2 machine running a large number of databases, all of which contain full-text catalogs. Whenever we try to drop one of these databases or rebuild a full-text index, the drop or rebuild process hangs indefinitely with a MSSEARCH wait type. The process can’t be killed, and a server reboot is required to get things running again. Based on a Microsoft forums post[1], it appears that the problem might be an improperly removed full-text catalog. Can anyone recommend a way to determine which catalog is causing the problem, without having to remove all of them? [1] [http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2681739&SiteID=1] “Yes we did have full text catalogues in the database, but since I had disabled full text search for the database, and disabled msftesql, I didn't suspect them. I got however an article from Microsoft support, showing me how I could test for catalogues not properly removed. So I discovered that there still existed an old catalogue, which I ,after and only after re-enabling full text search, were able to delete, since then my backup has worked”

    Read the article

  • WatiN wait for java script execution completed before click link (IE)

    - by Sendoh
    i have this page displaying statement every 2 second (using javascript), at the end of it there is a link which the user can click. with IE it will click the link before javascript generated statement is completed. when i use Link.Click() (with Firefox it will throw exception, which is fine with me) is there a way to wait for javascript execution to complete before link gets clicked (IE)? TIA EDITED // the code, pretty simple seaching for link that startwith //"Continue seaching" in the browser then click if (ln.Text.StartsWith("Continue searching", StringComparison.CurrentCultureIgnoreCase)) { ln.Click(); } Thx

    Read the article

  • Please help. Creating threads and wait till finsh

    - by Raj Aththanayake
    Hi I have two method calls that I want to call using two threads. Then I want them to wait till method executions get completed before continuing. My sample solution is something like below. public static void Main() { Console.WriteLine("Main thread starting."); String[] strThreads = new String[] { "one", "two" }; String ctemp = string.Empty; foreach (String c in strThreads) { ctemp = c; Thread thread = new Thread(delegate() { MethodCall(ctemp); }); thread.Start(); thread.Join(); } Console.WriteLine("Main thread ending."); Console.Read(); } public static void MethodCalls(string number) { Console.WriteLine("Method call " + number); } Is this will do the job? Or is there another better way to do the same thing?

    Read the article

  • Monitor.Wait, Pulse - When worker thread should conditionally behave as an actual worker thread

    - by Griever
    My particular scenario: - Main thread starts a worker thread. - Main thread needs to block itself until either worker thread is completed (yeah funny) or worker thread itself informs main thread to go on Alright, so what I did in main thread: wokerThread.Start(lockObj); lock(lockObj) Monitor.Wait(lockObj); Somewhere in worker thread: if(mainThreadShouldGoOn) lock(lockObj) Monitor.Pulse(lockObj); Also, at the end of worker thread: lock(lockObj) Monitor.Pulse(lockObj); So far, it's working perfect. But is it a good solution? Is there a better one?

    Read the article

  • Ruby: wait for system command to end

    - by Ignace
    Hey all, I'm converting an xls 2 csv with a system(command) in ruby. After the conversion i'm processing this csv files. But the conversion is still going when the program wants to process the files. So at that time they are non existant. Can someone tell me if it's possible to let Ruby wait the right amount of time for the system command to finish? Right now i'm using sleep 20 but if it will take longer once, it isn't right of course... Thanks!

    Read the article

  • Official way to ask jQuery wait for all images to load before executing something

    - by Simon_Weaver
    In jQuery when you do this: $(function() { alert("DOM is loaded, but images not necessarily all loaded"); }); It waits for the DOM to load and executes your code. If all the images are not loaded then it still executes the code. This is obviously what we want if we're initializing any DOM stuff such as showing or hiding elements or attaching events. Let's say though that I want some animation and I don't want it running until all the images are loaded. Is there an official way in jQuery to do this? The best way I have is to use <body onload="finished()">, but I don't really want to do that unless I have to. Note: There is a bug in jQuery 1.3.1 in Internet Explorer which actually does wait for all images to load before executing code inside $function() { }. So if you're using that platform you'll get the behavior I'm looking for instead of the correct behavior described above.

    Read the article

  • jquery to php (wait for php script until result/finish)

    - by user354051
    Hi, I am executing a php call from javascript(jQuery), php sript is sending result back. The problem is that these php scripts are taking some time (milliseconds), and java script is not waiting for them to finish, thus variables are not getting initialized with correct values. The code is simple: $.get("php/validation.php",{'email':email},function(data){ // valid_email now contains true/false alert(data); if(data=="true"){ var valid_email = true;} }); The "alert" is printing true but value of valid_mail is recognized as "false" in the code below. Is there any other better way to call php scripts and wait for until they are not finished? Prashant

    Read the article

  • Wait until user press enter in textbox in another form and return value

    - by ekapek
    Hello, I am new to C# and I'm trying to do sth like this: myList = list of 1000+ string values; 1.StartNewThreads(50); //50 is the numbers of new threads 2.DoSth1(next value from myList); 3.DoSth2(); 4. var value = { ShowNewImageForm(); //show only if not another ImageForm is displayed if another is show - wait WaitUntilUserPressEnterInTextBox(); ReturnValueFormTextbox(); } 5.DoSth3(); 6.StartNewThread(); For now I have: foreach(String s in myList ) { DoSth1(s); DoSth2(); DoSth3(); } And now I'm looking for ideas to points 1,3,6 Can You suggest me how to resolve this? How to start 50 threads How to get value from textbox in another form when user press enter

    Read the article

  • Using ManualResetEvent to wait for multiple Image.ImageOpened events

    - by umlgorithm
    Dictionary<Image, ManualResetEvent> waitHandleMap = new Dictionary<Image, ManualResetEvent>(); List<Image> images = GetImagesWhichAreAlreadyInVisualTree(); foreach (var image in images) { image.Source = new BitmapImage(new Uri("some_valid_image_url")); waitHandleMap.Add(image, new ManualResetEvent(false)); image.ImageOpened += delegate { waitHandleMap[image].Set(); }; image.ImageFailed += delegate { waitHandleMap[image].Set(); }; } WaitHandle.WaitAll(waitHandleMap.Values.ToArray()); WaitHandle.WaitAll blocks the current UI thread, so ImageOpened/ImageFailed events would never get fired. Could you suggest me an easy workaround to wait for the multiple ui events?

    Read the article

  • Wait for function to finish before executing the rest

    - by Wurlitzer
    When the user refreshes the page, defaultView() is called, which loads some UI elements. $.address.change() should execute when defaultView() has finished, but this doesn't happen all the time. $.address.change() cannot be in the success: callback, as it's used by the application to track URL changes. defaultView(); function defaultView() { $('#tout').fadeOut('normal', function() { $.ajax({ url: "functions.php", type: "GET", data: "defaultview=true", async: false, success: function (response) { $('#tout').html(response).fadeIn('normal'); } }); }); } $.address.change(function(hash) { hash = hash.value; getPage(hash); }); I'm at a loss as to how to make $.address.change() wait for defaultView() to finish. Any help would be appreciated.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >