Search Results

Search found 3440 results on 138 pages for 'returning'.

Page 56/138 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • Will my shared variables loose value? (asp.net vb)

    - by Phil
    I have a class includes.vb that holds some variables (sharing them with other pages) like: Public Shared pageid As Integer = 0 I then have a function that does some work with these variables returning them with values; Return pageid When I step through the code, the variables have values (while stepping through the function), but when they are returned to the page, they come back null. Do they loose value everytime a page is loaded? Can you suggest an alternative method? Thanks a lot.

    Read the article

  • Types in a struct in C

    - by drigoSkalWalker
    In this article : http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/language/ref/clrc03defst.htm What's means the sentence "In C, a structure member may be of any type except "function returning T" (for some type T)" Thanks for all the answers!

    Read the article

  • [c#] SoundPlayer.PlaySync stopping prematurely

    - by JeffE
    I want to play a wav file synchronously on the gui thread, but my call to PlaySync is returning early (and prematurely stopping playback). The wav file is 2-3 minutes. Here's what my code looks like: //in gui code (event handler) //play first audio file JE_SP.playSound("example1.wav"); //do a few other statements doSomethingUnrelated(); //play another audio file JE_SP.playSound("example2.wav"); //library method written by me, called in gui code, but located in another assembly public static int playSound(string wavFile, bool synchronous = true, bool debug = true, string logFile = "", int loadTimeout = FIVE_MINUTES_IN_MS) { SoundPlayer sp = new SoundPlayer(); sp.LoadTimeout = loadTimeout; sp.SoundLocation = wavFile; sp.Load(); switch (synchronous) { case true: sp.PlaySync(); break; case false: sp.Play(); break; } if (debug) { string writeMe = "JE_SP: \r\n\tSoundLocation = " + sp.SoundLocation + "\r\n\t" + "Synchronous = " + synchronous.ToString(); JE_Log.logMessage(writeMe); } sp.Dispose(); sp = null; return 0; } Some things I've thought of are the load timeout, and playing the audio on another thread and then manually 'freeze' the gui by forcing the gui thread to wait for the duration of the sound file. I tried lengthening the load timeout, but that did nothing. I'm not quite sure what the best way to get the duration of a wav file is without using code written by somebody who isn't me/Microsoft. I suppose this can be calculated since I know the file size, and all of the encoding properties (bitrate, sample rate, sample size, etc) are consistent across all files I intend to play. Can somebody elaborate on how to calculate the duration of a wav file using this info? That is, if nobody has an idea about why PlaySync is returning early. Of Note: I encountered a similar problem in VB 6 a while ago, but that was caused by a timeout, which I don't suspect to be a problem here. Shorter (< 1min) files seem to play fine, so I might decide to manually edit the longer files down, then play them separately with multiple calls.

    Read the article

  • MySQL - Combine two fields to create a unix timestamp?

    - by Dan
    Hi, I'm trying to retrieve a UNIX timestamp from a query by combining a date and a time field in the table, however it keeps returning as zero. SELECT *, UNIX_TIMESTAMP(startdate starttime) AS start, UNIX_TIMESTAMP(enddate endtime) AS end FROM mytable; Can anyone help me out? Thanks.

    Read the article

  • Displaying Data on the Windows Form

    - by The.Anti.9
    I'm searching files and returning lines that include the search text, and I'm not really sure the best way to display the information I get. Every time I get a match, I want to show, in some sort of control, the File it came from, and the whole text line. (aka streamreader.ReadLine() result). First I tried just putting it all in a read-only text box, but it doesn't have a scroll bar. What is the best form control to help me display this data neatly?

    Read the article

  • best scala idiom for find & return

    - by IttayD
    This is something I encounter frequently, but I don't know the elegant way of doing. I have a collection of Foo objects. Foo has a method bar() that may return null or a Bar object. I want to scan the collection, calling each object's bar() method and stop on the first one returning an actual reference and return that reference from the scan. Obviously: foos.find(_.bar != null).bar does the trick, but calls #bar twice.

    Read the article

  • How to create PHP method linking?

    - by Kerry
    I've seen other objects that do this: $obj->method1()->method2(); How do I do that? Is each function just modifying the pointer of an object or returning a pointer? I don't know the proper term for this style -- if anyone could help me with that, it would be great.

    Read the article

  • Get spiral index from location

    - by ricick
    I'm using Alberto Santini's solution to this question to get a spiral grid reference based on an items index Algorithm for iterating over an outward spiral on a discrete 2D grid from the origin It's not the accepted solution, but it's the best for my needs as it avoids using a loop. It's working well, but what I want now is to do the inverse. Based on a known x and y coordinate return the index of a location. This is as a precursor to returning the items surrounding a given location.

    Read the article

  • How to determine element touched on touchend for a page with layers

    - by Greg
    I cannot supply a follow up question as of yet to Get the element under a touchend , so I am opening a new issue. I want to get the element under a touchend that is different from the touchstart, but my page has absolutely positioned elements, and the function document.elementFromPoint keeps on returning my background element instead of every element in front of it. How do I get the actual element being touched?

    Read the article

  • crosshair tool, is there one? Visual studio 2008

    - by flavour404
    Hi, I am doing some image sampling. What my question is, is there a 'crosshair' tool in visual studio? I want to have several instances on a single form, be able to move them around and then sample those points, obviously returning the color of the pixel at the center of the crosshair, is there already a tool that will do this, before I go and write one? Thanks, R.

    Read the article

  • Difference between `<%#` and `<%=` and an asp.net ascx file?

    - by jax
    I understand that <%= is for returning a String I seem to usually use <%# in my .ascx files. For example the following works OnClientClick=<%# String.Format("return confirm('Are you sure you wish to delete barcode ({0})?');", Eval("BARCODE") ) %> The following does not work OnClientClick=<%# String.Format("return confirm('Are you sure you wish to delete barcode ({0})?');", Eval("BARCODE") ) %>

    Read the article

  • How do I return something in JQuery?

    - by TIMEX
    function vote_helper(content_id, thevote){ var result = ""; $.ajax({ type:"POST", url:"/vote", data:{'thevote':thevote, 'content_id':content_id}, beforeSend:function() { }, success:function(html){ result = html; } }); return result; }; I want to return the result. But it's returning blank string.

    Read the article

  • WebService remote invoking fails.

    - by user569913
    I have a web service hosted on a web server, I invoke the web service using jquery ajax. The service returns results successfully when invoked locally from the server, but it fails when invoked from a remote client machine (not in the same domain). I see the request fail in the firebug returning error (401 UnAuthorized) and the response has the following error (Request format is unrecognized for URL unexpectedly ending in '/List').

    Read the article

  • ActionScript Reading Static Const Array

    - by TheDarkIn1978
    how can i evaluate weather my test array is equal to my static constant DEFAULT_ARRAY? shouldn't my output be returning true? public class myClass extends Sprite { private static const DEFAULT_ARRAY:Array = new Array(1, 2, 3); public function myClass() { var test:Array = new Array(1, 2, 3); trace (test == DEFAULT_ARRAY); } //traces false

    Read the article

  • PHP MYSQL SIMPLE SEARCH ISSUE

    - by Kunal
    Hi I have a table with the following structure: id int(11), name varchar(250) I have lots of records in the table but when I am trying to find a particluar record which has the following value on the name field: Lorem ipsum d\'olor sit amet The query is simply returning a blank recordset. I am not being able to figure out this weird behaviour, when my query is as simple as follows: SELECT * FROM slot_games WHERE name='Lorem ipsum d\'olor sit amet' Would appreciate your help please! Thanks in advance.

    Read the article

  • Does Ruby have a special stack for return value?

    - by prosseek
    The following Ruby code def a(b,c) b+c end is the same as follows with Python def a(b,c): return b+c It looks like that ruby has the special stack that stores the final evaluation result and returns the value when a function is called. If so, what's the name of the stack, and how can I get that stack? If not, how does the Ruby code work without returning something?

    Read the article

  • What's the best replacement for timeGetTime to avoid wrap-around?

    - by phjr
    timeGetTime seems to be quite good to query for system time. However, its return value is 32-bit only, so it wraps around every 49 days approx. It's not too hard to detect the rollover in calling code, but it adds some complexity, and (worse) requires keeping a state. Is there some replacement for timeGetTime that would not have this wrap-around problem (probably by returning a 64-bit value), and have roughly the same precision and cost?

    Read the article

  • class NSCFData autoreleased with no pool in place

    - by iSight
    Hi, I have converted my NSString into string, and returning the same but the above error mentioned in the title is printing on console. Please suggest so that i could get away from this issue. my code is below: string stringFromNSString(NSString *inNSString) { return [inNSString UTF8String]; }

    Read the article

  • Rails cookies not working right

    - by Michael Waxman
    Rails is setting and returning a remember_token cookie like this: = cookies[:remember_token] = value6c69b17681d2bf316f8eexpiresThu Jun 10 14:55:00 -0400 2010 In other words, when I'm calling the cookie I don't just get the value. Why is this? I am setting the cookie as follows: cookies[:remember_token] = { :value => @user.remember_me, :expires => 1.year.from_now} What's going on here?

    Read the article

  • Ternary operators in C#

    - by pm_2
    With the ternary operator, it is possible to do something like the following (assuming Func1() and Func2() return an int: int x = (x == y) ? Func1() : Func2(); However, is there any way to do the same thing, without returning a value? For example, something like (assuming Func1() and Func2() return void): (x == y) ? Func1() : Func2(); I realise this could be accomplished using an if statement, I just wondered if there was a way to do it like this.

    Read the article

  • a string doesn't exist in the current context

    - by Strider007
    the following is a part of my code. string lsStatus; lsStatus = ((Tv10DBLookup)(Sender)).EditValue.ToString(); while im debuging the code, im getting the following: "lsStatus is not in the context" ! Knowing that (Tv10DBLookup)(Sender)).EditValue is returning the value "Closed" what does this mean ?

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >