« first day (2049 days earlier)      last day (2893 days later) » 

4:00 PM
@Antoine this is actually interesting enough to me that I might try to demo it myself later
 
@TomW if you can do that it will be perfect, I've already tried stuff like GMap.net and still grinding but i can't do it.
 
Do you need it to be interactive?
Or is just drawing an image fine?
 
I would like it to zoom in and out and to find a way to add markers in the future.
If it can't be done I will try to get live with what I have :/
 
OK so canvas sounds like a good solution
 
@TomW where can I find you later?
 
4:10 PM
prolly still be here
 
I will work on other stuffs throughout the day, so I think I will be here too
 
I've downloaded a sample osm file, this stuff is not very obvious. I assumed somewhere there would be elements representing shapes
i.e. a set of points
 
There are nodes.
That have lat+lon coordinates. You can have ways (corridors) that are represented by a set of nodes. Ways can have tags (like room:A, room:B, corridor:xxx)
And still have relations that connect the ways to each others.
 
OK, so I guess you could write a query over the document to build a series of points or something more logical to bind to
 
4:27 PM
Is it true that You can only have a maximum of 2 action methods with the same name on a controller, and in order to do that, 1 [HttpPost], and the other [HttpGet]?
Like you cant Overload?
 
4:37 PM
That makes sense to me
 
You can have as many with the same name as you want, they just need different signatures
(attributes do not change the signature of a method (at compile time))
 
@CharlieBrown I tried that and it said the request was ambiguous
 
Well, is the route ambigiuous?
Can multiple methods respond to the same request?
 
like I had:
public ActionResult Edit()
public ActionResult Edit(int id)
public ActionResult Edit(string name)
 
well, makes sense then
 
4:40 PM
All [HttpGet]s
 
how would it choose?
 
like you said
different signature
 
/controller/edit => could go to any of those
in this case, its a routing problem
it doesnt know which method to call for the route
 
hmmm
okay. So I need to define that in RegisterRoutes?
 
do you have your router setup like
"/{controller}/{action}/{id}"
 
4:42 PM
Yes currently it only has the default route
 
so, id could be a string, blank, or an int
So, its not sure which method to call b/c of that
 
So I need to do:
"{User}/{Edit}/{id}"
"{User}/{Edit}/{name}"
?
 
[Route("/something/edit")]
public ActionResult Edit()
[Route("/something/edit/{id:int}")]
public ActionResult Edit(int id)
[Route("/something/edit/{name:string}")]
public ActionResult Edit(string name)
it will still get the 1st and 3rd confused though
How do you edit something without the ID of the thing?
 
How can you edit what you dont know the name of _
 
In the Action we can check who the user is by looking at REquest.ServerVariables and using a Authentication class we have
@CharlieBrown it will get the 1st and 3rd confused because strings are nullable?
 
4:49 PM
right
 
So is there anyway around that? or not really
 
not really. your not following REST, so its going to be a bit weird
 
I do need to learn rest :/
 
I can rest all day
 
4:51 PM
yeah, i mean, web api and mvc are designed around REST endpoints, so it gets weird when you try to do something non-standard
 
@CharlieBrown Well for the ID one at least it should be like this? no defaults / optional URLparameters?

routes.MapRoute(
name: "Default",
url: "{User}/{Edit}/{id}"
);
 
"user/edit/{id}"
 
@CharlieBrown so do I need a seperate MapRoute for the non-ID one?
 
routes.MapRoute(
"EditUser",
"user/edit/{id}",
null,
new {id = @"\d+" }
);
 
Okay thanks!
 
4:55 PM
Hey just started using Ajax and have been struggling with this issue all day. Can anyone shed some light on what is going on?
0
Q: How to resolve an Invalid JSON primitive model error?

Brian JI'm passing form data using the following assignment in an ajax post call: data: {model: JSON.stringify(formData) }, Where model is my model type tied to the view, so that the objects can be passed to my controller's model. But when I return a JSON bool value to the ajax method, I get a JS...

 
@BrianJ this is not needed data: {model: JSON.stringify(formData) }
 
can I say a 2-3 tree is self-balancing? or is it just not nice enough to delete?
 
data: JSON.stringify(formData) }
 
@CharlieBrown if I use data: JSON.stringify(formData) } without the model bit, my params passed into the controller at runtime are null
 
i was going to respond, but Erik beat me to it
 
5:11 PM
ok I'm still not sure if that's correct
going to take a break and come back to it
thanks
 
hello all panini
 
I'm a panini, he's a panini, she's a panini, we're all panini HEY
 
user47589
speak for yourself
 
being a pony doesn't prevent you from being a panini at the same time
you can be a poniny something
 
IM A PANIIIIINI IM A PANIIIIIIINI IM A PANIIIIIINI LOOK AT ME GRILL
 
