« first day (1210 days earlier)      last day (2939 days later) » 

12:36 AM
@NETscape in general, I'd prefer an immutable approach
so the 2nd option would be better than the first (Run can be immutable)
but I'd even consider a different option than that, if possible
for example, if you make the "events" generating the stats IObservable, you can just do var run = new Run(eventsA.Sum(), eventsB.Sum(), eventsC.Sum()) or similar ;)
 
12:57 AM
Sounds interesting... how is it immutable then? Would values be updating in a private scope?
 
well, neither of those is completely immutable - its more than your code/types can stay immutable
observable.sum would be responsible for doin gthe accumulation at that point
oh, should be observable.Average() actually ;)
 
 
5 hours later…
6:34 AM
morning
 
 
1 hour later…
7:44 AM
hey Hey HEY!
Need a little Asp help here please!
So I have this myPage.aspx page, and I need to access a variable in the Global.aspx.cs file. How?
 
morning
 
Morning
Oh, it's the Global.asax.cs
@Rudi?
 
@Markus, try in c# room
 
Ye I know, but trying here first, the C# room is whack ;)
 
8:16 AM
morning
 
Morning Mr Franssu!
 
:) what's up ?
 
driven any Ferraris lately?
I took out the Porsche for a short ride yesterday
 
you have a Porsche ?
I've driven and bought a Yaris HSD oO
 
hehe haven't you followed any discussions with me and @Катерина? :)
 
8:19 AM
I didn't get that
what model ?
 
the best one :)
 
well... there's always the Carrera GT, the 918 etc
 
a 911 has more charm
 
how about the 904 then?
 
8:24 AM
I don't really know Porsches
or cars in general
 
but I like the design of cars before the 90's
 
yup
 
911 is the last porsche to have this kind of design isn't it
 
yes
 
8:27 AM
shit I have no coffee money for today :(
 
However, I'm a little interested in having a 996 turbo. and I think that now is a good time to buy them
they will probably not go very much cheeper
 
it's nice too :)
 
and it's a tad more modern than my car..
don't know how many turbos where made though
 
hopefully on saturday I'll have my Yaris :D
 
8:49 AM
hehe
noooo
 
why noooo ?
 
 
3 hours later…
11:33 AM
@Markus "Access a variable"? Is it static? Public? It's the same concept as any other C# app
 
ok, so I got the public static to work, thanks. Now one more question :)
this static variable, it's value is for one session?
so it won't spread to other users?
 
Nope, unfortunately it's going to be global for the life of your app for any user
If it needs to be just for one users' session, you could use the Session object itself
 
11:48 AM
wait.. so if I have a variable username, and user2 logs in after user1 (login sets the username variable), then user1 will see user2's username?
 
Yes
 
ok. Very good to know :)
 
There is a whole concept of ASP.NET Authentication though
ie. session based storage
You have to think of an ASP.NET app as, unlike a PHP app or something, a Windows app that is constantly running but presents its interface to many different users
 
mm
 
So the only thing you can rely on being different is anything cookie-based (ie. client side) that sets some form of state server side (normally ASP.NET Auth, or the Session context itself)
You can use HttpContext.Current.Session (I think) to store stuff per user, or per browser session specifically
 
11:50 AM
well... then I have a problem again...
maybe not... hold on...
 
12:24 PM
So where is the session initiated?
at least in the Application_BeginRequest it is null
 
There is a Session_Start() in there
If you haven't used Session so far, then yes it will be null as won't be created. If you were to use it in a controller or something it would create it - or by having a Session_Start method overridden it will create it also
 
hmm. I should probably take a course in asp.net
do you use asp.net MVC?
 
Yes
It's king!
WebForms make me want to die, last worked with them in 2008-9 I think and it was a very dark time
 
12:42 PM
:)
 
I fear ASP.NET MVC Core (or whatever the hell it's called now) will go almost the same way what with it's attribute-driven server side processing on existing HTML elements
I enjoyed Razor's separation and code generation through @Html.ActionLink( .. ) (as an example) rather than <a asp-action="whatever">whatever</a>
 
that is just gibberish to me :)
 
so no Катерина in sight?
has she even been here since her internship ended?
 
yes, once, I think
 
1:06 PM
Thrice
 
1:16 PM
A lot of interns do that :)
or full developers even
who come here.. ask questions.. then promptly leave even
I find it curious that it doesn't make them feel bad at all.. infact I bet it doesn't even cross their mind that they should be at least try to do it a bit differently
 
1:41 PM
Ofc not, people are sutdip
 
2:40 PM
What tha!!!
Chrome stores some kind of cache... how do I clear it?
oh kay.. probably had to close that page before cleared the cache...
 
