Hi, im trying to increment the numbers to create unique id so i did: twin_chairid1 = 1; twin_chairid2 = 2; var twinseatsid = "twinseat" + twinseats; //create div for twin seats $("<div class='twin_seat' style='width:120px;display:table-row;'></div>").attr('id', twinseatsid).appendTo(cinema).draggable({ containment: cinema, snap: true }); //create unique id var twin_chair1_id = "B" + twin_chairid1; var twin_chair2_id = "B" + twin_chairid2; //create label to display unique id var label1 = $("<label></label>").text(twin_chair1_id); var label2 = $("<label></label>").text(twin_chair2_id); //clone chair and add unique id var twin_chair1 = $(single).clone().attr('id', twin_chair1_id).append(label1); var twin_chair2 = $(single).clone().attr('id', twin_chair2_id).append(label2); //append chair to div twin_chair1.appendTo("#twinseat" + twinseats).css('display','table-cell'); twin_chair2.appendTo("#twinseat" + twinseats).css('display','table-cell'); //increment number for unique id …

Member Avatar
Member Avatar
+0 forum 1

Hi, I use the following code from phpmyadmin to reset one of my table's auto increment value from 1. SET @count = 0; UPDATE `mytable` SET `mytable`.`id` = @count:= @count + 1; ALTER TABLE `mytable` AUTO_INCREMENT = 1; But I want to run this query from PHP file and set a cron job everyday to do this. Table's storage engine type is INNODB. And id is not related in any of my tables (not a foreign key), so its ok to reset. Reason to reset is beacuse everyday million rows gets inserted and deleted once the day is completed. So …

Member Avatar
Member Avatar
+0 forum 3

how to auto increment alphabets in actionscript??

Member Avatar
+0 forum 0

The expected outcome dosent agree with result. Following is the code snippet. int a,c; a=10; c=0; c=(--a)+(--a); printf("C: %d", c); printf("\nValue of a: %d", a); I expected C to be 17 i.e (9+8), but it comes out to be 16. And a becomes 8 as expected. When expression is changed to like this. c=(--a); c=c+(--a); Then it works fine. Someone please point out where is loophole in my knowledge. Thanx.

Member Avatar
Member Avatar
+0 forum 6

Hi Could you please tell me how to solve this simple problem in c++. #include<iostream.h> #include<conio.h> void main() { clrscr(); int a=5,b=3; int y=a-b++ * --b; /* manually I get the answer as 6 , but the compiler gives as -4 . how?*/ cout<<y; getch(); }

Member Avatar
Member Avatar
+0 forum 4

hi guys, am testing this script, but its not working. my requirements: current file in database and in folder is 135.docx, and if i want to update it by uploading a new file, the new filename should be 135_1.docx , if update again it must be 135_2.docx and so on, the word file will just keep adding up in the folder but the database will just update its row data. $infile = 135.docx if ($pos = strrpos($infile, '.')) { $name = substr($infile, 0, $pos); $ext = substr($infile, $pos); } else { $name = $infile; } $testname = $name.$ext; //$newpath = …

Member Avatar
Member Avatar
+0 forum 15

i have the db with serial no and reference no. serial no is auto_increment value. it is worked perfectly. but i want ref no column also as auto_increment value start with 0000001,0000002,0000003...., how to do that? i cannot able to add two auto_increment values in mysql.

Member Avatar
Member Avatar
+0 forum 2

1. #include<stdio.h> #include<conio.h> int main() int a=10; printf("%d%d%d",a,a++,++a); getch(); return 0; } o/p:12 11 11 #include<stdio.h> #include<conio.h> int main() { double a=5.2; if(a==5.2) printf("equal"); else if(a<5.2) printf("less"); else printf("high"); getch(); } o/p: less Can any one give me explanation for the above outputs.....

Member Avatar
Member Avatar
+0 forum 23

You can fix one parameter of function call by calling underlying method of fixed parameter instead of using functools.partial or lambda statement.

Member Avatar
Member Avatar
+1 forum 2

Hi all. I have two tables (question and answer) with q_id as the link. I would like to output the data that each table holds alternately like this: [Question 1] [Question 1 Choice of Answers] [Question 2] [Question 2 Choice of Answers] ...and so on. I've managed to filter the answer sets by q_id but now they do not tally with the question. I attached an image of the output. The $id alternates between the questions and answer sets. Commenting out the $id++; line has the same outcome. ![question3](/attachments/large/3/question3.png "question3") I hope someone can point me in the right direction. …

