|
Buy a good grade of coffee and make the Java in an automatic drip pot.
Jon
Smith & Wesson: The original point and click interface
|
|
|
|
|
You have posted 6 messages here. The headers are all 'urgent' or 'plz help'. Surely you have the brain capacity to come up with a subject that pertains to your question ?
I haven't checked if all your questions are as completely off topic for their forums as this one is. Either way, I recommend you read the guide on how to ask questions, and for questions as basic as this one, take a class or buy a book.
To build an exe in Java, you write the code and select the 'compile' option from the menu of your compiler.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sahar111 wrote: need to know how can i make executable fle in JAVA.
Four things...
1. don't post in a C# forum
2. don't use "urgent" because no one really cares.
3. get a java compiler to create the byte code .class file. There isn't really an .exe executable generated in Java if that is what you are thinking...
4. read a book or take a class.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all,
I am planning to develop a website which have a simulator where allows users to design thier nail design online. This will be something drag and drop the design to the fingernail in 3D mode.
I would like to ask can this implement in C# with Managed DirectX? And, how do I implement this using C# wi9th Managed DirectX?
Thanks.
|
|
|
|
|
I could be very wrong here... But I think you may want to use Flash instead of DirectX.
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
I do not want to use Flash because it just align the timeframe and some simple code. I want algorithm involved in my program. Hence, I choose using C# with DirectX. This is used for game development but I do not sure can it apply in my program which my program is similar like the bottom link website.
My program want to be in 3D,fully interactive.
http://www.edheads.org/activities/knee/[^]
Instead of using flash, got any language is better than this?
Thanks.
Katelva
|
|
|
|
|
You may want to try Processing[^], it may be able to embed in web pages although I'm not sure.
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
I am trying to load data from a data file. At first I declared a list called list<client> clients and I was able to load this list.
Then I tried to declare a class list as shown below and the program crashed on the add statement. Could someone please explain:
namespace WindowsApplication2
{
public struct client
{
public string matter;
public string name;
}
public class clientList
{
public List<client> data;
}
static class Program
{
[STAThread]
static void Main()
{
client Myclient;
clientList clients = new clientList();
FileStream aFile = new FileStream
("TextFile1.txt", FileMode.Open);
StreamReader sr = new StreamReader(aFile);
//load data into the Myclient list
Myclient.matter = sr.ReadLine();
while(Myclient.matter!=null)
{
Myclient.name = sr.ReadLine();
clients.data.Add(Myclient);
Myclient.matter = sr.ReadLine();
}
//
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 f = new Form1();
Application.Run(f);
}
}
}
|
|
|
|
|
it looks like the clientList class needs a constructor that initializes data .
data = new List < client > ();
|
|
|
|
|
Thank you, I will try that. My main program invokes a form (Form1) and Form1 invokes another form Form2.
How can I load my list in the main function and make it available to these forms?
|
|
|
|
|
the best way depends on your programs structure and how you're going to use the data. two methods would be to make the list a static global so anybody can access it or pass the list to your forms as a parameter during construction. Again, it depends on how your program is structured but I'd generally prefer parameter passing to globals.
|
|
|
|
|
Jerry Graham wrote: public class clientList
{
public List<client> data;
}
You have to "new" the internal list before you can use it. You make a new ClientList class but, the internal List is not created when you do. I suggest either A) Hiding the list internally (after you new it of course) you shouldn't expose members like that, or B) doing away with the containing class if it only has a List in it.
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Thanks! I placed the list in a class because,my main program invokes a form (Form1) and Form1 invokes another form Form2 and I want to load my list and make it available (globally) to these forms?
|
|
|
|
|
You can pass the list around just like you pass a class around.
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Hi All,
i used this code:
protected void btnAddToCart_Click(object sender, ImageClickEventArgs e)
{
string Price = double.Parse(((Label)DataList1.Controls[0].FindControl("PriceLabel")).Text);
}
but now i have this error: double:Cannot implicity convert type double to string.
why this error occured?
what do i do now?
thank you
Hoda
|
|
|
|
|
You don't need to use double.Parse(), just assign the string variable to the text outcome of the control
Mohamed El Gohary
|
|
|
|
|
string Price = double.Parse(((Label)DataList1.Controls[0].FindControl("PriceLabel")).Text).ToString("0.00");
I Love T-SQL
Don't torture yourself,let the life to do it for you.
|
|
|
|
|
Saba02 wrote: why this error occured?
because
1) double.Parse(...) returns a double
2) string Price = expects a string
Saba02 wrote: what do i do now?
get your act together.
|
|
|
|
|
Saba02,
Two things. You are assigning a string with a double. And you should also use TryParse();
Label priceLabel = DataList1.Controls[0].FindControl("PriceLabel") as Label;
double price = double.TryParse(priceLabel.Text);
Regards,
Gareth.
|
|
|
|
|
gareth111 wrote: double price = double.TryParse(priceLabel.Text);
your intentions are good, your syntax isn't.
The documentation tells differently.
|
|
|
|
|
|
Hi Gareth,
no problem!
|
|
|
|
|
Hi!
I am using MS Visio control in an application developed in C# (for .Net 1.1). I have a class MyAppContext that extends ApplicationContext . The application is started by calling Application.Run(myAppContext) where myAppContext is an instance of class MyAppContext .
The problem I face, is this, only under Vista, if a form containing Visio control is initialized, a NullRefrenceException is thrown. However, if I load the same form before initializing myAppContext, it works fine.
The same code works under XP and Windows 2003. I have also used 'Run as Administrator' option in Vista but the result is same.
Does anyone have a clue, what should I do to fix this problem?
|
|
|
|
|
Kashif Iqbal Khan wrote: a NullRefrenceException is thrown
by whom? at what line? catch the exception, look at its ToString() output, tell
Visual Studio to always show line numbers, and identify the faulty line.
A wild guess: you did something that is not thread-safe, your XP machine is single core
so it runs fine nevertheless, and your Vista machine is dual core, so it is bound to fail.
As I said, this is just a guess.
|
|
|
|
|
Thanks for your prompt reply.
The exception stack trace shows that it is thrown somewhere in AxHost class. Unfortunately, I am not at my work place right now, so cannot attach the exact StackTrace. But will update as soon as I get it.
To explain further, I am writing the code flow that is something like as follows
<br />
<br />
VisioForm f = new VisioForm();<br />
f.Show();<br />
f.Close();<br />
<br />
MyApplicationContext c = new MyApplicationContext; <br />
Application.Run( c );<br />
<br />
<br />
There is a button on MainForm that has the same code as mentioned in Line 1-3 above in its click event. Now If I comment the code as in Line 1-3, the application will crash if the button on main form is clicked. But works fine, if I leave it there.
More interestingly, If the lines 1-3 are moved between line 4 and 5, the application will still crash with the same message.
This makes me believe that there is something wrong when using ActiveX controls inside a custom application context on Vista.
|
|
|
|