wpf how to return a value with dispatcher.invoke
Hi! Anyone knows how to return a value from Dispatcher.Invoke in WPF? I want to return the selected index for a combobox. Thanks! ...
Hi! Anyone knows how to return a value from Dispatcher.Invoke in WPF? I want to return the selected index for a combobox. Thanks! ...
I have a struct SystemStruct *sharedStruct = [SystemStruct sharedSystemStruct]; implemented as a singleton, to share 3 Arrays. the problem is that when i try to count the array's objects the system crash. es: This code Crash: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { SystemStruct *Sha...
I'm using wget in a php script and need to get the name of the file downloaded. For example, if I try <?php system('/usr/bin/wget -q --directory-prefix="./downloads/" http://www.google.com/'); ?> I will get a file called index.html in the downloads directory. EDIT: The page will not always be google though, the target may be an im...
Hi, when a carriage return follows a closing php tag, php doesn't print it. How can I change this? Thanks a lot ...
I wanted to assign a returned value (just text) to a variable in jQuery. I wrote this: var hm=22; $.ajax({ type: "GET", url: "ajax_check_match.php", dataType: "text", success:callback }); function callback(data, status) { //...
My static method returns the following concatenated string like this return (Sb.ToString() + " " + ds.Tables[1].Rows[0].ItemArray[0].ToString() + " " + ds.Tables[2].Rows[0].ItemArray[0].ToString()); Is this a good/bad practise or should i use stringbuilder for it.... ...
I'm completely confused ... I'd swear this was working yesterday ... I woke up this morning and all my forms stopped to work in my project. All the forms have a "onsubmit" to a function that returns false since it's an ajax call, so the form is never sent. After a lot of tests, I simplified the question to this piece of code: <html> <...
I'm using SDL with FASM, and have code that's minimally like the following: format ELF extrn _SDL_Init extrn _SDL_SetVideoMode extrn _SDL_Quit extrn _exit SDL_INIT_VIDEO equ 0x00000020 section '.text' public _SDL_main _SDL_main: ccall _SDL_Init, SDL_INIT_VIDEO ccall _SDL_SetVideoMode, 640, 480, 32, 0 ccall _SDL_Quit...
Hi all fellow programmer I'd like to have a separate js file for each MVC set I have in my application /Controllers/ -TestController.cs /Models/ /Views/ /Test/ -Index.aspx -script.js And I'd like to include the js in the Index.aspx by <script type="text/javascript" src="<%=UriHelper.GetBaseUrl()%>/Test/Js"></...
howdy, i currently have a method that checks what is around the centre item in a 3x3 grid, if what is in the 8 adjacent positions is containing what i am checking for i want to mark that square on an array with length 7 as being 1. to do this i need to create and return an array in my method, is it possible to do this? ...
How can we get and handle the sftp return codes in a C program if sftp fails to put the file in a server? We need to transfer the files again if sftp fails to put it in the sftp server. ...
Hello Fellow Koder ••• I have a TableViewController that is using a grouped Style and has two(2) sections. The first section has 4 rows and the second section has 3 rows. I have placed a UILabel and a UITextField in each cell, and have a custom method(textFieldDone:) to handle the cursor movement to the next text field when the return ...
I spend most of my time in C# and am trying to figure out which is the best practice for handling an exception and cleanly return an error message from a called method back to the calling method. For example, here is some ActiveDirectory authentication code. Please imagine this Method as part of a Class (and not just a standalone funct...
Hello, This isn't valid code: public class MyClass { private static boolean yesNo = false; static { if (yesNo) { System.out.println("Yes"); return; // The return statement is the problem } System.exit(0); } } This is a stupid example, but in a static class const...
I have a function that is set up as follows function mainFunction() { function subFunction() { var str = "foo"; return str; } } var test = mainFunction(); alert(test); To my logic, that alert should return 'foo', but instead it returns undefined. What am I doing wrong? UPDATE: Here's my actual co...
Hi, I have the following member of class foo. foo &foo::bar() { return this; } But I am getting compiler errors. What stupid thing am I doing wrong? Compiler error (gcc): error: invalid initialization of non-const reference of type 'foo&' from a temporary of type 'foo* const' ...
i know that in vb.net you can just do Exit Sub but i would like to know how do i exit a click event in a button? here's my code: private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "") { //exit this event } } ...
How do I return the latlon variable for codeAddress function. return latlon doesn't work, probably because of scope but I am unsure how to make it work. function codeAddress(addr) { if (geocoder) { geocoder.geocode({ 'address': addr}, function(results, status) { if (status == google.maps.Geocoder...
Sorry for the vague question. I would like to create a string that uses a plural if count > 1. For that, I would like have an "inline" condition that returns 's' to concatenate to my noun. print "The plural of plural is plural{0}. {1}".format( {'s' if count > 1}, "Isnt't it!?") ...
When a method returns IEnumerable<T> and I do not have anything to return, we can use Enumerable.Empty<T>(). Is there an equivalent to the above for a method returning IQueryable<T> ...