50 Topics

Member Avatar for
Member Avatar for borobhaisab

Hi, I got this long version code: ```` if(ISSET($_GET['limit'])) { $limit = intval($_GET['limit']); } else { $limit = intval(1); } ```` I can shorten it, like this and it works: ```` $limit = ISSET($_GET['limit'])?intval($_GET['limit']):1; ```` Now add an echo and try shortening it. And I get error. I got this …

Member Avatar for Dani
0
30
Member Avatar for Siberian

Can a else if, or else statment contain a condition ? If the condition is not meet then, nothing happens other wise one of the else if or if statements is read ?

Member Avatar for Siberian
0
522
Member Avatar for Lethugs

Hi, Im trying to extract data from sql server where conditions are multiple and variying I have a datagridview with 2 columns ID and Name I need to create Select Query to extract data where condition is 'ID should be equal to the value or values in Datagridview ID Column. …

Member Avatar for Lethugs
0
265
Member Avatar for moaz.amin.37

i write a code of multithreading in which arise an race condition code is below class Race1{ public void show(String s){ try{ System.out.print("["+s); Thread.sleep(1000); }catch(InterruptedException e){ e.printStackTrace(); } System.out.println("]"); } } class Checking implements Runnable{ Race1 ob=new Race1(); String s; public Checking(String s){ this.s=s; } public void run(){ synchronized(ob){ ob.show(s); …

Member Avatar for vantrendin
0
241
Member Avatar for leadcrumb

Wordpress - I want to use a title condition for displaying info on a page, from a MySQL table "country". The condition must compare the title with the names in the column "name" and when it match a value than display on the page the text from column "description" from …

Member Avatar for nauticalmac
0
480
Member Avatar for leadcrumb

I made a new MySQL table in Phpmyadmin in Wordpress in the same database from Wordpress but a new table. I want to make a new page and add a script in the body that allows: 1. when i insert the page title to the new page, the script should …

Member Avatar for leadcrumb
0
384
Member Avatar for Lethugs

Hi Just asking for a better solution for my approach in getting sql result with different multiple conditions based on comboboxes. I have a 4 comboboxes, for Branch, Type, Status and other info. User can select conditions from this comboboxes. The default value is "All", meaning no specific condition at …

Member Avatar for Lethugs
0
255
Member Avatar for Ng

How To Determine The Best Score? I am doing a lab regarding 'guess number game' Actually,the answer should be the random number,but I set the exact number to 88,because it is easy for me to test other requirement. I need to printf("Best Score so far [X]") How to make comparison …

Member Avatar for Jamblaster
0
225
Member Avatar for rudasi

I have 2 processes (producer and consumer) sharing an int deque in shared memory, I have the producer process put 2 numbers in the deque and then it gets in a wait state losing its mutex lock. I then have the consumer process removing the numbers and printing them. It …

Member Avatar for rudasi
0
513
Member Avatar for Pobunjenik

Hi everyone! So, I hereby hope to show that I've made progress in coding java (largely due to the help of this great community). I want to thank everyone for dealing with me (especially James). :) The goal: The code below is supposed to seed a layout of boats into …

Member Avatar for JamesCherrill
0
2K
Member Avatar for CoilFyzx

Hello Good day. Here is the problem I am trying to solve. I have a table as seen below. ![232465554203149acd8363d3a4a127ae](/attachments/large/3/232465554203149acd8363d3a4a127ae.jpg "232465554203149acd8363d3a4a127ae") My GOAL: Columns A through G are going to be filled with integers. (I have already created an integer model so that these cells only take integers). As the …

Member Avatar for CoilFyzx
0
445
Member Avatar for mbarandao

Hello! I was wondering if someone can take a look at the following if and else statement and point out what I have written incorrectly. In its current form, I cannot get it to work. So, essentially, I'm trying to construct an if conditional statement within another if statement. $var_test …

Member Avatar for mbarandao
0
177
Member Avatar for Vijaysurya

hai everybody, i need help in multiple true if condition IF (condition 1 is true) { $('.cCal').css('border-color','red'); return false; } and (condition 2 is true) { $('.cCal2').css('border-color','red'); return false; } (condition 3 is true) { $('.cCal3').css('border-color','red'); return false; } this syntax working only one condition is true. more than one …

Member Avatar for Troy III
-1
150
Member Avatar for l.worboyz

I am making an ABACUS MODEL program which adds counters to pegs. The program compiles fine but when i use the test that was issued to me (as pictured) it appears as though my program does not work as intended. I don't know if anyone will be able to help …

Member Avatar for bguild
0
216
Member Avatar for GeneClaude

In this code, I need to put a limitation in every part where the user is asked to input data. The user will be asked to input a grade ranging from 50-100, and if his input is not in the range, the program will display a warning, and if the …

Member Avatar for CGSMCMLXXV
0
238
Member Avatar for Lavanya1312

Hi, I'm new to junit. I want to create test cases for if condition,loops. do we have any guidelines to write test cases for if conditions.Can any1 explain with an example. Thanks in advance. Lavanya

Member Avatar for JamesCherrill
0
328
Member Avatar for duneflyingyfz_1

Hi all, ive got a big question about conducting mysql_queries.. i have a schedule program that needs to sort through and pick the records that apply.. the date will change, and used a php date() formatted to mysql date and pick out the ones records that are active vers inactive. …

Member Avatar for duneflyingyfz_1
0
2K
Member Avatar for glao

I am trying to implement periodic boundary conditions for 2d lattice. I did: int boundary2d(int xpos,int ypos,int stepx,int stepy){ int x=4,y=4; //grid size int **matrix; //the grid matrix int i=stepx+xpos; int j=stepy+ypos; if (i<0) { do { i+=Nx; }while (i>Nx-1); } if (i>Nx-1) { do{ i-=Nx; }while(i>Nx-1); } if (j<0) …

Member Avatar for glao
0
1K
Member Avatar for sphe_g

Hi Everyone, I'm doing my third year in Information Technology. As part of our syllabus, we need to go out into the "real world" and find an information systems problem, which we then solve using the skills we've learnt over the years, as well as any new skills we learn …

Member Avatar for phoenix_2000
0
214
Member Avatar for rugged1529

I'm trying to seem if(t3.alive) is not ever entered. It successfully goes through t1 and t2 if statment but skips over three. I've tried the do while, while (like seen). I would think if t3 is still alive the loop would still go then once it's not, its out but …

Member Avatar for skatamatic
0
3K
Member Avatar for chirag_mittal

Hello, I was given a question a few few days back to write a program that lets a user enter a value for an angle and quadrant in which the angle lies is printed using switch statement. I was able to make this program using if-else very easily but making …

Member Avatar for chirag_mittal
0
464
Member Avatar for yeeitsneo

hi. uhm. im having a problem with coding such conditional statement that would check if a certain input contains a certain subs tring. for example. i have a text box that is used for the user to input a string. (0,1) then i have a command button to determine if …

Member Avatar for Sam367
0
309
Member Avatar for DezineGenerator

Here is code which i am using Please check it first [CODE] for(x=0; x<=y; x++){ if(a=x||b=x||c=x){ printf("Value =%d",x); } } [/CODE] In this code x is a base for the loop i want loop till y (variable). Now inside the loop i want to check a condition if x (variable) …

Member Avatar for DezineGenerator
0
426
Member Avatar for anubhavk

I am working on improving the visual appeal of table rows. The data in table rows is generated dynamically and has lots of information. There is a column in that table which gives the time when that particular information row was issued. On the basis of the days/months etc before …

Member Avatar for Airshow
0
273
Member Avatar for pwolf

the scenario is a fitness test and the challenge was to return a string saying either Gold, Silver, Pass or Fail, depending on certain conditions, they were as follows; gold - the candidate scored 4 or more at each station , and had a total of 13 or more points …

Member Avatar for woooee
0
236
Member Avatar for suhaildawood

I am having some trouble with this code. I want have an onclick function on a div and I want to call this function. Only the 'if' section of the code works. If the #about opacity is anything other than 0.47, it still executes the 'if' code, but not the …

Member Avatar for suhaildawood
0
1K
Member Avatar for pavankumarr

Hi Everyone, I want to write a condition for Datetime to show gridview. The condition is that the gridview has to show data for updating datas in DB only from [B]Friday 5:00pm to Saturday 4:00PM[/B] How can I give this condition.I had tried various datetime methods but i cant figure …

Member Avatar for catherine sea
0
110
Member Avatar for jeraldmuthu

Hi i'm new to xslt the below code for getting chart in pdf after clicking the chart checkbox [CODE] <xsl:if test="$chartimage"> <fo:block text-align="center" space-after="8em"> <fo:external-graphic xmlns:fo="http://www.w3.org/1999/XSL/Format" scaling="uniform"> [B]<xsl:attribute name="src">[/B] <xsl:value-of select="concat(concat('url(',$chartimage),')')" /> </xsl:attribute> </fo:external-graphic> </fo:block> <xsl:if test="$chartPageBreak='true'"> <fo:block break-after="page" /> </xsl:if></xsl:if> [/CODE] bold coded setted attribute name through that they …

0
142
Member Avatar for JoshuaBurleson

if I wanted to remove all of the strings within a given list that met a certain criteria, such as having the str'a' in them, how would I go about doing that? the only way that's intuitive to me a for/in loop, but that can't be done. any ideas? Using …

Member Avatar for Enalicho
0
237
Member Avatar for niggz

Hi masters! I have a problem with my while loop. I realised that my code does not work the way I want. It has to check if sum of def, mid and att variables is different from 10 or if style variable is different from multiple strings. So if any …

Member Avatar for niggz
0
159

The End.