Official Programmers Thread

  • Christian Chat is a moderated online Christian community allowing Christians around the world to fellowship with each other in real time chat via webcam, voice, and text, with the Christian Chat app. You can also start or participate in a Bible-based discussion here in the Christian Chat Forums, where members can also share with each other their own videos, pictures, or favorite Christian music.

    If you are a Christian and need encouragement and fellowship, we're here for you! If you are not a Christian but interested in knowing more about Jesus our Lord, you're also welcome! Want to know what the Bible says, and how you can apply it to your life? Join us!

    To make new Christian friends now around the world, click here to join Christian Chat.
W

wwjd_kilden

Guest
modem died :p got a new one...so I'll just leave it local :p


Got any suggestions to how to keep my Norwegian symbols from being encoded?

æøå turns into <?>

my database, table and php document are all utf8, and I have the meta- element for utf8 in my html header.... still it won't go away :S
 
W

wwjd_kilden

Guest
lol

it works on the php page, but is coded in my database ..

*sticks out tounge*: - ææææææææææææblææææææææææææææææææææææææææææ
 
W

wwjd_kilden

Guest
how come ht mysql server studio management thingy lets me inpput 2010-01-10 in the "edit" part
but refuse to accept the exact same value when I use INSERT INTO?

orders has Order_ID (int) , Costumer_ID (int) and Date (date)

INSERT INTO Orders VALUES (3, 2, 2010-01-10)
Operand type clash: int is incompatible with date

and yes, I also tried 20100110 ,
2010/01/10 and 2010.01.10
 
B

Belgian_Pilot

Guest
Try dd/mm/yyyy
 
W

wwjd_kilden

Guest
but I set the format to YYMMDD before inserting it
 
B

Belgian_Pilot

Guest
Ah. Weird.

Very weird.
 
E

ex-Ranger

Guest
hey yall ive just started using ubuntu 10.10 (maverick meerkat) ive installed it so i have dual boot windows 7 or ubuntu. i have all ready gotten alot of the "non standard" packages/sources ,i was hoping yall could reccomend any that i might need/want. and for some reason i can not switch directories in the terminal kyle@ubuntu:~$ /Downloads
bash: /Downloads: No such file or directory
kyle@ubuntu:~$ dir
aircrack-ng-1.1 gramcap-01.csv Music
aircrack-ng-1.1.tar.gz gramcap-01.kismet.csv Pictures
Desktop gramcap-01.kismet.netxml Public
Documents IMG_0005.JPG replay_arp-0206-222755.cap
Downloads IMG_0006.JPG Templates
examples.desktop IMG_0007.JPG tes.dxf
Firefox_wallpaper.png IMG_0008.JPG Ubuntu\ One
FrostWire IMG_0009.JPG Videos
gramcap-01.cap libdvdcss2_1.2.5-1_i386.deb
kyle@ubuntu:~$


am i typing the commands wrong or...
any help would be wonderful thanks
 
W

wwjd_kilden

Guest
hm,I cant see cd in your code (the command to change directories)
and I don't remember how linux command line works with that, but sometimes you need a full path, unless you are just entering a sub directory
 
E

ex-Ranger

Guest
yeah ive tryed using cd
root@ubuntu:/home/kyle# dir
aircrack-ng-1.1 gramcap-01.csv Music
aircrack-ng-1.1.tar.gz gramcap-01.kismet.csv Pictures
Desktop gramcap-01.kismet.netxml Public
Documents IMG_0005.JPG replay_arp-0206-222755.cap
Downloads IMG_0006.JPG Templates
examples.desktop IMG_0007.JPG tes.dxf
Firefox_wallpaper.png IMG_0008.JPG Ubuntu\ One
FrostWire IMG_0009.JPG Videos
gramcap-01.cap libdvdcss2_1.2.5-1_i386.deb
root@ubuntu:/home/kyle# cd/Downloads
bash: cd/Downloads: No such file or directory
root@ubuntu:/home/kyle# cd /Downloads
bash: cd: /Downloads: No such file or directory
root@ubuntu:/home/kyle# cd.. /downloads
cd..: command not found
root@ubuntu:/home/kyle# dir cd /downloads
dir: cannot access cd: No such file or directory
dir: cannot access /downloads: No such file or directory
root@ubuntu:/home/kyle# cd Downloads
bash: cd: Downloads: No such file or directory

i just don't get it there is a Downloads dir but its refusing to switch to it ive tried every combo available and followed what they sugest on the ubuntu one help site, could there be a problem with the install? btw the only way i managed to get it to /home/kyle was by the command sudo su wich gives me admin priviliges
 
Oct 18, 2009
60
0
6
Hm, dir works, but I normally use ls to list a directory's contents. Linux is case-sensitive, unlike Windows; if you type 'downloads' instead of 'Downloads', it won't work. Also, why are you doing it as root? I suppose it's ok, but why not just be a normal user?

Ah, I see, it looks like you are typing it correctly. Are you sure that Downloads is a directory? Try running:

