Archive for the ‘.NET’ Tag
GridView Paging in ASP.NET 2.0
I am posting this on a well covered topic, because the examples I saw online were stupidly complex for this simple task. Now, I don’t mean to say that this is the most efficient method, but for smaller sets of data (we have less than 1000 records returned from this query) it is fast and easy.
Obviously, make sure you have the GridView set to allow paging. You will need to add an event handler for the GridViewPageIndexChanging (Not “Changed”). There is a private property for the class, ds which is a custom DataSet we have in our application. Any DataSet or DataTable (binding source?) will (should) work.
protected void gvUsers_PageIndexChanging(object sender,
GridViewPageEventArgs e)
{
DataTable dt = ds.GetUsers;
gvUsers.DataSource = dt;
gvUsers.PageIndex = e.NewPageIndex;
gvUsers .DataSource = dt;
gvUsers .DataBind();
}
Where are the other Software Jedi?
This is something that is going on two years old now, but it pops into my mind every so often. How come we haven’t heard about any Mac or Linux software Jedi? Does anybody remember the Original Software Jedi and is “App a day” project? I do. I still use some of those utilities from time to time. I think my favorite is the quick kill applications.
It seems to me that nobody has wanted to step up to the plate to try and match his feat in the non-Windows world. I certainly don’t think I would be able to find the time to do it myself, so perhaps that is an issue? There has to be somebody out in the ‘verse whom is up to the task. Who knows though. I would love to see something like this go on for the Mac and Linux world. A lot of very useful stuff comes out of it and there is lots to learn. I admit that I could stand to learn some *nix and Mac coding tricks.
If I am just off my rocker, and somebody is doing this (although I find it hard to believe that I would have missed it. I mean, hell, somebody would have submitted it to digg, right?) please share with me.
WinZip vs 7zip: First round – Misc Textual Documents
So, I was a lot closer to having this “mostly” working than I thought. After some trial and error with 7zips command line arguments I got a few good test runs in. I need to work with some different data to further confirm, but so far, it seems that 7zip is pure win!
See the text results below:
Starting WinZip…
WinZip finished… reporting…
Start Ticks: 633616615839494087
End ticks: 633616615845744327
Time to completion (ticks): 6250240
Time to completion (ms): 625.024
Starting 7Zip…
7Zip finished… reporting…
Start Ticks: 633616615846681863
End ticks: 633616615859338599
Time to completion (ticks): 12656736
Time to completion (ms): 1265.6736
Press esc or enter key too continue…
Starting 7Zip…
7Zip finished… reporting…
Start Ticks: 633616617982545127
End ticks: 633616618061454407
Time to completion (ticks): 78909280
Time to completion (ms): 7890.928
a 7zip with max compression?
Starting 7Zip…
7Zip finished… reporting…
Start Ticks: 633616621970019726
End ticks: 633616622006270886
Time to completion (ticks): 36251160
Time to completion (ms): 3625.116
Testing Windows file Compression Utilities
So, after recalling a debate about which file compression utility was the best (WinRar vs 7zip, I think it was) I have decided to test this in the most accurate way I can think of. I am going to write an application that will run WinZip, WinRar, and 7zip on the same set of files, with the same settings (if possible, I haven’t looked at WinRar yet, but WinZip’s CLI is pretty sparse).
A few pages I found for reference:
- http://www.memecode.com/docs/winzip.html
- http://alonesworld.blogspot.com/2007/10/how-to-use-7-zip-on-command-line-prompt.html
- http://www.respower.com/page_tutorial_unrar
It seems that if I use the same files, run each from the command line through a .NET application and time it from start to finish, I think we can get some pretty accurate results. Check back in a little while and we’ll see what I come up with.
Leave a Comment
Leave a Comment
Leave a Comment