user47589
5:28 PM
you're out of your mind
 
user47589
get back in there
 
a panini has no name
a panini has no desires
 
user47589
you know what this room needs
 
user47589
starts playing disco music
 
turns on disco ball and some colorful lights
 
5:42 PM
apparently vs2015 setup has "important updates"
I just wanted to install another feature and it's been updating itself for a half hour D:
 
user47589
maybe it locked up. try encouraging it
 
user47589
computers need reassurance too
 
buy it flowers.
 
kill the update no one likes updates
 
@CuddleBunny in my experience, the VS2015.2 update takes roughly 3x as long as the original VS2015 install. go grab a sammich panini
 
5:48 PM
@juanvan you cold blooded monster
 
it isn't an update to VS itself, it is an update to the installer
 
cold as code will to sacrifice my install
 
so it's update to the installer that updates VS that updates your company's application?
 
anyone ever use License plate reader software?
 
I've used software that can identify license plates, but I don't remember whether it was able to read the plate # or not
 
5:53 PM
I have used software that can identify license plates.
 
@tweray just the installer that updates VS, I wanted to add a feature I didn't check when I installed VS. It is done now, but it took a while.
 
it's built into the latest red light cameras.
given appropriately networked hardware it can even track the same car as it moves around the city.
 
@MichaelEdenfield do you think it could be modified to find numbers in an image?
as an example
 
uh. i assume that the license plate software is itself based on an OCR engine
which can find text in images
 
want to make an svg of the position and numbers in that type of image
 
5:56 PM
im not sure it would have the same boundaries to look at
 
any decent OCR engine will give you that information
 
sure it would be a pure custom job, but if it finds all the number
 
but typically, those cost $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
because that's hard
 
@juanvan an svg? explain
 
the image changes size
the maps have to move with the image
 
5:58 PM
did you mean imagemap?
 
yes
 
@juanvan illustrator can do that, just have it trace the image and delete the parts you don't want
 
have 20k images
 
more like 100k but who is counting
 
5:59 PM
Yeah, don't use illustrator then. It will cry.
 
there is an online tool that worked - but it was image by image
and was by hand
want the program to Read the image, find the Numbers, map the coordinates and the number at that position
this is all because of Mobile and it is easier to order with an image map
 
@juanvan what about Windows.Media.Ocr.OcrEngine?
 
will try a test program see what I come up with
 
it is a winrt api so you could use it with a windows 10 app
I was tinkering with it before I went to Japan because the point-and-translate app doesn't do Japanese -> English, only the other way around but the OCR engine supports it. I just ran out of time to get it working before I left.
 
If I register a message in many viewmodels all of them will receive when the message was sent right?
 
user47589
6:06 PM
@Antoine your question lacks context. we cannot provide a meaningful answer.
 
user47589
How are you using these viewmodels? How are the messages being sent? How are you "registering" messages with the viewmodels?
 
@Amy I'm using the MVVM Light, using the messenger.
 
user47589
That information is a start.
 
I have a timer. When it ticks it sends a message that is listen in many view models and will update info.
 
I heard the craziest thing. Someone told me that Dependency Injection is useless, an abstraction layer that is useless because we build shopping carts.
 
6:09 PM
I'm making ObsCollection.Clear() before I call the method in the register message handler, but even so it's summing to the previous objects
 
@Greg they are crazy
 
@Greg it's a well known rule that shopping carts do not follow any of the usual best practices for software development, as they are largely made of metal and plastic
 
@Amy the thing is that the message is running three times the method. That is strange.
 
user47589
it might help if you shared your code
 
6:25 PM
or it might not. that's the risk you take.
 
could all go down hill fast
 
there's a solid 80% chance no one will mock you
 
user47589
If you are mocked, there's a 10% chance it will last fewer than 3 sentences.
 
politics aside, this is a fantastic GIF
 
user47589
lol
 
6:27 PM
lol
 
sanders can move
 
@ReedCopsey did you see this? fsprojects.github.io/Fable
 
Yes, Fable is awesome
it grew out of FunScript
 
@juanvan dude there are videos of him jogging to the subway. He's in great shape for his age
 
6:29 PM
F# has had various ways of doing that for a while
WebSharper is the most proven - been around a long time - also has seamless client/server interaction baked in
 
If you run for president you must be able to run a 5k once a weekend
 
so you can call server methods from client methods and vice versa, and everything's handled for you
 
that's pretty rad
 
