|
valiovalio wrote: database=db.mdf;
I think that is 'Attach Database=db.mdf;'
|
|
|
|
|
You meant 'AttachDbFilename=db.mdf;'?
|
|
|
|
|
Shouldn't it be like this:
string c = "Data Source=(local);Initial Catalog=db.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";
HTH
|
|
|
|
|
I don`t think it`s a problem with connection string... I`m not able to connect no mathet what I write in that connection string...
|
|
|
|
|
Hi all,
I have a grayscale image (8-bit indexed). I want to operate pseudo coloring on it.
How should I do this. Can any one help me with source code or any resources?
Thanks in advance
Anindya Chatterjee
|
|
|
|
|
hi , i want to know if any one one have any idea about how to convert from char to binary in c# , and how to know the the size of the binary array after converting
|
|
|
|
|
Hi AbdallahZiad
When you say binary, what do you mean?
Do you want the char 'A' to be converted to an array of bytes
byte[] theA = new byte[] {0,1,0,0,0,0,0,1}; or what?
And what do you need it for?
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
yes , my man
char 'A' to be converted to an array of bytes
and i need it to write a program for "hamming code "
so plz help me.
-- modified at 7:38 Wednesday 12th April, 2006
|
|
|
|
|
or u , can tell about some resurces that i can use to reach my point.
plz
|
|
|
|
|
HEllo there!
So you need to convert the char 'A' into byte Array. Quite strange.
Try this line of code...
byte[] b = System.Text.UTF8Encoding.UTF8.GetBytes(new char[] { 'A' });
Actually it takes a char array and return respective byte array.
Hope it helps
regards
Mubashir
|
|
|
|
|
thx alot mubashir , and i want to ask u another question .
how can i get the size of this stream of byte after i convert the char "a" or after i convert any stream of character. :->
regards
abdallah
|
|
|
|
|
b.Length
---
b { font-weight: normal; }
|
|
|
|
|
Hi again Abdallah
I think I understand what you want to do - and I've created a utilityclass for you that will do this.
You can see it in action at: http://sweetsilence.dk/codeprojectprojects/CodeProjectSample_BinaryEncoding[^]
You can get the file here: http://sweetsilence.dk/codeprojectprojects/CodeProjectSample%5FBinaryEncoding/binaryencoder.zip[^]
And you can see the code here:
public class BinaryEncoder
{
public static int[] bitValues = new int[8]{128,64,32,16,8,4,2,1};
public static byte[] StringToBinary(string stringToEncode)
{
byte[] bytes = new byte[stringToEncode.Length * 8];
int byteOffset = 0;
int byteIndex = 0;
for(int charCounter = 0; charCounter< stringToEncode.Length; charCounter++)
{
byteOffset = charCounter*8;
for (int bitCounter = 0; bitCounter < 8; bitCounter++)
{
byteIndex = byteOffset + bitCounter;
if((stringToEncode[charCounter] & bitValues[bitCounter]) != 0)
bytes[byteIndex] = 1;
else
bytes[byteIndex] = 0;
}
}
return bytes;
}
}
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
thx alot , you give so much helpfull guide to cod the project that i gonna to write i hope i will help you in any thing that i can do........
thx
kind regards
abdallah
|
|
|
|
|
Hi Abdallah
I am very glad the code sample was of use to you!
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
Dear members
I need some help here to solve a problem , maybe i don't know if i have done the right thing
protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
Process p = Process.Start("C:\\Boot.ini");
}
this is a windows service and i have instaled it as the books says and it works fine and i see the notepad process in the task manager BUT i need it to show me the notepad to be visible to me, just to know that it is working
thanks a lot
Mohamed
|
|
|
|
|
You need to make sure your service is configured to 'allow service to interact with the desktop'
Michael
CP Blog [^] Development Blog [^]
-- modified at 7:57 Wednesday 12th April, 2006
|
|
|
|
|
Thanks a lot Mr/ Michael for ur concern
although all the forum laughed at me , but I don't care.
but here is the problem : i have a program on my server and i don't want to deploy it at the clients because it is a windows application and the application in my company is web application ; so my idea is : i will create a web service to call the windows service that will run on the server like Microsoft do when the asp.net launch it's application .
Is it a crazy idea ? or it is impossible?. If not can anyoine show me the way , also how to make the program to run and be visible to me on the server,when the client call the web service
thanks a lot for the help again
|
|
|
|
|
Everyone who posts a question "needs some help here" - please try to use descriptive subjects!
|
|
|
|
|
Perhaps disallowing certain words in the subject would be an idea... like please, problem, help, urgent...
---
b { font-weight: normal; }
|
|
|
|
|
We can dream.... you get my 5!!
|
|
|
|
|
I got a laugh out the "Immediately" a few posts up. That just screams "Please, ignore my post!"
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want use LDAP in C# get all user
Add, Edit, Delete Acount in LDAP
can u help me
|
|
|
|
|
I want Get all user , add , edit , delete on Winform
can u help me
|
|
|
|
|