Cltr+F5 clears the cache and refreshes the page
 
not entirely... don'r really know why. closed the tab, and reloaded it (after ctlr-F5) and it worked
 
2:59 PM
If anyone understands binding better I could use some help. I have the following binding: pastebin.com/mSPGM7x0. When user writes a string in the combobox the converter will create that category if it does not already exist. When new category is added to ModManager.Categories I call ListCollectionView.Refresh, but it seems to be too soon to call that since the groups don't update properly. If I change category of another item the first item will update it's group on the datagrid.
I tried invoking the ListCollectionView.Refresh with DispatcherPriority.Background, but that didn't change anything.
 
3:14 PM
ok well first off converters are usually meant to just do that, convert stuff
if your combo box is bound to a list collection view, and you add/remove items from the LCV, you should not have to call anything else to get the combobx to refresh
 
I changed refresh to the propertychange event of the Category and now it works.
I don't need to refresh combobox, I need to refresh groupings on datagrid
 
so the code snippet has nothing to do with the problem? lol
 
3:37 PM
We really need to stop solving XY problems
the real issue is with ModManager.Categories being wrong
anybody calling Refresh on a collection is doing it wrong
(That's for you FINDarkside in case there's any confusion)
LCV subscribes to INotifyCollectionChanged.. if you're not raising it or not even implementing it, that's the probelm
 
3:54 PM
I am implementing it but it's still not refreshing even though the event is raised
That's why i manually refreshed it when it was changed
But the problem is probably that it refreshes before the category of item is actually set
ConvertBack -> Add new category -> Refresh -> Convert
 
so i'm rdp'd into my work machine last night working on a .cs file in VS
my rdp session dies and won't let me back in
i come into work this morning, my computer won't wake up from sleep
i reboot, load vs, and my cs file now opens in notepad, a blank 13kb file
i open it with notepad+ and i see 13kb of NULNULNULNULNULNULNUL
 
@Julien Look for an autosave
 
i have a copy in tfs from a few hours before but lost some key work
where would ifind autosaves
 
User\Documents\Visual Studio 20xx\Backup Files
 
empty folders :(
 
4:04 PM
:(
 
cant you just use an attribute on your optional property to tell it not to serialize if its null
with json:
[JsonProperty( NullValueHandling = NullValueHandling.Ignore )]
i'm sure xml has something similar
 
4:23 PM
@FINDarkside that does make sense. I'd just avoid combobox altogether if possible and use explicit category add dialog if needed
it's one of those wpf controls that are best left alone and forgotten about
Julien: %temp% perhaps?
why do we keep getting people from asp.net world in here >.>
not even a courtesy apology for going so off topic.. "check dis pl0x, kthxbai"
2 messages moved to Trash can
Friend Enum EmailAddressType <-- who the hell came up with Friend as keyword >.<
(If i seem cranky.. it's because I'm in vb hell)
xxxDb.Open()
xxxDb.Close()
xxxDb.Dispose()

Exit Sub

ErrorHandler:
xxxDb.Dispose()  <-- real world code handles issues like that
(in 50k+ LoC that i've seen so far, this is the only place where they even bother to dispose.. everywhere else they hope for best)
(PS: Sorry rubber ducks.. you don't just help troubleshoot.. you're also helping vent!)
 
^ annoying
 
< annoyed
 
vent!!
you don't want the nukes to blow up do you :)
Johan: how are you binding to that key?
 
<Style x:Key="{x:Static propertyGrid:Keys.RootGridStyleKey}"
        TargetType="{x:Type Grid}">
    <Setter Property="propertyGrid:Grid.RowDefinitions" Value="{StaticResource RowDefinitions}" />
    <Setter Property="propertyGrid:Grid.ColumnDefinitions" Value="{StaticResource ColumnDefinitions}" />
</Style>
@Maverik using it as staticresource
 
4:34 PM
yea thus the edit ;)
rebuild didn't help i guess?
 
yep, kill an rebuild helps
still annoying
 
ok then.. that's at least expected behaviour ;)
 
:)
In an app I could live with it but really annoying if a lib causes apps to have that problem
 
anybody has any tip for me in navigating this turdpool of code?
 
but maybe it goes away if the lib uses a compiled binary
 
4:36 PM
I need to figure out where in the world this one treeview in form is getting populated from
 
@Maverik no using in vb?
 
but given the size of this spaghetti monster, i don't have the slightest clue about where to put a breakpoint
nah dispose isn't the issue right now
there's a tree view thats dynamically getting populated but I can't find in code where that's happening
 
winforms?
 
yea
vb6+winform
(i'm in vb.net but this is really vb6 recompiled)
 
I'm happy to say I have never done anything in winforms
Started programming long after it was dead and gone :)
 
4:38 PM
lucky you
 
i know
 
as i said yesterday, i'd prefer to slit my wrists open than wade through this mess
but everybody tells me thats me being a coward
so i'm trying to stay strong and try to make some sense
 
I don't envy you
or my condolences is probably more what I mean
 
take it like a challenge
 
yea thats what I'm doing but not sure how strong can i stay
but i just discovered something new
did you guys ever use VS's Schema Compare/Sync gem?
 
4:45 PM
what's that
 
Tools -> Sql Server -> Schema / Data Comparison
 
what's sql Oo
 
so the original Sqlserver 2005's schema was so ancient, I had patch it to make it work with EF
and i was thinking, once I'm done, i'll have to redo this to bring production db up-to-date
then it hit me.. somebody must have had this problem already and probably solved it too! .. turns out MS gives it out of box on Premium+ (and I'm guessing that's Professional+ now) edition of VS
 
:)
 
