« first day (2315 days earlier)      last day (2635 days later) » 

4:00 PM
Ok. I wasn't sure if the terminology was the same as it is in my native land of Python.
 
Of which HashSet is a good implementation
 
wait a dictionary isn't a hash set?
 
good night guys
 
@SteveG it's a hash table
 
Night @satibel
 
4:01 PM
bloop
 
What to do when somebody posts an answer after some minutes delete it? and I don't have enough privilege to see deleted answer :/
 
What question was it? I could take a screenshot or something for you.
 
0
Q: Autorest/Swagger generated code for Web Api controller that returns File

Mr_LinDowsMacIn my ASP.NET Web API application I have a controller like this: [RoutePrefix("api/ratings")] public class RateCostumerController : ApiController { [AllowAnonymous] [Route("Report/GetReport")] [HttpGet] public HttpResponseMessage ExportReport([Fr...

 
I'll copy it into a pastebin... here it is.
 
Wow, thanks dude
 
4:13 PM
I'm guessing he deleted it because it was somehow inaccurate... Let the buyer beware.
 
Anybody here know anything about Tasks?
 
War
0
Q: Kendo UI TreeListViews with complex data

WarBackground Information In short i'm looking to achieve "mostly" whats shown here ... http://demos.telerik.com/kendo-ui/treelist/remote-data-binding ... except it's a bit of a mind bender and the data comes from more than base endpoint url in my case. I am trying to build a generic query build...

 
@Nathvi sigh You should know by now just to ask your question.
 
War
@Nathvi my entire webstack is async and uses tasks throughout
and what mike said
 
@War you want to take a look at my MVC question?
 
War
4:21 PM
@juanvan uh ... maybe?
 
it has to do with routes
1
Q: The current request is ambiguous MVC Attribute Route

juanvanHave 3 Attribute Routes [Route("{foo}_{bar}_{fee}_o_p")] ActionResult SelectFee [Route("{foo}_{bar}_{fee}_{fii}_o_p")] ActionResult SelectFii [Route("{foo}_{bar}_{fee}_{fii}_{fum}_o_p")] ActionResult SelectFum The First 2 work as expected. But the last one comes up with an ambiguous Reflection...

 
War
oh wow
I usually keep my routing a ton simpler than that lol
 
is all the data for SEO stuff
 
War
and of course elmah gives you nothing useful ... I ripped that rubbish out
 
you can see them work here
and see why the routes are that way
 
War
4:23 PM
surely you only need one route and 1 method to handle all of that
[Route("{foo}_{bar}_{fee}_{fii}_{fum}_o_p")]
public ActionResult SelectFum(string foo = null, string bar = null, string fee = null, string fii = null, string fum = null)
make the whole lot optional and job done
but I wouldn't even use the route attrib
 
then that method would be bigger? I guess
 
War
the default route can catch that
 
then just call the view I would need for it
I will try that see what happens quick
(more like 30mins)
 
War
and binding can be done from ?fum=someVal&fii=someVal
 
ya that is what it's doing
 
War
4:25 PM
but if its a post I would just create an args object then populate whatever props you want
 
they are gets
 
War
yeh I figured ...
 
@war
 
War
?
 
o/
 
4:30 PM
A Task is just an operation that is sent out to the thread pool, that gets executed in some asynch order, right?
 
War
@Nathvi sort of ... mostly right "sent out to the thread pool" should be "sent out to the synchronisation context to be async handled, possibly using a thread from a thread pool if deemed appropriate"
although i'm sure someone here will tell me thats wrong
that's basically my understanding of the task system
you basically add a job to an async queue of sorts on a context
 
ohhh...
 
War
then the framework figures how most effiecntly to execute that
 
So, it doesn't always use a new thread to execute it
 
War
That's not a requirement no
but it's easy if you're learning to think of it that way
 
4:33 PM
That is very good to know.
 
War
threading is a whole separate beast
and a part of what tasks CAN do
it's really hard to explain and knowing me i'll get it wrong and then we end up in a flame war in here
 
So if I have two Tasks, T1 and T2, and execute them both, there is a possibility that they will be executed on the same thread.
 
War
it's possible yes
 
The url formatting is for SEO
 
How does the framework know to put both of them on the same thread, or on different ones?
 
War
4:36 PM
@juanvan if you need url formatted that way build a route for the controller then have the path past some earlier segment just passed in as a string arg to the action
[Route("{*path}")]
public ActionResult Foo(path) {
    var args = path.Split('_');
}
something like that
might be a bit different
but doing it your way just floods your routing tables with a ton of rules and creates havoc for the guy following you adding more routes and also MVC has to cache all that routing info at the application level
I tend to prefer keeping my app context / sessions as clean as possible and put everything I can in to the request itself
 
@Nathvi It can be, but there's nothing fundamental about a Task that implies executing anything.
A Task is simply a result that will be available at a future time
 
War
@Nathvi That I don't know ... I've deliberately stayed out of that part of .Net as it looks ugly as all hell (probably for good reason)
 
thus why they're sometimes called futures or promises
 
I think I find a good article to explain this in simple terms.
http://blog.slaks.net/2013-10-11/threads-vs-tasks/
 
@Nathvi Scheduler
 
4:41 PM
TaskScheduler normally runs on the CLR thread pool
 
War
yeh it's pre allocated so they can offset the overhead of kicking off new threads
 
The default scheduler, yes
 
War
but nothing stops you making a new scheduler yourself
 
same as BackgroundWorker
 
Looks like LongRunning is an option for a task, to specify "Hey, I want this to run on a separate thread"
So, LongRunning is a way to ensure that a task runs on a separate thread.
 
4:42 PM
The question is, why does this matter to you?
Remember that fundamentally a Task has no notion of execution
 
Because I am having other problems related to threading / tasks.
 
A Task can execute code on zero, one, or multiple threads
 
Right,
and you can force the task to execute on a separate thread if you set LongRunning to true
 
That only applies in cases where the task consists of code running in a background thread
Which in reality is pretty rare
 
I'm using it as a poller for an object. It basically goes out an polls a physical device, and raises events if the state changes. (Connected, disconnected, etc)
 
4:47 PM
If it's a task that never completes, you might be better off not using a Task
 
That's kind of what i'm thinking. Is there any disadvantage to running as a task vs just spinning up a thread?
 
I think the main disadvantage is abuse of the pattern
8 mins ago, by Kendall Frey
A Task is simply a result that will be available at a future time
 
So, only use a task if you want something back
ok
 
If the task never yields a result, it's not that useful, and you're basically simulating a thread
Note that "result" doesn't necessarily mean "value"
 
Or, in my case, THINKING I'm getting a new thread, which I may or may not have.
How can a result not be a value... .?
 
4:49 PM
failure is a result
 
but isn't that a value?
 
no
What value would you assign to failure?
success is also a result, and doesn't require a value
 
War
Task.Run(() => {
    while(true) { ... }
})
is this literally what's going on here?
seems like this doesn't suit the purpose of a task at all
 
As great as the monadic task pattern is, MS has tacked a lot of junk onto it
 
War
junk?
 
4:53 PM
Mostly to provide the illusion that a task is actually executing code
 
Task.Run always starts a new thread
 
@SteveG Don't believe you
 
Long shot, but does anyone have experience building custom SSIS components?
 
lol
 
@MattThrower oh god I'm going to hate myself for this but....yes
 
War
4:54 PM
@MattThrower a while back ... then the world moved on
 
@War schedulers, status, etc.
 
@War I'm sorry
 
The world had moved on. The world had emptied.
 
War
@KendallFrey those aren't "tacked on features" lol
 
.Wait() is one of those things that sounds like a good idea until you try it without
@War Yes they are
 
War
4:55 PM
@MattThrower ok so lesson learnt ... what disaster recovery are we performing today?
 
@War I added the routes to the RegisterRoute Manually, and now they are working as expected.
 
believe me naow?
 
So ... I've built something which .... compiles. I've managed to get it in my SSIS toolbox. Now, here's what's currently baffling me. If I deploy this component in a VS2013 integration package it ... doesn't work, but it runs. If I deploy is in a VS2015 integration package and try to run it, it throws an error. Why?
 
At a bare minimum you need ContinueWith and FromResult to have a complete monadic task pattern
 
4:56 PM
Unfortunately, this is a misuse of Task.Run. The problem is that it’s not truly asynchronous. It’s still executing blocking work, blocking a thread pool thread the whole time the operation is in progress.
BOOOM
 
@War

Task.Run(() => {
while(true) { ... }
})

This is how I was running in what should have been separate threads
 
@SteveG You just disproved yourself
 
no i didn't
 
yes you did
 
okay, argue over everything
you're right kendall
you'ren ot a fucking asshole at all
literally had it up to here with you
go read the post.
 
4:58 PM
First you asserted that Task.Run creates a new thread, and then quoted someone saying it uses the thread pool.
Those are completely different
 
War
@Nathvi yeh its the abuse scenario @SteveG linked to above
 
can't talk to you, so dumb
 
War
don't do that
 
@MattThrower what's the error?
 
@War the error it throws in 2015 is Method not found: 'Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSInputColumn100.get_DataType()'
 
4:58 PM
I've been abusing the Task for so long now :(
 
You should try Haskell :3
 
eat a dick
 
@mikeTheLiar Method not found: 'Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSInputColumn100.get_DataType()'
 
wait no, you'd enjoy that
 
Woah...
 
4:59 PM
Literally everything that "happens" in Haskell uses IO, which is conceptually the same as Task
 
@MattThrower this is thrown at runtime? Just trying to make sure I understand the issue.
 
Never seen this level of abuse in chat before. I'd have bought popcorn
 
War
@KendallFrey no-one gives a shit about haskell
 
So in Haskell, everything is a thing that returns a thing.
 
@Nathvi Or just a thing
the former is a function, the latter is a value
 
5:00 PM
@mikeTheLiar If you put the component into a package you can see the error - you get a big red cross on the component. And it actually throws the error if you run the package. And this exact same component runs without a hitch in a 2013 package
 
erything is a ratchet function that returns a ratchet value
 
War
50 secs ago, by War
@KendallFrey no-one gives a shit about haskell
 
lol
 
No one likes war.
 
i like war
 
5:01 PM
@mikeTheLiar Doesn't work, mind, but that's another issue. So many issues. Trying to make these components feels like working voodoo. Depends what direction the wind is blowing as to whether it works
 
@MattThrower probably a version mismatch between 2013 and 2015
 
he's my bestie
 
@mikeTheLiar It was built in 2015
 
@MattThrower that sounds about right for SSIS
 
@mikeTheLiar So I'd be more inclined to think that if it was the other way round.
 
5:01 PM
Wait what
 
SSIS is terrible
 
It was built in 2015 and it doesn't work in 2015 but it works in 2013?
 
@SteveG interesting coming from a vet
 
dafuq
 
@mikeTheLiar Yep
 
5:02 PM
@KendallFrey once again, eat a dick
 
@KendallFrey oh, Steve's a vet. That explains his wanting to rent cats.
 
i didn't want to rent them, i wanted to eat them
i just didn't want to pay full price
 
@MattThrower so does it actually work in 2013 or does it just compile?
 
Whatever happened to Amy? Did she block me, or leave?
 
@SteveG Are you a Korean with a huge nose?
@Nathvi Given that she's not here, I'd say the latter
 
5:04 PM
@mikeTheLiar I don't entirely know. If I add it to a package, the package will run from end to end and give me an output. But it doesn't do what I'm expecting it to do. Working out how to debug the bloody thing is the next problem
 
@Nathvi Amy's not here. Amy went away. Amy's gone.
 
@mikeTheLiar that's in 2013 .. it runs and gives a result in 2013
 
Hummm
 
@MattThrower IIRC you can programmatically set a breakpoint at runtime in your component.
 
@mikeTheLiar Thanks for trying to help BTW. Been doing this all day and got to hair-tearing stage
 
5:05 PM
System.Diagnostics.Debugger.Break() I think
 
@mikeTheLiar Yeah you can put a breakpoint in but I'm not sure if it'll step into the custom code at that point. It's something I need to try. But then, I need this to work in VS 2015 too :)
 
I think you have to do a System.Dianostics.Debugger.Launch() first
 
@mikeTheLiar Or .Launch()
ninjad
 
wewlad
@MattThrower if you programmatically call the debugger it will enter your custom code
I know it was helpful when we were developing our component
 
@mikeTheLiar System.Dianostics.Debugger.Launch() in the code? Another round of registering and reregistering in the GAC. Joy :) Will try that now
 
5:08 PM
Right, exactly
 
The GAC is just a repository for common assemblies on a machine, right?
 
So wherever you'd normally set a breakpoint, put that in the code instead
 
@Nathvi Yes, but to make these components work they have to be in the GAC. Because ... someone at MS didn't sacrifice a chicken that day or something
@Navthi just because
 
oook
 
tired
 
5:12 PM
in JavaScript, 1 hour ago, by Kendall Frey
I just spent 15 minutes searching for a toilet plunger. How's your day going?
glad to hear you're looking forward to tomorrow
 
lol
 
So I'm writing code in 2015, running it in 2013 and debugging it in another 2015 instance. I feel like I need a totem.
 
i need a beer. or a fifth
yeah a fifth sounds good
 
@MattThrower we need to go deeper
 
lol
 
5:19 PM
@SteveG or an eighth
 
+1
 
@SteveG honestly, one of the biggest challenges for me now is just designing an easy to use form with the sales orders
not a HUGE number of inputs on the form, but enough and enough data i need to get the overall feel right. not overcrowding, etc
 
your sales people can edit the PO's before confirming them?
bam bam bam bam
 
ya
wait wattya mean
basically, customer creates an order on the site. goes into our erp in a "draft" state/status
backoffice can edit it, customer can edit it
eventually it gets to a closed state
 
ah okay
 
5:28 PM
then confirmed by backoffice, then shipped
we have a monthly order cycle, the cust is going to be able to order for any cycle in the future they want
 
we call them purchase orders, because they aren't orders, but they're reqeusts for an order
 
sure
we have something like that now too
but the main stakeholder in this project whats that to go away
im on the fence....
i just dont want a bunch of sales orders that ended up not going thru to completion. they insist that wont happen. we'll see lol
 
yeah
 
@Kevin I just test the answer. Even if is not a 100% working solution, it was helpful.
@Kevin I usually find less working answers, but at least this one point me to a direction
 
panini
 
5:35 PM
All assholes
 
lmao
 
That needs to be a thing again
 
!!panini
 
May 4 '16 at 14:23, by Caprica Six
Jan 12 at 16:55, by Markus Werner
to all stupid put all "Panini" in your asshole
 
What the hell even was the context of the conversation?
 
5:37 PM
people were talking about panini's and wouldn't answer his non-understandable questions i think
 
haha
 
is that a panini in your pants or did you just get home from the club
 
lol oh thats def. not a panini
it's a slim jim, just got back from 7/11
 
As opposed to the slim jim that's always there?
 
Jim is always there
 
5:54 PM
lol
We, the GOP, in light of the alarming connections between the Trump campaign/administration and the Kremlin, have decided that we have no alternative but to reinvestigate Benghazi
 
6:08 PM
@SteveG the puppets are being played well
 
6:37 PM
@SteveG i found out my issue with my web api
in the JS that ends up calling the api, its wrapped in a dialog that will call api on a yes. i mispelled callback as classback LOL
 
hi all, I am doing a linq join and I seem to be having a bit of trouble

here is my linq join:
var exp = from u in db.Users
                      join o in db.Orders on u.Id equals o.Customer
                      join e in db.LogUserInfos on e.EmpID equals u.EmployeeId
                      where o.ShirtYear == shirtYear
                      select new { EmpId = e.EmpID, FirstName = e.FirstName, LastName = e.LastName, Department = e.DeptName, Product = o.ShirtCause, Total = o.Total };
 
is the only way to go from a view to communicate with a controller by using a html.beginform?
 
the line join o in db.Orders on u.Id equals o.Customer says that the type of one of the expressions in the join is incorrect, however if I switch the two columns in that line I get a n error that tells me to switch them back
Where am I going wrong here?
 
i think youre doing join wrong
oops
 
Is it supposed to be o.CustomerID?
 
6:42 PM
sorry i missed a line
 
yes
 
can you explain what the issue you are facing exactly?
 
I am trying to do a export to Excel
 
sorry i missed your follow up message
im having an off day
 
but I need to set up the message
@peterpep are you talking to me?
 
6:44 PM
lol
 
@mikeTheLiar intellesense gives me Customer
on o.
it is also Cutomer on insert
 
Intellisense is not a substitution for understanding.
 
what is the type of o.Customer?
@Skullomania
 
public ApplicationUser Customer { get; set; }
it is an instance of the application user
 
can you try changing to
o.Customer.GetUserId
 
6:48 PM
the column codefirst created in the database is CustomerId
 
Yeah I don't see how you're going to be able to compare that to u.Id (which I'm assuming is either an int or a guid)
 
applicationuser cant be compared to int
equals keyword wont work on that
 
application user is not an int
let me show you
 
u.Id is the int
u.Id (int) equals o.Customer (application user)
you cant do that
 
6:50 PM
yea so o should be o.Customer.GetUserId
 
this is the identity user Table Id column
oooooh
I understand
 
the types of what you are comparing are different
need to make them the same
if getuserid wont work (i think theres an issue with doing a query like that in EF) but you get what the problem is now so you can find a way to fix it
 
well in a normal sql join it would seem like this would work
they both contain the same thing
 
If I have an object that has some event handlers set on it, is it a problem not removing them before destructing the object?
I don't think it should be, I'm trying to figure out what's going on in this code.
 
idk
@KendallFrey
 
7:03 PM
@SteveG
 
7:23 PM
@Skullomania - Why are you still using the query syntax instead of method syntax with linq?
 
the one advantage is readbility
but if you comment and/or have variables that make sense dont really need to use query syntax
 
Advantage to which? I find .Where().Select() to be much more readable
 
lambda expression
since were familiar with method syntax we can read it easily
 
I like lambda.
 
yea i do too
 
7:32 PM
Query syntax is for people who don't understand lambdas but understand SQL.
 
Some frameworks (like dapper) require query syntax though
 
Why? I thought the jitter turned them into the same thing
 
@mikeTheLiar - Yeah there is a lot of truth to that, it goes the other way too I think. People who aren't familiar with SQL probably prefer method syntax, or fluent syntax, or w/e the daily name is.. the one with x =>
@mikeTheLiar - The jitter? Nah. The compiler has no clue about sql. That comes from the sql provider factory.
 
7:47 PM
hello children
 
hello god
 
It's time to tithe now
 
shit
starts filing unemployment
 
The lord loves a cheerful giver
 
sorry will you accept a kitkat?
 
7:54 PM
Yes.
 
provide mailing address and you will receive it in 1 month
 
lol
 
nathvi do you use mvc a lot?
 
No.
 
damn
 
7:57 PM
What are you confused about with mvc aside from the kitkat thing, and it better be all four sticks too, none of this left twix right twix bullshit
 
lol
basically is the only way to redirect from the view to a controller by using html.beginform("action", "controller")
 
well... there are several things going on there really.
using the html begin form helper will output a <form> element, which once submitted with a submit or input type submit button will issue a request.
 

« first day (2315 days earlier)      last day (2635 days later) »