« first day (51 days earlier)      last day (4901 days later) » 

jjj
8:40 AM
hey guys
is there a handle on closing page (method) vb.net?
or on leaving the page and loading an other page in the same masterPage?
@Lasse V. Karlsen ... help
@room .. help
@Zerotoinfinite ..help
help..help ...help
anybody
somebody
a proramming body
a programmer body
 
9:09 AM
I don't think pleading like that will help you
Are you talking about a javascript script to handle navigating away from the web page?
 
jjj
no vb
like | Handles Me.Load |
 
@Lasse How's your mercurial project coming along? You had a codeplex page right?
Did you extend the Repository class to include functions or did you reduce it to Execute(command)?
 
jjj
@Lasse V. Karlsen
 
@jjj Have you searched for anything?
 
jjj
ya
did find anything related
 
9:18 AM
@Patrick I did both
 
@jjj The entire life cycle is explained here: msdn.microsoft.com/en-us/library/ms178472.aspx and there's nothing related to "leaving the page". I'm not sure you can do it.
 
I rewrote to use command objects, then added methods to Repository for some common cases
so you can say:
repo.Commit("commit message");
 
@LasseVKarlsen Beautiful, let the user of the class decide :)
 
but that just internally constructs a CommitCommand, puts the message into the right property and calls the Execute method
yep
and I also added a fluent interface, which makes extensions seamlessly integrate into the syntax
so you can do:
repo.Execute(new CommitCommand()
    .WithMessage("your commit message")
    .WithYourExtension(false));
 
@LasseVKarlsen Sweet
 
9:20 AM
just add extension methods to the appropriate classes, and stuff the right command line options and arguments into a collection that is present in each
the project is here: mercurialnet.codeplex.com
 
thanks. bookmarking that one
 
if you navigate to the source on that page, and use the Browse function, check out the Examples directory
it shows various functions in small portions
I also have another project that I intend to use together with this one: difflib.codeplex.com
For producing collection diffs, including text file diffs
 
@LasseVKarlsen Cool, I never add example projects. It's the first step to TDD i guess :)
 
can someone help me with a C# problem involving SQL transactions
 
I try to do everything right for these projects
All public identifiers have xml documentation, I have unit-tests, I run FxCOP against the projects, I have examples, signed files, continuous build process
 
9:25 AM
@LasseVKarlsen Nice one. Can anyone contribute?
 
Sure, fork the project, do your changes and send me a pull-request
 
When i run this query in C#
thisCommand.CommandText = "SELECT "
+"db.name DBName, "
+"tl.request_session_id, "
+"wt.blocking_session_id, "
+"OBJECT_NAME(p.OBJECT_ID) BlockedObjectName, "
+"tl.resource_type, "
+"h1.TEXT AS RequestingText, "
+"h2.TEXT AS BlockingText, "
+"tl.request_mode "
+"FROM sys.dm_tran_locks AS tl "
+"INNER JOIN sys.databases db ON db.database_id = tl.resource_database_id "
+"INNER JOIN sys.dm_os_waiting_tasks AS wt ON tl.lock_owner_address = wt.resource_address "
+"INNER JOIN sys.partitions AS p ON p.hobt_id = tl.resource_associated_entity_id "
 
Or is it "open" as in anyone can download, but it's closed for edits
@LasseVKarlsen Alright
 
and use SQLDataReader to read the result
 
jjj
nothing
 
9:26 AM
At the moment closed for edits, but that's just how it is at the moment, could change in the future
 
i keep getting "Enumeration yields no result"
 
You sure it should return a result?
 
@LasseVKarlsen Well nice going so far. I'm actually looking in to making a website kind of like Kiln or Bitbucket and have some bug tracking on it as well. So far I guess using hg is easier to use as you can just redirect traffic from hg serve.. But your project could come in handy in that case :)
 
yea its supposed to return a result
 
You should definitely reuse the hgweb server (through IIS)
But yes, something to handle log output in order to get it into a different website
But handling the log is super-easy, you can output it as XML and it is very structured
 
9:35 AM
the log from hg?
 
yeah
hg log --style=XML --quiet
 
I never looked into it..
 
then you only get the log, as xml, no messages or nothing
 
cool, going to look into that, thanks
 
unless it produces an error of course, but you can use the exit code from hg.exe to figure out that, but all of that is wrapped up in my library
so you can do
var log = new Repository(@"c:\temp\repo").Log().ToArray();
That'll give you all the changesets as objects, all nicely bound together
I am working on handling the graph log, to get those nice graphical branchy log views, but not high on the priority-list at the moment
 
9:37 AM
:)
 
9:55 AM
Hi, in a WCF service I have a method which returns a List<PunchCard>, where PunchCard is a class. Say that method signature looks like List<PunchCard> GetPunchCards() {}. But in my client, after adding the web reference the method signature reads like PunchCard[] GetPunchCards(). Why?
 
because collections are serialized as arrays over WCF
 
@LasseVKarlsen so can we serialize it as a list somehow?
 
10:17 AM
No?
Why do you care what data structure it ends up as?
If you need it in a list on the client-side, just put it into a list
var list = GetPunchCards().ToList();
 
 
2 hours later…
12:35 PM
Please help me
0
Q: How to remove characters from a string using LINQ

Thomas AndersonI'm having a String like XQ74MNT8244A i nee to remove all the char from the string. so the output will be like 748244 How to do this? Is there any LINQ Approach for this? Please help me to do this

 
 
3 hours later…
3:35 PM
hello
 
Howdy
 
 
4 hours later…
7:37 PM
Is it possible to wait for the child process to exit?
1
A: Spawn processes, but only 5 at a time

Alex LEThis works (this will be easier with C# 5.0 async await): Queue<string> queue = new Queue<string>(); queue.Enqueue("1.mp3"); queue.Enqueue("2.mp3"); queue.Enqueue("3.mp3"); ... queue.Enqueue("10000.mp3"); int runningProcesses = 0; const int MaxRunningProcesses = 5; object syncLock =...

 
8:15 PM
@McKembley: BeginInvoke returns an IAsyncResult, which has an AsyncWaitHandle property that you can use to wait for the operation
But you should be using the Task class anyway instead of BeginInvoke ing on a delegate
 
 
1 hour later…
9:24 PM
Hey, I've created a table in SQL Server that has two foreign keys pointing to the same primary key in another table.
When I drag and drop it into the .dbml file in my project, the relationship isn't mapped out.
That is to say, I don't get the usual arrows connecting these tables together.
Does anyone have any advice on what I should look into? Maybe a checklist to make sure I did things right or something?
I'm not sure, but I was guessing that it is a problem relating to having two foreign keys pointing to the same primary key because when I try to add the relationship myself I get the error "The same property is listed more than once: UserId"
 
You might try editing the xml directly.
 
Yeah, I should look at what it's generating. Thanks
 
 
3 hours later…
11:59 PM
Hi guys! I want to read the last line of a file continuosly (Im thinking of a thread, but no solution ive seen is thread-able)
 

« first day (51 days earlier)      last day (4901 days later) »