Hello All,
I am trying to parse formula in C# language like
"5*3 + 2"
"(3*4 - 2)/5"
Is it possible to do in C# or scripts like VBScript, JavaScript (which will be called in c# program).
Thanks a lot!.
hi there
i am writing a program in C#
i have a code like this
Hashtable ht = new Hashtable();
ht.Add("1", "One");
ht.Add("2", "Two");
ht.Add("3", "Three");
ht.Add("4", "Four");
but Compiler sort it
i wanna know how can i prevent sorting hashtable
please help me
Is there a way to allow an HTML file to open an application on the local computer and send that application arguments?
We have an application that allows a user to set a link to an external application. We also provide a summary page in HTML (they usually interact with the application from outside the browser) with the link in HTML as well. We can get applications to launch if the program exists, but cant seem to send arguments through the HTML link.
Is this even possible?
I am trying to plot the following !
from numpy import *
from pylab import *
import random
for x in range(1,500):
y = random.randint(1,25000)
print(x,y)
plot(x,y)
show()
However, I keep getting a blank graph (?). Just to make sure that the program logic is correct I added the code print(x,y), just the confirm that (x,y) pairs are being generated.
(x,y) pairs are being generated, but there is no plot, I keep getting a blank graph.
Any help ?
I am using VS2008 C# and testing on my local XP Pro PC with local IIS, I have wrote a web service to call a third party software .exe file to use svn checkout commands to insert data into a folder, which use System.Diagnostics.Process.Start . The same codes did work when I use VS2008 build-in ASP.NET Development Server(http://localhost:2999/MyServices/MyServices.asmx). but when I use IIS normal URL(http://developer/MyServices/MyServices.asmx) to run Process.Start on the web service, it just haunlted and not doing anything.plz send one sample program.
I'm making a notepad-like program. To get the text from a file I read each character into the buffer by doing
while (!file.EOF())
{
mystr += file.get();
}
however if I load in an exe it stops after MZ but Notepad reads the whole exe.
I set my ifstream to binary mode but still no luck. What am I doing wrong?
Thanks
In advance, thank you for your advice.
I am currently working on a program which uses Putty to create a SSH connection with a server that uses local port forwarding to enable a client, running my software, to access the service behind the SSH server via localhost.
IE: client:20100 - Internet - Remote SSH server exposed via router/firewall - Local Intranet - Intranet Web POP3 Server:110.
Cmd Line: "putty -ssh -2 -P 22 -C -L 20100:intranteIP:110 -pw sshpassword sshusername@sshserver"
Client would use putty to create a SSH connection with the SSH server specifying in the connection string that it would like to tie port 110 of the Intranet POP3 Server to port 20100 on the client system. Therefore the client would be able to open up a mail client to localhost:20100 and interact with the Internal POP3 server over the SSH tunnel. The above is a general description. I already know what I am trying to do will work without a problem so am not looking for debate on the above.
The question is this...How can I ensure the local port (I cannot use dynamic ports, so it must be static) on localhost is not being used or listened to by any other application?
I am currently executing this code in my C# app:
private bool checkPort(int port)
{
try
{
//Create a socket on the current IPv4 address
Socket TestSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
// Create an IP end point
IPEndPoint localIP = new IPEndPoint(IPAddress.Parse("127.0.0.1"), port);
// Bind that port
TestSocket.Bind(localIP);
// Cleanup
TestSocket.Close();
return false;
}
catch (Exception e)
{
// Exception occurred. Port is already bound.
return true;
}
}
I am currently calling this function starting with a specific port in a for loop to get the 'false' return at the first available port. The first port I try is actually being listened to by uTorrent. The above code does not catch this and my connection fails.
What is the best method to ensure a port is truly free? I do understand some other program may grab the port during/after I have tested it. I just need to find something that will ensure it is not currently in use AT ALL when the test is executed.
If there is a way to truly reserve the localhost port during the test, I would love to hear about it.
Hi,
since the new SDK 1.1 is missing the tutorial for "ASPProviders", i am currently asking myself how i would implement a "azure session state provider" ( this is the path in the "old" SDK: C:\Program Files\Windows Azure SDK\v1.0\Samples\AspProviders )
Related threads:
http://stackoverflow.com/questions/1023108/how-does-microsoft-azure-handle-session-state
http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/2d1340ed-0ad0-456a-b069-aa6b85672102/
Has anyone an idea or even the old example project and could post some snippets of the config here?
I am using a ServerSocket port to run one instance only of my Java Swing application, so if a user tries to open another instance of the program, i show him a warning that "Another instance is already open". This works fine, but instead of showing this message i want to set focus on the running application itself, like some programs does (MSN Messenger), even if it was minimized.
Is there a solution for this for various operating systems ?
I need to provide an update to application data as a download from a website. The update would actually just be the replacing of some data files with some updated ones.
The update, which I assume would be some sort of setup package type program, would need to be able to do the following:
access the file system and registry
to determine where files should be
copied to
supply the files to be copied
provide strong security so the data files cannot be downloaded or used by the wrong people
What would be best way to achieve all of the above?
Tried to install some program, it gives above message requiring 1.1.4322.
BUT as the title says, all the frameworks are already installed on my WinXP SP2, if i inspect C:\WINDOWS\Microsoft.NET\Framework\
The machine has VS2008 which essentially required full installtion of Framework 3.5 SP1.
Any ideas? (i know, just re-install framework 1.1 again, but why should i - I can see all Frameworks are installed, and things are supposed to be backward compatible.
Hi!
Is there a maximum number of assembly language instructions to be loaded into the fragment program unit?
I have an algorithm on to port from cpu to gpu and apparently it doesn't fit on the gpu.
What are the typical reasons for bugs and abnormal program behavior that manifest themselves only in release compilation mode but which do not occur when in debug mode?
I have been trying to learn assembly for a few years now. I get to do a "Hello, World" program but never further. I find it so hard. Is anyone able to point me to a place or maybe even themselves, teach me some? I have prior programming experice mainly in python. So i am not completely unfamiliar with programming.
I'm relearning UNIX commands to use git on windows using MINGW32.
When I launch a program, for example "$ notepad hello.txt" I can't use the shell again until I close the notepad file or CTRL-C in the shell.
How do I essentially fork a new process so I can use both programs?
How do you handle clean up when the program receives a kill signal?
For instance, there is an application I connect to that wants any third party app (my app) to send a finish command. What is the best say to send that finish command when my app has been destroyed with a kill -9?
Hi i have watched this tutorial from Roman Dedenis
Alternativa 3D: Import and object animation DAE (Collada 3D Object)
From:
http://romaindedenis.over-blog.com/article-alternativa-3d-importer-objet-et-animation-dae-objet-3d-collada-66067921.html
Im have implemented the program on flash and it's working fine on my computer. Then i exported it on my Android mobile device (Nexus One) using adobe AIR for Android but the animation doesn't appear on my mobile:
Below i show screenshots of how it looks like on my pc and on my mobile.
Printscreen from PC
Printscreen from Android Phone device
I'm not able to get WSDL to work, it giving me this error:
C:\Program Files\Microsoft.NET\SDK\v2.0\Bin>wsdl.exe /username:NOTGIVINGU/password:THEPASSWORD /v /parsableerrors http://www.stoysnet.com/stn_mfg/link/soap.php?wsdl
WSDL: error WSDL1: Unable to import binding 'Product' from namespace 'http://www.stoysnet.com/stn_mfg/link/soap.php?wsdl'.
Unable to import operation 'exists'.
The datatype 'http://www.stoysnet.com/stn_mfg/link/soap.php?wsdl:IDType' is missing.
The WSDL is located:
http://www.stoysnet.com//stn_mfg/link/soap.php?wsdl
Any ideas?
Is there a script i can use to copy some particular sectors of my Harddisk?
I actually have two partitions say A and B, on my Harddisk. Both are of same sizes. What i want is to run a program which starts copying data from the starting sector of A to the starting sector of B until the end sector of A is copied to the end sector of B.
Looking for possible solutions...
Thanks a lot
I'm mainly a Python programmer, and it is often described as being "executable pseudo-code". I have used a little bit of AppleScript, which seems to be the most English-like programming language I have ever seen, because almost operators can be words, and it lets you use "the" anywhere (for example, this stupid example I just came up with:
firstnumber = 1
secondnumber = 2
if the firstnumber is equal to the secondnumber then
set the sum to 5
end if
is a valid AppleScript program. Are there any programming languages that are even more English-like than these?
Your code is of course checked into a repository somewhere, but where do you keep your working copy/copies? C:\Program Files isn't right, as it's for installed packages. My Documents somehow doesn't seem right, either—a My Code folder next to My Music and My Pictures? Dumping in C:\ is messy, but seems to be "working" for other people in my office.
I have a C program which has a function call that is defined in windows.h (which I have included), however, when I try and compile it with gcc, I get the error:
warning: implicit declaration of function `LockWorkStation'
I looked at the MSDN documentation and I see that this function is the User32 library file, and I was wondering how I would go about linking that to my file.
Related Question
My code doesn't release a file handle even after I call dispose to an initialized OleDbException. Is there a way to explicitly force the program to release a file handle?
What is the best way to fill a template file with variables, which are collected from a Windows Form or Web Page. I want to create a wizard program that collects some data from user, for instance, reportname, reporttype, etc. and I need to create then some xml files (templates) with these variables inserted.