Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
80% Quality Score
Upvotes Received
6
Posts with Upvotes
6
Upvoting Members
6
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
2 Commented Posts
~49.1K People Reached
About Me

www.iamhenryli.com

Interests
www.iamhenryli.com
Favorite Tags

182 Posted Topics

Member Avatar for k2k

hi, does anyone know how to insert a background picture to a JPanel? I have googled around, found something seem more difficult than it should be, and a simple one as below but not showing the pic. [code] midBoard = new JPanel(); JLabel pic = new JLabel(new ImageIcon("Sunset.jpg")); //midBoard.setBackground(java.awt.Color.RED); midBoard.add(pic); …

Member Avatar for JamesCherrill
0
14K
Member Avatar for k2k

hi, would anyone please show how i should make my site searchable? by yahoo, google... whatever search engine. is it the meta tag? any quick example please. thanks

Member Avatar for John_66
0
173
Member Avatar for k2k

I have just installed (binary install) php 5.3.6 to my redhat box. However, it is still seeing a 2.x version. Does anyone know how to find out where my 2.x version is and possibly uninstalling it? And how do I make mysql to use my new 5.3.6 version? Thanks. I …

Member Avatar for rakib.sarowar
0
143
Member Avatar for k2k

Today I have finally made up my mind to quit bat scripting and go for powershell... I need to do a quick script bascially trying to looping through a command output.. can anyone shed some light? i tried foreach ($col in 'app-command -argument') { echo $col } well, guess my …

0
174
Member Avatar for k2k

I udnerstand that setting up a public/private key authentication is a way to go when automating scp copy files to target machines. however, I just now just to get a quick a dirty way to copy a number of files to a number of remote machines. My question is how …

0
71
Member Avatar for k2k

haven't been using linux for a while. remember I used to do search and replace all the time with :s/searchString/replaceString/g now I have "pattern not found: " even though pattern I was trying to search/replace was definitly there. any idea? did i forget anything?

Member Avatar for shivemg
0
145
Member Avatar for k2k

I normally mount my windows share as follow: [code]mount -t cifs //192.xxx.x.xx/share -o username="username' password="pass" /mnt/mountPoint [/code] now I am trying to mount my epson scanner which has a SD card that can be shared on the network. I did the same command but it failed to mount. pinging the …

Member Avatar for k2k
0
153
Member Avatar for k2k

I am testing an open source application. When at the setup stage after installing mysql, php all the good stuffs, I have to specify where the mysql server is. Here is the problem, if I put in "localhost" as the mysql is installed on the same box, it would work …

Member Avatar for rubberman
0
117
Member Avatar for k2k

Say like I have hi() everywhere in a shell script and I would like to replace only a hi() to hi(20) right under the line "#modify only the hi() below this line". Is there anyway that I can locate the line "#modify only the hi() below this line" and then …

Member Avatar for anijacity
0
168
Member Avatar for k2k

Im trying to scp including password in one line... seems not working. [code] echo "pass" | scp --stdin source destination [/code] However this does work though [code]echo "newpass" | passwd --stdin user [/code] same concept, diff result. Any suggestion would be great. Thanks

Member Avatar for maninaction
0
545
Member Avatar for k2k

Sometimes it is hard to locate the exact line you want to modify if there are so many lines having the exact same codes/text. example: #this is x a=0 #this is y #this is yy a=0 this is z a=0 My question is, is it possible to find something unique, …

Member Avatar for k2k
0
128
Member Avatar for k2k