Fable is pretty awesome, though
Ionide (the F# support for VS Code and Atom) is all written using Fable :)
because javascript sucks
to be fair, this stuff is much easier to do in F#
 
that's like really nice naming, considering the game is also by msft, there's won't be any copyright problem
 
6:32 PM
F# came out of OCaml, which came out of ML - which stands for Metalanguage ;) There are tons of meta-programming constructs built into F#
@tweray what naming?
 
Fable is also name of a video game by msft
 
Yeah - But "Fable" is a normal dictionary term, too - fair use would really allow it to be used in this context
since it has nothing to do with gaming
 
yeah i know, just saying
what does Fable exactly means in english btw? :)
 
@ReedCopsey I just wanna know when we're getting type providers in C# :(
 
never :p
Anders hates them
though, to be fair, he doesn't really understand them, either
 
user47589
6:36 PM
type providers?
 
I don't really understand them either, I just know they let me be lazy when I'm integrating with web services and I LOVE BEING LAZY
 
it's like xsd.exe running on runtime imo, pretty handy when you are dealing with some json data that you really don't want to create schema class for it
i honestly have no idea how it works though, feels like magic for me
gist please
 
4 messages moved to Trash
thanks, and what's your question about the code?
 
I think that the timer is sending 3 messages. Because in the Message.register the Observable collection has always 3 times the method
I was refactoring (In the beginning I only have one message for 3 viewmodels and now I have 2 messages, but the .register is still running 3 times)
 
6:50 PM
just to confirm, you want the timer1_Tick method only run once right?
 
@tweray every X seconds.
 
@rlemon you bastard
 
:P
 
lol
@Antoine hmm, have you put breakpoints at the timer1_Tick and check if it's been called only once every 15 seconds?
 
6:55 PM
@tweray yes that is ok
Is just in the receiving side that is running 3 times -.-'
 
I really hate it when I'm basically at the mercy of another team
 
@Codeman better than being at the mercy of another team at another company
 
@Codeman Says that guy we're all at the mercy of
 
@KendallFrey do any of you even use visual studio team services -_-
 
I do
 
6:59 PM
Yea totally
 
@Codeman Is that different from TFS?
 
what's that again? /s
 
it has the best CI and unlimited private repos...
 
:30791875 no. Is a different viewmodel
 
i see, mvvmlight, i thought it's some msmq stuff
i can only see possibility that you get 3 instances of same class on the subscriber side
 
7:05 PM
in the timer handler?
Because in the other part I've put a counter.
 
@Codeman and @Amy Type providers are one of the most awesome language features invented in a long, long time - it's sad C# won't get them (but not too sad, since I use them anyways ;) )
 
!!wiki type provider
 
@kush The Gods of Wikipedia did not bless us
 
@tweray this stuff is magical. Sometimes it calls 3 times, and sometimes 2 times..Epic
 
user47589
@ReedCopsey i googled, is this an F# feature? the top links are related to F#
 
7:18 PM
yes @Amy
 
user47589
ok
 
basically, it's a "library" that provides code that's executed in the compiler itself, as part of the compilation process
which lets you do some awesome stuff
 
user47589
so, you can manipulate the compilation process?
 
user47589
or, the compilation result
 
user47589
i'm looking at examples but i'm not that familiar with F#
 
7:24 PM
Yeah well F# doesn't have type classes
 
well, that's really a separate issue
type classes wouldn't do the same thing as type providers
 
I know
I'm just poking the fire
 
hehehe
type classes would be nice, but there are a lot of things I'd rather have first
tbh - most places where I've wanted type class support I can handle via SRTP instead in F#
 
SRTP?
 
@Amy Type providers let you do things like have strongly typed access to json data from an online feed, validated at compile time, with 1 line of code
@KendallFrey Statically resolved type parameters
basically, you can do inline functions with static constraints
 
7:29 PM
Also, does F# even have the concept of a monad built in?
 
ie: Constrain 'T to types where there is a Foo method and the like
@KendallFrey It's handled via computational expressions - they provide the capabilities to handle monads (but also other things that aren't monads)
 
@ReedCopsey Oh you mean as an analog for do-notation?
/me is furiously googling away
 
yes
but really, a monad as a concept is separate from the language (in any language) - it's more whether the language has constructs to work with monads
 
Yeah I was just wondering, since I know that Monad is a built-in class in Haskell, and the equivalent is impossible in C#
but you don't need a contract for monads to use them effectively
 
well, you can do monads in C#
"do" as in create and use
look at LINQ ;)
LINQ is effectively just monads with stupid names
 
7:38 PM
@ReedCopsey well of course, I love em
My favourite is Task
 
is there a easy way to search against all columns in a module in entity framework 6
or even all string attributes in ones model?
 
user47589
easy? not really.
 
user47589
you can loop over the objects properties, take the properties you want to search, generate expression trees that the sql provider can understand
 
user47589
or, manually search each column
 
can you create a combo-column that gets all the other columns of interest concatenated into it?
 
