|
Store the image in the database along with the rest of the person's details. There are plenty of samples around that show how to do it.
BTW no one is going to download your source code and rework it for you.
Veni, vidi, abiit domum
|
|
|
|
|
1. Your post is against about every rule in the guideline. Please read them first. (first forum post on top)
2. Don't provide download links like that, we don't know you and don't trust strangers.
3. Don't do txt spch. They're is an entire dictionary at your disposal, use full sentences and full words. It is a token of respect for one another.
4. No one will fix things for you. We will help you with a specific problem so you can fix it yourself. If you need coding done for you there are other sites for that.
5. "god bless u" Suppose, for a brief moment, I believe in such an entity, why would he bless me and what gives you the power or the right to make that claim for said entity? (OK, here I'm joking, but keep "faith" related expressions out posts, unless it is in the soapbox)
Despite the replies you received so far, no one is "against" you, nor is it personal, just step in line with the forum's way of working and you 'll be just fine.
|
|
|
|
|
I want to run a command in remote computer command prompt and fetch command output of the remote computer and save the output in local system. i don't want to use WMI for this as wmi is not enabled in the remote computer.
|
|
|
|
|
|
i have already mentioned wmi is not an option.
|
|
|
|
|
|
If I were you, I'd use PsExec[^] to execute the commands.
|
|
|
|
|
can psexec work for machines not in domain.
|
|
|
|
|
Do you think of a tool similar to Java's Web Start used by e.g. Continuous Integration tools like Hudson and Jenkins?
Well, I do not know of such a component in the .Net world...
|
|
|
|
|
can i execute command in a windows box remotely over internet and get its output provided i have full details of credential required to connect to the remote machine. Through PSexec i am able excute command in remote machine in the LAN /intranet and get output in my local machine in a text file but will it be possible to get the same details if the remote machine is connected in Internet.
|
|
|
|
|
Assuming you have the credentials and legal approval then the pc must be directly connected to the internet, meaning it must have an ip directly on the internet, or have port forwarding enabled on the router it sits behind.
Normally you are not going to find pc's directly attached to the internet. Best practice is a firewall in between, which means you need to manually set up port forwarding at the pc's location.
|
|
|
|
|
Lets start with the basics first.
To execute a 'command' on a remote machine then the remote machine MUST have a server application running which will execute those commands. (Note that starting an application is also considered executing a command so you cannot expect to remotely start the application.)
And that server application MUST be remotely accessible.
That is an absolute. There is no other possibility.
There are many applications that can do this - including writing your own.
The FIRST step to implementing a solution is to determine what that server application will be. Because that will determine what the client application can do and what it can't do.
|
|
|
|
|
Hi I am just starting out using c# and I have followed a tutorial i think but i am getting errors
------------------------------------------------
namespace SkiTrip
{
Class Student
{
private string name;
private decimal totalPaid;
private bool canTravel;
//Here write the properties
public void setName (string newName)
{
name = newName;
}
public string getName ()
{
return name;
}
}
--------------------------------------------
Error 1 A namespace cannot directly contain members such as fields or methods
Error 2 x 4 Expected class, delegate, enum, interface, or struct
--------------------------------------------
help really appreciated
mark
|
|
|
|
|
c# is case-sensitive, so
Class is not the same as class . C# uses lower-case names for keywords, so the capitalized "Class" is not valid, you have to start it with "class".
You are also missing a } in the code you provided, it should be (in full):
namespace SkiTrip
{
class Student
{
private string name;
private decimal totalPaid;
private bool canTravel;
public void setName (string newName)
{
name = newName;
}
public string getName ()
{
return name;
}
}
}
|
|
|
|
|
Many thanks, I have been trying to sort this for hours, hopefully I wont make any more typo's
Mark
|
|
|
|
|
Use an Integrated Development Environment (IDE), the Express versions of Visual Studio are free!
|
|
|
|
|
Also do not use methods such as setName and getName , use the integrated C# set and get to access properties as described in this tutorial[^]. If you want to read a really good introduction to C# try .NET Book Zero[^].
Veni, vidi, abiit domum
|
|
|
|
|
I am looking for a working in C# that can convert English text to Arabic text before the text is passed to printer.
|
|
|
|
|
|
|
private void Form1_Load(object sender, EventArgs e)
{
DirectoryInfo di = new DirectoryInfo(path);
foreach (var movie in di.GetFiles())
{
foreach (var extension in extensionsForMovies)
{
if (movie.Extension.ToUpper() == extension)
{
List1.Add(movie.Name);
}
}
}
DateTime dt = DateTime.UtcNow;
string day = dt.Day.ToString(); if (dt.Day < 10) day = 0 + dt.Day.ToString();
string month = dt.Month.ToString(); if (dt.Month < 10) month = 0 + dt.Month.ToString();
string date = dt.Year.ToString() + month + day;
index = new FileInfo(" index" + List1.Count + " [" + date + "].pls");
label1.Text = List1.Count + " files/" + nrMovies() + " saved";
}
List<string> List1 = new List<string>();
List<string> List2 = new List<string>();
List<string> List3 = new List<string>();
private void button1Create_Click(object sender, EventArgs e)
{
bool isPLSfile = false;
DirectoryInfo di = new DirectoryInfo(path);
foreach (var movie in di.GetFiles())
{
if (movie.Extension.ToUpper() == ".PLS")
{
List2.Clear(); List3.Clear();
StreamReader sr074 = new StreamReader(movie.FullName);
while (!sr074.EndOfStream)
{
List2.Add(sr074.ReadLine() + "\r\n");
}
sr074.Close();
List2.RemoveAt(0);
List2.RemoveAt(0);
isPLSfile = true;
}
}
if (isPLSfile == false) { button0Default.PerformClick(); goto End; }
string llinelist1_ = "", llinelist2_ = "";
again:
for (int i = 0; i < List2.Count; i++)
{
for (int j = 0; j < List1.Count; j++)
{
llinelist1_ = List1[j];
llinelist2_ = List2[i];
if (llinelist2_.Contains(llinelist1_))
{
List3.Add(List1[j]);
List1.RemoveAt(j);
List2.RemoveAt(i);
goto again;
}
}
}
foreach (var List1_Line in List1)
{
List3.Insert(0, List1_Line);
}
List2.Clear();
foreach (var line in List3)
{
List2.Add(line);
}
FileInfo fi = new FileInfo(index.FullName);
fi.Delete();
StreamWriter sw = new StreamWriter(index.Name, false, Encoding.Unicode);
sw.Write("[playlist]\r\nNumberOfEntries=" + List3.Count + "\r\n");
string s4563 = "";
for (int i = 1; i < List2.Count + 1; i++)
{
s4563 = "File" + i + "=" + path + "\\" + List2[i - 1] + "\r\n";
"sw.Write(s4563);
}
sw.Close();
//--------------------------------------------------
//start software
label1.Text = List3.Count + " files/" + nrMovies() + " saved";
Process.Start(path + "
End:
List2.Clear(); List3.Clear();
}
Thanks
|
|
|
|
|
So where are you facing the problem?
|
|
|
|
|
I am thinking on my code as a structure - i want my code to make it more practical, usable, coder friendly, with good structure and architecture. Maybe this is the problem. The actual code is working fine- but when i have to change something, i must spend days to debug the sh*t out.
Thanks Abhinav.
|
|
|
|
|
Being frank here: that code is rather poor.
I'm not too surprised that if you change something, the rest of it starts to fall over - you don't seem to have any consistent structure or to use any good practices.
Don't call things "list1" and "list2" - name them after what they do, just as you do in the comments.
If you only want files which match an extension, then only retrieve file which match the extension:
string[] files = Directory.GetFiles(path, "*.PLS");
If you want all lines from a file, then just read them:
string[] lines = File.ReadAllLines(path);
You can then convert this to a list with the ToList method if you need a list.
And so on - try modularising this code so that you have a method doing one task, then call it from your click handler - that way, you can test the method in isolation and be sure it works.
I'm not at all sure what your code is doing at the moment, so I'm not that surprised that you have problems maintaining it - it looks like you have hacked and slashed it a bit to get it working, then hacked it again to fix that bug, then...all without sitting down and working out what you are trying to achieve and doing a design of some form which meets that aim first.
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
_Q12_ wrote: I work at this code from a month now, and still is full of bugs. Where? Your description in the comments section states what you want your application to do but gives no useful details of what the problems are.
Veni, vidi, abiit domum
|
|
|
|