 |
 |
When posting your question please:- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-fou
|
|
|
|
 |
please am new in java programming and i have a problem on how to solve the problem below please can any one help me.
how to write a java program to display 3 on labal1 if textbox1 is not empty or display 0 if textbox1 is empty
|
|
|
|
|
 |
if we take input as 'eyes'
then, occurence of e = 2
y = 1
s = 1
then, 2=1+1 ,so the output will be 'YES'
if its not equal ,then output will be 'NO'
that is, check whether the sum of occurences of some character is equal to the sum of occurences of other charcters.
|
|
|
|
 |
Very interesting. Now do you have a question?
|
|
|
|
 |
yeah, this is my question
if we take input as eyes
then, occurence of e = 2
y = 1
s = 1
then, 2=1+1 ,so the output will be printed like "YES"
if its not equal ,then output will be printed "NO"
that is, check whether the sum of occurences of some character is equal to the sum of occurences of other charcters.
|
|
|
|
 |
Jebastin koilraj wrote: yeah, this is my question
No, it is your homework assignment. It is not a question.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
 |
You need to loop through each character and if it is the one you want, increment counter A and if it is not the character you are interested in increment counter B. Then compare the counters. Simple.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
 |
thank you
|
|
|
|
|
 |
Not sure what you think FTP and chat applications have to do with each other but,
file upload using FTP[^]
or
file download using FTP[^]
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
 |
hey thanx for reply ..this application allow a client and a server to send message to each other..i am asking how to implement if client/server wants to send file through this application .
|
|
|
|
 |
Member 12814174 wrote: wants to send file through this application
Then why didn't you ask about that?
Google[^]
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
 |
FTP is a protocol and has nothing to do with GUI design or programming. If you want to add it into your application then you need to create the protocol rules that your client and server will follow. At its most basic it will be something like:
User selects a file and clicks the UPLOAD button.
Client system sends an FTPstart message to the server.
Server sends an acknowledge/ready message back to the client.
Client sends the next N bytes of the file.
Server responds with ACK.
... repeat until ...
Client sends NoMoreData message.
Server responds with some message to show all the data has been received and saved.
|
|
|
|
 |
import javax.swing.*; import java.awt.*; import java.awt.event.*; class Demoswing extends JFrame implements ActionListener { JPanel p1; JTextField txt; JButton bt1,bt2,bt3; JLabel l1; JLabel l2; JPasswordField pf;
Demoswing() { l1 = new JLabel("UserName"); txt= new JTextField(10); l2 = new JLabel("Password"); pf = new JPasswordField(10); bt1 = new JButton("Login"); bt2 = new JButton("Cancel"); bt3 = new JButton("Exit"); p1 = new JPanel(); p1.setLayout(null); l1.setBounds(70,100,100,25); txt.setBounds(200,100,100,25); l2.setBounds(70,150,100,25); pf.setBounds(200,150,100,25); bt1.setBounds(60,200,100,25); bt2.setBounds(190,200,100,25); bt3.setBounds(310,200,80,25); p1.add(l1); p1.add(txt); p1.add(l2); p1.add(pf); p1.add(bt1); p1.add(bt2); p1.add(bt3); add(p1); bt1.addActionListener(this); bt2.addActionListener(this); bt3.addActionListener(this); setVisible(true); setSize(500,500); setTitle("Layout frame"); setResizable(false); setLocation(100,50); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==bt1) { String user = txt.getText();//to get username textfield detail String pwd = pf.getText();//to get passwordfield detail if(user.equals("appin")&&pwd.equals("123")) JOptionPane.showMessageDialog(null,"valid user","Authentication",1);//to get dialog box when both the fields are same else JOptionPane.showMessageDialog(this,"invalid user","error",0); } else if(ae.getSource()==bt2) { pf.setText(""); txt.setText(""); } else { System.exit(0); } } public static void main(String arg[]) { Demoswing ob = new Demoswing(); } }
|
|
|
|
|
 |
One of these days, you might learn that an unformatted code-dump is not a good question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
what is class and object ?
|
|
|
|
 |
What is Google?[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
Hi I am ramesh
Please suggest some way to improve the performance?
Actually our project has below mentioned process,
1.load the huge xlsx file and validating that value by using sax parser xml.
2.if validation success then will store into database.
this is the routine process,every day we will load more file.
Currenty using technique:
1.reading large file using Apache poi(XSSF user model api) and validating through xml by using sax parser.
2. then storing into jdbc batch and executing it.
so my question is still any better way is there to improve performance?
please suggest i am waiting for your reply
|
|
|
|
|
 |
public class DemoStructurepass {
public int a;
public int b;
public int c;
public int d;
}
public class MainActivity extends Activity {
test clsObj ;
DemoStructurepass dss;
long iS;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
dss = new DemoStructurepass();
clsObj = new test();
iS = clsObj.functionAddcheck(dss);
// public native long functionAddcheck(DemoStructurepass dss);
}
}
Now I need to access the DemoStructurepass structure in JNI(C)
|
|
|
|
|
 |
I feel like I could make my own high level language with more logical layouts, where anything heirchy-related actually makes sense.
Here, methods are called towards the top of the page or program, and then written out and stored just below it. So the method has already been processed by the time you get down to where it is written entirely. This completely goes against the concept of a program, "a set or order of instructions to be compiled and executed," not to mention it is confusing.
This initializing of data in classes with their constructors towards the bottom of the page and referencing them from main on top of the program is illogical and ridiculus.
A program should sequentially follow steps from top to bottom, and as simple as this sounds, this concept still needs to apply at more advanced levels of programming
For this opinion that I have, what would be a better language for me to work with?
|
|
|
|
 |
I guess you are reading someone else's bad code. Java of itself is a fine language for solving many problems. But like any language it can easily be misused.
|
|
|
|