Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by jprog1000 Hello, Thank you again so much! All your additions are clear, but it seems like whenever two balls collide, more than one ball is added to the arraylist and painted. Any way to have just one ball added to the panel for every collision? Have some kind of a toggle flag in paintcomponent? Regards Re: Extracting values from capturing groups in regex Programming Software Development by AndreRet … <td> tags. You should also use re.DOTALL flag to make the dot (.) in the pattern match newline characters… Re: Flag Programming Software Development by engrjawad … main(String args[]){ int num = Integer.parseInt(args[0]); int flag=0; for(int i=2;i<num;i++){ if….println(num+" is not a Prime Number"); flag = 1; break; } } if(flag==0) System.out.println(num+" is a… Flag Programming Software Development by engrjawad What is a flag in java? when do we need it in our program? what it is used for? Re: Flag question in quiz Programming Software Development by bertha … qns,all button are working fine except one button NEXT flag. Does any body can assist how to impelement please. I…. " NEXT FLAG QUESTION" CODE Populate first flag If not Populate next flag Do while ++ Click next flag Check previous flag answer (same as… Re: Flag question in quiz Programming Software Development by JOSheaIV …and create new event handler for button Instructions.Text = "Flag"; Instructions.Click -= this.Instructions_Click; Instructions.Click += this.… Flag_Click(Object sender, EventArgs e)// Event handler for flag button { //flag instructions to go here } private void Line1_Click(object … Re: Flag question in quiz Programming Software Development by mcoliver88 … new event handler for button Instructions.Text = "Flag"; Instructions.Click -= this.Instructions_Click; Instructions.Click … sender, EventArgs e)// Event handler for flag button { //flag instructions to go here } private void … FLAG and InputBox Programming Software Development by TommyTran … word, there will be no more inputBox. How can we FLAG (stop) the inputBox, or let the inputBox know when to… "Flag" a post for future review Community Center Meta DaniWeb by daviddoria I saw a post today that I said "hm I'd like to have a closer look at that tonight". Is there anyway to "mark" or "flag" a thread to put it in your "favorites" or something like that? Dave Flag bad post 1 why? Community Center Meta DaniWeb by layman114 why my post has a flag bad post as 1? is it because i wrote 'Silly'? Re: Flag bad post 1 why? Community Center Meta DaniWeb by pritaeas You don't have any downvotes. You got an **upvote** from me because you shared what solved your issue and marked the thread as solved. The "Flag Bad Post" link next to it is to notify moderators, and is not related to that number. Flag question in quiz Programming Software Development by mcoliver88 Hi I am creating a quiz in C# and i want to know how to flag a question that the user is unsure about. At the end of the quiz i would like them to review flagged questions. How can i do this? So far i have created the array of questions and answers. Thanks for any help Re: Flag question in quiz Programming Software Development by mcoliver88 … and answer them, When the question is answered then the flag is removed. Another thing probally sound really stupid but when… Re: Flag question in quiz Programming Software Development by JOSheaIV … value of their new answer, and then simply change the flag to false (however the way this loop works, it wouldn… Re: Flag question in quiz Programming Software Development by JOSheaIV … putting it in that if statement, if they don't flag it, then you won't increment). Also make sure you… Re: Flag question in quiz Programming Software Development by bertha This is what I have done on Next Flag question,but it seems not working. a Re: wat is flag??pls...can someone explain it to me!! Programming Software Development by b2daj flag is a preordered keyword that isnt avaible to be used as a variable or a function name or a structure name blah blah.... simply change the keyword and it'll work Re: Flag Programming Software Development by stultuske bit little information to go on. can you put it in a context? Re: Flag Programming Software Development by JamesCherrill It's rubbish coding by someone who hasn't heard of boolean variables. Replace it by a boolean called numberHasADivisor, initially false, set true on line 9, and all should become obvious. Re: Flag Programming Software Development by engrjawad James .. can u type the complete code for me bro? Re: Flag Programming Software Development by JamesCherrill Just this one time... I just replaced the stupid int with a boolean, and gave it a meaningful name. If this code still isn't clear then add some print statements to show how the values of the main variables change, and execute it yourself. class PrimeNo{ public static void main(String args[]){ int num = Integer.parseInt(… Re: Flag Programming Software Development by engrjawad i m having an exception of "arrayoutofbounds" ? now what ?? Re: Flag Programming Software Development by JamesCherrill int num = Integer.parseInt(args[0]); ... is the only array referred to, so there's the problem (the exception message will have told you that line number). It's trying to access the first element of the array of args, and that array is empty, so the index is "out of bounds". args is an array containing all the arguments passed to … Re: Flag Programming Software Development by stultuske so ... you don't know how to use booleans, you don't know how to use command line parameters and you don't know what an arrayoutofboundsexception is. don't go reading code, first start reading up on the basic concepts. Re: Flag Programming Software Development by jalpesh_007 for that you have to pass commandline argument(input as a command line argument) when you are executing it like " java filename args[0]" this from command prompt. Re: flag in bubble sort Programming Software Development by vanalex …num) { int i, j, flag = 1; // set flag to 1 to start first pass…;= numLength) && flag; i++) //if flag becomes 0 then sorting stops { flag = 0; for (j=… num[j + 1]; // swap elements flag = 1; // indicates that a swap occurred. } } … Re: Flag Bad Post Community Center Meta DaniWeb by The Dude Hey that wouldnt be too shabby! Have the link change from "Flag bad post" to "Thread reported" and if its found to be OK,the status is changed back to regular and the link will again say "Flag bad post" :) Whadda think of this Dani? Re: Flag Bad Post Community Center Meta DaniWeb by Nick Evan And besides: you can flag a single post instead of a whole thread, so no problem when someone reposts. Re: Flag Bad Post Community Center Meta DaniWeb by jbennet Also, if you did my suggestion, with a trigger so edits reset the "already flagged" property, then there would be no issue. Would also need to give the mod team an ability to set/usnet this property on the fly (in case they decided to ignire the flag, for example), and some way of logging everything. use of flag in c Programming Software Development by akulkarni … it within a loop (for) using flag. can u please tell me how to use flag in c . my code is as…; void main() { int i,j; int d; int d1;int flag=0; char str[10]; char str2[10]; char str3[10…<=d-1;i++) { if(str2[i]==str[i]) flag=1; } if(flag==1) printf("palindrome"); else printf("not…