|
+5 for the assumption of guilt, which doesn't waste the time it would take to examine the facts, or require ridiculous ceremonies like trial-by-jury, or absurd philosophies like "presumption of innocence."
best, Bill
"The first principle is that you must not fool yourself, and you are the easiest person to fool." Richard Feynman
|
|
|
|
|
So, Ashish-ji, given that your own Skype, when on-line, can show you the status of other Skype users you have added to your contacts: whether they are on-line, have call-forwarding on, etc.
And, you also have ability to send SMS messages from Skype (although this is something I haven't tried yet, and am not familiar with exactly what notifications, if any, are produced at the receiving end).
What is your reason for wanting the ability to (I assume) make some remote machine on-line on Skype ?
Is this on a private network, or across the internet in general ?
thanks, Bill
"The first principle is that you must not fool yourself, and you are the easiest person to fool." Richard Feynman
|
|
|
|
|
hey guys how can i know that the given file path is permissioned or not ?PlZ reply
modified 9-Feb-12 4:30am.
|
|
|
|
|
See DirectorySecurity and FileSystemAccessRule
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
|
Make use of the FileIOPermissions[^] class.
FileIOPermission writePermission = new FileIOPermission(FileIOPermissionAccess.Write, filename);
if(!SecurityManager.IsGranted(writePermission))
{
}
|
|
|
|
|
The easiest way is to try and create a temporary file in it. If it fails, you don't have permissions. It's FAR easier than trying to parse the ACL for a folder chain.
|
|
|
|
|
Greetings,
i am using Visual studio, C# reporting with windows reportviewer control, which grab reports from *.rdlc file. When i start my program it shows all records accuratelly, but when i add some records by means of text boxes and re-open the form it does'nt shows new values.
When i stop the solution and again compile and run the application then the new entries also there.
Suggest a method how to re-bind or re-fill datasource or table adopter.
Best Regards
|
|
|
|
|
how to make a table 20 to 50 to a dial member other person
|
|
|
|
|
Your question is just too unclear.
If you want to use Hindi, then go to the GIT and try posting the same question in that language.
|
|
|
|
|
|
Done. Thanks. My 5 for the suggestion.
|
|
|
|
|
Further to my answer, post your question over here[^].
|
|
|
|
|
Anyone know if/how I can get the CPU Serial Number in C# 4.5 under Windows 8?
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
Why would you want to? Everyone turns it off.
In fact, it's normally turned off by default and todays processors don't even implement it anymore because of privacy concerns.
|
|
|
|
|
|
The problem with using that is if the CPU ID is turned off, the field will be blank or say something generic. Manufacturers are not required to have providers fill in WMI objects.
Besides, Only a couple of manufacturers implemented CPU ID and AMD was NOT one of them.
|
|
|
|
|
As far as I know, Win32 is not available in Metro. You have to use WinRT.
What I need is a machine-specific unique Id.
Everything makes sense in someone's mind
|
|
|
|
|
There's no such thing in a single value. You'll have to build a value taking data from various parts of the machine and registry. Such as getting a hard drive serial number, maybe a CD/DVD drive serial number, chassis serial number, machine SID, ... If any of these values are missing, you still have other things that you can get. You combine all of this stuff together using some algorithm or scheme and you end up building what amounts to be a pretty unique identifier.
|
|
|
|
|
Ok, so...
1) Whatever sceheme I use cannot rely on removable devices.
2) Any examples of doing this in C# through WinRT?
Everything makes sense in someone's mind
|
|
|
|
|
WinRT?? Nope. Too new.
Can I share the example I have? Nope, 'cause it doesn't belong to me.
|
|
|
|
|
I am trying to use a regex expression to replace all of the LF end of line chars in a file with CRLF. I noticed that for some reason that when the LF is replaced with CRLF that the last char in the line is cut off. Is there something wrong with my syntax? For this particular file, all of the lines end with ! which is used as a segment delimeter. Thanks in advance for your help!
try
{
string data = null;
using (StreamReader srFileName = new StreamReader(FileName))
{
data = srFileName.ReadToEnd();
data = Regex.Replace(data, "[^\r]\n", "\r\n");
}
using (StreamWriter swFileName = new StreamWriter(FileName))
{
swFileName.Write(data);
}
}
|
|
|
|
|
you asked: Why is my regex cutting off last char when doing replace? Short answer: because that's what you asked it to do.
Longer (and more helpful) answer: Your Regex.Replace says "replace [any non-return char][linefeed] by [return][linefeed]", so of course it's eating up the character before the newline. What you need to do is a capture of the character so you can include it in the replacement expression.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
KimberlyKetchum wrote: when the LF is replaced with CRLF that the last char in the line is cut off
That is more or less what you ordered, as "[^\r]\n" represents a single character that isn't \r, followed by \n , so assuming your input does not have any \r, then you are replacing each last char on a line by a \r.
A better approach would be a double replace:
- first replace \r\n by \n
- then replace \n by \r\n
The first step is a safety precaution in case the file already has \r\n somewhere.
BTW: why are you using a stream and its ReadToEnd method, that just doesn't make sense. Either you want a streaming operation (which would make much sense here), or you want all the text at once, and then File.ReadAllText() would be the obvious way.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
The simple solution is:
data = Regex.Replace(data, "\r?\n", "\r\n");
The question mark means that the \r need not be present, but if it is, it is included in the match.
|
|
|
|