|
Kornfeld Eliyahu Peter wrote: SD-PARAM is build from PARAM-NAME and PARAM-VALUE . PARAM-NAME is the same as SD-ID ...
PARAM-VALUE build like
* any UTF-8
* the characters " , \ and ] must be escaped (by \ )
The regex for that is -
([^"\]\\]|(\\")|(\\])|\\{2})*
The idea was good,
but I managed to come up with a better solution:
(?<!\\)@|(?<!\\)\[|(?<!\\)\]|(?<!\\)"
Will produce a match whenever there is a string (@, [, ] or ") without a preceding \, which is more than sufficient for my use case.
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
It's nice - but I hope you know that
(?<!match) is an extension that will not work in everywhere (I think it works only in python/.NET word)...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
It will also work with Perl, and the expression is widely supported (At least my clever book says that).
What differs are the restrictions for the lookbehind characters, e.g. Perl and Phyton only allow fixed length strings to look after, and different restrictions are allowed by different languages.
The (?match is what differences them.
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
Marco Bertschi wrote: my clever book
What book?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
|
Care to recommend here?
Useful Reference Books[^]
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Added
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
Hello XSockets.NET,
I am newbie, I am installing XSocket by command: Install-Package XSockets (http://xsockets.net/docs/video-tutorials), It complete. But, I can not see CodeTemplate folder in project
(I am using Package Manager Console Host Version 2.8.50126.400, VS 2010 SP1).
Please help me, how to show CodeTemplate folder???
|
|
|
|
|
If it has successfully installed the package, left click on the project that you have installed it into. Select the Project menu and then Show all files... If the folder is shown in the project now, open it up and right click on the files in there - choose Include in project
|
|
|
|
|
I have developed a c# application and when I tried to install it I figured out that some users don't have framework installed on their computers and for some business constraints they can't install it.
Is there a tool to convert my c# application to native one to be able to work on clean machines with out installing framework ?
|
|
|
|
|
Native code? Why?? There's no point to it.
If you want to avoid the .NET Framework, you have to spend some big'ish money. The only compiler I know of is not free, called Salamander[^]. It costs about $1300 per developer using it and it hasn't been updated since 2007.
Warning: Linking in the .NET Framework is NOT supported will result is HUGE executables!
|
|
|
|
|
What? You don't like 500Mb .EXE files? Luddite!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
After a couple of herniated disks, I was told by my doctor that I can't do any heavy lifting. So I can't generate a 500MB executable anymore.
|
|
|
|
|
My doctor said the same thing so now I have to sit to urinate.
|
|
|
|
|
|
The basic .NET framework comes with Windows, and there is no business reason not to install the latest updates. Trying to convert a .NET application to native, would mean a complete rewrite in C++ possibly with MFC.
Veni, vidi, abiit domum
|
|
|
|
|
To add to Dave's answer, there is also this: http://spoon.net/studio?gclid=CJOjsY-mxrwCFYjLtAodoCIA8A[^] - but at $4800 per application, it's a tad expensive as well...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
If they have Windows the chances are that they will have a version of the .NET framework installed.
Lots of software uses the .NET framework nowadays, so it's really just a case of how long you can put off installing it if you have a WIndows machine rather than not installing it.
Generally the 'I don't want to install the .NET framework " crowd don't understand what the .NET framework is.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/aa326741%28v=vs.71%29.aspx[^]
//I WAS READING FROM THE ABOVE MICROSOFT LINK ABOUT CONVERTING //FROM BYTE TO TO DECIMAL IN C#, BUT I AM JUST NOT GETTING MY ////CODE TO WORK. I AM TRYING TO CONVERT AN ARRAY OF BYTES TO AN //ARRAY OF DECIMALS. THIS IS WHAT I AM DOING..PLEASE KINDLY SEE //BELOW.
<pre>using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Applica
{
class Program
{
static void Main(string[] args)
{
long Totbyte = 0;
string filePath = null;
DirectoryInfo da = new DirectoryInfo("C:\\Folder");
FileInfo[] Arr = da.GetFiles();
foreach (FileInfo ap in Arr)
{
Totbyte = ap.Length;
filePath = ap.FullName;
}
string temPath = Path.GetTempFileName();
byte[] data = new byte[Totbyte];
if (File.Exists(temPath))
{
data = File.ReadAllBytes(filePath);
File.WriteAllBytes(temPath, data);
}
decimal decVal;
int[] arry = new int[Totbyte];
for (int count = 0; count < data.Length; count++)
{
arry[count] = decimal.GetBits((data[count])decVal);
Console.WriteLine("Byte to Decimal = {0},,,,,, count = {1}", arry[count], count);
}
}
}
}
|
|
|
|
|
You don't have an array of decimals. You have an array of ints. Also, I'm pretty sure this was answered in the thread below, and the answer is much simpler than anything you've been trying to do.
|
|
|
|
|
I tried using an array of decimal and it still does not work. Also the question i ask this morning was about Bitconverter. There is no Bitconverter in this question. You keep saying you don't know what I am trying to do. I think it is pretty obvious that i am having trouble converting from byte to decimal. This is what I am trying to do.
|
|
|
|
|
computerpublic wrote: i am having trouble converting from byte to decimal. Ok, good. That's a pretty clear description. Here you go:
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Applica
{
class Program
{
static void Main(string[] args)
{
long Totbyte = 0;
string filePath = null;
DirectoryInfo da = new DirectoryInfo("C:\\Folder");
FileInfo[] Arr = da.GetFiles();
foreach (FileInfo ap in Arr)
{
Totbyte = ap.Length;
filePath = ap.FullName;
}
string temPath = Path.GetTempFileName();
byte[] data = new byte[Totbyte];
if (File.Exists(temPath))
{
data = File.ReadAllBytes(filePath);
File.WriteAllBytes(temPath, data);
}
decimal[] arry = new decimal[Totbyte];
for (int count = 0; count < data.Length; count++)
{
arry[count] = data[count];
Console.WriteLine("Byte to Decimal = {0},,,,,, count = {1}", arry[count], count);
}
}
}
}
That's what you meant, right?
|
|
|
|
|
Your answer worked very well. I think I was over complicating the problem. Anyway thank you very much for your help.
|
|
|
|
|
You are correct. I did ask the question improperly. I do have one final question:
In a file transfer OUT: Does LSB of the FIRST byte transfer out before MSB? Followed by the LSB of the SECOND byte, then the MSB? Followed by the LSB of the LAST byte , then the MSB?
In a file transfer work the same way when I file comes IN?
|
|
|
|
|
The bytes in a file are exactly what they are, the bits of those bytes are not mixed in weird ways.
|
|
|
|