|
File.ReadAllBytes. Getting those bytes into strings that you can then run a regex on, is another matter. I guess you need to look for sequences that look like a string. I think the whole thing is a disaster. I assume you're assuming that the string is not in a config file, seeing as you're trying to hack into an existing program.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i cant undrestand you plese help me... i must write this program till this evening isnt there any other way?
|
|
|
|
|
Why do you have to write it this evening ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i must deliver it to my boss. i am a programmer and its a piece of our projects
|
|
|
|
|
Your boss gave you one night to write something, but when it's explained to you, you can't understand the explanation ? Your boss is an idiot.
I've explained every possible way to do this that I can think of, in the plainest possible language. I don't know what else to say.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i can undrstand you but i want just to know is there any other way? you are right... i am sorry... thank you for your help my good friend anyway
|
|
|
|
|
Hey guys,
Is there any body that worked on archive? Right now I am working on small application, which does the archive and the code was written in vb.net. It copies the database and zip that file and send that zipped file to write a DVD. This application works fine for small file but its giving error when we have data like 5 GB its giving error as below
ICSharpCode.SharpZipLib.Zip.ZipException: Maximum entry size exceeded
If any body can help, it will be grate …….appreciate your time. Thank you………
|
|
|
|
|
You should create a multi part zip, not a single 5 gb file.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hey Christian Graus,
Thank you very much for ur reply. but, please can u tell me how can i use multi part zip. i have no clue about that. i have a 5 GB database i need to archive that.
Thank you for ur time.....
|
|
|
|
|
As Christian has said, do multi-part file and just have a way to be able to work with all the parts when unzipping.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Not sure whether to put this query into the database section or here, but here goes.
I have a SQL Server database with a table of contacts (about 130,000 records). Each contact is a member of a category (9 different categories). What i need to do is count how many contacts are in each category for output in my vb.net application.
I can think of 2 methods to do this (actually 3 but the third is a definate no), which would you recommend.
Method 1 : Use a Cursor in a SQL Server stored procedure to iterate through all the contacts keeping a count of contacts in each category.
Method 2 : Get the data from the database and do the processing in my application.
Which approach do you think would ofrer the best performance?
(In case you were wondering, the 3rd method involves calling a stored procedure 9 times, once for each category and doing the count)
|
|
|
|
|
Since option 1 mentions access to stored procedures, why not write a stored procedure to return the data in one call? If the categories exist in a table, then you should be able to join on that table.
And this should be in the database section...
Tim
|
|
|
|
|
It is relatively easy to do in sql, depending on your database structure. If you give a few more details of the database structure I am sure it will be easy to write a sql query - after all, its this type of thing sql was designed for.
Liqz wrote: Method 1 : Use a Cursor in a SQL Server stored procedure to iterate through all the contacts keeping a count of contacts in each category.
Slow. Only ever use cursors if you have process on a record by record basis
Liqz wrote: Method 2 : Get the data from the database and do the processing in my application.
Could do, but you are return large volumes of data which again, you would end up processing on a record by record basis.
If the data is held in a link table something like
contactid, categoryid
The query is
select categoryid, count(*) from links group by categoryid
or, if its a single column on the contacts table with different values
select categoryid, count(*) from contacts group by categoryid
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Don't do cursors, but rather go with stored procedures. You'll be better off performance-wise.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Ah OK, thanks for the help. My novice-ness is obviously showing through!
|
|
|
|
|
Can some tell me why this would not work, i try everything and i still won't work
If updating = "y" Then
Application.ScreenUpdating = True
Else
Sheets("graph").Select
Application.ScreenUpdating = False
End If
Sheets("data").Select
endrow = Worksheets("path").Range("c12").Value
startrow = Worksheets("path").Range("c11").Value
num_columns = 1
str_col_11 = startrow & ":"
name_column = ""
If toomany = False Then
Do
num_columns = num_columns + 1
Loop While Not IsEmpty(Worksheets("data").Rows(10).Cells(num_columns))
num_columns = num_columns - 1
startc = 1
endc = num_columns
Else
to_plot = Worksheets("path").Range("c18").Value
Select Case to_plot
Case "a"
startc = 1
endc = Worksheets("path").Range("C15").Value
Case "b"
startc = 91
endc = Worksheets("path").Range("C16").Value + 90
Case "c"
startc = 181
endc = Worksheets("path").Range("C17").Value + 180
End Select
End If
' On Error GoTo errs
j = 4
If Graph.OptionButton1.Value = True Then
xax = 1
ElseIf Graph.OptionButton2.Value = True Then
xax = 2 'what do you want plotted on the x-axis?
End If
startt = Timer
For i = startc To endc
Application.StatusBar = "**** (Charting " & startc & " to " & endc & ") " & Application.WorksheetFunction.Round(((i / endc) * 100), 0) & "% Complete Memory in Use: " & Application.WorksheetFunction.Round(Application.MemoryUsed / 1000000#, 0) & " MB ****"
name_column = Worksheets("data").Cells(10, i).Value
Call Sheet1.col_lookup(i, alpha) 'lookup column alpha reference
str_setcolumn = alpha
strSelCol = str_setcolumn & startrow & ":" & str_setcolumn
Range(strSelCol & endrow).Select
Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("data").Range(strSelCol & endrow), PlotBy _
:=xlColumns
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:=name_column
|
|
|
|
|
Hi!
Could you tell us what it's supposed to do? Then we might be able to give you some advice.
Thanks!
MrWolfy
|
|
|
|
|
It has already been mentioned that you should provide more details. What is supposed to happen? What is actually happening? Are there erros? If so give details.
You're more likely to get help that way.
|
|
|
|
|
What the program does is that it takes a raw data and graphs each column individually... my problem is that it graphs everything until it gets to the tenth column that is where the error occurs
|
|
|
|
|
Gentlemen thank you for your help i found the problem, and the program ran fine
|
|
|
|
|
Hi All!
You've all been soooo helpful so far, so I was wondering wheather you'd help me with something
else.
I Use a text editor called 'Notepad ++' for HTML Editing and such, and it's syntax highlighting
library 'SciLexer.dll' (Originally used in the popular scintilla editor) caught my attention.
It is provided free for use in applications so I tried adding the SciLexer to the toolbox (Silly Me).
It says it isn't a valid .NET Control so how would i go about (If possible) integrating it into my VB Application?
I think Notepad ++ was written in C++ so it may not be possible in VB.
I should point out i know next to Nothing about C++ : I can just about print a line to a console window.
Thanks!
MrWolfy
modified on Friday, June 27, 2008 11:09 AM
|
|
|
|
|
Hi Everybody!
I Just found a great control called ScintillaNET For use in Visual Studio 2005/2008, and it looks fantastic. There is only one problem...
I Can't get it to work.
The Editor Displays all right, but then it does not display line numbers, not highlight my code, anyone know what's wrong?
Thanks!
MrWolfy
|
|
|
|
|
MrWolfy wrote: ScintillaNET
Yeah, it's nice.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Okay, I'm a year late here but just in case...
Line numbers and folding: ScintillaNet.Margins.
If the margin width is zero, the line nums / fold marks (+/-) are hidden. Margins 0 & 1 do the lines, and margin2 handles the folding. Just set the width - about 40 for line nums and 14 for folding. They'll be there.
|
|
|
|
|
Hi!
I did work this out eventually, but thanks anyway! It's good to know that people out there are looking out for people who need help.
Thanks!
MrWolfy
|
|
|
|