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); [/code] any suggestion? thanks

Member Avatar
Member Avatar
+0 forum 10

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
Member Avatar
+0 forum 6

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 am so confused about php conf files.

Member Avatar
Member Avatar
+0 forum 2

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 guess isn't correct. Can anyone help me with this? Thanks thanks

Member Avatar
+0 forum 0

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 to do that in a script? I tried a couple attempts but haven't been sucessfully yet. #!/bin/bash echo "password" | scp source user@destination:\folder hope anyone can shed some light. Thanks much.

Member Avatar
+0 forum 0

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
Member Avatar
+0 forum 2

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 device is fine. My epson share doesn't have a username or password. Can anyone suggest any command to try?

Member Avatar
Member Avatar
+0 forum 2

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 perfectly fine. If I put the actual hostname then it would fail. pinging the hostname actually has no problem. The box is using a working dns server. Did anyone experience any similar name resolving issue while ping, nslookup everything is workig but an application isn't able to see its hostname?

Member Avatar
Member Avatar
+0 forum 3

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 do a replacement on the line right under the cursor? example: [code] #!/bin/sh hi() some other code #modify only the hi() below this line hi() [B]---> this is the hi() i want to modify[/B] hi() other code hi() other code hi() [/code] or if there is any other better approach? …

Member Avatar
Member Avatar
+0 forum 15

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
Member Avatar
+0 forum 5

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, such as "#this is y" from above, and then modify the "a=0" 2 lines down? this has been puzzling me.. thanks

Member Avatar
Member Avatar
+0 forum 2

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 >> %userprofile%\desktop\clientInfo.txt however... for /F "tokens=3" %%a in ('E:\things\bpplclients') do ( set hn="%%a" if /I not "%hn%" == "Client" ( if /I not "%hn%" == "--------------" ( echo %hn% >> %userprofile%\desktop\clientInfo.txt ) ) This will output "" instead of the value of variable `%hn%`... How do i correctly set variable …

Member Avatar
+0 forum 0

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? or sed maybe? [code]awk 'NR%3==1' file.txt [/code]

Member Avatar
Member Avatar
+0 forum 1

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 that NFS (network file system) is for Unix while CIFS is for Windows? Can the terms be interchangable? If I have created a Windows share folder, is this folder considered NFS or CIFS? What would be the easiest way to access this folder from Unix? What about mounting a Windows …

Member Avatar
Member Avatar
+0 forum 4

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 it is running on putty: under SSH, X11, X11, checked box "Enable x11 forwarding" X display location [xp box ip] ---------- Is there anything else I missed? I think I have configured it the same way last time I made a Redhat box worked. Thanks

Member Avatar
Member Avatar
+0 forum 1

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 the server name of my school is something like myname.wit.local and domain name is something like wit.local........ what would be my home server name and domain name??? my ISP is comcast if it is needed.... Thank you very much

Member Avatar
Member Avatar
+0 forum 6

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
Member Avatar
+0 forum 4

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); xmlhttp.send(null); } else { status = xmlhttp.readyState; alert(status); ///// this always return 0 ///// } } [/code] which calls this function to initialize xmlhttp [code] function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, …

Member Avatar
Member Avatar
+0 forum 3

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 syntax set today = %DATE% // sort of work, but I just need the mm/dd/yy, i don't need the "Mon 11/22/2010" kind of format [/code] is there a way to assign a cmd output to a varible in bat script?

Member Avatar
+0 forum 0

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 typing over and over the same pathes. does anyone know the syntax doing stuffs like this? thanks

Member Avatar
Member Avatar
+0 forum 2

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 bat script do that? how about the if statement? thanks.

Member Avatar
+0 forum 0

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 efficient than 32 bit processor, but why os has 32/64 bit too? Does os walk shoulder to shoulder with processors? Could anyone please explain a little bit. So much wanna know. Thanks

Member Avatar
Member Avatar
+0 forum 13

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 the right device. "grep -i usb /var/log/dmesg" doesn't give me very good idea where my usb is. any good suggestion? please.. thanks

Member Avatar
Member Avatar
+0 forum 2

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 this is doable with bat scripting?

Member Avatar
+0 forum 0

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. 4. /etc/hosts #127.0.0.1 localhost.localdomain localhost #127.0.0.1 localhost.localdomain localhost 127.0.0.1 esxfedora ::1 localhost6.localdomain6 localhost6 /// i don't understand this line 192.168.1.10 basementXP //i will ping this hostname with my client dns unix box Questions: 1. ok now I am on another unix box (opensolaris), i edit /etc/resolv.conf as nameserver 192.168.1.1 //point …

Member Avatar
Member Avatar
+0 forum 9

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'] will get over written .. only the last user logged in session remains. how am i supposed to have multiple users logged in at the same time with session? is this possible with session? or if cookies have to be used. thanks

Member Avatar
Member Avatar
+0 forum 2

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) i tried resetting the router to the manufacture setting by rebooting it and press the reset key. then i see.. [code] Rights clause at FAR sec. 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 …

Member Avatar
Member Avatar
+0 forum 7

[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 a string inside the "mysql_query" thanks

Member Avatar
Member Avatar
+0 forum 2

[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, i want the result in a new window or tab in small size. Is it possible to do something like that?

Member Avatar
Member Avatar
+0 forum 4

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 below getContent("./php_lib/getOrder.php"); </script> </body> </html> [/code] [code] //my ajax code var asyncRequest; var data = "table=table_for_testing&res_name=name_for_testing"; function getContent(url) { try { asyncRequest = new XMLHttpRequest(); asyncRequest.onreadystatechange = stateChange; asyncRequest.open('POST', url, true); //////////////// newly added for php parsing /////////////////////// ////// Send the proper header information along with the request //////////// asyncRequest.setRequestHeader("Content-type", …

Member Avatar
+0 forum 0

The End.