103 Posted Topics
Re: Hey, I am no expert in regexp but quite recently I had the same problem with escaping a $ sign. Just like you I used a single backslash to escape it and when it did not work I experimented with double backslashes and it did work then. I do not … | |
Re: it COULD be tht there is not a value stored in $_SESSION['id'] echo it out and check if it has a value. | |
Re: $_SESSION is a super-global variable you could use to store temporary data. It is an associative array and 'views' indeed could be said as an index. Instead of having numeric values as indexes as in normal arrays, in associative arrays you could have words as indexes. So in this case, … | |
Re: In your php code, the if block that echos the numbers is inside the second for-loop while it needs to be outside. | |
Re: One easy way to do this is as below. [CODE] int[][] Board = new int[15][15]; for (int j = 0; j < Board.length; j++) { System.out.print((j < 10) ? " " + j + "\t" : j + "\t");} //use tab (\t) to introduce space with constant width. for (int … | |
Re: Change type of variables between line 44 and 50 from int to float. If you want to cast from float to int then you should do like this [CODE] int numTens = 0; .. numTens = (int) change / 1000; //since change is float cast needed. [/CODE] hope this is … | |
Re: I don't think if its possible to generate popups with only PHP. You can use Javascript to achieve this. | |
Re: Did you set your JFrame2's visibility to true? | |
Re: You could manipulate string to see if it contains letter 'V' at 10th position (9th if you consider that the string starts with index 0, 1... and so on). One way to achieve your goal is, [CODE] $num = "123456789V"; if(strlen($num) == 10){ echo "OK. length is OK."; //assuming that … | |
Re: It seems that the error lies in your database.php file. So, perhaps you could include the source of that file. ![]() | |
Re: One way to do it is to have a main container. This could be a div or a table. Then set the border using css. Eg: [CODE] <div id="main" style="border: 1px solid #333333"> <!-- inline styling. you could also do this in a separate css file. --> .... </div> [/CODE] … | |
Re: Knowing about JMenus might help you. Here is Sun's/Oracle's tutorial on how to use menus. [URL="http://download.oracle.com/javase/tutorial/uiswing/components/menu.html"]http://download.oracle.com/javase/tutorial/uiswing/components/menu.html[/URL] Hope this helps. | |
Re: line 11, closing bracket is missing. [CODE] //mysqli_select_db($this->link, $this->db_database mysqli_select_db($this->link, $this->db_database); [/CODE] line 19: try changing it from [CODE] //$sql = "select * from '$table'"; //TO $sql = "select * from $table"; //without single quotes. table name do not need to be enclosed with single quotes. //OR $sql = "select … | |
Re: try changing line 15 to thia [CODE] <!--<img border="0" src="/images/2173453.jpg" alt="koria girl" width="304" height="228" />--> <img border="0" src="images/2173453.jpg" alt="koria girl" width="304" height="228" /> [/CODE] | |
Re: ur convertIntegerToWords(int number) function should return numWordString. (if number is 1 nuwWordString would be one. also for each of the case add break so that it would break as soon as numWordString as a value eg: [CODE] case 1: numWordString = "one; break; case 2: numWordString = "two"; break; //ans … | |
Re: cant u just use the default date class? or Calendar class? (or both together?) | |
Re: if i may add in, a couple of points. (refering to ur original code) 1- [CODE] $con = new mysqli("internal-db.s110820.gridserver.com","db110820","Solved!2$$"); //is only the connetion. the database needs to be selected $con->select_db("dbname"); [/CODE] 2- the way u've coded mysqli_stmt::num_rows wont work i think. u first need to store the result if … | |
Re: if u want to count the number of rows a mysql result set carries, you could use mysql_num_rows function. [CODE] $sql = "SELECT * FROM table WHERE id={$id}"; $number_of_rows = mysql_num_rows($sql); [/CODE] | |
Re: encrypt the password received from input before comparing. that is for eg: [CODE] $pass = $_POST['pass']; //assumed u r using post $pass = encrypFunction($pass); //assumed that u r using a function to encrypt the password and that the function is, say, encrypFunction($s); //$pass is now encrypted so now ud be … | |
Re: echo the actvtn code within the block to check.. u know just in case. [CODE] //THIS SEEMS TO BE WHERE THE ERROR IS $get_user_data = mysql_fetch_array($check_id); echo $get_user_data['activationcode']; echo $activationcode; if($get_user_data['activationcode'] != $activationcode){ $final_report.="Sorry that activation code seems to be invaid."; }else{ //THIS SEEMS TO BE WHERE THE ERROR IS^ … | |
Re: i wish to help u with this but im having a bit of difficulty understanding ur problem. [QUOTE]i've been doing while loops for this problem [/QUOTE] what exactly is '[I]this problem[/I]'? are u trying to retrieve a set of '[I]boxes[/I]' from a mysql database and arrange them in order? ![]() | |
Re: [CODE] System.out.print(a[i][j] + ' '); [/CODE] change to [CODE] System.out.print(a[i][j] + " "); [/CODE] and see. | |
Re: Top coder [[URL="http://www.topcoder.com/tc"]here[/URL] Uva Online Judge [problem archive [URL="http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8"]here[/URL] there are many such. | |
Re: u needa return the sorted array from the rotateRight function [CODE] public static int[] rotateRight(int[] array){ [/CODE] and at the end of the function [CODE] return array; [/CODE] and in the main [CODE] list = rotateRight(list); [/CODE] hope this helps ![]() | |
Re: try this [CODE] //if('$choicetext'!="" && '$verb'=="other"){ if($choicetext !="" && $verb=="other"){ //see the difference? variables are without the single quote [/CODE] | |
Re: referin to ur sample tree the following would work i suppose. [CODE] int height = 9; int currentRow = 1; //current row count for iterating int stCount = 1; //star count for each row while(currentRow <= height){ int checker = 1; //to keep check of already printed star if(currentRow == … ![]() | |
Re: if i may add in, can't u just do this? [CODE] public static void main(String[] args){ int sum=0; for(String s: args){ sum += Integer.parseInt(s); } System.out.println("Sum: "+sum); } [/CODE] | |
Re: if u want to convert string to int [CODE] String s = "2"; int x = Integer.parseInt(s); [/CODE] but u could directly get the int value using nextInt [CODE] Scanner sc = new Scanner(System.in); int x = sc.nextInt(); //edited to assign sc.nextInt() to int x [/CODE] hope this helps. | |
hi, i'm trying to manipulate dynamic textboxes using jquery such that when the value of the textbox_1 is, say, 'abcd' a new text box textbox_2 would be introduced and when the value of textbox_2 is again 'abcd' a third one is introduced and so on. ive managed to do this … | |
Re: maybe this could help. (ive assumed a sample scenario) [CODE] public class Orange { private String name; public void setName(String name){ this.name = name; } public String getName(){ return this.name; } public void remove(Orange o[], Orange o1){ for(int i=0; i<o.length; i++){ if(o[i].getName().equals(o1.getName())){ o[i] = new Orange(); } } } } … | |
Re: have u tried after uncommenting ur constructors? | |
Re: may be use explode() to get the individual phrases in the search string and then re-build the query string for each of the phrases... | |
Re: select id from your table, order by id in descending order and give it a limit of 1. | |
Re: u could use strrpos function to identify the positions of the dots. but, i dont think a file would have two extensions. extension is the one that comes after the last dot no matter how many dots a file name has. if you already do not know about it, you … | |
hi, i've been trying, without success, to maintain the style of the text in a jTextPane when it is copied into the clipboard. what I want is to copy the text in a jTextPane with styles (eg: bold, italic) and to be able to paste it into MS WORD with … | |
Re: you gotta try yourself first. hint: you could use Euclid's gcd algorithm.... it goes like this, gcd(a,b) = gcd(b, a%b) | |
Re: you could may be do this [CODE]//do //{ System.out.print("Please enter your guess(1-1000): "); n = in.next(); if(isIntNumber(n)) num = Integer.parseInt(n); else num = 0; //} //while(!isIntNumber(n)); while(num != target) { if(num <1 || num >1000) System.out.println("Stupidity"); else if(num >0 && num <1000 && num > target){ System.out.println("Too high"); numberOfGuesses++; } … | |
Re: [QUOTE=J.M;1026513]Hi There, I have had a look on the internet but not really been able to find the correct thing i'm looking for very easily, or at least not very well/easily explained. I am trying to create a Search Form for my website which has 2 fields. 1) A Postcode … | |
Re: [QUOTE=cane23;1148182]i have a multiple select drop down menu where i select some courses however my problem is that i was to store the selected courses in an array for further use. i have tried creating an array but is is coming up empty. Can someone help me out here here … | |
Re: [QUOTE=CFROG;1031315]Does anyone know of a php based forum that is easily customizable to work with an existing user base so that members don't have to register or sign in a second time when they access the forum? I heard that this is possible with phpbb3 but I haven't seen anything … | |
Re: [QUOTE=Folaju;1031532]I have tested the query in phpmyadmin and it pulls back the expected results. so it not working in the code is beyond me[/QUOTE] If the connection is OK then try this. u said its workin on the test server, so can u recheck the database in ur server and … | |
Re: just thought id also add in a bit. remember that mysql fetch array returns only one row each time the query runs, first run returns first row of the mysql resource, the second run second row and so on and returns a false if there is no more... so the … | |
Re: [QUOTE=jakx12;1025634]Ok so im building a level editor for this game. What the code i cant working does is, when the button is clicked it should get the selected cell from the jtable and set a value for it. However, for some reason I cannont get it working. Here is the … | |
Re: come on man, there's no way someone can go thru all ur codes to understand ur problem. in light of the title, check out these links. [url]http://www.tizag.com/mysqlTutorial/mysqlupdate.php[/url] [url]http://www.tizag.com/mysqlTutorial/mysqldelete.php[/url] OR [url]http://www.w3schools.com/php/php_mysql_update.asp[/url] [url]http://www.w3schools.com/php/php_mysql_delete.asp[/url] OR [url]http://dev.mysql.com/doc/refman/5.0/en/update.html[/url] [url]http://dev.mysql.com/doc/refman/5.0/en/delete.html[/url] good luck. | |
Re: [QUOTE=SKANK!!!!!;1025318]i dont know why but sometimes i use the same exact thing ive used on other pages that it has worked for and it just doesnt work on the new page im working on. i have a table called users. with columns called username password and status why isnt this … | |
Re: [QUOTE=umairraja52;1024844]Can PHP be the alternative for ASP.net, or it is different from other.[/QUOTE] it is different and, using PHP as an alternative for ASP is all up to you. i personally prefer PHP and it's been 6 years since i started using it and loving it ever since. :) | |
Re: [QUOTE=JavaCode;1024756]OK I'm making a script and I get this error and have no clue off have to fix heres the code all help is thanked: [CODE]import java.awt.*; import java.util.*; import java.util.List; import java.util.logging.Level; import javax.accessibility.*; import javax.swing.*; import org.rsbot.bot.Bot; import org.rsbot.script.*; import org.rsbot.script.wrappers.*; import org.rsbot.accessors.*; import org.rsbot.event.listeners.PaintListener; import org.rsbot.event.listeners.ServerMessageListener; import … | |
Re: [QUOTE=Namibnat;1024681]I am busy with a project for fun and I am finding it tricky to set balues for mysql queries. If I do the following: [CODE]function CalcPostByTime(){ include 'DB_connection.php'; $result = mysql_query("SELECT ztime FROM blogpost;");[/CODE] What is the simplest way to set an array, which will be a return value … | |
Re: > Im very new to php, but im trying to create a bit of code that you type in the part number and quantity you want and it returns the part number and the word "limited" if its the same "not enough" if it's less than and "in stock" if … | |
Hi, ive been trying to assign a value to a variable from within the ActionPerformed method, but the value seems to be lost as soon as ActionPerformed method ends. here's the code [CODE] public class Log{ private JTextField user = new JTextField(10); private JPasswordField pass = new JPasswordField(10); private int … |
The End.