it can even help migrate with smart defaults O.O
as in, if you're migrating up to a nonnull column from null, it can give sensible default to make it work out of box
 
5:00 PM
Oh, vb6!
I'm in vb6 atm.
Yay.
 
T_T
 
5:14 PM
Just FYI Mav #region Voodoo became a thing :P
Like, on multiple occassions
 
5:46 PM
@RudiVisser xD
did you give credit :P
PS: Compare Data to sync dev/production back and forth really works.. I has tears of joy! it's been one of my pain points
 
#region There be dragons here. Do not meddle in the affairs of Dragons, for you are crunchy and taste good with ketchup!
^ favorite region text ever.
 
i did give him that sort of thing
his Voodoo region has this in it:
Jan 19 at 16:27, by Rudi Visser
/**
 *
 * To Rudi or anyone else, don't try to fix this.
 *
 * It's not nice, but COM is crap. Don't fix it, just leave it well alone, pretend it doesn't exist. If you must
 * touch it, TEST(!!!!!!) its interop with a COM client. Specifically FoxPro as COM marshals it to a FoxPro
 * array, which can't hold .NET objects (Employee).
 *
 * "Here be dragons"
 *
 **/
 
Also this gem from yesterday
// Oh God Oh God Oh God This is terrible
// No time to fix it!
// HACK - Woop!
// TODO - Make this make more sense
public class PayElementDescriptorAttribute : Attribute
 
Almost afraid to ask this question. To address a need for a datagrid with some dynamic columns and grouped headers for those columns, I'm using an ItemsControl for both the header and the cell template in a DataGridTemplateColumn, laid out horizontally. Each item in the ItemsControl is a dynamic column (or part of a group of items that make up one dynamic column).
 
do you really need a data grid at all
items control can have a header
 
5:57 PM
Maybe this approach is way off, but with what I have, I am trying to think of a way of making sure the width of the items in both the header and the cell match up. I'm thinking attached behaviors
@Julien, I was thinking no at first, but other aspects of the design make it a lot easier to use a datagrid
 
such as?
data grids just suck. i would put my efforts towards not using one
 
keyboard navigation, freezing a set of "normal" columns, ensuring row hight, handling scrolling and scroll bars
 
by keyboard navigation, do you mean cell selection?
or row movement up and down
 
I went down the path of using just ItemsControls at first.
both
 
yeah if you need cells you are screwed
 
6:00 PM
If you turn off most of the features of the standard datagrid, it's a lot easier to use as a layout tool.
 
you might be able to do it with binding, i dont know
bind the size of a column one way to VM
bind your header size to that value
 
Ya, I was able to do that actually, including being able to drag the column size like normal, but it's a bit of a mess to code up.
 
really? that is like 3 lines of code
 
Actually, I should say, to add another column
 
ok i guess if everything is dynamic it's more then 3 lines
 
6:02 PM
well, it means you have to add a column header and bind its width, add the cell template and bind its width, and create the property to bind to in either the code-behind or the VM.
It's totally do-able. I'm just trying to simplify it and reduce some redundancy
I was thinking of an attached property where you name the column header, then the property would take the name and you'd attach it to the cell. That would set the cell width to that of the header automatically.
attached property, or attached behavior. Whatever you want to call it.
Actually, just talking this out here has helped a lot.
 
I wonder if @JohanLarsson has something to offer.. I bet his magic toolbox has something already
 
What is the question, too busy to read the transcript
 
i was just writing that he's probably busy
 
What is the problem we are solving?
 
6:10 PM
so yea short concise accurate version of the problem please :)
 
OK, let me see if I can do that
@JohanLarsson, Two ItemsControls, laid out horizontally
I want the width of each item in the second ItemsControl to follow the width of its corresponding (by index) item in the first ItemsControl.
 