this is perfectly fine. It will grep each of the output, if it != "client" or "-----" then it will be written to the text file. for /F "tokens=3" %%a in ('E:\things\bpplclients') do ( if /I not "%%a" == "Client" ( if /I not "%%a" == "--------------" ( echo %%a …

0
94
Member Avatar for k2k

Does anyone know how to use awk to print every 3rd line from the 1st line and including the 1st line? 1st .. 3rd .. .. 3rd .. .. 3rd soemthing like this? the closest I could get was below, but it dosn't go beyond the 3rd line.. any ideas? …

Member Avatar for griswolf
0
78
Member Avatar for k2k

Would anyone please explain a bit about sharing between Unix and Windows? From my understanding, Unix can only see windows's share/print by Samba. However, I was googling around and found many pages talking about mounting Windows CIFS by just using regular "mount" command. Is Samba outdated now? Is it right …

Member Avatar for rubberman
0
152
Member Avatar for k2k

i am trying to export display to my xp box from redhat.. problematic again. These are what I already have done: on redhat: #export $DISPLAY=:0.0 #export $DISPLAY=XXX.XXX.XX.XX ## my xp box ip #echo $DISPLAY #XXX.XXX.XX.XX #xhost + xhost: unable to open display "xxx.xxx.xx.xx" on xp: installed xming x11 server and …

Member Avatar for shibblez
0
122
Member Avatar for k2k

I am trying to know my own server name and domain name. I use windows xp, I try to install freeBSD 7.0 to one of my laptop. I need the network info.... Can anyone please tell me how I can check what my server name and domain name? I know …

Member Avatar for meharazeem
0
270
Member Avatar for k2k

I have a bat script that if i run it on cmd it is working fine. However, if I right click and run as admin it broke. Has anyone seen this behavior?

Member Avatar for k2k
0
198
Member Avatar for k2k

hi, basically i have this function. [code] function showDetail(checkBoxShipmentId) { xmlhttp = GetXmlHttpObject(); // this calls function below if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="detailBackend.php"; url=url+"?shipmentid="+checkBoxShipmentId; //?shipmentid = value of the checkbox, which is the shipmentid url=url+"&ran="+Math.random(); if(xmlhttp.readyState ==4) { xmlhttp.onreadystatechange= displayDetail; xmlhttp.open("GET",url,true); …

Member Avatar for Airshow
0
637
Member Avatar for bolalampu

1. open up the case and take out the hd, plug it in "internally" see if it works 2. if it works go buy yourself a new external case and put the working hd in it (that means your case/cable was the problem) 3. if the hd is damaged... i …

Member Avatar for firelfiex
0
226
Member Avatar for k2k

sounds it should be simple but I wasn't able to google this out. basically i want to do something like [code] variable = `data` //from unix but I now need it for windows bat script [/code] [code] //windows set today = "date /t" //output is what i need, but wrong …

0
59
Member Avatar for k2k

set v1=%e:\file1\file0% set v2=%c:\file1\file0% set v3=%d:\file3\file4% cd %v1% and do something cd %v2% and do something cd %v3% and do something I just want to set a variable = path and cd to it later, since I have multiple pathes, i would like to cd to diff variables instead of …

Member Avatar for k2k
0
172
Member Avatar for k2k

i am trying to do something like [code] set var= ping google.com | find "Received = 4" if [var has something] then echo "ping well" [/code] something like that. in unix i can use the ` ` to execute shell command and set the returned value to the variable... can …

0
67
Member Avatar for k2k

How do i check if i have a 32 or 64 bit processor? Will 64 bit os work with the 32 bit processor? 64 bit os from 32 bit os, is it because processor went from 32 bit to 64 bit ? I know 64 bit is faster and more …

Member Avatar for crunchie
0
1K
Member Avatar for k2k

RedHat5 enterprise when i plugged in an USB thumb drive, redhat automatically mounted to /media i did a "umount /media/driveName" and it went away. i tried to mount it again "mount /dev/sda /mnt/usb" i got """mount: /dev/sda already mounted or /mnt/usb busy"""" i am actually not sure if /dev/sda is …

Member Avatar for 1seo
0
149
Member Avatar for k2k

i am trying to write a bat script to ping a machine if it is up. i am trying to do something like this [code] if "ping xxxMachine | findstr reply" echo "xxxMachine is up" else echo "xxxMachine is down" [/code] the syntax is definitely wrong, does anyone know if …

0
75
Member Avatar for k2k

I am trying to setup a dns server with fedora 11. what I have done: 1. /etc/init.d/named start 2. chkconfig --list named ---> return status ok, both 3 and 5 are on 3. "/etc/resolv.conf" as below // does it look okay? nameserver 192.168.1.1 //my router, nameserver 127.0.0.1 //this machine itself. …

Member Avatar for hyerutko
0
254
Member Avatar for k2k

my login script checks for login name and password in the database, if true then set value for a session variable for example $_SESSION['loginName'] = $login --> this is to identify who got logged in. however, if i have more than one user logged in to the system, then $_SESSION['loginName'] …

Member Avatar for chrishea
0
107
Member Avatar for k2k

I just got a used Cisco 851 router from ebay and ready to play around with it. i connected it to my computer com port and start seeing something from the putty serial connection. i see something like this repeating and repeating.. what does that mean? Translating "stipp2.srv.hcvlny.cv.net"...domain server (255.255.255.255) …

Member Avatar for cguan_77
0
425
Member Avatar for k2k

[code] $sql_table_get=mysql_query("select orderline.quantity, menu.item_name, menu.price from orderline, menu, orders where orderline.item_id = menu.item_id and orders.order_id = orderline.order_id and orders.table_num =table".'"$count"'." // problem line and orders.order_status = 0; "); [/code] tried many combo and couldn't make it work yet. basically i just need to know how to combine a $variable and …

Member Avatar for k2k
0
314
Member Avatar for k2k

[code] <form id="History" method="post" action="./php_lib/getHistoryProcess.php"> <button name="clearTableButton" type="submit" value="table2">Table 2 Orders</button> </form> [/code] the code above will process through the getHistoryProcess.php and return the result in the same page (the white blank page). I would really like the result pop up like ***** href=" " target="blank" style***** in other words, …

Member Avatar for k2k
0
126
Member Avatar for k2k

Trying to use ajax to sync up with the database but never really got it to work unless i refresh the page. [code] <!-- the html page --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="js/generalFunctions.js"></script> <script src="php_lib/getOrder.php"></script> </head> <body> <script type="text/javascript"> // a function in the "js/generalFunctions.js", the ajax function, see …

0
65
Member Avatar for k2k

trying to call an external ajax function to exec the php script to update a table. it is somehow not working.. it is my first time programming in ajax, please point it out if there is anything obviously wrong. thanks. [code] <html> <head> <script>myAjaxFunctions.js</script> </head> <body> <button type="button" onclick="clearT1();">Clear TableOne</button> …

Member Avatar for Graphix
0
463
Member Avatar for k2k

i wanna try to use ajax to async something from the mysql database.. i have read many tutorial/book/article recently and there are many things that I don't clearly understand. it looks like json is a good pick to do stuffs like loading things from a database. however, the examples i …

Member Avatar for scrappedcola
0
325
Member Avatar for k2k

I registered a dns name from dynamicdns.org with my home IP (myname.homelinux.come). What I want to do is to join my fedora to this domain name. so i can see this machine as "fedora.myname.homelinux.com" Not sure which file I need to modify. I edited: /etc/resolv.conf search myname.homelinux.com // is this …

Member Avatar for helioptra
0
62
Member Avatar for hazar

i think first of all you should check if the school server is on the same subnet you are on. simply do a ping to the server and ipconfig and compare the network bits. however you said you could see the login screen that means your pc is at lease …

Member Avatar for Adriane Houk
0
192
Member Avatar for k2k

hi, i am very new to the darwin unix os. so much i wanna know if there is something like redhat's "yum" command to search and install softwares from the repository. my second question is, for example i downloaded vnc .. when i cd to the installtion folder, i see …

Member Avatar for neilnicky017
0
149
Member Avatar for k2k

I am trying to write some links on a site that would do stuffs for the clients. I kinda want to do something (such as executing a server side script) to a remote client machine (windows machines). Such as downloading something to the client's machine with permission, install vnc for …

Member Avatar for k2k
0
87
Member Avatar for k2k

Just gathering general idea here... let's say I have a table "Names" with a field "name" --> bob, and tom (2 records) I want the ajax/php page to pull out all the names. which would be bob and tom. And then if my database got updated at the backend (ex: …

Member Avatar for sergb
0
2K
Member Avatar for fadi-ft

huh, it should be simple. just configure and bring up both of your NICs and route other computers through this box. """route ADD destinationIP GatewayPC_IP""""" if you want this box be able to act like a wide area network simulator then you need some kind of application in it. FreeBSD …

Member Avatar for blud
0
260
Member Avatar for k2k

if i have 10 pages and each of the page has the same navigation bar, i don't think duplicating the code again and again in every page is the right solution... what do the pro normally do? ** i tried to use a frame inside one of my div tag …

Member Avatar for k2k
0
111
Member Avatar for k2k

i was having fun with php until i hit this road block... geolocation.class.php is in the same directory as my index.php.. anyone has any idea why it can't find it? =( /* * this is part of the index.php * / [code] <div id="midBox"> <table border="0" align="left"> <tr><td><script type="text/javascript"> var …

Member Avatar for saiprem
0
277
Member Avatar for k2k

i need something simple without much overhead to read plain text (tab separated, columns & rows of data) .. and with the data i need to generate some charts (plot, bar, etc) better be interactive since javascript doesn't need webserver like php .... setup is simple .. and can be …

Member Avatar for fxm
0
112
Member Avatar for k2k

i am thinking to use php to read plain text... and draw graph. what is the best approach? i googled and found JpGraph which looks kinda cool.. not sure if it is commonly used though.

Member Avatar for furqan219
0
165
Member Avatar for k2k

i have been using WAMP so never did a real php install... now i am trying to install php on a windows2003 machine... downloaded php5.3 msi file and finished the installation, added the path to the environmental variable. i can run php file in cmd now. however, i used notepad …

Member Avatar for k2k
0
106
Member Avatar for k2k

This is a MenuBar class which is supposed to assemble a Menu bar.. basically i have some JMenus which contains some JMenu items here... and add all the JMenus to this class which is the bar (sorry if this is confusing) i am trying to write a public method to …

Member Avatar for k2k
0
128
Member Avatar for k2k

i would really like to automate something like ... login to mysql cmd followed by creating a database following by creating tables... with one bat script here is my try: [code] mysql -u root password password; [/code] however it returned me this: [code] C:\Documents and Settings\lih>mysql -u root password root …

Member Avatar for k2k
0
267
Member Avatar for k2k

would anyone please take a quick look? this always return false for some reason... the database connection is fine and the query is fine... it actually returned the right password from the database. please see below [code] public boolean passCheck(String login, String pass) { String realPass=""; try { String query …

Member Avatar for stultuske
0
149
Member Avatar for k2k

anyone has ideas? i could cd to %ProgramFiles%... or move folder anotherFolder [code] move folder %ProgramFiles% The syntax of the command is incorrect. [/code] thanks thanks

Member Avatar for k2k
0
113
Member Avatar for k2k

just wondering if anyone could explain this... [code] if(loginF.equals("root") && passwordF.equals("root"))[COLOR="Red"]; [/COLOR] ---> if this semicolon is here, my program works.. but i can't have an else statement if i take out this semicolon, the code within the if statement don't execute.. but i can then have an else statement …

Member Avatar for JamesCherrill
0
107
Member Avatar for k2k

I had done a program with JFrame a year ago and I am trying to convert it to with JApplet so I can put it on the web. So far so good and I am able to see the applet and seems every functions are still working... there is one …

Member Avatar for k2k
0
197

The End.