Click here to Skip to main content
14,933,641 members

Comments by L Viljoen (Top 29 by date)

L Viljoen 14-Dec-15 8:27am View
   
Reason for my vote of 1 \n Bad practice, use properties
L Viljoen 23-Jan-13 2:38am View
   
yes but that wont prevent the device from being unplugged and used in a diferent pc.

Basically what it boild down to is we want only our software to be capable of using the device, I am checking with securitech if they may not have a solution for us.
L Viljoen 22-Jan-13 9:30am View
   
My Device is a digital persona, Good solution but i am afriad it wont suit my needs I need a more out of the box solution becuase I need to roll this out to thousands of devices.
L Viljoen 2-Jan-13 0:14am View
   
I looked at the error, can you please show me the format of your text file becuase something tells me its not comma dlimited or place a line

if(line.Length > 3){
string[] dataBreakdown = System.Text.RegularExpressions.Regex.Split(line,","); //seperating the comma delimited data Console.WriteLine("ID:"+dataBreakdown[0]+" Full Name: "+dataBreakdown[1] +" Tel: "+dataBreakdown[2];
}
after the foreach string
L Viljoen 31-Dec-12 7:58am View
   
Ok lets say in your text file you have the following file in "c:\myfile.txt":
1, John Smith,054 654 1234
2, Jane Smith,054 654 1235
3, Andrew Smith, 054 654 1236

This is comma delimited data in the form: id, fullname, phone number

now you wish to break it down so in C# you go
string filename = @"C:\myfile.txt";
string[] fileLines = System.IO.File.ReadAllLines(filename);
foreach(string line in fileLines){
string[] dataBreakdown = System.Text.RegularExpressions.Regex.Split(line,","); //seperating the comma delimited data
Console.WriteLine("ID:"+dataBreakdown[0]+" Full Name: "+dataBreakdown[1] +" Tel: "+dataBreakdown[2];
}
L Viljoen 31-Dec-12 4:45am View
   
Heres what you can do is , if you have 4 lines per student. then I suggest you can use the Readall lines command

string[] lines = System.IO.File.ReadAllLines("Filepath");
if(lines.count != 0){ //avoid zero devision error
int studentCount = lines.count /4
}

but I would recommadn instead of having diferent lines per block of info is creating comma delimited information

firstname, surname, telephone ect

so you have 1 student per line, then you can simply use a
Regex.Split(line, ",")
to split the information and read the text like that , much xleaner and less prone to error.
L Viljoen 31-Dec-12 2:33am View
   
Also keep in mind that 32 bit processes are limited, so 64 bit would be needed. Its not so much a hardware issue as it is a infrastructure issue, you see the garbage collector in C# starts to take strain when the memory runs up to huge amounts
L Viljoen 1-Oct-12 6:23am View
   
u welcome
L Viljoen 28-Sep-12 6:46am View
   
If you want to do it purely out of html may i suggest the following then
http://www.longtailvideo.com/html5/hls

I have never done this before but from when I read it suggest its a way of steaming live video using HTML5

hope this helps
L Viljoen 20-Sep-12 2:34am View
   
The most helpfull answer would be one that tells me for instance.

"that my understanding of the public private key distribution is incomplete, and that i should do the following..."

Not saying teh answer isnt helpfull but a nushell explanation would recieve full marks :)
L Viljoen 19-Sep-12 3:57am View
   
having read the article , and having skimmed over the comments i can honestly say I would have a better chance going straight to the Question section that waiting for a handfull of people to hopefully give me a usefull answer. But thx for the wiki link.
L Viljoen 3-Sep-12 6:23am View
   
What you are currently doing poses as a massive security risk as the username and password is being stored in clear text on a cookie.

What i recommend is generating a user id (GUID) and encrypting it in order to automatically log a user in instead of saveing the login details on the client pc., also what you are doing is currently begin done automatically by most mainstream browsers.
L Viljoen 24-Aug-12 12:07pm View
   
Well assumption is the mother of all "Unhanded exception occurred".
L Viljoen 24-Aug-12 11:57am View
   
