|
|
Exelioindia wrote: I want to convert the below hexa decimal value into string
.ToString(formatSpecifier)
|
|
|
|
|
For goodness sake. You posted this question in another way just a couple of posts below. Please have the courtesy of responding on that thread and not starting a new one off just because you can't be bothered to think about the replies.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi all,
I have following problem. I have folloving classes
public class MyBase
{
public propA {get {return ...}}
...
}
public class MyExt: MyBase
{
public propB {get {return ...}}
...
}
than I have a list
public class listClass: List<mybase>
{
...
}
This list can be populated with MyBase or MyExt objects. What I want to do is setup databinding to DataGridView to see propB (if available).
Is it possible?
Thanks
Petr
|
|
|
|
|
Hi guys, im new here.. I've got a problem with a regular expression i am trying to make!
I want to match all '{' or '}' characters, that are <b>not</b> alone on a row.
There are, as always, an exception: there can be two brackets though, if there is one or less instructions between them.
### The following are examples that should not match with the regex:
<code>string myStr = new string { "Hi", "!" };
string myStr = new string {
"Hi", "!" };
int myProperty
{
get { return myInt; }
set { myInt = value; }
}</code>
### the following are examples that should match:
<code>public class myClass {
internal int MyMethod(int input){
public int myProperty { // <- this line
get { log(DateTime.Now); return myInt; } // <- this line too</code>
etc... Hopefully you get what I am trying to do ^^
Anyways, this is what i have got now
<code>(?m <!^\s*?)[{}])|(?:[{}](?!\s*?$)))</code>
which only matches the ones that are not alone on a row, please help me! ^^
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
|
|
|
|
|
I started trying to help you, but I'm still not exactly sure what you are trying to capture...
It appears that you have a class and you only want to capture certain parts of the class? Are you looking for all of the data between the { and } or just the location of each brace?
Hogan
|
|
|
|
|
The location of the braces that are not correctly placed according to my code standard
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
|
|
|
|
|
Hi
I needed to find a way to determine whether or not someone has started typing on the keyboard.
I found Console.KeyAvailable and so tried to have the following code running in it's own thread:
while (true)
{
while (Console.KeyAvailable == false) { };
isTyping = true;
Console.WriteLine("Key pressed!");
}
And then another thread that is constantly performing a Console.ReadLine (to read keyboard input) would reset the isTyping flag to false after a successful ReadLine.
But it appears that Console.KeyAvailable never returns true even when I type on the keyboard or even hold a key down. Is it possibly affected by any other actions occurring on the Console or by threading?
Or does anyone know any other way to determine if someone has started typing? The scenario is I'm using the console window as a chat client and I only want to display server messages if the client hasn't started typing since they last sent a message.
Thanks
Glen
|
|
|
|
|
Its out the top of my head, havnt tested it, but maybe Console.In.Peek() would do it for you?
it returns -1 if no character is avaible
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
|
|
|
|
|
Hi all,
I am trying to execute the below code.
s = (char)ulong.Parse("01040209000D0006040705000D0008020208000D0006010204", System.Globalization.NumberStyles.HexNumber);
While executing the above code i am getting below error:
Value was either too large or too small for a UInt64.
Plz some one suggest me how to solve this issue.
Know is Drop, Unknown is Ocean
|
|
|
|
|
Exelioindia wrote: Value was either too large or too small for a UInt64
The error says everything you want to know. Have you tried with a shorter number (shorter in number of decimal). Ulong has it's minimum value 0, of course, and it's maximum value 18446744073709551615. Your number is much much bigger than the maximum value of ulong
There are 10 kinds of people: those who understand binary and those who don't
|
|
|
|
|
|
hi all;
what i need to do is send a pdf as atachment in mail and before that i also need to secure it with a password , what i need to do is to pass data from memory stream to pdf and then apply password to it and then reconvert it to memory stream and then pass it as attachment
following is the code if u need to check ...
thanks!
byte[] bytes = lr.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);// here im converting the report to pdf format
MemoryStream s = new MemoryStream(bytes);// this puts the report data into the memory stream
s.Seek(0, SeekOrigin.Begin);
Document doc1 = new Document();
//doc1.Open();
PdfWriter p1= PdfWriter.GetInstance(doc1, new FileStream("Chap0101.pdf", FileMode.Create));
PdfWriter.GetInstance(doc1, s);
p1.SetEncryption(PdfWriter.STRENGTH128BITS, "admin", "admin", PdfWriter.AllowPrinting);
//doc1.Close();
Attachment a = new Attachment(s,"example.pdf");
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("kuruvilla.philip@rave-tech.com", "kuruvilla.philip@rave-tech.com", "A report for you!", "Here is a report for you");
message.Attachments.Add(a);
SmtpClient client = new SmtpClient("server");
client.Send(message);
|
|
|
|
|
moved to web development forum
-- modified at 10:50 Tuesday 16th October, 2007
|
|
|
|
|
But_Im_a_Lady wrote: Soz, dont really know if this is the correct forum or not
It's not...the ASP.NET forum is for web.
But_Im_a_Lady wrote: Trouble is I'm new to Javascript & dont really know where to start, have read plenty of examples on the Web but all of these are adding in at design time.
The script itself is written at design time, yes. You want to write the script at runtime?
There are 10 kinds of people: those who understand binary and those who don't
|
|
|
|
|
But_Im_a_Lady wrote: Trouble is I'm new to Javascript & dont really know where to start, have read plenty of examples on the Web but all of these are adding in at design time.
This would be done entirely in Javascript on the client side. The question should be posted in the Web Development forum.
|
|
|
|
|
Hy
I have 2 databases and one table for each of database. The tables have the same structure. One of them is populate and I want to copy the contain of this to the second table. I want to ask if this is possible with DTS.
thx
|
|
|
|
|
mihksoft wrote: I want to ask if this is possible with DTS.
Yes, better ask in the SQL messageboard though.
IMO you will be better off using a simple cross database INSERT/SELECT if they are running on the same instance (that said, copy/paste should work too from within VS).
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
Hi all ,
How can I generate typed dataset at runtime and add it to project?
Thanks in advance
|
|
|
|
|
System.Data.Design.TypedDataSetGenerator in System.Design.dll
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
Hi,
I parsed a CSV file and loaded in a dataset. All the columns got loaded in the dataset with extra empty cells. I need only the columns in the CSV file with values to be parsed and loaded in Dataset. Can any one help me out. I am using the following Code to parse
string ConStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Text;HDR=No;FMT=Delimited\\\"";
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(ConStr);
System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter("Select * from " + file, conn);
da.Fill(ds, "TextFile");
|
|
|
|
|
Search CodeProject for an article that shows you how to do this.
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
I searched CP but couldn't find anything. Can u plz get me any document regarding this.
|
|
|
|
|
IF you cant find , neither will I, try harder, I know it's there. Try Google!
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
My guess would be that you opened the csv file in excel and then saved the file which added a bunch of extra empty cells. I would suggest adding some code to your csv parsing program that checks for extra empty cells and excludes them.
Ben
|
|
|
|