Search Results

Search found 6374 results on 255 pages for 'double underscore'.

Page 187/255 | < Previous Page | 183 184 185 186 187 188 189 190 191 192 193 194  | Next Page >

  • Actionscript 2.0 element.text always outputs "00"

    - by Mbarry
    Hi everybody, I'm fighting against a strange behaviour with my actionscript! After setting the four integer variables from the MovieTimer sprite (hour, minute, second, mili-sec) and concate them i got always double zero: 00 stop (); delete this.onEnterFrame; var str1; var str2; var mili; var second; var minute; var hour; var timer; mili = _root.MovieTimer.txt_mili.text; second = _root.MovieTimer.txt_sec.text; minute = _root.MovieTimer.txt_min.text; hour = _root.MovieTimer.txt_heures.text; timer = hour+' : '+minute+' : '+second+' : '+mili; _root.MovieSpellFinish.TextTime.text = timer; _root.MovieSpellFinish.TextTime.text outputs: 00 is there any solutions for this??

    Read the article

  • Beginner Access VBA SQL INSERT Question

    - by Josh K
    Syntax question: I am using the code below to call a query in Access VBA strSQL = "INSERT INTO tblLoanDetails ([ServerName]) VALUES ('Test') WHERE [ID]=3" Call CurrentDb.Execute(strSQL) And i am getting a runtime error of "3067: Query must contain atleast one table or query." the insert statement string looks like this (Threw the var into a text box): INSERT INTO tblLoanDetails ([ServerName]) VALUES ('Test') WHERE [ID]=3 I also tried adding a semi-colon to the end but with no luck. I also double checked to make sure my table is called tblLoanDetails and my Column names are ServerName, and ID Appreciate any help.

    Read the article

  • record mouse movements, clicks and keyboard input with Java or C++

    - by Joe
    I want to be able to record mouse movements, clicks and keyboard input from a user. It would be great if it was a cross platform solution. I'd like to get back something like this (pseudo code): mouse moved to 500, 500 mouse double clicked mouse moved to 800, 300 mouse left clicked keyboard typed "Hello World" Does either C++ or Java have any classes that can do this? If I was using C++, I would probably working with the QT framework. Edit: I should have said this originally, but I want to record the movements and clicks outside of the applications gui, so on the desktop too.

    Read the article

  • class classname(value); & class classname=value; difference when constructor is explicit

    - by Mahesh
    When constructor is explicit, it isn't used for implicit conversions. In the given snippet, constructor is marked as explicit. Then why in case foo obj1(10.25); it is working and in foo obj2=10.25; it isn't working ? #include <iostream> class foo { int x; public: explicit foo( int x ):x(x) {} }; int main() { foo obj(10.25); // Not an error. Why ? foo obj2 = 10.25; // Error getchar(); return 0; } error: error C2440: 'initializing' : cannot convert from 'double' to 'foo'

    Read the article

  • How to store matrix information in MySQL?

    - by dedalo
    Hi, I'm working on an application that analizes music similarity. In order to do that I proccess audio data and store the results in txt files. For each audio file I create 2 files, 1 containing and 16 values (each value can be like this:2.7000023942731723) and the other file contains 16 rows, each row containing 16 values like the one previously shown. I'd like to store the contents of these 2 file in a table of my MySQL database. My table looks like: Name varchar(100) Author varchar (100) in order to add the content of those 2 file I think I need to use the BLOB data type: file1 blob file2 blob My question is how should I store this info in the data base? I'm working with Java where I have a double array containing the 16 values (for the file1) and a matrix containing the file2 info. Should I process the values as strings and add them to the columns in my database? Thanks

    Read the article

  • PHP HTML variable

    - by Abakiz Myth
    In Coldfusion we have the variable: <cfsavecontent name="HTML_content"> <div class="test_div" style="color:#FFF;">Test</div> </cfsavecontent> Within PHP there seems to be no way of doing this without some really hacky function or escaping double quotes. I'm trying to create emails (large html documents) within the same page by saving the email content and simply mailing it but it seems like there's no way of doing this within PHP without using $var = "\"crap\""; Can somebody point me in the right direction?

    Read the article

  • Permissions for Large Variables to Be Sent Via Stored Procedures (SQL Server)

    - by Joe Majewski
    I can't figure out a way to allow more than 4000 bytes to be received at once via a call to a stored procedure. I am storing images in the table that are around 15 - 20 kilobytes each, but upon getting them and displaying them to the page, they are always exactly 3.91 KB in size (or 4000 bytes). Do stored procedures have a limit on how much data can be sent at once? I double-checked my data, and I am indeed only receiving the first 4000 characters from the varbinary(MAX) field. Is there a permission setting to allow more than 4k bytes at once?

    Read the article

  • Highest value datatype can store in c#

    - by user472832
    I am writing a small program for my assignment to find the primitive roots of a prime number. So far, the program works for smaller prime numbers till 13 and gives correct number of roots. But for higher primes numbers, it is showing only fewer primitive roots. And now i got stuck for the prime number 41, shows no primitive roots for it. I used DOUBLE datatype for the calculation, and again tried with the datatype DECIMAL, but no luck. Does anyone know about this kind of problem??? Thank you.

    Read the article

  • How to get the right row in a sorted DataView?

    - by ZeissS
    Hi, I have a DataGrid containing a small table. Until now, I had a double click handler on this grid which iterated over all rows to find the selected one: DataTable table = (DataTable)this.dataGrid.DataSource; int selectedRow = -1; for (int i=0; i<table.Rows.Count; i++) if (this.dataGrid.IsSelected(i)) selectedRow = i; break; } if ( selectedRow != -1 ) { DataRow row = table.Rows[selectedRow]; // More code ... } Problem: When the user clicks on a column header and sort the table, table.Rows does not return the right rows. It still contains the unsorted rows. How can I get the right column?

    Read the article

  • Can a real number "cover" all integers within its range?

    - by macias
    Is there a guarantee that a real number (float, double, etc) can "cover" all integers within its range? By cover I mean, that for every integer within its range there is such real number that this equality holds: real == int Or in another example, let's say I have the biggest real number which is smaller than given integer. When I add "epsilon" will I get this number equal to given integer or bigger than integer? (I know that among real numbers you should not write comparisons as == for equality, I am simply asking for better understanding subject, not for coding comparisons.)

    Read the article

  • Robust Way of Selecting All Text in Textbox

    - by Emil
    I'm trying to have the content of the an HTML textbox be selected fully onFocus. I know the simple solution of putting a onfocus="this.select()" on the component but this is not a good solution because if a user double clicks into the area the selection is lost and in browsers like chrome it is rarely working like it should and just reverts into input form. I have searched on Google for a little while and can't find a good solution, most suggestions are of this simple solution. What I would like it is that the selection inside the textbox not change once selected and if possible the user should not be able to edit the content of the textbox, for example if you have used AdSense when you grab code from AdSense the selection never changes and your unable to alter the code in the textbox. Any solutions would be appreciated.

    Read the article

  • How to Change Type of a VARIANT

    - by nimo
    Hi, I'm having a VARIANT with its type set to VT_R8. Subsequently I need to change its type to VT_BSTR. I would like know whether there is a way of resetting a VARIANT status. Thus, I noticed that every time I set value to the VARIANT (in my case, its double) , VARIANT itself set its bstrVal member to a bad pointer, even though I set bstrVal member to NULL at the initialization of VARIANT. Why such thing is happening ? Is it safe to use a VARIANT as structure where both dbVal and bstrVal member are set ? Please clarify, thank you.

    Read the article

  • problem with sql statement using vb.net

    - by newBie
    hi i got some problem i got this 3 line statement: Dim infoID As Integer = objCommand1.ExecuteScalar() Dim strSQL2 As String = "insert into feedBackHotel (infoID, feedBackView) values(" + infoID + ",'" + FeedBack + "')" Dim objCommand2 As New SqlCommand(strSQL2, conn) objCommand2.ExecuteNonQuery() the problem here is..the strSQL2 can capture the infoID from previous statement, but it didnt insert into the database. it will pop out this error "Conversion from string "insert into feedBackHotel (infoI" to type 'Double' is not valid." in both table related, use same data type (int) but for the feedBackHotel's infoID i allow it to be null..bcoz if i make it not null, it will show another error.. im using vb.net ..can anyone help?

    Read the article

  • render json data returned from mvc controller

    - by user1765862
    I'm having js function which calls mvc controller action method which return list of data as json. function FillCountryCities(countryId) { $.ajax({ type: 'GET', url: '/User/FillCityCombo', data: { countryId: countryId }, contentType: 'application/json', success: function (data) { alert(data[0].Name); } error: function () { alert('something bad happened'); } .... format of data which sent back from controller is Name (string) and Id (Guid) Now I just want to alert Name on success first item from collection. Double checked controller sends 20 records, so it should alert first from collection but I'm getting error something bad happened update: public JsonResult FillCityCombo(Guid countryId) { var cities = repository.GetData() .Where(x = x.Country.Id == countryId).ToList(); if (Request.IsAjaxRequest()) { return new JsonResult { Data = cities, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; } else { return new JsonResult { Data = "Not Valid Request", JsonRequestBehavior = JsonRequestBehavior.AllowGet }; } }

    Read the article

  • C++ stringstream reads all zero's

    - by user69514
    I have a file which contains three integers per line. When I read the line I use a stringstream to separate the values, but it only reads the first value as it is. The other two are read as zero's. ifstream inputstream(filename.c_str()); if( inputstream.is_open() ){ string line; stringstream ss; while( getline(inputstream, line) ){ //check line and extract elements int id; double income; int members; ss.clear(); ss.str(line); ss >> id >> income >> members; In the case above, id is extracted correctly, but income, and members get assigned zero instead of the actual value.

    Read the article

  • Keep row of datagridview clicked by user selected

    - by user367509
    Hi All, I need the snipped code in C# to mantain selected the row from a datagridview after that row is double clicked. Right now I'm displaying data from a dataset and the selection mode is FullRowSelect. Any way to set this? There are two scenarios to deal with: 1) Everytime the timer ticks the selected row always go to the first row of datagridview. 2) Once a row is clicked, it is selected but after the timer ticks the selected row goes to the first one. Thanks for your help! A newbie programmer

    Read the article

  • Help in optimizing a for loop in matlab

    - by HH
    I have a 1 by N double array consisting of 1 and 0. I would like to map all the 1 to symbol '-3' and '3' and all the 0 to symbol '-1' and '1' equally. Below is my code. As my array is approx 1 by 8 million, it is taking a very long time. How to speed things up? [row,ll] = size(Data); sym_zero = -1; sym_one = -3; for loop = 1 : row if Data(loop,1) == 0 Data2(loop,1) = sym_zero; if sym_zero == -1 sym_zero = 1; else sym_zero = -1; end else Data2(loop,1) = sym_one; if sym_one == -3 sym_zero = 3; else sym_zero = -3; end end end

    Read the article

  • C++ vector reference parameter

    - by Archanimus
    Hello folks, let's say we have a class class MyClass { vector<vector<int > > myMatrice; public : MyClass(vector<vector<int > > &); } MyClass::MyClass(vector<vector<int > > & m) { myMatrice = m; } During the instanciation of MyClass, I pass a big vector < vector < int and I find that the object is actually copied and not only the reference, so it takes the double of the memory ... Please, can anyone help me out with this problem, I'm stuck since too many time ... And thanks a lot!

    Read the article

  • A little javascript help needed here (easy).

    - by Camran
    function addOption(selectbox, val, txt){ ...... } addOption(list, "Cars", "Cars"); I need to add this in front of the text of the function: &nbsp;&nbsp;&nbsp; So that there is space coming in before the option text...Never mind what it is for, it is just confusing... I just don't know how to insert it into the js code. If I do it like this: addOption(list, "Cars", "&nbsp;&nbsp;&nbsp;Cars"); Then the &nbsp;&nbsp;&nbsp; comes into the text, so it gets displayed for the users. However I need it to be interpreted as "space"... If you don't understand let me know... How can I do this? Quotes, double quotes etc? Thanks

    Read the article

  • When is (true == x) === !!x false?

    - by Paul S.
    JavaScript has different equality comparison operators Equal == Strict equal === It also has a logical NOT ! and I've tended to think of using a double logical NOT, !!x, as basically the same as true == x. However I know this is not always the case, e.g. x = [] because [] is truthy for ! but falsy for ==. So, for which xs would (true == x) === !!x give false? Alternatively, what is falsy by == but not !! (or vice versa)?

    Read the article

  • Proper code but can't insert to database

    - by Dchris
    I have a Visual Basic project using Access database.I run a query but i don't see any new data on my database table.I don't have any exception or error.Instead of this the success messagebox is shown. Here is my code: Dim ID As Integer = 2 Dim TableNumber As Integer = 2 Dim OrderDate As Date = Format(Now, "General Date") Dim TotalPrice As Double = 100.0 Dim ConnectionString As String = "myconnectionstring" Dim con As New OleDb.OleDbConnection(ConnectionString) Try Dim InsertCMD As OleDb.OleDbCommand InsertCMD = New OleDb.OleDbCommand("INSERT INTO Orders([ID],[TableNumber],[OrderDate],[TotalPrice]) VALUES(@ID,@TableNumber,@OrderDate,@TotalPrice);", con) InsertCMD.Parameters.AddWithValue("@ID", ID) InsertCMD.Parameters.AddWithValue("@TableNumber", TableNumber) InsertCMD.Parameters.AddWithValue("@OrderDate", OrderDate) InsertCMD.Parameters.AddWithValue("@TotalPrice", TotalPrice) con.Open() InsertCMD.ExecuteNonQuery() MessageBox.Show("Successfully Added New Order", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information) con.Close() Catch ex As Exception 'Something went wrong MessageBox.Show(ex.ToString) Finally 'Success or not, make sure it's closed If con.State <> ConnectionState.Closed Then con.Close() End Try What is the problem?

    Read the article

  • Doubling a number - shift left vs. multiplication

    - by ToxicAvenger
    What are the differences between int size = (int)((length * 200L) / 100L); // (1) and int size = length << 1; // (2) (length is int in both cases) I assume both code snippets want to double the length parameter. I'd be tempted to use (2) ... so are there any advantages for using (1)? I looked at the edge cases when overflow occurs, and both versions seem to have the same behavior. Please tell me what am I missing.

    Read the article

  • How to store coordinates in a database

    - by Tim
    Hello all! I have a Flex GUI where I have to place quadrate elements. The position of these elements need to be stored into a database. So I can create two integer fields in the db table x and y. Also I need an angle, because the user can rotate these elements, so I can also make a int (int is okay, I do not need a double value therefore). As a ORM, I use Hibernate. But the question is, if creating three integer fields is the best way to handle this. Perhaps someone can tell me if this will be okay or if there are better ways? Thanks a lot in advance & Best Regards.

    Read the article

  • Multithreaded SDL error in C++

    - by wyatt
    I'm building a program in C++, using SDL, and am occasionally receiving this error: * glibc detected * ./assistant: double free or corruption (!prev) It's difficult to replicate, so I can't find exactly what's causing it, but I just added a second thread to the program, and neither thread run on its own seems to cause the error. The threads don't share any variables, though they both run the functions SDL_BlitSurface and SDL_Flip. Could running these concurrently throw up such an error, or am I barking up the wrong tree? If this is the cause, should I simply throw a mutex around all SDL calls? Thanks

    Read the article

  • strategy to allocate/free lots of small objects

    - by aaa
    hello I am toying with certain caching algorithm, which is challenging somewhat. Basically, it needs to allocate lots of small objects (double arrays, < 256 elements), with objects accessible through mapped value, map[key] = array. time to initialized array may be quite large, generally more than 10 thousand cpu cycles. By lots I mean around gigabyte in total. objects may need to be popped/pushed as needed, generally in random places, one object at a time. lifetime of an object is generally long, minutes or more, however, object may be subject to allocation/deallocation several times during duration of program. What would be good strategy to avoid memory fragmentation, while still maintaining reasonable allocate deallocate speed? I am using C++, so I can use new and malloc. Thanks. I know there a similar questions on website, http://stackoverflow.com/questions/2156745/efficiently-allocating-many-short-lived-small-objects, are somewhat different, thread safety is not immediate issue for me.

    Read the article

< Previous Page | 183 184 185 186 187 188 189 190 191 192 193 194  | Next Page >