ls -l

If the output looks like this, with d's on the left, it is a directory:

drwxr-x--x 3 urmum urmum 4096 May 15 19:15 Common Files
drwxr-x--x 2 urmum urmum 4096 May 2 23:06 Internet Explorer
drwxr-xr-x 13 urmum urmum 4096 May 20 11:38 Steam

In case you're wondering, this is in my WINE directory.

You could also try an absolute path:

cd /home/kyle/Downloads
 
Last edited:
E

ex-Ranger

Guest
i was having to do it as root because my sudo file got messed up i reinstalled and it fixed all the problems i was having including dir switching
 
W

wwjd_kilden

Guest
embedding javascript in html

So, I am just randomly trying to figure out how this works, and failing :p
I just want to embed a java applet into a plain html page, but I get a error message
What am I doing wrong?

(Yes, I got the .class file in the same folder as the html file)



<html> <body bgcolor=white>

<applet code=MyApplet.class width="200" height="200">
Your browser does not support the <code>applet</code> tag.
</applet>

</body> </html>

========================


import java.applet.*;
import java.awt.*;

public class MyApplet extends Applet {

int width, height;

public void init() {
width = getSize().width;
height = getSize().height;
setBackground( Color.black );
}

public void paint( Graphics g ) {
g.setColor( Color.green );
for ( int i = 0; i < 10; ++i ) {
g.drawLine( width, height, i * width / 10, 0 );
}
}
}
=================================

Java Plug-in 1.6.0_24
Using JRE version 1.6.0_24-b07 Java HotSpot(TM) Client VM

----------------------------------------------------


load: class MyApplet.class not found.
java.lang.ClassNotFoundException: MyApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: MyApplet.class
 
E

ex-Ranger

Guest
hey guys i got difficult problem
i put several password protected files into a password protected .zip file like 2 years ago
the problem is i used different passwords for each file(including the .zip) and i do not remember what they are lol
i managed to recover the password for the .zip file using a brute force attack in fcrackzip but i cant find any way to recover the passwords for the individual files inside the .zip i cant extract them with out the passwords so i have to work inside the .zip to recover the passwords
any ideas? or suggestions?
 
W

wwjd_kilden

Guest
So, I just started trying out visual basic (EEEEEEEEEEK, I hate it :p)
Trying to make a game that is partially explained in the turorial of the program I use, but being unable to do the part it suggests I try, that don't have any guide of how to...

I am trying to make my code ask what background color the object that is triggered has (as to make it handle different colored labels differently)

Clearly I am slow, cause I can't figure it out, not by my own, and not by trying to google for it...)

Also, it is set to play a sound when the mouse hits a wall (enters a label) or is taken out of the game area (the panel) and then reenters.
the thing is, this setting makes it play the sound when the game starts (since it "enters" the panel), I don't want it to...
I haven't figured out how to bypass that either,


Part of my present code is
-------------------------------------

Public Sub New()
' This call is required by the designer.
InitializeComponent()
MoveToStart()
' Add any initialization after the InitializeComponent() call.

End Sub


Private Sub MoveToStart()
Dim startingPoint = Panel1.Location
startingPoint.Offset(10, 10)
Cursor.Position = PointToScreen(startingPoint)
End Sub

' the ... in the follow code is just because I got several lines of labels being listed that makes my post unreadable

Private Sub wall_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.MouseEnter, Label9.MouseEnter, ....., Label10.MouseEnter, Panel1.MouseEnter

' Play sound, then move mouse pointer to starting point
' Want to make it behave differently with different colors (different walls can trigger different responses)
' don't want sound on game startup

startSoundPlayer.Play()
MoveToStart()
End Sub
 
Last edited:
E

ex-Ranger

Guest
sense it has been a while sense i have programed in VB and i no longer have access to the software my code may be a lil off
it sounds like you need a "on load" argument so something like me.programname.onload(mouseenter.startsoundplayer.pause())
like i said the code is prob all wrong but it should get you thinking along the right lines
 
E

ex-Ranger

Guest
im using ubuntu 11.04 after extensive goggling i found that changing the greeter(login) theme was near imposable with gdm so 3 more hrs of goggling and lightdm seems to be the answer now how on earth do i change the theme from its default to one i downloaded off of gnome-look.org? ive read that i need to modify the lightdm.conf file but it looks like thats only for pre-configured themes
this is what i want the login theme to be SystemAccess GNOME-Look.org
 
E

ex-Ranger

Guest
nvm i figured it out but now i have a new problem the theme i want is a GDM theme and it needs to be a GTK theme is there a way i can convert it? or make my own?
 
E

ex-Ranger

Guest
i had a random idea that idk if it will work its more on the networking side of computers but i figure id ask
basically i would want my computers ip to be broadcast as something other then it is
so say a radio station is on the freq 102.3 call-sign KLUV but the d.j. announces thats its 98.2 call-sign KNEW
if that makes any sense