|
Who can help me tofind tools to convert from MS Access Database to MYSQL Database
I tried so hard and got so far
|
|
|
|
|
You can write a plugin in JSP or PHP which Takes all the data form ms access and first create the structure in MYSQL then transfer the data to it. Right now i don't know any tool but you can do this by using this methos. It will take hardly 2 or 3 Hours to done this work.
Try it..
Ankit Singhal
|
|
|
|
|
I want to keep a connection string in a config file in a DLL project. I have tried using myappname.dll.config and app.config and have stored the data like this...
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="constring" value="a_connection_string_goes_here"/>
</appSettings>
</configuration>
and try to retrieve this data using...
strConnectionString = ConfigurationSettings.AppSettings["constring"];
I'm only getting null back. The application doesn't seem to be able to see the config file.
ConfigurationSettings.AppSettings.Keys.Count is zero.
ConfigurationSettings.AppSettings.Count is zero.
Can anyone tell me why this is not working?
Thanks in advance - Dave
|
|
|
|
|
Configuration files seems to be intended for applications, not for libraries.
ConfigurationSettings is just a wrapper around XmlDocument
You can easily write your own (and provide abstract API, so you can extend or re-implement it in case you figure out some better way how to do it).
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Because .DLL projects can't have config files.
Since the .DLL becomes part of the host application using it, any code you write like this in the .DLL will use the host applications config file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm programming a neural network
and I got a small user interface problem.
I want it to lool like this:
Input: 10 Output: 0
The algorithm could look like this:
1. print Input:
2. get 2 chars
3. procesing
4. print Output:
5. print result of proccesing
But I can't do the get 2 chars line.
<br />
static void Main(string[] args)<br />
{<br />
NeuralNetwork nn = new NeuralNetwork(2);<br />
nn[0].addNeurons(2);<br />
nn[1].addNeurons(1);<br />
<br />
nn.CENTENIPL();<br />
<br />
educateNeuron(nn);<br />
<br />
do<br />
{<br />
setInputs(nn);<br />
nn.CalcNet();<br />
<br />
Console.Write(" Output ");<br />
for (int i = 0; i < nn[1].neurons.Length;i++ )<br />
Console.Write(nn[1][0].output);<br />
Console.Write('\n');<br />
} while (true);<br />
}<br />
static void setInputs(NeuralNetwork nn)<br />
{<br />
Console.Write("Input: ");<br />
char[] buffer = new char[nn[0].neurons.Length];<br />
Console.In.Read(buffer, 0, buffer.Length);<br />
<br />
for (int i = 0; i < buffer.Length; i++)<br />
{<br />
if (buffer[i] == '0')<br />
nn[0][i].output = 0;<br />
else<br />
nn[0][i].output = 1;<br />
}<br />
}<br />
Now it looks like:
Input: 01
Output 0,009378789
Input: Output 0,9900505
//don't worry about the decimals
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
You ought to be able to figure this out by looking at the string.Format documentation. That function will allow all sorts of formatting, including ways to force a number to display as 2 digits.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
It's not a number!!
It's 2 binary datas.
And it's input numbers!!
I didn't express my self clearly.
Input: [input 2 chars without pressing ENTER] Output: [whatever]
Hope you get it now.
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
All the data in a computer can be represented as numbers (bytes are numbers). So, you can use string.Format() to represent that data as a string.
[edit]
IF you're talking about a single binary digit as the input, then you simply transform your two bits into two bytes, using the bitwise operators to set your byte to 1 or 0 based on the state of the bit.
[/edit]
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
That isn't the prob.
I want to take 2 and only 2 chars of input and no moore.
And it should (if possible) not need the enter key to be
pressed at all.
Casting is easy and I don't do it with string.Format()
anyway.
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
Ah! You're asking about input, not output. Ok.
Y'know, I haven't written a console application with the need to do that, so I can't help much with that. However, if you turned it into a window display, it would be very simple.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
Yes. I also know that but now it's in
a console and it stays there for a while.
Could anyone else please help me with this.
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
I did a search for you, since I was curious too. Here[^]'s a link that looks to be right on the money. (It's written in VB.NET, but you can use it or translate only the piece you need.)
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
Hi, i have wrote this code to create a static class
public static class Tools
{
public static Tools()
{}
}
but the complier give me this error :
The modifier 'static' is not valid for this item. (referring to the class declaration)
What i miss?
thanks
|
|
|
|
|
static class es is a new feature in .NET 2.0 (still in beta). Are you sure you're not programming for .NET 1.1?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hello
You've missed reading MSDN:
"The static modifier can be used with fields, methods, properties, operators, events and constructors, but cannot be used with indexers, destructors, or types."
With best regards,
Andrew
|
|
|
|
|
A static class can't create an object
and thereby it can't have a construcor.
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
Thats wrong. In .Net static constructors are allowed which are called the first time the class is used:
public class Blubb() {
static Blubb() {
}
}
Note that no more modifiers are allowed and that this constructor cannot be called explicitely (the framwork handles this).
|
|
|
|
|
OK thanks.
I didn't know that.
I'll maby use it someday.
The PROgrammer Niklas Ulvinge aka IDK
|
|
|
|
|
Consider:
public abstract sealed class Tools
{
private Tools(){}
}
The static modifier in c#2.0 is implemented this way.
|
|
|
|
|
thank you very much.
Actually i'm using .net 1.1, i didn't know that this feature is implemented only in 2.0.
I'll try another way...
|
|
|
|
|
Hi Guys,
Is it possible to Filter multiple file types with the FileSystemWatcher component.
I tried watcher.Filter = "*.doc;*.ppt"; but this doesn't work.
Any ideas?
Thanks
|
|
|
|
|
The documentation here[^], doesn't mention anything about allowing multiple filters.
You could simply use two FileSystemWatcher instances. Or, you could use one FileSystemWatcher, and process the filename yourself to only deal with the extensions you care about. Either way, you reach the same goal.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
I'm sending data between a async socket client and server. 99% of the time all goes well, but sometimes the data received at the client is somehow received in two parts. A numeric example:
Server sends data: 20000 bytes
Client receives data: 15000 bytes
Client receives data: 5000 bytes
As you can see, the client somehow splits the data in two parts.
What might trigger the socket.EndReceive() method so early?
How can this happen and more important: how can I prevent this data mutilation?
|
|
|
|
|
This happens for valid reasons within normal operation, so you should just concentrate on how to deal with the result (not really a mutilation, just a separation as it travels over the network).
Your protocol must somehow indicate the beginning and end of a message. One simple way is to always end a message with a unique byte signature of some kind. Another way is to begin every message with a set number of bytes (say 4) that indicates the byte length of the rest of the message.
After you have established a way to know the beginning and end of the message, you edit your receive code to notice the difference, and to process a whole message at a time. (Merge split message chunks into one byte array if needed.)
Another thing you should watch out for, is a common scenario like this:
Server sends data: 1500 bytes
Server sends data: 2100 bytes
Server sends data: 1400 bytes
Client receives data: 5000 bytes
In that case, you will also need to know the beginning and end of a message, so you can process the messages individually from the received data.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|