« first day (1846 days earlier)      last day (3103 days later) » 

12:00 AM
There were issues of date comparison and because the basic date was at like noon, the less than or equals wasn't matching because the new date was midnight and the stored date was noon so I had to compare the .Date exactly without the hours in ther
fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu datetime
 
OK. Guess I forgot how to do this. Building a project template. How do I get this solution to compile when it's bitching about all the $variable$ replacements in my code?
 
 
1 hour later…
1:08 AM
hmm
that was maybe the weirdest interview question I've had
 
1:42 AM
@Codeman do go on
 
"given a list of buildings that make up a skyline that may overlap, calculate the total area covered by the buildings. Each Building has a "start", "end" and "height""
so a bunch of rectangles that can overlap
I was asked two geometry questions in that interview... blah
old German dude that didn't seem to like me
whatevs
 
1:56 AM
@Codeman are you trying to find a job in gamedev?
 
@torvin this was at a company that makes tools for utility companies
honestly, my Zillow and the one startup interviews have been the best
 
that's weird. why do they need geometry? maybe it's the only thing that german dude knows good enough.
 
"please write me a small webpage that does X", not "please do this thing that doesn't come close to resembling anything you've ever done or ever will do in your professional life"
trying to do a difficult interview problem
 
haha, so true
 
 
1 hour later…
3:25 AM
If you have a generic return type - like 'Task<IEnumerable>' what determines if you can return another generic type, related to the first. Like 'Task<List>. Even though List implements IEnumerable - it won't work. But what dictates that?
 
3:42 AM
ienumerable of what type?
 
Let's say string
But will that affect the answer?
Yeah - sorry - I see what you mean. Task<IEnumerable<string>> and Task<List<string>>
I know the compiler won't let me implicitly or explicitly convert between those, but I don't quite get why or how to make a generic where I can use inheritance in there somehow
 
flexible
like in college, you have a linked list
using generic allows to store any type of data
 
Yeah - so when I do 'MyType<T>' T is whatever class or type I give it when I create it
 
you can specify what type of T you allow
MyType<T> where T: class
 
Yeah - I don't remember all of them but I've seen that with class and struct or a specific class
But is there any way to allow T and anything that inherits from T?
I'm not sure if I'm asking this right, or maybe it jsut doesn't make sense to do what I'm trying
 
3:52 AM
yeah
5
A: C# generic type argument from child class, possible?

AniI wouldn't really recommend it, but you could use a C# version of the curiously recurring template pattern: class Parent<T> where T : Parent<T> { protected event Action<T> NewItem; } class Child : Parent<Child> { public Child() { NewItem += OnNewItem; } private voi...

 
Thank you!
I'll check that out
 
np
i think people don't recomend child type for generic
you can restrict the type of T by its constructor too
i forget the syntax but i think you can do: MyType<T> where T: new()
 
Cool - thanks again
 
ask @RyanTernier
he's better than me ;)
 
4:02 AM
i saw you helped someone with generic before?
 
What's the question? The answer is 42.
 
"But is there any way to allow T and anything that inherits from T?"
and "I don't quite get why or how to make a generic where I can use inheritance in there somehow"
 
public class foo<T>
where T : basetype
{
   public foo()
  {
      T bar = methodThatREturnsBaseTypeOrDerivedTypeofBaseType();
  }
}
 
can you do parameter ?
where T: class(string, string)?
 
why would you need to?
 
4:05 AM
i don't think it's possible
 
Classes dont' have parameters
 
right
duh
haha
 
public class foo<TVehicle, TGround, TPersonToHit>
Where T : VehicleBase
TGround : IGround
TPersonToHit : string
 
^
that one
 
that just defines the types though for the generics, locks it down
 
4:07 AM
yeah
 
Foo<VanType, GroundType, string> foo = new Foo()<VanType, GroundType, string>;
Foo<CarType, WaterType, string> foo = new...
 
thanks a lot for examples :D
 
:)
ping me if you need anything else
 
sure will, thanks again
 
4:48 AM
Thanks to both of you
 
 
3 hours later…
7:25 AM
hello people
 
Hello all
i want to make left panel in windows form same as toolbox in visual studio 2010
any help or link on how to create this
 
@MuneemHabib 1. Use a third-party control library that already did a lot of the work - and there's a LOT of work for custom UI controls with that level of functionality. See here: stackoverflow.com/questions/5684069/…
2. Switch to WPF, and find a third-party control library for that. People! Stop! Using! WinForms!
There are also various CodeProject projects that aim to give you Toolbox-like functionality, but being CodeProject, they're probably in varying levels of completeness. google.co.il/…
 
7:50 AM
@AvnerShahar-Kashtan i want mouse pointer functionality like if mouse clicks on toolbos then it s opened then we can also pin it and then when mouse moves out toolbox panel is closed
 
i would gladly switch to wpf if I could :/
 
8:03 AM
My hunch is that docking controls are either custom to visual studio, or part of MFC
It's still a mixture of techs I think?
There's definitely wpf in there but it doesn't feel like a wpf application (I.e. it's not badly rendered and slow ;))
Ok, it is slow. But a different feeling of slow
 
@MuneemHabib Start with the big component vendors - Telerik, Infragistics, DevExpress. They're pricey and often clunky to use, but there are hundreds of man-years put into development and testing, which are crucial for UI controls.
For instance:
 
8:25 AM
morning
does someone know of a way to get the real background color of a control? Meaning, if the control itself has no background or a transparent background, how would I get the real background color that is displayed?
 
Traverse the parents in the visual tree and see if it is displayed at x/y?
 
how would I do that in Binding?
I'm currently just looking at the immediate ancestor (level 1)
 
You can't do that in a binding.
It's manual traversing, and tedious, and I wonder why you need this
 
because I need to set the appropriate foreground color of a textblock
and those are usually transparent and used in all kinds of weird places (listviewitems being one of them)
I thought about using a trigger on the foreground property that would just set a new binding, but I'd to somehow have to figure out the new ancestor level
wait...
I wonder if I could just set a binding on FallbackValue
it's an object so that should work
 
hmmm apparently it's not possible. FallbackValue doesn't make use of a Binding...but there is something called PriorityBinding
 
9:23 AM
and it works
finally
 
@SteffenWinkler Never really tried using them. But it allows you to list several binding statements and it evaluates them in order until one works, right?
Too bad the syntax is so cumbersome.
 
@AvnerShahar-Kashtan yes, correct.
The only thing you've to keep in mind is that nullis considered a successfull binding
so, if you don't want that, use a Converter that returns DependencyProperty.UnsetValue if the binding source returns null
also not sure what you mean about the syntax. It's pretty straight forward
C# example:
var blckStyle = new Style(typeof(TextBlock));
				var blckPrioBinding = new PriorityBinding();
				blckPrioBinding.Bindings.Add(new Binding("Background.Color")
				{
					RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(Control), 1),
					Converter = new Endian.WPFComponents.FontColorCalc()
				});

				blckPrioBinding.Bindings.Add(new Binding("Background.Color")
				{
					RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(Control), 2),
					Converter = new Endian.WPFComponents.FontColorCalc()
 
9:36 AM
@SteffenWinkler I never set bindings in C#, only in XAML, but this C# is even more cumbersome than the XAML, which is already too verbose. :)
 
how is that cumbersome?
and in XAML it's just one more layer
so instead of just writing your <binding> tag you write a <PriorityBinding> first and inside of it you write your bindings
if you think that is cumbersome I'm not sure what kind of work you usually do o_0
 
The default binding markup extension that lets you specify the binding expression in a single XAML property is fine. But if you need something more, you have to split it into sub-elements, which usually take up 4-5 lines for the simplest things.
<Control Content="{Binding MyValue}"/> = simple.
 
Hello guys
 
<Control>
  <Control.Content>
    <PriorityBinding>
       <Binding Path="MyValue1" />
       <Binding Path="MyValue2" />
    </PriorityBinding>
  </Control.Content>
</Control> - less simple.
 
What I should take note to select the appropriate framework for a C# project WinForm ?
 
9:44 AM
@AvnerShahar-Kashtan ohhh I never use/used those. To me it's the same as those two-line if statements
 
@gtzinos don't use WinForms :)
 
@Squiggle why not ?
@Squiggle you prefer more java swing from c# ?
 
@gtzinos why use a legacy technology like Windows Forms when you can use WPF?
 
@Squiggle i dont know WPF
 
@Squiggle because WinForms is less stubborn?
 
9:47 AM
it's... urgh.
 
<div <% if (!string.IsNullOrEmpty(x))%> <%{ "class='employee'"; }%>></div>

What am I doing wrong? :o
 
it may look ugly, but it get's the job done. And I don't have to follow some weird paradigm to make it work
 
@Squiggle Java swing (JFrame) Or WinForms ?
 
@gtzinos you're asking about Java in a C# room?
 
@Squiggle rumors have it that you can interact with Java stuff from C# world. shudders
 
9:48 AM
@Squiggle Where i can ask about java + c# ?
 
why do you want to use Java when you've C#?
 
VS is unresponsive stuck building, what process do I need to kill?
 
@SteffenWinkler Cause you can make application Cross - Platform without move your hand
 
I killed all msbuilds
 
@gtzinos hehe it's fine. The answer you'll get anywhere would be "Use whatever you're most comfortable with, with strong consideration given to the constraints of your business"
 
9:50 AM
@gtzinos I can do the same with XWT, eto.forms, WinForms, ASP.NET, HTML5...
 
@gtzinos what are your requirements? You need to make a cross-platform app? What is it going to do?
 
@SteffenWinkler You can run a project normally for every platform with these frameworks ?
 
@gtzinos yes
 
@Squiggle My project will be only for windows. I just ask @SteffenWinkler for these frameworks
@SteffenWinkler And linux ?
 
@gtzinos XWT and eto.forms and ASP.NET are mono-compatible
(with ASP.NET you sometimes need a bit of tinkering to get it running with nginx or something similiar)
 
9:52 AM
@SteffenWinkler Mono project is not another java. Have some problems
 
mono is a .NET implementation. It works on Linuxoid systems, including Android. And it does work on Mac OS X and Windows
HTML5...well, it's HTML5 ;)
was more of a 'use a webbrowser to display stuff'
 
@SteffenWinkler At this point, HTML5 is comparable to the .NET framework it terms of scope. It's a huge set of APIs covering everything from display to network communications to database storag.e
It's just that instead of there being different JVM implementations (Oracle, IBM, etc) or different .NET implementations (Microsoft, Mono, corefx), you have the main browsers developing the implementations.
I wish R# would let me mark a block of code and extract it to a lambda delegate automatically.
Not that it's a lot of work, but it's nice to automate.
Oh, it does!
Kinda.
 
user1804599
@gtzinos on Stack Overflow
 
It let me extract what was already a lambda into a Delegate variable.
 
10:11 AM
Guys on (Windows XP Service Pack 3) i saw on control panel this installed framework (Net framework 4 client profile). So if i need to create one .net app i need at least framework 4 or 3.5 ?
 
Any friendly soul out there that could help me with a C# Form conatining ID's?
Ah, nvm actually.
 
@gtzinos Stop developing for Windows XP
 
@RoelvanUden I stopped but i just need to know how this works
 
Uhm, so what's the question? Certain OS's have certain .NET versions pre-installed
Don't want a .NET install and targeting Vista/7? Release a .NET 3.0 build
But then those that have 4.0 (e.g. 8 and 10) need to install 3.x
Vice versa, if you target 4.x and want Vista/7 to run it, they need to install .NET 4.x
Long story short; don't worry about it. It's mainly automatic anyway
 
@RoelvanUden I need some brain cells after what you say
 
10:22 AM
Yeah that's fine and all, BUT
If you compile for .NET3.x and try to run it with .NET4.x, IT WONT WORK
Even though, theoretically according to that diagram, that SHOULD work.
But it doesn't.
 
@RoelvanUden Thank you really !!!
 
@RoelvanUden Yeah, that chart is a bit misleading. 3.0 is built on top of 2.0, but 4.0 replaces 2.0.
 
10:38 AM
Personally I've never had any issues related to incompatible .Net versions and platforms.
 
@Squiggle ...because your clients are dinosaurs and make you dev everything in .net 2.0?
 
@TomW Because I focus almost exclusively on web applications and our servers are up-to-date.
 
so ronery
 
@TomW ronnie pickering can help
 
should I be glad I have no idea who that is?
 
10:44 AM
@RoelvanUden I cant run project with target framework 4.5.2 for windows xp service pack 3
@RoelvanUden So xp stopped on 4.0
 
@TomW you don't know who Ronnie Pickering is?!
 
nope
 
"Don't you know who I am?!"
 
oh god, the wealdstone raider?
ha no, where did that come from
totally off the mark
 
:-/
 
10:48 AM
oh, actually not far off
random bloke gobs off, it goes on youtube, something like that?
 
morning
 
mornin'
 
Trying to change stuff on websites someone else has created is so much cancer that I am near to committing suicide
 
at least it's not Drupal.
 
Haha!
 
11:00 AM
Hello Guys
 
Hello boro
 
Seriously, Drupal can go fuck it's self. Anyone who thinks it's OK to mix configuration with business logic and store it all in an unversioned database can take a long walk of a short cliff.
 
I developed an internal website , i have a problem related to CSS
every time i update CSS , all other PCs still keep the old Css version
if user clear cache , he see the updated version , i don't want to tell user to clear cache everytime
is there any solution for that
sorry i know that this is a C# room not related to Css but there may some setting in IIS can control it , so plz help
 
Don't set aggressive caching. A simple solution is to change file name.
e.g. mysimplecss-1.0.0.css
version numbering!
bundling does all that for you btw.
 
11:15 AM
o/
@TomW He's Ronnie Pickering!
 
@Sippy when Squiggle said "Don't you know who I am?!" I was like "piss off, that was Vinnie Jones"
Great line tho
 
Some guy on the other side of the road beeped at me and flipped me off for reversing onto my side of the road this morning
 
@Roel , can u clarify more plz
 
@Bassem Speak properly.
 
what do u mean by version numbering
my file is called style.css
 
11:18 AM
You are not a luddite.
 
@Bassem Change the file name.
 
@TomW Lol
The video had me giggling for like half an hour.
"I'M RONNIE PICKERING!"
"Who, Jonny Pickerin?"
 
@Jakobmillah , so with every change , i should change the version say from 1.0.0 to 2.0.0
 
the the browser get the latest version
 
11:24 AM
Yes. Use semver.
 
11:36 AM
but look guys ,
my site use more that one language and sometimes i pass the stylesheet name in .aspx.cs file
i don't want to change file name , is there any way ?
 
You can't force visitors to clear cache, so.. I guess not? Don't make changes so often or you'll have to stick with the solution Roel gave you. I know no other, but I'm a noob.
<asp:Repeater ID="rptEmployees" runat="server" OnItemDataBound="rptEmployees_ItemDataBound">
            <ItemTemplate>
                <div class="employee" <%# !string.IsNullOrEmpty(EmployeeInfo)?  "style='border: solid black 1px'" :  "style=''"%>..........</div>

at the server, the information is right.. But why is the style in the class="employee" being updated 1 repeat too late all the same? Server sided code not read before the html?
 
@Bassem You can probably set headers in your web server to force cache expiration - I know IIS has it, and apache and nginx probably do too.
 
@Avner , i will search it
 
You can append the datetime ticks as a query parameter to have the browser think the css has changed. Would cause it to load every time though
style.css?id=15235235
 
i try to write it as style.css?v=1 , it doesn't work @scheien
 
11:45 AM
Lol @Roel
He ain't gon use semver properly.
 
semver is awesome
 
Some smart alec here thought we should use T4 templating to append the timestamp on every build instead of just using bundling
 
@scheien what is semver
 
@Bassem semver.org Semantic Versioning
just a three-digit version technique that identifies major version changes, minor breaking changes and incremental compatible bug fixes.
 
@Squiggle :)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
u know it.
 
11:48 AM
@Sippy :((((((((((((((((((((((((
 
I hate it when messages time out on this chat lol
so annoying
 
literally worse than Hitler
 
minor isn't breaking changes though @Squiggle :)
should be backwards compatible
 
@scheien yeah I realised that. Hoped nobody would notice.
I got 2 hours sleep last night. I can't brain so well.
 
You're excused.
 
11:50 AM
@Squiggle What on earth were you doing
Lol
I swear to god
If you say my mom
I'm renaming you to Kendall and you two will be married
 
@squiggle
u read my comment when i said that sometimes i pass style.css file name in .aspx .cs file
styleEn.css
styleAr.Css
styleFr.Css
 
@Sippy That was a pretty good setup
 
@KendallFrey I only had like 4 hours sleep as well
Didn't realise what I'd said until it was too late lol
I was playing Pokémon
#noregrets
Wow I just heard the weirdest lyric I've ever heard.
 
!!youtube motherlover
 
11:54 AM
weirder than that?
 
I want to share your mouthful
I want to do all the things your lungs do so well
I’m gonna bed into you like a cat beds into a beanbag
Turn you inside out and lick you like a crisp packet
yeah.
Motherlover is a timeless classic.
 
> crisp packet
silly brit
 
Lol
 
Where did you get that, did you pop down to the shops?
 
@Sippy Ugh. I'm a big fan of grease and salt, but this is disgusting.
 
11:56 AM
I've never licked a crisp packet before
Not sure why anyone would lol
Maybe fat people.
 
Who wouldn't
 
Can anyone explain to me why ImageTitle[0] ?? ImageTitle[0].Replace("'", "&#8217;") throws a null reference exception, but just ImageTitle[0] doesn't, even when null?
Am I using ?? incorrectly?
 
That'd be why
 
the ?? only evaluates the second half if the first half is null
 
11:59 AM
@Sippy The NRE is thrown by calling Replace.
 
so .Replace will never not throw
 
@AvnerShahar-Kashtan I know :)
 
I think you're trying to use ?.
 
I'm a retard so I used ?? wrong.
 
right?
 
11:59 AM
gg
 
C# 6 will allow you to do ImageTitle[0]?.Replace()
 
I don't think we're on C#6
rip.
 
use the old way
 
Ah, the well-worn ImageTitle[0] == null ? null : ImageTitle[0].Replace(). The syntax never bothered me until C# 6 came along.
 
The greatest thing about ?. is it's monadic :3
 
12:04 PM
FFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU @Bassem
3
"Let's ignore all best practices and, oh, I know! I'll come up with something that is bound to work better than what everyone else in the world agreed on!"
/rage
 
omg loling
 
none pizza with left beef
fucking funniest thing I've seen in years
 
@KendallFrey wotwot?
 
uwotavinagigglem8
 
Pahahahaha
 
12:10 PM
lol
 
HAAHAHA
Some of these are amazing
 
I don't get it.
 
...what is this?
 
@you two noobs, refresh page and read usernames
 
Does the actual 12yearoldsimulator part work?
It's giving me a 403
 
12:18 PM
?
> [codghotstisawesome452@#]: i fucked ur mum last night
I assume so.
 
that sounds like it's working
 
Hmm. WPFists: will a constantly running animation (a small color-change animation for a little rectangle along a gradient and back) be a performance problem if it's a constant part of the application?
 
depends what counts as a performance problem
it will be eating some CPU I think
 
I can live with that, as long as it won't harm responsiveness.
With which we're having problems.
I have a listbox with rather heavy items - each item's datatemplate binds to about 10-12 properties, has images and style triggers and such. Selecting an item on the list is almost instantaneous when there are 4-5 items, but if there are 100, it takes ~2-3 seconds.
Even though UI virtualization is active and only about 10 items are rendered.
 
@Sippy Doesn't do anything for me
 
12:29 PM
 
That's a GREAT user name! DildoFaggings
 
too witty for a 12 year old
don't ask him about his One Ring
 
Is it possible to dump the private key from a running c# application? I know this is not in c#, but I am trying to understand what happens here, is it dumping the private key? If so that would also be possible in c# using olly or similar tool? Or is that merely dumping strings from the application memory?
By the private key I mean, application is using a webrequest to a https url, that private key.
 
... Sure if a system has access to the private key, it can be extracted from it?
 
well the application it self only have the URL and the public key
but doesn't it need to provide the private key for the application to read the data received?
 
12:41 PM
You can't extract a private key from a public key, by design
@Prix No, nothing ever provides their private key
 
@Prix The basic premise of asymmetrical encryption is that the keys used to encrypt and to decrypt are different, so that the decrypter doesn't need the encrypter's private key.
 
To elaborate, it is possible to dump anything a process has access to. If you're targeting a web server process, then dumping the private key is entirely possible. If it wasn't even present in the first place, like is the case with a pure-client process, then it's not possible.
 
I see, so technically, by using a pinned certificate I am externally safe? My only concern would be if they reverse my application for the actual URL or something else, given I don't hold the private key.
 
... If you're delivering code to a client, consider it open-source.
4
Anything in that binary can be read. Go from that.
 
yeah that was what I understood from it.
thanks for clearing that up for me both of u :)
 
12:46 PM
@AvnerShahar-Kashtan is decrypting with a public key a thing? because that's not encryption, only a signature
 
@KendallFrey Sure, that's verification.
 
Does SSL use that?
 
that's a good point, if its only verification how would the c# class httpwebrequest know its data from the encrypted comm?
 
@KendallFrey Yeah, well, the server responds with content encrypted in its private key, so you can use pub key to decrypt.
also for verifying code signatures etc
 
holy shit
so HTTPS responses aren't secure?
 
12:48 PM
Eh what?
SSL is a little more elaborate than that but that's the basic premises
one side uses pub, other priv
it actually negotiates and switches to another cipher for performance
because asym keys are slow by design
 
oh so the actual messages aren't encrypted with the keys?
 
wondering that as well...
 
No they aren't. Basically, negotiation initiates with data encrypted with pub key going from client to server. Server responds to finish a handshake encrypted with priv key, so the client can verify its the correct server that's giving the response (and not one-way mitm). Then after the handshake, they have agreed on a shared session key, and encrypt the payload with that.
usually aes for speed
its a little more elaborate than that
but thats the gist of it really
 
I'm guessing the "shared session key" isn't just a random value transferred from server to client, or vice versa
 
It's agreed upon, somehow. There are different protocols
 
12:57 PM
@KendallFrey It is, sort of. It's a one-off key that's generated for that session only.
 
@AvnerShahar-Kashtan If it's sent from the server to the client, then it would be exposed by anyone with the server's public key, right?
 
good morning, loves
people think i'm gay because i say shit like that ^
 

« first day (1846 days earlier)      last day (3103 days later) »