7:50 PM
so like right now
 
It's been a while since I've dealt with massive text searching, is lucene.net still a thing?
 
I search based on the primary key
can i just throw an OR in the where and compared to another column or two
i know it will be slower
 
user47589
8:03 PM
lucene is still a thing
 
user47589
yes, you can put an OR inside the where clause.
 
user47589
you'll have to.
 
slow and correct > fast and wrong
(usually)
 
user47589
being correct is usually more desirable than being fast, but not always. take chess engines. at some point they have to say "okay this move is good enough" and stop analyzing. otherwise it'll keep going forever
 
yeah, I built an AI for a board game once, ended up having to scale back the accuracy by ~70% for the game to be performant on the client's slow machines
 
user47589
8:09 PM
another example: stealing a car, being fast is more important than driving correctly.
 
lol
 
@Amy unless you're planning to sell the car...
 
user47589
I don't comment on my car-stealing.
 
Is there any reason Type.GetType("Namespace.ClassName") would return null?
 
the classname is wrong
or the assembly's not the current assembly
 
8:19 PM
How can that be, if I'm constructing an object using the exact same Namespace.ClassName?
 
if it's a different assembly, you need the fully qualified name
 
hummm
@ReedCopsey, I think that is what it is
 
if you already have an instance, why are you using Type.GetType?
if you can construct a type, just use typeof<>
 
@Amy A former colleague claimed to have had a chess computer that could only beat him on difficulty levels that would cause it to get too hot to use and crash
He's pretty old.
 
@ReedCopsey, that was it! Thank you.
@ReedCopsey, I just wanted to make sure that I could make a type.
It's really a switch. If it's type A, do this, type B, do this.
 
8:23 PM
remember the is and as keywords also exist
 
Oracle vs. Google decision is in.
Google won
 
@Nathvi in general, that's typically a sign of a flawed design
just be aware of that ;)
 
@ReedCopsey, why is that?
 
switching on type? it's incredibly brittle, but usually a sign that your design is flawed - there's almost always better ways to approach a problem
 
I'm using it to construct an interface.
 
8:37 PM
?
 
wtf
@ReedCopsey, I know it's not the best design. Right now I'm trying to hack something out without really thinking about it. Good times.
 
@TomW did you manage to have any insights?
 
@Antoine well I started knocking together a demo application. Immediate problem - canvas isn't an ItemsControl so it doesn't databind in the way I expected
It might not databind at all, I need to look into it
 
@TomW oh, this will be much trickier than I was expecting -.-'
 
8:48 PM
@Antoine ah ok there might be a way round it. This looks like a start
 
9:02 PM
Hi,I am getting out of memory exception with the picturebox with the 3 mb Image(jpeg).I am disposing the images.Can anyone explain why?
 
user47589
We would need to see your code.
 
user47589
Make a MCVE that demonstrates the issue.
 
@Amy I'm sending messages using MVVM Light, but in the viewmodel I am making the register the function runs 3 times or 2 times each time I sent a new message.
 
user47589
@Antoine i was talking to @user3403437
 
(Is a timer that every X seconds sends message to update the info)
 
9:28 PM
@Antoine yeah this is quite difficult.
Data binding it is, anyway.
 
@TomW my professors are crazy man. They don't teach, they give us projects and say go google yourself. Before this I've never worked in C# nor used any architecture.
I decided if I'm doing I'm doing this somekind right and I've been implementing all the project using MVVM it has been a difficult and harsh journey but I think I'm learning, but this is no teaching method -.-'
 
The best teachers are the teachers who are the best. Do not try to C#. Let the C# you.
 
I've got some code-behind generating polylines according to some random OSM data I stole off the internet
they have point collections that look realistic
Can't see anything.
 
When you poly across cache, you will be lead to the one.
 
aah
lat-lon can have negatives.
 
9:39 PM
yes they can
 
When you have negative aura, the real c# mama jammers will be the one
 
I could calculate relative positions but I'm lazy
surely it should be able to do this for me
 
when the relative positions are lazy, c# is you
Be the compiler.
 
@TomW I don't know if I am saying silly things but can you define somekind of converter?
like 0.000001lon = 0.01x
and you just take into account the minus if you want to turn the plant to the north, otherwise is just a relative position.
 
@Antoine, no you can't
You must c# harder
 
9:47 PM
@Antoine yeah I've found some lazy copy-paste I'm trying to make work now
but I need to go to bed
so I'm going to leave it for now
 
hidy
ho
 
@BrianJ,
hello
 
hi
 
ever have one of them days where you spend your 9 hour work day trying to implement something small to no avail...then spend your evening going in circles
:/
actually it's not that bad..just need to take a break
:)
 

« first day (2049 days earlier)      last day (2893 days later) »