Yes but don't you think that should be the concern of the system creating the records to put in the list rather than the one extracting the values ?

All I am saying is validate the value once, than having to validate it countless times when its accessed.

I mean obviously we at the top of our fields but don't you think we have better topics to debate than bicker about pedantic subjects over a question that really just warrants a straight forward answer than I in-depth analysis and performance comparison chart (because this is what it usually goes down to)

We ppl in the science and technology field can be so stubborn sometimes :)
L Viljoen 24-Aug-12 10:56am View
   
That being the case wouldnt you think that the data in the dropdown would be invalid in the same sentence one could say never assume a string value would be convertable to an int. :)
L Viljoen 23-Aug-12 3:41am View
   
Heres my thought on the matter: Seeing as some people in code project did something similar they can tell me what works for them. For example books / google articles or so on.

Believe me I googled this quite extensively and 99% of the related results brings me to the door of someone using another 3rd party non commercial api , with vurtually no one writing from the ground up.

I wouldnt be asking on CP questions if I havent exhausted other options
L Viljoen 16-Aug-12 6:15am View
   
for a perfect answer I need the source of what is causing the issue , as in the whole document , I gave you answers based on what could be causing the issue in firefox, I dont have your document so I have to guess what the issue is.
L Viljoen 16-Aug-12 5:57am View
   
I wish to be able to log it , so that I can then take that query and parse it via a web service to a data warehouse.

I am aware that this might not work for huge datatypes but for my purposes it would be ideal, as i want to keep the data in the warehouse as upto date as possible
L Viljoen 16-Aug-12 5:28am View
   
sorry i should have been a bit more clear , I want to do it using a trigger so I can store the query on a table
L Viljoen 13-Aug-12 8:40am View
   
Sorry that link was deleted so i only have access to it

I updated the amin article waiting for approval check the zip file at the top labeled "updated easy soution"
L Viljoen 17-Apr-12 10:56am View
   
Seems to be a good explanation , going to investigate if i find this a valid solution i will accept as solution. thx.
L Viljoen 30-Nov-11 8:55am View
   
try catch is coding 101, but yes in future i will explain my problem better.

And no i don't ant my user control to handle all error on a page , as explained i only want to suppress errors on a user control individually.
L Viljoen 30-Nov-11 8:33am View
   
What I am attempting is a little bit more complex, this has to be generic for all unhandled exceptions, so if for instance a datasource countrol lost connection to a database. I also know about global error handling in gobal.asax , but still I am aiming for something more elegant.
L Viljoen 30-Nov-11 8:31am View
   
Yes we all know try catch ... and so on , what I am attempting is a little bit more complex, this has to be generic for all unhandled exceptions, so if for instance a datasource lost connection to a database.

I also know about global error handling in gobal.asax , but still I am aiming for something more elegant.
L Viljoen 25-May-11 8:59am View
   
Deleted
Reason for my vote of 5
Nice simple clean
L Viljoen 3-May-11 15:57pm View
   
Yes i thought about using DateTime , just one problem if you had more than 1 remote terminal directly connecting to the sql server.

Their time need to be in perfect sync to ensure that the order is maintained.

If terminal 1 writes to the database and then terminal 2 then terminal 1 again it should keep that order (If their clocks are out of sync they can and will differ so the auto assign should happen on SQL )


Long story short I need the longest possible data type that order is perfectly maintained as the record get entered.

I would like to run a compare when processing these records eg get all records where RecordID > lastRecordProcessed

Follow.
L Viljoen 3-May-11 15:50pm View
   
Because one record need to be processed before the other, one of the many reasons why one would request a exceedingly long data type that can be ordered.

No worries I am going to go with jeremy's solution
L Viljoen 3-May-11 11:12am View
   
I am aware of int and identity specification but I need something reeeeeaaaaaly big
L Viljoen 3-May-11 11:12am View
   
If you can point me to a data type that can hold the same amount of records as a Guid but that auto increments I would gladly accept that as the solution. I would like to use this because I need to record the last record processed on my program and then use a compare to get the records that still needs to be processed