Interesting.. when you put it that way, Grid SharedColumnWidth could do that?
 
why do you have two itemscontrols?
And not one itemscontrol and a datatemplate showing two rows?
@Maverik yes probably after some fiddling
 
First ItemsControl is for the header of a DataGridTemplateColumn, second is for the cell
 
but you don't want to use a datagrid?
 
6:15 PM
I am using a datagrid, but the DataGridTemplateColumn in question is representing a dynamic list of columns.
And some other funky header grouping stuff.
AND some other funky additional header stuff
 
do you have a pic of what it looks like?
 
Well, here's a basic Excel-based wire frame, though it doesn't have everything: imgur.com/NhHqlvI
 
looks like a tricky beast to get right
 
Totally agree.
But I already have a PoC working.
I'm just trying to simplify it. Hence the question about the widths
 
so your itemscontrol in header is dealing with the main heading and subheading of column?
 
6:22 PM
Correct
 
Interesting, i'd be interested to see xaml template of this thing or better yet star a gist snippet of xaml if you feel like contributing a template :)
I haven't had to tackle this myself yet but I'm sure this sort of thing will cross our wpf desks at one point or another
 
I really don't mind doing that, but I don't want to put something up there that's just garbage, hacked together code
 
yea of course
especially for a gist.. it's a point of reference for future :)
 
Or a sample project on Github
 
This is probably the third time I've had to deal with this. The first time I wrote my own control from scratch (though that mainly had to do with the huge amount of data). The second time, I just said "F it" and said no to dynamic columns.
 
6:25 PM
i've done the F it approach in past
but i'd like to see it done properly
 
lol
The part I'm stuck at here is making it easy to define a template for the columns, where the logic for the widths is already there.
brb
 
Oh btw, LINQPad now supports EF7 in its latest beta (5.06.x)
@RudiVisser suppose this will be interesting for you
 
Cool, though I've had literally 2 hours exposure to EFCore1.0beta1rc1
 
oh they've finally renamed nuget?
i saw the announcements but as usual myget was lagging behind
 
Nah I doubt it, was EF7 at point in time I used it, just love the rename
 
6:40 PM
thats why i'm subscribed to MS Announcements repo
it's the only repo i actively track
^ that specifically deals with .NetCore rename progress
github.com/aspnet/Announcements <-- subscribe to this to know whats breaking where if you're on bleeding edge
 
Yep already on it
 
7:19 PM
"null Email Fantasy Report"
that was the subject on an e-mail, someone's losing their job
 
 
2 hours later…
9:02 PM
Oh wow, Chrome is utter crap at times
If it receives a HTTP 204, it just shows whatever was already on the screen
Doesn't bother giving any visible (without dev tool) indication that the request has succeeded, just keeps happily showing whatever was there
Just spent a good 15 minutes trying to debug what I thought was an issue
As it was still showing the previous Exception - so I added a test exception, sure enough I got that. Figured it might be deeper down, added a random exception at the deepest point of the code, got that. Removed it, still got the same error - that's when I realised
Damnit Chrome
Edge doesn't handle it much better, just endlessly spins
Like it hasn't stopped loading
IE shows "Blank Page" by redirecting to about:blank
 
mm i guess because browsers don't expect 204?
and I'm gonna head home..
g'night all
 
But c'mon it's not the most farfetched of status codes!
But yeah hometime for me also, g'night...
 
 
2 hours later…
11:08 PM
Hey all. Is there an event or something I can hook in to when an ItemsControl creates a child item? Or at lease when it's done creating them?
 
@BrandenBoucher Loaded fires...
 
XY problem. Does it need to create a child item? Can your view model create it and add it to the bounch collection?
 
@LynnCrumbling, tnx. I was thinking I wouldn't be able to do what I need to do from there, but it looks like I can.
 
the question is... are you doing it right?
 
11:23 PM
@Brendan what if you retemplate the datagrid and use something fancy for headers?
 
@JohanLarsson, was that for me?
 
oh, got the a and e switched.
 
you did? :)
 
No. Parents did...
lol
I actually got it working. Just needed to match up the width of items in the cell ItemsControl to the items in the header ItemsControl
 
11:30 PM
I have never done anything like that with datagrid but it feels worth a try
 
Right now it still feels... dirty. But as I move things more to the abstract and generic, it's starting to look and feel more elegant.
 
ok good
 
Right now, I have to make one of the constraint be that the dynamic columns need to be made up of an ItemsControl for the header and a separate ItemsControl for the cell, but I'm OK with that. Now I have two event handlers on the Loaded events for each
So next I want to see if I can move those out of the code behind
 

« first day (1210 days earlier)      last day (2939 days later) »