Member Avatar
Member Avatar
+0 forum 20

Im incrementing a value in a while loop, but its only incrementing when my mouse is moving. Any ideas? while (isAlwaysTrue) { value += 1; } Thats basically what Im doing.

Member Avatar
Member Avatar
+0 forum 12

I have a different buttons for each item i have, each buttons has a function of which compute total price of item versus the quantity that have been entered in the textbox qty and summing all the total bill of all items to textbox3 or totalbilltext. but it seems that only value that appearing to the textbox3 is the (qty*price) not the value of the totalbill+=qty*price. T_T help. Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click a = TextBox1.Text b = a * 2 tb += b TextBox3.Text = tb End Sub Protected Sub Button2_Click(sender As Object, e …

Member Avatar
Member Avatar
+0 forum 1

I have written a very simple program inside of a standard .NET 4.0 windows form (well a form opened by another form to be more exact) in C# using Visual Studio 2010. The basic idea is I have a series of text boxes with numbers. I want to be able to increase them by specific preset amounts and stop at a given limit. The limit being 20 increments (remaining) between all attributes (Hp,Mp, Str, Agil, Int, Will, Luck) (50/50/10/10/10/10/10), however decreasing an increment (by the same amount) should return the increment counter to its former state. Ex: Number is 10. …

Member Avatar
Member Avatar
+0 forum 2

i have a database consisting of a table PROJECT(p_id,p_name,P_manager) i am using oracle 9i as my backend and auto increment is possible only through triggers and sequence. instead i would like to retreive the data p_id onto a combo box. simply put- when i add data into my table PROJECT i should be able to add only p_name and p_manager. p_id should get auto incremented from last value and get stored in database. here is the code i use: dim a as double rs.MoveLast a = rs.Fields(0) a = a + 1 con.Execute "insert into project values (" + a …

Member Avatar
Member Avatar
+0 forum 8

Why does the following snippet produces different result than expected? #include <stdio.h> int main() { int i = 5; printf("%d %d %d", i++, i++, ++i); getchar(); } I compiled and run this code with Visual C++ 2010 and it produces the output 7 6 8 instead of 7 6 6 Why?

Member Avatar
Member Avatar
+0 forum 2

Hai, I have 2 question to ask about vb.net. Now i'm using Visual Studio 2005 with connection MySql... 1. how if I want to passing the data from database to the textbox by SEARCH button. I Have 1 SEARCH button and 3 textbox [txtname],[txtage],[txtaddress] and to pass it also on datagrid... 2. I have a id_Student starting with S001 in database...and I want the id is increment when new data is added. The id_Student is display using lblID_stud Thanks in advanced. Hope anyone can help me to solve/handle this problem...

Member Avatar
Member Avatar
+0 forum 6

I have an integer called: int pID = 0; Inside my while loop I'm using pID++; to increment it. Sometimes the pID doesn't get incremented and sometimes it will. My sample output would be. 0 1 2 2 2 3 4 5 5 6 7 Does anyone have an idea to why it would be doing this? Here is the code. [CODE]int main(int argv, char *argc[]) { srand(time(NULL)); totalRunningTime = clock(); int randomP; int pID = 0; int ran = 0; int tempA; FILE * filePt; while(true) { randomP = rand() % 2; pID++; printf("%i\n",pID); if(randomP == 0)// Creates a …

Member Avatar
Member Avatar
+0 forum 7

[code]main() { int a=5; a=++a + ++a; printf("%d",a); }[/code] the output is 14..how come?

Member Avatar
Member Avatar
+0 forum 8

Hi guys well what I want to do is that when a button is pressed it increases the value in one of my database cells. So my question is how do I do this? As I cannot get this to work. My code so far: Any help would be appreciated [CODE]String updateStr = "UPDATE VIDEOS PLAYCOUNT = " + PLAYCOUNT + 1 + " WHERE ID = '" + id + "'"; System.out.println(updateStr); try { stmt.executeUpdate(updateStr); } catch (Exception e) { System.out.println(e); }[/CODE]

Member Avatar
Member Avatar
+0 forum 1

hey guys this code is not working [CODE] Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Do Until X = TextBox6.Text X = TextBox5.Text + 1 Label4.Text = X Me.Refresh() WebBrowser1.Document.GetElementById("subject").SetAttribute("value", TextBox3.Text) WebBrowser1.Document.GetElementById("message").SetAttribute("value", RichTextBox1.Text) WebBrowser1.Document.GetElementById("btnSubmit").InvokeMember("click") WebBrowser1.Navigate("http://forum.ea.com/uk/pm/sendTo/" & X & ".page") ReaderTimer.Interval = 5000 ' In thousands of seconds Loop End Sub[/CODE] I need it to auto increase amount, also wait on page load each time. or even better just post http content so i dont need to load page. It crashes on run, if i take the auto increment out it runs fine once. but that …

Member Avatar
Member Avatar
+0 forum 7

I was just wandering if there was a way to put information in to a string but increment a section of the text when putting it in the string. To put it simply: [CODE]string="to be put in string[this is to be incremented]";[/CODE] I was wandering if there is a way to do this.

Member Avatar
Member Avatar
+0 forum 2

I want to have an alternative way to increment my student no. the current way I'm doing to is in my database, mssql. there's a property called Identity Seed(201200001 - my studentid format) and Identity Increment (1 - no. of increments). The 2012-is the school year, while the 00001- is the no of the student. what can i do for next school year and upcoming years, the student no would have to be 201300001 but for that to happen the student no must reach 201299999 but that no of students enrolling for a school year is impossible. can i do …

Member Avatar
Member Avatar
+0 forum 3

total += nValue; so would that mean that whatever the total is it will be added towards nValue, or is something being incremented? Thanks

Member Avatar
Member Avatar
+0 forum 2

My assignment is to write a program that outputs the following columns of numbers using mathematical operators and the loop index. This is what I want the program to output: [CODE]1 10 0 1 1 0 2 20 1 4 2 0 3 30 2 9 3 0 4 40 3 16 4 0 5 50 4 25 0 1 6 60 5 36 1 1 7 70 6 49 2 1 8 80 7 64 3 1 9 90 8 81 4 1 10 100 9 100 0 2[/CODE] *I couldn't get the top row aligned right. The top …

Member Avatar
Member Avatar
+0 forum 5

i need code for vb.net 2008. That is invoice system i have number in each invoice. my database invoice number is null. when i click tab automatically invoice number increased number 1 ( EC000 to EC001). I used tab control . please reply...

Member Avatar
Member Avatar
+0 forum 10

Hello to all java programmers I have a java database problem specifically the auto increment. In my MSAccess I have a table named "[B][COLOR="Red"]Confirm[/COLOR][/B]" and in that table I got two fields, the "[B][COLOR="Red"]confirm[/COLOR][/B]" which is set to text and the "[B][COLOR="Red"]id[/COLOR][/B]" which is set to auto number or auto increment which is also my primary key. In my java application I have a textfield then a button save. If the button is clicked, the text in the textfield will be saved in the database field "[B][COLOR="Red"]confirm[/COLOR][/B]" then the [B][COLOR="Red"]id [/COLOR][/B]will increment. In my code, what I did is this: …

Member Avatar
Member Avatar
+0 forum 2

[CODE]Dim Processors(4) As ProcessorType For j = 1 To 4 Step 1 Put #filenum, WritePos, Processors(j).byte0 WritePos = WritePos + 1[/CODE] I'm in the process of translating this VBA code to python, and essentially what it does is creates 4 Processor Objects but as you can see from the for loop it allows the processor to be incremented to the next one so that it's byte0 from each processor is written. How would you do this in python, any advice?

Member Avatar
Member Avatar
+0 forum 6

I am making a request form with a uniqe FORM NO. in order to recall the data faster. The FORM NO. is formated as follows, yyyyMMdd-000 the 000 will be incremented for every transaction made that's easy... but the problem is how to reset it back to 000 the following day? example: 20110713-000 (for the first transaction) 20110713-001 (for the second transaction) 20110713-002 (for the third transaction) . . (and so on) . 20110713-999 then the following day, the number should go back to 000 20110714-000 . . . 20110714-999 any suggestion? with out reseting it manually

Member Avatar
Member Avatar
+0 forum 6

I have been looking for an answer for the last few hours on google with no success. I am trying to create a program that will determine what file to open from user input. For example: names of the text files are xaa through xzz. The text files contain integers that are incremented 1 to 250,000,000. Each file contains 370,000 integers except the last file. xaa - 1 through 370,000 xab - 370,000 through 740,000 etc. So the program asks which number they would like to find and the file goes to the file with that number and opens that …

Member Avatar
Member Avatar
+0 forum 8

i am writing a program and i need to increment a table row. How would i increment a table row on the click of a button?

Member Avatar
Member Avatar
+0 forum 7

The End.