Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
63% Quality Score
Upvotes Received
5
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
4
Posts with Downvotes
1
Downvoting Members
4
4 Commented Posts
~20.6K People Reached
Favorite Tags

42 Posted Topics

Member Avatar for rajesh1158

I have a search in my drupal website which searches for users registered in my website (finder module). Upon clicking any user from the user search result, it takes to that user's profile page. At the top of that page, a text 'Relationship' is displayed. Under it, a link saying …

Member Avatar for LastMitch
0
284
Member Avatar for rajesh1158

We are planning to develop a small embedded product, which will be touch-screen and loaded with few applications which we will develop. Those applications will be contacting a database through wi-fi, and displaying data, and also update the database sometimes. The available flash or ROM memory will be limited, around …

Member Avatar for DoRight
0
255
Member Avatar for rajesh1158

I have a html with a checkbox and 3 radio buttons. I want to disable and deselect all radio buttons when the checkbox is unchecked, and select the first radio button when checkbox is checked. I have the below code but it does not seem to be working. //html <input …

Member Avatar for LastMitch
0
203
Member Avatar for prashant1111

Any changes to the UI during run time must always be made inside a Thread. Example, inside ActionListener, if you want to update UI like adding label or disable button, it must be done inside a thread. Example: Thread r = new Thread(new Runnable() { public void run() { button1.setEnabled(false); …

Member Avatar for JamesCherrill
0
317
Member Avatar for rajesh1158

I found a C# script to copy any irregular portion from an image (using free hand drawing) and put it on another image. I have never worked with C#. All I want is to copy the irregular part and save it as a new image with transparent background (png format) …

Member Avatar for tinstaafl
0
231
Member Avatar for rajesh1158

I am trying to connect mysql from within PHP function. The credentials are stored in a separate PHP file, which I am including it inside the function. But when I run the script, I am getting following error: Warning: mysql_query(): A link to the server could not be established in …

Member Avatar for rajesh1158
0
353
Member Avatar for rajesh1158

I wanted to vertically align a div inside another div. For this I was using line-height (= height of the div) and vertical-align: middle. But if I specify the line-height value in % instead of px, it doesn't work. I tried googling it but could not find. What can be …

Member Avatar for JorgeM
0
207
Member Avatar for rajesh1158

I have a class which extends JFrame and this class is made singleton (private constructor, public static method to create instance if null). But still I get one more frame when already one is open. Can someone help?

Member Avatar for bibiki
0
682
Member Avatar for liezlardo

In line 10 above, change as below: echo "if (strlen($cellno == 11) && preg_match(\"[0-9]\", $cellno)"; What you typed above is not correct...double quote within another double quote can be written as \" (escape sequence)

Member Avatar for liezlardo
0
183
Member Avatar for Andyjava

For this, you have to use Servlets or Struts or Spring (to write controllers) because you have to retrieve the value(column name input by user) from the text box and inside the controller you have to write JDBC code to create table using the retrieved values.

Member Avatar for Andyjava
0
753
Member Avatar for rajesh1158

Need an Hello world example of how to add an item in the context/pop-up menu in eclipse plugin development. (menu should pop-up when we right-click anywhere in the workspace).

Member Avatar for JamesCherrill
0
307
Member Avatar for jjjmikalord

Create an array of Integers instead of an array of ints. Java 1.5+ supports autoboxing and unboxing so an array of Integer will accept int values.

Member Avatar for stultuske
0
731
Member Avatar for 47pirates

Try the following code: import java.util.*; import java.io.*; public class BackUpSql { public static void main(String[] args) { try { Runtime rt = Runtime.getRuntime(); rt.exec("cmd.exe /c start C:\\ab.bat"); System.exit(0); } catch(Exception ex) { ex.printStackTrace(); } } } Here is the ab.bat: set path=%path%;C:\Program files\MySQL\MySQL Server 5.0\bin; mysqldump -uroot -proot register …

Member Avatar for rajesh1158
0
3K
Member Avatar for 47pirates

Try the following code: import java.util.*; import java.io.*; public class BackUpSql { public static void main(String[] args) { try { Runtime rt = Runtime.getRuntime(); rt.exec("cmd.exe /c start C:\\ab.bat"); System.exit(0); } catch(Exception ex) { ex.printStackTrace(); } } } Here is the ab.bat: set path=%path%;C:\Program files\MySQL\MySQL Server 5.0\bin; mysqldump -uroot -proot register …

Member Avatar for rajesh1158
0
170
Member Avatar for daravindm

Upon submit, call a javascript function where you set a jsp session variable as 1. In the body of the jsp, check the session variable. if it is 1, proceed with displaying the form.

Member Avatar for rajesh1158
0
76
Member Avatar for anand01

use JSTL taglib tags...example below: <c:foreach var="a" list="studentList"> ID: ${a.id} - NAME: ${a.name} </c:foreach> id and name are fields in the student object. Dont forget to import JSTL taglib at top of page.

Member Avatar for rajesh1158
0
1K
Member Avatar for rajesh1158

In the below code, I want to know the significance of 10 while creating a PrioriyQueue. I know its the initial capacity but what does it mean?? I replace 10 with any positive number and the output remains same. import java.util.*; class Test { static class PQsort implements Comparator<Integer> { …

Member Avatar for JamesCherrill
0
201
Member Avatar for rajesh1158

public class Twisty { { index = 1; } //need clarification here int index; public static void main(String[] args) { new Twisty().go(); } void go() { int [][] dd = {{9,8,7}, {6,5,4}, {3,2,1,0}}; System.out.println(dd[index++][index++]); } } In the above code, inside the instance initialization code, index is used. But it …

Member Avatar for JamesCherrill
0
148
Member Avatar for nchy13

after logging in, store the user id in session ($_SESSION['userid'] = "nchy13"). Access the session variable from any other page as long as the user is online.

Member Avatar for urtrivedi
0
343
Member Avatar for rotten69

Hi rotten69. You are getting this issue because of resolution problems in different screens. I suggest you use percentage (%) instead of pixels (px) in your css styles. This will almost solve your problem. :) happy coding.

Member Avatar for ctaylo21
0
105
Member Avatar for sowh4t

First, your form wont submit. You should use <input type="submit"> instead of type="button". Now to accomplish what you want, we can do in 2 ways. 1) Upon selecting a value, print the result <html> <head> <script type="text/javascript"> function printResult() { var selectedVal = document.forms[0].list.options[document.forms[0].list.selectedIndex].value; document.getElementById("showResult").innerText = "Your number is: " …

Member Avatar for rajesh1158
0
2K
Member Avatar for rajesh1158

I'm getting user's profile picture along with their name from database and populating them in a div inside an anchor tag. The <a> tag is used so that we can click on any result and it takes to that user's profile page. I tried many codes to traverse the search …

Member Avatar for rajesh1158
0
124
Member Avatar for epson121

If you are getting undefined index error, it means the $_COOKIE array does not contain the 'user' index, which in turn means that $_POST['remember'] is not set. Can you provide the html part of the code? Just want to check if you have used form method="post" or "get"...If it is …

Member Avatar for epson121
0
5K
Member Avatar for adolf23

The following can be used. I saw this in one of the websites of Stack Exchange. The server sends a random salt string in the login page which gets appended to the password in javascript in the browser and the SHA1 hash of the result then gets submitted back to …

Member Avatar for rajesh1158
0
97
Member Avatar for nchy13

you can use php header as below, header("location: http://localhost/fi.php");

Member Avatar for rajesh1158
0
135
Member Avatar for eltonpiko

Use a form textfield. On click, display jQuery date picker. Select the date and it auto updates in the textfield. Then upon submit, the date will be stored in MySQL.

Member Avatar for eltonpiko
0
144
Member Avatar for ashiiiish

$_POST should be used to retrieve data only when data is submitted through forms. Since you are using a link, data is passed in the URL. so you have to use $_GET to retrieve 'nid'.

Member Avatar for rajesh1158
0
124
Member Avatar for adityamadhira

In the logout script, use unset(name_of_session_variable) to invalidate session. Plus, in all pages, before displaying the output, use an if condition and check if the session variable exists. Example: in logout script, unset ( $_SESSION ['name'] ); In all other pages, if(isset($_SESSION['name'])) { //display data echo "success"; } else { …

Member Avatar for rajesh1158
0
112
Member Avatar for rajesh1158

Hi..Earlier i was using Windows XP and used to access my company mails through MS Outlook. Now i'm using Ubuntu 11.10 and want to access my company mails. I thought of using Mozilla Thunderbird. During creating a mail account in Thunderbird, it is asking for various details like incoming server(IMAP …

Member Avatar for rajesh1158
0
228
Member Avatar for rajesh1158

I'm very much depressed with the following code. As for me, everything is correct. But the Goddamn code doesn't work. I've a html form with radio buttons and a hidden field. On clicking Submit, the form does not submit. Trying print_r($_POST) on the submitted radio button variable, it returns an …

Member Avatar for Zahinize
0
1K
Member Avatar for rajesh1158

I have to design a database where one requirement says "For each project, for each user, for each skill, store the marks gained". Initially, i had a table where each skill was a column(proj_id, user_id, skill1, skill2, ......., skill_N) I felt this was a bad design because the number of …

Member Avatar for rch1231
0
187
Member Avatar for rajesh1158

I have to design a database where one requirement says "For each project, for each user, for each skill, store the marks gained". Initially, i had a table where each skill was a column(proj_id, user_id, skill1, skill2, ......., skill_N) I felt this was a bad design because the number of …

Member Avatar for hfx642
0
196
Member Avatar for dantadin

Use the below code for all your <li> <li><a href="http://www.hackstavastergard.com/gasthem.html"><img class="imgstyle" src="source of the image you want"></a></li> replace "source of the image you want" with the actual image url (example: [url]http://www.mycircle.freevar.com/image4.jpg[/url]) then, remove css code for li and add for imgstyle as below img.imgstyle{ width:40; height:40; border:none; }

Member Avatar for drjohn
0
150
Member Avatar for rajesh1158

I have installed ajaxim chat SNIP in my website at SNIP I downloaded the minified version(size: 78K) The chat at bottom right corner always shows "You are currently not connected" (when mouse is moved over it). My database settings are all correct but still i'm getting this message. Also the …

0
71
Member Avatar for rajesh1158

Here is my problem. I have a site into which users can login. It has a logout button to let the user log out. My problem is when they close the browser without logging out, how can I close the logged in entry in the database?? I need a way …

Member Avatar for diafol
1
1K
Member Avatar for javanew

have a html form for users to enter the answer: form method=post action=abc.php input type="text" name="answer" input type="submit" value="submit" /form Then, use php to obtain the value entered in field: $value=$_POST['answer']; if($value!=2){ echo "sorry!! Answer wrong!!"; }

Member Avatar for diafol
0
103
Member Avatar for mapee

Try this.....i use this in my website. Note: $_SESSION['userid'] must be set already. <?php session_start(); $user=$_SESSION['userid']; $imgname=$_POST['imagename']; function findexts1 ($filename) { $filename = strtolower($filename) ; $exts1 = split("[/\\.]", $filename) ; $n = count($exts1)-1; $exts1 = $exts1[$n]; return $exts1; } $ext1 = findexts1 ($_FILES['userfile']['name']) ; $imagename = md5(rand() * time()); $ran …

Member Avatar for mapee
0
379
Member Avatar for rajesh1158

I have a php file, for example abc.php file whose output will be an image(profile pic) and below it a set of links(navigation links). When i click any of those links, it displays the output of destination file(output of file mentioned in "href" attribute of anchor tag). But i want …

Member Avatar for rajesh1158
0
131
Member Avatar for rajesh1158

echo '<a href="javascript:void(0)" onClick="javascript:chatWith('.$result[3].')">'.$result[3].'</a>'; only the $result[3] between the <a> and </a> gets displayed....i want to display also the $result[3] within the javascript function call....is thr any error in it??

Member Avatar for dcdruck
0
61
Member Avatar for rajesh1158

[url]http://www.mycircle.freevar.com[/url] This is my website. Whenever a user logs in using correct username and password, a field(flag=1) in the database is updated to show that the user is online(for chat). When user logs out, it is set to flag=0 to indicate offline. This works properly. Consider the situation. The user …

Member Avatar for nonshatter
0
117
Member Avatar for lDeadeyesl

Use the following in all pages..... 1. session_start() in the first line after <?php 1. check if session exists using if condition as below: if(isset($_SESSION["your_session_variable"])) { do all coding within this block; } else { display login page; } The login page can be displayed as below: header("Location:your_loginpage_address");

Member Avatar for rajesh1158
0
131
Member Avatar for rajesh1158

I have a website whose homepage has 4 frames. 1 at top(horizontal) and 3 vertical below it. The middle vertical frame displays all the contents of pages when links in other frames are clicked. I have a link in top frame to logout the user when clicked. In this link's …

Member Avatar for rajesh1158
0
206

The End.