|
sakurahito wrote: I am studying java.I want to write java project. How to write.
Start from here: Creating Your First Java Program[^]
Try out. Post specific issues if you face any.
|
|
|
|
|
use any IDE like netbeans or eclispe etc to do your java project
Jishnu
|
|
|
|
|
what are the main concept on these language and how it can use??
what are the features on these language?
|
|
|
|
|
|
|
Hi All,
I got a piece of code from google to convert byte array to hex string...i din't understand few lines of code can any on ehelp me to understand ??
public static String CellKeysGeneration() {
byte[] btba = new byte[5];
Random r = new Random();
r.nextBytes(btba);
for (int i = 0; i < btba.length; i++) {
btba[i] = btba[i];
}
String str = tohexString(btba);
return str;
}
public static String tohexString(byte[] bytes) {
StringBuffer sb = new StringBuffer(bytes.length * 2);
for (int i = 0; i < bytes.length; i++) {
sb.append(tohex(bytes[i] >> 4));
sb.append(tohex(bytes[i]));
}
return sb.toString();
}
public static char tohex(int nibble) {
final char[] hexdigit = { '0', '1', '2', '3', '4', '5', '6', '7', '8',
'9', 'A', 'B', 'C', 'D', 'E' , 'F' };
return hexdigit[nibble & 0xF];
}
In above three functions,
1) I dint understand why in toHex function we are always performing "and" operartion with 0xF.
2) I dint understand why in tohexString function we are performing ">>" operation with 4.
Can any one help me to understand toHexString and toHex functions ??
Thanks in advance !
|
|
|
|
|
|
Hey im new to this forum stuff... well i could not locate the question i posted in the discussions.So i just re-posted it.. hope mistakes are accepted for the first time by the way thanks for the reply.
|
|
|
|
|
IICTECH wrote: i could not locate the question i posted Hover your mouse over your name at the top right of the page and you will see links to your questions, answers, comments and forum messages. If you are new to the site then spend some time looking around to get familiar with it.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
how to store .jpg type image in MySQL database?
|
|
|
|
|
Use one of the BLOB types.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
in vb window
Private Sub btnBrowse_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
Dim OpenFileDialog1 As New OpenFileDialog
With OpenFileDialog1
.CheckFileExists = True
.ShowReadOnly = False
.Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg"
.FilterIndex = 2
If .ShowDialog = Windows.Forms.DialogResult.OK Then
PhotoPictureBox.Image = Image.FromFile(.FileName)
TextBox1.Text = OpenFileDialog1.FileName.ToString()
End If
End With
End Sub
in C# window
private void btnBrowse_Click(object sender, EventArgs e)
{
if (customeropen.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
txtCustomerPhoto.Text = customeropen.FileName.ToString();
pccustomerphotosample.Image = Image.FromFile(customeropen.FileName);
}
}
|
|
|
|
|
I have one idea to write app for android. App used to turn on of wifi of router but i dont know technical use for login router on java android. Please help me! Thanks you very much!!!
This is image server reques username and password
modified 20-Jan-13 8:46am.
|
|
|
|
|
|
First you need to communicate with the router, I mean, for eg. in your webbrowser if you write 192.168.x.x (router login webpage) you can access to your webconfig right? And to turn On/Off your wifi you must go to the right place right? Its like this ..
In your android app you must in first place know how to connect with router ip, if you can do this almost 60% of path is done, next you need to know how you turn On/off , and how do you know ? Almost of the router have one ssh login or telnet login, and almost of the routers have commands to open ports for example, you need to check you router manual and see what is the command to turn On/Off you wifi with terminal (telnet or ssh).
|
|
|
|
|
Thank you reply!
router use method protocol GET to config. EX: turn of wifi: http://192.168.0.254/userRpm/WlanNetworkRpm.htm?ssid1=Ngoan®ion=105&channel=15&mode=4&chanWidth=1&broadcast=2&brlssid=&brlbssid=&keytype=1&wepindex=1&authtype=1&keytext=&Save=Save
Router support remote login + no-ip.com and i can config it by 3G of smartphone. But this problem is authentication required of router when run this example
|
|
|
|
|
The authentication ?
There is a house where to known people they have a secret ring ...
what do you need to enter in the house ? if you have no key ?
you need to POST the secret ring..
First step again :
You need to authenticate yourself, when you put in the browser 192.168.0.254 what appear ? a windows to insert yours creds, that windows is make from anything right ?
otherwise you have the key ? what do you need to enter in the house? The place where you insert the key (that i dont know how to say in english lol )
if you have the creds you need to check if your router can be access by TELNET or SSH !!
or you must find the protocol that is used in the loggin of the router , for exemple wireshark is good for that job
|
|
|
|
|
ngoanrazor wrote: App used to turn on of wifi of router but
I doubt that statement as stated is possible.
If a router was running then one must either use a wired or wireless connection to access it.
You probably think that your cell phone is going to connect wireless to the router. But then that means that the router must have a wireless management API. (And to use that you learn about IP, TCP, HTTP at a minimum.)
Now if and only if you can access the admin via the wireless access then it should be possible to turn the router off.
But once the router is off you cannot connect to it - by any means. So it would not be possible to turn it back on. Same thing if you mean disabling the wireless connectivity.
|
|
|
|
|
Thank you reply!
But router support remote login + no-ip.com and i can config it by 3G of smartphone. But this problem is authentication required of router
|
|
|
|
|
So research how http authentication works.
|
|
|
|
|
thank you very much! , i had successful login. Base on
http://user:password@www.website.com
|
|
|
|
|
hello guys i am a beginner and i want to know how to go about programming with java any tutorial i will appreciate
|
|
|
|
|
You should learn to use Google for general research questions, as you will need to use it a lot. In the meantime start with the Java Tutorials[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
In oracle webpage you are able to find good tutorials!
|
|
|
|
|
You are replying to the wrong person.
One of these days I'm going to think of a really clever signature.
|
|
|
|