Search Results

Search found 2312 results on 93 pages for 'whats your favourite'.

Page 64/93 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • Update query in ado.net

    - by nikhil
    I wanted to update a column in my table, i have written the code it runs fine without any error also it displays the confirmation dialog box but the table is not updated whats wrong with the code. Dim sqlConn As New SqlClient.SqlConnection sqlConn.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\housingsociety.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" Try sqlConn.Open() Catch sqlError As Exception MsgBox(sqlError.Message, 0, "Connection Error!") End Try Dim sqlComm As New SqlClient.SqlCommand sqlComm.Connection = sqlConn sqlComm.CommandText = "update committe_member set name = '@name' where name = 'member1'" Dim paramString As New SqlClient.SqlParameter("@name", SqlDbType.VarChar, 50) paramString.Direction = ParameterDirection.Input sqlComm.Parameters.Add(paramString) paramString.Value = TextBox1.Text sqlComm.ExecuteNonQuery() MsgBox("Record Sucessfully Altered", 0, "Confirmation!") sqlConn.Close()

    Read the article

  • Form variable does not refresh with ajax call

    - by ChrisOPeterson
    I'm building a simple email sending form and wanted to make it with ajax. The form submits correctly the first time but if you make any subsequent changes to the text in the form and then submit again then jquery does not pick up on the changes and posts the old data. Whats going on? <script type="text/javascript"> var $j = jQuery.noConflict(); $j(document).ready(function() { var submit_url = "mail_submit.php"; var send_email = $j("#sendemail"); send_email.click(function() { var form = $j("#post"); $j.post(submit_url, form.serialize(), function(data) { alert(data); }); }); });

    Read the article

  • Ensure User has entered string in correct format?

    - by Daniel Granger
    Hi, Whats the best way to ensure the user has entered a valid time string such as: 5:24 5.4 102:30 102.5 It will be entered into a UITextField therefore will be in a NSString. I want to allow the user to enter the time in either hours and minutes (hh:mm) or hours and decimal minutes (hh.m). In the hours minutes example they should be able to enter as many hours as the like but only between 0 - 59 minutes. With the hours decimal minutes I want them to only be able to enter again as many hours as the like but decimal minutes can only be 0 - 9. Many Thanks

    Read the article

  • Download multiple files in background in Android

    - by Addev
    Basically I'm trying to make a little app for watching offline content. So there's a moment where the user selects to download the contents (and the app should download about 300 small files and images). I'd like to show the user how does the process go if he enters the proper activity. Showing a list of all the files, telling what has been already downloaded, in progress or waiting for download. My problem is that I really don't know what approach to take for achieve this. Since the download should last until finished I imagine the solution is an Service, but whats best? an IntentService, a Bound Service or an Standard Service calling a startService() for each download? And how can I keep my objects updated for displaying them later? should I use a database or objects in memory? Thanks

    Read the article

  • Send serialised object via socket

    - by RubbleFord
    Whats the best way to format a message to a server, at moment I'm serilising an object using the binaryformatter and then sending it to the server. At the server end its listening in an async fashion and then when the buffer size recieved is not 100% it assumes that the transfer has complete. This is working and the moment, and I can deserialise the object at the other end, I'm just concerned that if I start sending async this method will fail has message's could be blurred. I know that I need to mark the message somehow as to say that's the end of message one, this other bit belongs to message 2, but I'm unsure of the correct way to do this. Could anyone point me in the right direction and maybe give me some examples? Thanks

    Read the article

  • Text replace with regex in SQL Server

    - by Thiyaneshwaran S
    Currently I have a SQL server column of type nvarchar(max) which has text that starts with <span class="escape_<<digits>>"></span> The only thing that varies in the pattern is the <<digits>> in the class name. The common part is <span class="myclass_ and the closing </span> Some sample values are <span class="myclass_12"></span> <span class="myclass_234"></span> <span class="myclass_4546"></span> These span text are present only at the beginning of the column. Any such matching span in the middle should not be removed or matched. Whats the SQL Server query with regex to remove all these occurances of span?

    Read the article

  • Set hidden form field values with JavaScript but request still empty

    - by tigerstyle
    HI volks, I try to set some hidden form field values with an onclick event. Ok, after I did something like this: document.getElementById('hidden_field').value = 123; I can output the value with the firebug console by entering this: alert(document.getElementById('hidden_field').value); So the values are definitely set. But now when I submit the form, the hidden field values are still empty. Do you have any idea whats going wrong? Thx for your answers.

    Read the article

  • ConcurentModificationException in Java HashMap

    - by Bear
    Suppose I have two methods in my classes, writeToMap() and processKey() and both methods are called by multiple threads. writeToMap is a method to write something in hashmap and processKey() is used to do sth based on the keySet of HashMap. Inside processKey, I first copy the originalMap before getting the key set. new HashMap<String, Map<String,String>(originalMap).get("xx").keySet(); But I am still getting ConcurrentModificationException even though I always copy the hashmap. Whats the problem?

    Read the article

  • How to set ItemsSource?

    - by Mark
    This dialog makes no sense to me And I'm having trouble finding good tutorials on it. Most of the examples aren't detailed enough, or do stuff via code, but I'd like to take advantage of the IDE as much as possible. Whats the difference between ItemsSource and DataContext? I'd like to bind it to just a List for starters. I don't need SQL or databases or anything fancy. Where would I declare my list? In MainWindow.xaml.cs? How do I get it to appear in that dialog?

    Read the article

  • testing existing attribute of a @classmethod function, yields AttributeError

    - by alex
    i have a function which is a class method, and i want to test a attribute of the class which may or may not be None, but will exist always. class classA(): def __init__(self, var1, var2 = None): self.attribute1 = var1 self.attribute2 = var2 @classmethod def func(self,x): if self.attribute2 is None: do something i get the error AttributeError: class classA has no attribute 'attributeB' when i access the attribute like i showed but if on command line i can see it works, x = classA() x.attributeB is None True so the test works. if i remove the @classmethod decorator from func, the problem disapears. if i leave the @classmethod decorator, it only seems to affect variables which are supplied default values in the super-class's constructor. whats going on in the above code?

    Read the article

  • Wrap Sub as Function for use in Lambda

    - by Luhmann
    I have a problem with VB and Moq. I need to call a verify on a Sub. Like so: logger.Verify(Function(x) x.Log, Times.AtLeastOnce) And my logger looks like this: Public Interface ILogger Sub Log() End Interface But with VB this is not possible, because the Log method is a Sub, and thereby does not produce a value. I don't want to change the method to be a function. Whats the cleanest way of working around this limitation and is there any way to wrap the Sub as a Function like the below? logger.Verify(Function(x) ToFunc(AddressOf x.Log)) I have tried this, but i get: Lambda Parameter not in scope

    Read the article

  • Passing Services to MainViewModel - SHOULD I use a dependency injection container ?

    - by msfanboy
    Hello, I have this code: public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var mainVM = new MainViewModel ( new Service1(), ... new Service10(), ); var window = new MainWindow(); window.DataContext = mainVM; window.Show(); } } I pass all my Services instances to the MainViewModel. Within the MainViewModel I spread those services to other ViewModels via constructor parameter passing. Should I use any DI framework for the services in the App class? If yes whats the benefit of resolving the services instead of just creating the instance manually... ?

    Read the article

  • How can one use multi threading in php applications

    - by Steve Obbayi
    Is there a realistic way of implementing a multi-threaded model in php whether truly or just simulating it. Some time back it was suggested that you can force the operating system to load another instance of the php executable and handle other simultaneous processes. The problem with this is that when the php code finished executing the php instance remains in memory because there is no way to kill it from within php. so if you are simulating several threads you can imagine whats going to happen. So am still looking for a way multi-threading can be done or simulated effectively from within php. Any ideas?

    Read the article

  • iPhone: Going from transformed layers to jpeg

    - by Devin Ross
    I have a bunch of images that are transformed (using touch gestures). I want to take the transformations the user does to the images and create a jpeg from it. (ie. if a user rotates a photo to the right, I want to get a jpeg of the photo rotate to the right just as the looks on screen). This takes into account that the photo could be bigger than whats displayed on screen too (no screenshots). I'm trying to use CGContext (CGContextRotateCTM specifically) but its not been too successful. Thanks for the help.

    Read the article

  • PHP attempting to make JavaScript friendly timestamp, failing, returns 1.34899651119E+12

    - by chris
    Well, not sure whats going on. I have been trying to follow by examples I have found here on stack, on google, even an answer someone gave me a week+ ago, which unfortunately I wasn't able to test until today. Anyway I am attempting to generate a javascript friendly timestamp via php so I can get my times synced up. The best logic I could find overall was something dealing with microtime. However that doesn't seem to work as expected, not even in the slightest. Right now I am using microtime(true)*1000; and am getting 1.34899651119E+12 for the result. Did I some how manage to mess up that one tiny line of code, Im not sure.

    Read the article

  • iphone best practice, how to load multiple high quality images

    - by bennythemink
    Hi guys and girls, I have about 20-ish high quality images (~3840x5800 px) that I need to load in a simple gallery type app. The user clicks a button and the next image is loaded into the UIImageView. I currently use [UIImage imageWithContentsOfFile:] which takes about 6 seconds to load each image in the simulator :( if I use [UIImage imageNamed:] it takes even longer to load but caches the images which means its quicker if the user wishes to see the same images again. But it may cause memory problems later with all that caching crashing my app. I want to know whats the best practice for loading these? I'm experimenting with reducing image file size as much as is possible but I really need them to be high quality image for the purpose of the app (zoomable, etc.). Thanks for any advice

    Read the article

  • Array "tree" creation from db table

    - by Tural Teyyuboglu
    Trying to create array tree for db driven navigation. Getting following errur: array_key_exists() expects exactly 2 parameters, 1 given on line if (!array_key_exists($tree[$parent]['children'][$id])) Function looks like that $tree = array(); $sql = "SELECT id, parent, name FROM menu WHERE parent ... etc.... "; $results = mysql_query($sql) or die(mysql_error()); while(list($id, $parent, $name) = mysql_fetch_assoc($results)) { $tree[$id] = array('name' => $name, 'children' => array(), 'parent' => $parent); if (!array_key_exists($tree[$parent]['children'][$id])) { $tree[$parent]['children'][$id] = $id; } } Db structure How can I fix that? Whats wrong in this function?

    Read the article

  • Project works in eclipse but not when exported

    - by Mike
    I wrote an application that uses GraphViz to generate some graphs as .gif's according to the DOT syntax. When I run from Eclipse the images are generated fine but when I export it as a jar the images are created but there is no data in them. When I view them in Microsoft Picture Viewer its just the red X. It was working as an exported jar until I put the picture generation in its own thread. I can't seem to figure out whats going on here. Are there any problems exporting multi-threaded projects? Any one have any ideas? Thanks

    Read the article

  • Encog 3.0 backpropagation

    - by Mohamed Shouman
    I have a question...I am using Encog framework to train a network using BP. I am training the network using images that has some object say a cat, telling the network which images are cats and which are not. Bellow are my Neural Network results actual=0.1545868370551181 ideal=0.0,actual=0.797896306829758 ideal=1.0,actual=0.1545868370551181 ideal=0.0,actual=0.797896306829758 ideal=1.0 It is my understanding that since different pictures are presented to network some look like cat for example then they should have higher percentage...but i keep getting same percentage for any pic that has a cat which is 0.79 and for other pics i get 0.15...how can i solve this issue!, what is the intuition behind whats going on! Many thanks

    Read the article

  • Call functions in an event/function chain?

    - by acidzombie24
    I have 3 functions. They can be called in any order (later they may need specific order). The return value of one function should be the first param of the next. How do i do this? what i am thinking is something like the below. Whats the best way to do this? string void fn(string sz, data d, eventhdl nextFunc) { //do stuff if(nextFunc == null) return ret; else return nextFunc(ret, d, nextFunc.Next); }

    Read the article

  • JQuery: After adding some AJAX, some of the jquery code no longer works

    - by fwaokda
    Here's a pastebin link to my entire jQuery code. [ http://pastebin.com/w57ma5Gx ] The "Thumbnails" section was working fine before I added the ajax sections. Anyone can help me with why it quit working? And if I need to I can post another question but figured I'd try it here first. Whats a better way of writing the ajax code where it executes once upon loading the page and then every time I click the $("a#next") link afterwards? Right now I just repasted the code outside of the next link and that works, but seems silly to have the same code in two different places like that. Thanks!

    Read the article

  • Code compiles etc. but just hangs on run.

    - by Aidan
    Hey guys, My program is meant to parse through a text file, extract relevant data and then save it in a SQL table. I compile it like so.. gcc -o parse parse.c -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient_r then I run it like so... ./parse > tweets.rss But it just hangs. it doesn't print any printf's I put in to debug. Whats wrong? here is my code... http://pastebin.com/3R45zyMp I'd appreciate any help!

    Read the article

  • Showing a hidden form

    - by Arcadian
    Newb question: how do i show a from that have been hidden using this.Hide(); I have tried MainMenuForm.Show(); and this just says i need an object ref have tried: MainMenuForm frmMainMenu = new MainMenuForm(); frmMainMenu.Show(); which seems to show the appropriate form. but when you exit the app, it is still held in memory because it hasn't shown the form that was hidden, instead it has shown a new version of the form. in effect having 2 instances of the form (one hidden, one visible). whats the correct procedure here Thanks in advance

    Read the article

  • asp.net regular expression not working as expected

    - by Zaps
    Hi, I have a textbox and a regular expression validator applied to it. I want to make sure that the only allowed string inputted into the textbox are "Anything Entered" or "Something Else" or "Another String" otherwise I want an error to be displayed. This is the regular expression I have so far: ValidationExpression="(^Anything Entered)$|(^Something Else)$ |(^Another String)$" However when I enter the supposed valid strings the error is displayed. I cant figure out whats wrong with the expression. Any help would be greatly appreciated. Thanks, Zaps

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >