« first day (1552 days earlier)      last day (3398 days later) » 

user1630889
12:00 AM
ffs... I publish an app to azure and something it's doing manages to crash the entire app pool.
 
12:53 AM
If I have a post-build command that calls a third-party tool, how do I handle pushing that to github? Anyone that pulls will be missing said tool.
 
1:43 AM
0
Q: No Web Projects in Python Tools for Visual Studio

T AbrahamRecently, I have installed Python Tools for Visual Studio and went through the tutorial. Then I noticed that I didn't have the Python web projects that should come with the Python tools. I used the Python Tools wizard to install it and I have Visual Studio Express 2013. I also have both IronPytho...

 
@TAbraham Ummm... You do realize this is the C# room, right? Did you try a python room first?
 
Yes.. But the question was also about visual studio so wasn't sure where else to put it...
the chatroom was tagged visual-studio ...
 
Sure, its just unlikely we have actually used those tools
I'd ask in a python, or better, an ironpython room if it exists
Also, You might consider phrasing the question as a chat message
then linking to it if someone would like to see it
Its kind of off-putting to just have a random question link thrown in our faces.
 
ok.. thanks!
and sorry!'
 
no problem, just trying to give some free advice :)
 
2:01 AM
it's okay to just post questions in here, as long as you aren't spamming it or looking for upvotes
@TAbraham
 
 
2 hours later…
3:39 AM
Hey Steve, you around?
 
 
4 hours later…
7:19 AM
morning guys
 
hi
I was just about to ask whether any of you have a smart system for organizing projects when you test answers for SO?
 
7:31 AM
wonder what the answer to your question will be
 
7:50 AM
Morning
 
morning!
 
8:23 AM
Morning
anyone has any experience with sync framework?
 
8:38 AM
Hiya guys
anyone online??
 
@MikeM. I think so
 
I have a little annoying issue with Visual Studio, it's about the error/exceptions.
My internation settings == english
I installed visual studio as english but my exceptions remain dutch.
Do you know how to change it for all projects I create and not only this project [for this project it would be playing with the culture] but I want to set it to english for every existing and new project I have/create
 
I am new in LinkedIn app and In my LinkedIn app: I always get http://screencast.com/t/tLbHSN40fd2 this error.
My code http://pastie.org/9832862
 
8:59 AM
I'm having problems with the logging/following of the sync. I want a progressbar, but i don't find any examples or documentation of how to do it.
 
ciao, all
 
@Squiggle ciao bella
 
aww blush
 
@MikeM. Set the culture of the thread
 
Implementation of a one-time load, cached, of reference values for an application. Does that look ok, understandable and in particular, thread-safe to you?
(assume it implements IReferenceValueService whose members are obvious)
 
@MikeM. A thread will default to the culture of the OS (In your case, Windows is probably Dutch). Set it for a thread with Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us") (IIRC from memory)
 
Or en-gb if you want to do it properly
 
en-gb for traditional English, en-us for simplified English
 
9:23 AM
:D
 
@RoelvanUden You marked me by mistake, right?
 
@Markus Yup! I blame the similar avatars. Sorry :-)
 
:)
 
@RoelvanUden also appreciate if you'd take a look at that gist - it pretty neatly encapsulates what I actually want an ORM for (just grabbing some values from a database, as few times as possible, and never writing to them)
 
anyways... if you have any suggestions on this I would be thankful stackoverflow.com/questions/27959784/…
 
9:25 AM
relates to what I've been droning on about the last couple of days
 
@TomW Oh, what gist? I don't see one from you
 
sorry, I obfuscated the url somewhat
 
That's.. data access?
 
Yep. EF was convenient but totally overkill really
but it generates nice pocos.
 
I'd encapsulate linq2db then :p
But I don't see how you access data here..
 
9:28 AM
this.contextFactory().GetReferenceValues()
Oh, I did mention that the context only calls sprocs, didn't I? That's how it wraps sprocs, apparently, you just get a method that returns an...
 
Could you put that factory and context in the gist? it might make more sense then :)
 
one sec
Silly question. Can you edit anonymous gists?
 
Probably not. Not sure though
 
Presumably not as if you're anonymous, github has no way of knowing you're the owner
Was it really not obvious though?
 
Oh, no, it wasn't. That's pretty.. raw.
 
9:38 AM
...raw?
if you mean 'unfinished' then...it's a gist. Logging, null guards etc not mentioned
 
I mean that the data access is really basic. Exactly as you intended, but still very ... raw ;-)
 
Yeah, it's just...I'm trying to think of the right name for it
reference data
 
But why did you choose this kind of approach instead of, say, IQueryables?
You'd have the same "rawness" but with the flexibility.
 
where would IQueryable come in?
 
Because IQueryable : IEnumerable, you just pull a list, so at least you can then add paging and whatnot :P
 
9:49 AM
I don't think that will be necessary, but anyway, EF doesn't give me IQueryable for stored procedure results
 
Ahh, sprocs..
 
I'm not quite sure why this database expects everything to be done with sprocs, actually. That seemed to be a pattern for the people who wrote it
For this database there is never any reason for the application code to update anything so blocking all access to tables is acceptable
Does mean that if you want data out of it you get everything, whether you want it or not
 
Lol, awkward. What kind of app is it, anyway?
 
I've just signed something that I think means I can't say.
 
9:54 AM
Hey everyone, hope you all had a nice start in to the new year
you signed a NDA @TomW?
 
A bit more aggressive than that, actually.
but essentially yes
 
ouch.
Anyway, anyone here having an idea on how to create the following SQL FROM/WHERE statement in to a LINQ expression tree?
FROM tblMyData a INNER JOIN tblCustomer b ON a.CustomerID = b.CustomerID WHERE a.ArtNumber = '12345xyz' AND b.CustomerName = 'Mueller'
I've no problem with the a.ArtNumber part, but with accessing the CustomerName
 
tblMyData.Where(x => x.ArtNumber == "12345xyz" && x.Customer.CustomerName == "Mueller");
 
no, not lambda
LINQ expression tree
 
Well screw you then. :-D
 
10:05 AM
ParameterExpression numParam = Expression.Parameter(typeof(int), "num");
            ConstantExpression five = Expression.Constant(5, typeof(int));
those
 
Expression<Func<Data, bool>> tree = x => x.ArtNumber == "12345xyz" && x.Customer.CustomerName == "Mueller";
 
or combine a Lambda statement with an ExpressionTree
 
It's the same thing there.
Not what you asked, but, WHY are you making expression trees?
 
I've to. I've a kind of dynamic method to create a where statement that is executed against a database via DevArt Linq
basically I get a bunch of dictionaries where the key is the column name and the value is the searchterm. I go through those dictionaries and build my expressiontree
 
That DevArt thing doesn't support queryables?
 
10:09 AM
runs away
 
uhhh
not sure
I could execute that WHERE statement you posted above against it
 
GET OVER HERE
 
or a 'normal' LINQ statement (which is how I get my data in all other cases)
@RoelvanUden ah, thanks. Just wanted to search for something like that
 
Then you could just use that the Linq I posted first, right? Why make it so complex?
 
because for LINQ statements i'Ve to know which columns to compare
at compile time
but I do not know that
 
10:12 AM
How delightfully abstract.
 
How annoying. You're storing dynamic columns in SQL? >_<
 
no the columns on the database are fixed
 
Thennn.. how can you not know what column to use?
 
but the columns the user wants to search for a variable
THe user could search for, let's say, articlenumber, articlename, price, date when the article was added
but mostly he uses only some of those fields
like only the articlenumber
or the price and the name
 
ffs.
I asked for dual monitor setup
 
10:15 AM
my userinterface hands me down dictionaries for each datatype. Key is always the columnname, value is always the value to search for
 
So they've given me another monitor which maxes out at the wrong resolution
 
I then feed those dictionaries into this method:
  private static Expression BuildExpressionTreeWhere<T>(Dictionary<string, T> searchReq, ParameterExpression parameterExpression, ref Expression firstExpression, ref Expression filterExpression)
        {
            foreach (var pair in searchReq)
            {
                Expression left = Expression.Property(parameterExpression, pair.Key);
                Expression right = Expression.Constant(pair.Value);
                Expression comparison = Expression.Equal(left, right);
                if (firstExpression == null)
 
So I now have one on 1920x1080 and the other on 1680x1050
And it should be on 1920 so it's fucking blurred and unusable
rage.
 
which will build the needed where statement
 
you can't fix it, @sippy?
 
10:16 AM
@Squiggle It won't go any higher
It's cos they fucked up this windows 7 image they gave us all so hard
 
@SteffenWinkler I see. How annoying :-D
 
Top end i7 with 16gb RAM and it struggles running visual studio
 
@RoelvanUden so you've no idea either? Except for coming up with a different concept that is ;)
 
@SteffenWinkler I would just chain pre-build lambdas
 
oh. That's clever
you mean create a lambda statement for each column and just fill them with values and execute those that are requested?
@RoelvanUden still there?
 
10:21 AM
Something like this:
public IQueryable<Order> Filter(Dictionary<string, object> filters) {
  var orders = Context.Orders;
  if (filters.ContainsKey("Id")) orders = orders.Where(x => x.Id == filters["Id"]);
  // yadda yadda yadda ya
  return orders;
}
 
yeah, had something slightly different in mind but essentially the same. That could work but that'd take some lines of code more, compared to my current method (not real complain)
I'll try a last idea before switching to that: Joining the two classes/tables in normal LINQ and then putting the ExpressionTree on that joined LINQ table. That should give me all columns in one table where I can execute that statement on
 
Remember to test your performance and join only when necessary.
 
ah, just throw more hardware at it ;)
 
joking aside, the second table has less than 10 entries
 
10:29 AM
Woo! Swiss franc just about to shoot up in value <3
My pay packet has just risen by ~15% against the Euro
Money is weird.
Party at my place.
 
@Squiggle Woo!
@Squiggle Time to start buying everything in Euros?
 
@Sippy More like time to pay off my student loan and transfer cash into my UK ISA :P
 
@Squiggle :P
 
Why do people use dependency injection in situations when eventing is way more suitable?
 
I hardly see how riding a horse through the office helps loose-coupling
 
10:44 AM
@TomW lolwat
Loosely coupled with reality? xD
 
Eventing (also known as horse trials) is an equestrian event where a single horse and rider combination compete against other combinations across the three disciplines of dressage, cross-country, and show jumping. This event has its roots in a comprehensive cavalry test requiring mastery of several types of riding. The competition may be run as a one-day event (ODE), where all three events are completed in one day (dressage, followed by show jumping and then cross country) or a three-day event (3DE), which is more commonly now run over four days, with dressage on the first two days followed by...
 
Oh
You're very cool tom.
 
@TomW ++
 
I just put the following comment on code I just wrote:
This is *awful*.
Nobody should ever write code like this. May God have mercy on my soul.
 
GOTO?
 
10:49 AM
I'm trying to write code that can determine whether or not an object's property has a value, given a lambda expression that selects that value, where the value might be a reference type or a nullable. Extracting values from Nullables without knowing the underlying type gets wtf
(bool)typeof(Nullable<>).MakeGenericType(result.GetType()).GetProperty("HasValu‌​e").GetValue(subject) ASAAAGH
which won't even work, because result is a nullable and not the underlying type of the nullable
 
Oh my
 
> But it'll save time in the long run
 
@TomW I do that :(
I have an excuse though
I'm a newb
 
@TomW Is that really so hard to do? What is the API you envision?
 
I intend to have a large number of independent classes of a common base type which can extract an arbitrary property of an arbitrary type and compare it to some reference value, with some telemetry implemented in the base type so that I only have to write it once
getting the value of an arbitrary property (and its name, so I can report on it) where no types are known and they might be nullable, gets complicated
 
10:57 AM
I've done plenty of reflection and never considered it complicated. I just might be missing your point completely though. I still don't get it without seeing code to use it :P
 
you saw the pukeworthy line to find out whether an object that might be a nullable has a value, yeah?
aha! overloads to the rescue!
put it this way; method signature:
protected void VerifyExistence<T>(Expression<Func<Subject, T?>> propertyExpression, Subject subject) where T : struct
is one of the overloads.
 
You're just after if something is set?
 
quick question... Eventing vs Dependency Injection
https://gist.github.com/Squiggle/40eb2354d04e532341b3

Which one "feels nicer" to you lot?
I know there's subtle differences in functionality, but just the general concept
 
@RoelvanUden and get the property's name from the expression
phew ok, with two overloads it's much simpler.
 
11:20 AM
no takers?
n/m
 
11:32 AM
@RoelvanUden I think I'm gonna try implement your one first
Charlie's one I think I need the blog posts for, my codefu is not strong apparently.
 
12:07 PM
Charlies solution is more elegant if you've got a huge code base
The one I posted is simpler, but can get hairy if you've got hundreds of tables.
(then you want charlies solution)
 
I don't particularly understand either of them
I just wanna get better at stuff
Yours has a lot less stuff in it so I think it's probably a better place to start.
 
Don't hesitate to ask. I'm willing to answer, and I'm sure Charlie is, too :-)
 
There would be a thousand questions and I hate being that guy :D
I'm gonna start by learning about dependency injection cos I think there's some stuff in yours and his code I might understand more by knowing other concepts
and I think I have a basic grasp on generics but that needs reading too
 
Learning more stuff is never bad, but don't get caught in the spiral of "I don't know x, let's read x. X references y, I don't know y. Let's read y. Repeat."
 
@RoelvanUden I'll try :D
There's just a lot of stuff I don't know about that I think I need to
And I feel like I'm gonna go to interview for a decent job and they'll ask me about these patterns and I'll say I have no idea and that'll be that
 
> Violations of DRY are typically referred to as WET solutions, which is commonly taken to stand for either “write everything twice” or “we enjoy typing”.
Lol
From what I've been reading in here, following the DRY principle is easy, but just because your code conforms to it doesn't mean it's right or good.
You guys slandered the repo pattern and that's what I use all the time cos I dunno what else to use :D
Is there ever a point in implementing a repo pattern?
 
Hello there I have a slight problem which i have failed multiple times to resolve but I have narrowed it down to this. I created a UI which uses panels when i i switch objects in the panel controls( my forms) on the second time i load any form the state changes for example if i had form one to maximized and form two set on normal when i switch between the two and go back to form one instead of maximized the form is changed to normal
 
@Sippy We bitch about repositories on top of an Unit of Work. We don't bitch about repositories in general, because they serve a purpose and are extremely useful. It's just that EF is a UoW and therefore repositories on top of EF is just extremely silly.
 
@Broken_Code Can you write that out again with punctuation please
@RoelvanUden I get that
I am struggling a lot with the point and implementation of isolating EF if you're going to forego that stage though
 
I can implement an example when I'm home if you need it.
 
12:26 PM
You already did one :D
 
Not a full project with solutions and everything :P
 
Well, from what you wrote I already sorta know how to use it
You define your tables as mutablequeries and then you can just use Context.<TableName>.C/R/U/D();
 
Or query, yes. Super simple and straight forward :-3
You can, of course, wrap it too!
 
And I'm guessing you can use lambda expressions in those as well
 
(It's how I manage permissions)
 
12:28 PM
Why bother wrapping it haha
Oh
 
Ok.
Hello again. I created a UI which has a problem. In the UI I have multiple forms which I switch between using a panel. My problem though is that the form state reverts to normal on the second time I load that form. So if basically the form properties for the window state do not stick. Which causes my auto-scroll to appear twice and sometimes not at all
 
@Broken_Code Is this WPF?
 
@Sippy AccountContext wraps an IContext to add additional filters to existing queries, for example to hide things the user can't see or influence :P
 
@sippy i am using winforms
 
@RoelvanUden That's an interesting way of doing it
@Broken_Code Do you have any code to show us that you think might be causing the issue? Basically your data object for your form isn't persistent and it needs to be
 
12:30 PM
@Sippy Huge upside is that you cannot ever forget to check permissions, because the data will simply not ever return. Downside is that you need to query items before you edit them to find out if the user can even edit them (or implement custom create/edit that checks the entities permissions).
 
So if there is a layer above your panel, that would be where you store your data object.
Either that or you will need to pass the object to and fro
@RoelvanUden Is an implementation of activity based authorisation not more useful in MVC?
 
@Sippy I have no idea what activity based authorisation is.
 
@Sippy:
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnintro.Click
AxWindowsMediaPlayer1.Ctlcontrols.stop()
Me.Panel2.Controls.Add(introfrm)
Me.Panel2.Controls.Remove(wordfrm)
Me.Panel2.Controls.Remove(excelfrm)
Me.Panel2.Controls.Remove(emailfrm)
Me.Panel2.Controls.Remove(internetfrm)
Me.Panel2.Controls.Remove(powerpointfrm)
Me.Panel2.Controls.Remove(AxWindowsMediaPlayer1)
TextBox1.Text = ""
PictureBox3.Image = introimg
introfrm.Show()
End Sub
 
@RoelvanUden It's a way of turning authorisation of controller actions on its side
So that you can define activities and the roles that can use those activities in your database, then you needn't authorise a role for every action.
You just need to authorise an activity.
 
12:33 PM
It's not an MVC thing you have to write it yourself, useful though
Like if I had an admin action that created a user
 
@RoelvanUden activity based auth is great. I implemented one myself
 
I'd use [AuthoriseActivity("CreateUser")]
Then in my database, I'd have a CreateUser activity with roles that can use it.
 
it re-casts the idea of permissions to:
- what are you trying to do
- what are you trying to do it to
 
@Sippy so when i run it the second time it always will be normal even though its set to maximized
 
That way, I can easily change which roles can be assigned without having to change the code.
@Roel Either that or you were being pedantic about me using the wrong word out of authentication and authorisation :P
 
12:34 PM
Most annoying aspect of ASP.net auth: the built-in permissions stuff returns the wrong http status code when it denies you
 
@TomW You can override that though can you not?
 
Yep, which is what I did. But it's annoying that they get it wrong
 
shrug
I had to override the lot to implement activity based auth so
 
In their defence, the code is called 401 Unauthorized. Which is not what it means. It should have been called 401 Unauthenticated
 
@TomW Ahhhmmmmmmm
For me 401 is right
Because internally, everyone is authenticated.
 
12:36 PM
There is debate. There are some who say that's fine and what it's really telling you is your current credentials (which might be no credentials) don't allow you access, present some that do
 
@TomW @Sippy Oh that, sure that is great and I use it too, but I use that in combination with context filtering to avoid code that checks if, say, a user can edit an item that is supposedly on his order list (and not someones elses). The two combined are super powerful. :P
 
Some people don't have access to things, so to be denied they would be unauthorised.
@RoelvanUden Very true.
 
@Sippy the problem with that is that 401 is the start of the challenge-response sequence for http basic auth. Browsers respond to it as though it's an auth challenge, rightly so
 
@TomW Oh
OH
THAT EXPLAINS A LOT.
 
If you're already logged in but denied access to a resource, you should get 403
 
12:39 PM
@Sippy I am a bit lost as to how to fix this, I tried setting the properties on the main form as well as the button but Nothing seem to work
 
@Broken_Code Sorry hold on
Agh you're in the wrong room for VB but I'll try :P
Reading VB makes me nauseous
 
Sheeeit. Someone's burned down South Oxfordshire District Council's HQ
I'm about to move to south oxon.
 
@TomW Oh dear :D
 
@TomW Did you send an advance scout party?
... They did more than scout.
 
just as well I haven't done my council tax form yet
maybe if I do it now they won't bother
 
12:41 PM
@TomW You'll be about 40 mins from me :P
 
@Sippy I'm comfortable with the language I probably should switch
 
@Broken_Code I'm not sure if you can do model binding in winforms but I'm fairly sure you should be able to
 
Nu-uh, you can't bind most of the stuff in WinForms.
 
oh
sucks
 
Hence we bash WinForms. Or, well, that's a reason, not the reason.
 
12:43 PM
@Broken_Code I have no idea then, sorry
WinForms is a bit old
It's like web forms, which I have used and actively hate
 
Whoever told you to work with winforms, stab them. I'm sure the court will be lenient
 
@Sippy Oh how long would it take to learn wpf and would i be able to do the same thing in wpf
 
And you won't have to do any more winforms. Fair trade.
 
@TomW i cant stab myself:/
 
@Broken_Code Not a huge amount of time, as I understand WPF is a lot more fun than winforms
It might not be something you pick up in a day, but just follow beginner tuts for WPF and I'm sure you'll pick it up quickly.
Eugh
Slightly stale bread
vom
 
12:46 PM
@Broken_Code It's simple, really. Point blade at yourself. Run at wall. Wait for collision.
 
@RoelvanUden Or get one of those harikiri knives, those are good
 
WPF doesn't really have a visual style in the same way winforms does, that's the only point lacking really. Winforms is ugly but at least it matches the win9x visual style by default; WPF defaults are super flat and uninteresting so you have to do some styling yourself
 
@Sippy i have found that when i tried to work on c# and wpf but there so many things I couldnt do so i just went back to vb.net because i knew how to do it there
 
@Sippy Those probably still require a fair amount of determination.
 
@Broken_Code You do need to get away from VB
 
12:47 PM
We might be slightly opinionated for C#... but yes, go C# all the way :P
 
There are some jobs out there that will hire VB devs, but I would hazard a guess those are not places you want to work.
Dunno though, I used VB once and found it so awful I dropped it
 
They're pretty similar, there's 1:1 correspondence between most features
 
And it's made me suspicious of Ruby ever since :P
 
^ That, so, so much. I had a job meeting for a VB.NET job and I couldn't figure out how to get out of there the fastest. WHAT A HORRIBLE THING.
 
@Sippy yeah i guess I'm gonna have to prepare for the torrent of questions I will most likely be asking in the future
 
12:48 PM
Yeah ask @Sippy everything you want. Thousands questions are okay!
 
@TomW I always figured they did, I just don't like VB :D
 
My first job was almost entirely VB.net, it's so similar to C# I didn't need any ramp up time at all to just switch
 
I ask thousands of questions so
My come-uppance :D
 
I did start learning programming with C# so it wasn't entirely unfamiliar
 
I had to google that word:| need to read more becoming uncultured
 
12:50 PM
@RoelvanUden is that github example usable out of the box or is there some legwork you need to do to integrate it?
 
I don't think they're different enough to worry about
 
@Broken_Code What, come-uppance?
 
It's just .net Ugly Edition
 
Yeah my main problem between the two i suppose has strictly been I had learnt vb.net in college and didn't stop using
 
@Sippy Uh, that's pretty much it. Just hook up a EF context in Context
 
12:51 PM
@Sippy that be correct
 
@RoelvanUden As in replace SiteEntities with my own? :P
 
@Sippy Jup!
 
@Broken_Code It's not really a commonly used phrase :P Don't worry about it.
 
@Broken_Code basically; get rid of Function and Sub; {curly brackets} instead. Arrays and dictionaries have [square brackets]. Keywords are all lower case. That's about it really
 
@Sippy I'm usually the one spouting words no one knows the meaning to so yeah kinda different being on the receiving end of the treatment
 
12:53 PM
@RoelvanUden Shweet, maybe you and Charlie could work together on his EF stack package and you could make a lightweight version :D
 
@TomW I see and if i Have code that works on vb.net but does not work on C# or to be precise i do not know how to code for it in C# best example would be I use a lot of modules when I code in vb.net but C# does not have that. How do i work around such things
 
(Of T) becomes <T> for generic types. Select Case becomes switch(thing)
Module == static class, I think
 
@Broken_Code If you can learn to use C# alongside VB, you'll have mastered two types of language which will be very helpful to you in the long run
Cos things like JavaScript are much closer to C# syntax than VB
 
@TomW Do I make the static class.
 
@Sippy Nah, that wouldn't work very well. I don't like enterprise solutions. Charlie needs more abstraction than I use or want. We have conflicting interests in the basic design, where Charlie focuses on enterprise projects and I focus on everything else.
 
12:55 PM
@RoelvanUden Ah right, I see.
 
@Broken_Code Yes?
 
@Sippy Java is probably the reason why I have strayed from c#, I really did not like the language
 
@Broken_Code I said the other day that Java is like the doddery grandfather of C#
 
@TomW and I call them as I would in vb.net?
 
People disagreed but I think I'm close enough.
 
12:57 PM
@Broken_Code how do you call a module? That doesn't make sense
 
@Broken_Code public static class Module {}
 
I think you're looking for namespaces.
Or a class. Whatever :3
 
@TomW I had meant do i use static classes in the same way i would use modules
 
Static classes are the source of all evil! :P
 
@RoelvanUden That web forms project I was supporting was made of static classes and variables.
 
12:59 PM
@Broken_Code they are basically the same thing, but I'd avoid using either most of the time
 
@RoelvanUden I feel like I am missing something fundamentally important
 

« first day (1552 days earlier)      last day (3398 days later) »