« first day (2204 days earlier)      last day (2735 days later) » 

3:21 AM
my git repo is being naughty
it keeps highlighting random files as completely changed, but there are no changes
 
4:03 AM
 
 
2 hours later…
6:29 AM
ohayou
 
sup
 
7:05 AM
Gmorning folks
 
morning
 
@Nathvi Look, I honestly don't care what you do to your own code. Just know that if I'd have to work with you, and I would see you make repositories on top of a UoW, I'd immediately think you didn't really get the point of abstraction layers, and I would know that interaction with the most basic of basics (data) is going to be a huge PITA.
 
lol i don't know what any of those acronyms mean
 
Morn all
 
7:22 AM
@Proxy Get moar on the interwebz
 
i definitely should
also, people on forum complaining because pokemon give you only the option to chose between female/male gender
 
Yea man, who doesn't want to choose their actual gender: the apache attack helicopter
 
if all you have to worry about is the sex of your virtual char then its a good day
 
or not according to some
 
C4u
Good morning.
 
7:57 AM
o/ morgen
 
so weird, in my angular directive, I have link function. removing and adding class won't work
link : function(scope, element, attrs) {
scope.$watch('states', function(newValue, oldValue){
if(newValue && scope.states[scope.elementId].value > 0) {
angular.element(document.getElementById(scope.elementId)).removeClass('state');
}
}
}
 
8:28 AM
morning
 
@JackyNguyen property elementId exists on scope?
looks a little messy, tbh - is this intended to change the state of elements outside of its own directive, too? Not sure I approve of that...
 
yeah it does
 
gnarly
 
well, i agree it is messy, rewriting the code now
 
:D
 
 
1 hour later…
10:04 AM
what is the best way to parse a page? basically i need to extract some data like name of movies, actors etc
so far i have done it by hand as parsed the entire page into string array
and then searching for matching tags
but i would like to make something more practical
 
10:15 AM
has anyone here got much azure experience. database specific
 
@Serban - Was looking at favourited chat lines on this channel and noticed yours about "my javascript skills are as good as they need to be etc." nothing could be more truer.
and when you come back in 2 years time it'll be easier to learn
 
@Proxy HTML scraping? Use a HTML parser. ;-)
@Proxy In C# land you have HtmlAgilityPack. In NodeJS you have Cheerio.
 
Is that reading the pages off in an XML to class fashion
 
10:31 AM
@Proxy a friend of mine wrote an app that you highlight the screen and it extracts the data
 
@RoelvanUden okay so far i have done it in a way that i broke the html source into lines and removed tabs etc and then parsed based on tags
 
@hsimah I did a code first deploy but it was easy
 
@Ggalla1779 i have to extract data automatically :)
 
@Proxy Yeah once selected you get preview of the data it extracts.... then you click ok and it extracts same data automatically..
 
you can link it for the cool factor :)
 
10:36 AM
yeah, I'm a bit further in than that :/
 
10:50 AM
@Euphoria: thank you
 
@Proxy That's terrible and extremely error prone.
 
11:46 AM
o/
 
@RoelvanUden i know but in my case it was enough... i wanted to make it on my own
but to expand and make something usefull it would require a lot more time
so i'm looking for something reliable
 
HAP in .NET world is good for HTML parsing. ;-)
 
yeah i will take a look it
i'm planning on making somekind of app in wpf
for web scrapping or something
cause i need to learn multithreading as well
also i need to stop writing before i think through
 
12:02 PM
If you can, don't do multi-threading.
It's a sure-fire way to get yourself fucked up.
 
War
well this is going to end well
 
i need to learn it cause we use it a lot at my current job
 
@RoelvanUden I multithread every loop
 
@war ?
 
@Failsafe Parallel.For excluded :P
 
War
12:03 PM
^
doesn't really count (imo)
 
i was being sarcastic haha
 
@Proxy Threads are difficult. Extremely difficult. At your skill level, no offense intended, it's absolutely bonkers to even attempt to use them.
 
War
only counts if you actually write "var t = new Thread()"
 
@RoelvanUden i know, but i must learn
 
@Proxy I even have big question marks about your colleagues using it. It's hardly ever needed and it's a giant pit of snakes.
Why?
 
War
12:04 PM
I used to work with a guy who thought it was a good idea to create double the number of threads as you have cores from go weather you needed them or not
 
because the thread pool totally doesn't already do that...
 
well for start i got told that i need to get familiar with it on my job
 
War
his argument was ...
1. Not all theads will always be busy.
2. you want enough to keep every core busy
3. it saves you time / overhead, creating threads when you need them
I was like ... WTF!
that's the most crazy broken logic i've heard in a long time
 
@Proxy Why?
 
cause we are working intensively with it
 
12:06 PM
@Proxy Why?
 
the explantaion i got when i asked why
its used extensively
 
So they don't know
is what I take from that
 
War
or they don't want to explain
I've been there before
you get stuff like "just do it, this is how we work, deal with it!"
 
Just don't bother then. Muddle on like the rest of them, not understanding any kind of multi-threading implications.
 
thats dumb
 
12:08 PM
So is multi threading (for 99.99% of the cases)
 
if i do something at least i want to understand what i do
 
What you need is concurrency, not specifically multi-threading.
Concurrency is fine. Multi-threading is not.
 
War
When I get faced with that I tend to do what's asked then in addition look at how it's being used then one day I go in to meeting with 10 lines of code and rip the whole lot apart
 
maybe as i said i have limited knowledge
 
War
really pisses off the dev lead
 
12:09 PM
Unfortunately many people use multi-threading w/o understanding the implications.
I got so deep into it... now I'm afraid of it.
 
so i don't know what is the best way
 
War
@RoelvanUden possibly ... do we really have enough information to make that call though?
@RoelvanUden I do agree with you though ... most see threading == concurrency
don't really get the difference (they don't that is, not me)
 
@War So long as he's not working on an OS, it'll be very hard to justify the need of multi-threading.
@War Yeah, while the difference is massive
 
War
I use async a lot ... but rarey threading ... async handles most my concurrency for me
 
The only cases where I think multi-threading is justified:
- Building an OS
- Doing parallel math (use Parallel.* and don't do threads yourself)
Yeah, async and force everything to run on a single thread and you're set.
Never worry about locks or data corruption again
 
12:12 PM
Deadlocks hate it!
 
War
@RoelvanUden there's always that issue with web apps
 
how do web developers get around browser cache? I am using chrome incognito for .js changes and refreshing with chrome tools open, but still .js changes do not come in. Is it better to close the incognito browser and open a new one?
 
War
async request handling multiple database queries over http
i've hit that before
 
In C#, yeah, unfortunately. I just can't convince IIS to use one thread and no more.
But, in web apps, requests are pretty isolated and you have to be really doing dumb things to get into lock problems.
 
War
@JoJo I thought there was header the server could serve up for that to tell the browser when something expires
 
12:13 PM
^
 
ok, I will search, ty
 
Don't tell the browser to cache a file for a time, tell it an etag.
 
War
@RoelvanUden yeh true ... although I think that IIS using threads is a good thing ... makes the server more efficient
 
Then the client can ask "Hey server, I got etag xyz, is this still latest?" and server can go "Yep!" or "Nope, here's the new file"
@War I disagree. One web application should use one thread for processing user code, and n threads for handling asynchronous completions. Then if you want to scale out, you just tell IIS to make multiple appdomains/processes so you still can't get into trouble, ever.
Traditionally, this was not possible, lack of async/await and all.
So I get it's not like that.
Whereas nodejs is exactly like that. And it's so simple because of it.
 
War
hmmm reasonable I suppose
 
12:37 PM
@RoelvanUden thanks does the thing i need :)
 
hi guys, i have a situation, with a menu link on the left of a page using RadTreeView. When we click a tab we fetch a usercontrol for center content, top right nav content, and bottom right content.
we do this with Ajax, so all of the .js for the controls comes in
and .js is conflicting for each control has we click the left tree view
i am thinking of resorting to Post Backs.. but not sure what to do
I don't want to keep loading more .js ugh..
 
Can't you limit the app pool in IIS for threading options
 
1:36 PM
woha
saw my first win 10 blue screen
 
How did that happen
 
dunno my coworked was watching some video
and it occurred
 
errr that is really bad, sounds like a videocard driver or hardware
worse case you been haked
 
most likely video card driver
 
That happens once every few weeks on my AMD card.
 
1:44 PM
i did not have any problems with never windows (8
besides the micro stuttering in win8 which was irritating
 
2:02 PM
hello kids
 
in .net, i have a RadColorPicker that has OnClientColorChange, when I first load the page this even fires when I choose a different color swatch. But when I change out the colorpicker for the other colorpicker for bg colors - this event stops working
what should I do to reinstantiate the RadColorPicker so that the OnClientColorChange works?
 
2:17 PM
Morning @Nathvi
@JoJo add it to the delegate to fire?
 
Hi @juanvan that is new to me? now sure how I would do that. Going through and making bgcolors and fontcolors do not have shared methods.. this is a nightmare using Telerik
 
do you have the event wired? WPF right
 
no webForms
 
and you have the event wired up
 
yes i created a javascript function for each
if i load the whole page and click background colors tab
and then click a color on the palette.. it will fire.. but then clicking fontcolors next will fail
but if I refresh the page and click font colors tab first and click a color on that palette it will fire the .js function, but then clicking to the background tab, and now clicking a color swatch will fail to fire the function
because it is all jQuery ajax calls to webmethod content which then loads the new controls
I guess something is getting screwed up. OR .js is overlapping somewhere
 
2:25 PM
check the console logs
 
it just shows nothing
i can try a set mouse-click in event listeners again
 
something is miswired
 
in the .js?
I trust you, gonna keep at it
 
or in the name
 
k
 
3:14 PM
What are your thoughts on the usage of expression bodies in c# 6.0? Have you started to use them? Does less not necessarily mean more? (I nor the team of developers I work with have used them yet)
 
it works, you don't need all the extra lines 1/2 of 1 or 6 of a dozen
 
@Euphoria Hate it.
 
My gut feeling is that if developer A uses them in the codebase, developer B will come across and quickly assume it's a linq function or something and get slammed by the readability.
@RoelvanUden - Not very readable especially because we're use to seeing get{} set{} bodies for accesible properties
 
3:32 PM
@Euphoria I don't really like it either. It was a good idea in theory, but I think one long function signature with the expression all on one line is less readable than the 3-4 line full bodied version.
 
@juanvan phew.. worked it out... just making sure ALL .js functions/id's were UNIQUE for EACH tab... pffffft. tried to share too much :)
 
cool glad it worked
 
4:02 PM
Guys, can i have 1 Function with 2 different type of output data depend on the input data ? lol
 
@Pedram How related are they? Could you make a parent class that you inherit both of the types you want to output from, then output the parent class instead? if not you could always return a generic or object and do some fancy boxing
 
I mean i have like public (int || string) myfunc() {} :D as far as i know the output was only 1 data :D and always only 1 type ... if u wanted to pass more than 1 data you had to make a class output or reference stuff, but i was wondering if there was a way.
hmm this can actually work i guess
@BrennenSprimont I think the inherit thingy will work for me i just have to make an extra class
Well will try it :D Thanks :D
 
is that Method Overriding?
 
hmmm i think it through again while checking it and i think it's best i don't do this way, while inheriting is also an easy approach but I use this function with only 1 intended output for all my pages but only for 1 page i need both output together, so i guess I make a new function that convert the first output to the 2nd type and use it here :D
 
4:45 PM
@Pedram is that medhod overriding?
 
@JoJo nah it's not overriding
 
5:20 PM
Any experts in thread safety want to take a look at a code review?[Shameless Bumping Intensifies]
0
Q: Using Concurrent Dictionary and Lazy<T> to cache expensive query results and only run query once in a threadsafe manner

SidneyOk, so I'm querying a webservice. This webservice is slow with multiple o's. I want to cache the results of the query, because I only want to query on a given set of parameters once during my transaction (In addition to the query being slow, it's also rate limited, so I don't want to perform unne...

 
6:13 PM
@Sidney Is the login query locked?
 
Is there a way to start the list with 1 index
instead of zero
 
6:33 PM
Make a list that does a +1 on each indexer and get ready to be hated by all your colleagues
 
roel
if you would rate me from 1 -10 on programming scale where would i fit in
 
Guys is there a way I can copy the table styling of a table from word document
to html /css?
 
@Proxy I don't know your actual ability. I've never worked with you.
 
:'(
a girl rated my look 1
:'(
 
I don't know what you look like either. Besides, who gives a shit about looks.
 
6:41 PM
btw that agility pack is really nice
i managed to pull the data i need really quick
and its easy to use
better then my convoluted solution
 
Yeah, that's why I suggested it. Whenever I needed to scrape HTML in C#, I'd use that.
Reading lines is very finnicky.
 
@RoelvanUden Login Query?
 
@Sidney The bit in the Lazy.
Because if not, you need to specify thread safety mode.
 
Huh, I hadn't even thought about that.
I just assumed it was thread safe.
 
Oh wait, the defualt behaviour IS thread safe.
My bad.
 
6:45 PM
Yeah, Lock is to my knowledge thread safe.
Which is why I didn't think about that, because the code in the delegate gets called only once.
Thread safety is hard. :`(
 
@RoelvanUden, everybody gives a shit about looks
 
@Nathvi Heh. I don't care much.
 
@Nathvi yeah, but it depends on what category you're looking into
Potential mates - Look is high on priorities
C# Devs - Honestly, you take what you can get
 
lol
true
 
@Sidney You would have to do a TryGetValue, if fails, TryAddValue, if fails, GetValue, AFAIK
@Sidney Potential mates: I still don't care much about looks.
It's all about personality.
 
6:48 PM
You're a good man charlie brown.
Where would I need the TryGetValue? Either result of the TryAdd function means that the value is in the dictionary. Once added, values never get removed.
At least, until the entire program is unloaded.
If the program never unloads, well, that's someone elses problem. :P
 
7:09 PM
Hello
does anybody here know something about unity and c#?
 
This is kinda c# related because it's for Unity so i'll try my luck:
Any one of you ever had to glue Unity -> iOS <- OpenCV for iOS together?
 
gamedev.stackexchange.com/questions/132232/… if anybody can help please i would be trly grateful
truly*
 
@AndréMarques - Simple, just turn your main character into a ghost that floats around instead of a character that walks :)
 
maybe you need to add a collider like rigid body
 
Yeah add physics and DONT USE TRANSLATE. Those are literally teleportations
It wont use phyics
Or colliders
Use a Move or add force to the ragdoll
Controller moves, I mean.
 
7:19 PM
@TravisJ WHAT :S
 
yeah
 
so i didnt understand
i need to change my script
?
or add some components
 
or make it into a ghost game!
 
but i cant bro :(
 
Oh, then you need a physics engine for movement :(
 
7:20 PM
@AndréMarques TL;DR: Don't teleport your entity, move it.
 
my script is not moving?
 
You know, x', x'', x'''
 
Do you even english.
You're using translates.
Translates are teleports.
Teleports don't care about walls.
Did you see Captain Kirk being refused to be teleported into a building? You didn't. Because teleports.
 
No one refuses Captain Kirk.
 
hmm ok so i need to use rigibody and use add force or something like that?
 
7:22 PM
yes
 
last time i used that gave me an error that is when i get close to the Ai he bends with this script that doesnt happen because of direction.Y
and i couldnt do that in the other script that i had
 
That's a completely different issue.
 
ok i will try to get parts from the 2 scripts that i have to make 1
do you guy know anything i can read or video to watch that talks about ai movement?
 
It depends on the type of AI movement.
A dumb follower is a matter of steering to the player and moving when out of range.
But they can get stuck behind shit.
A smarter follower would be one that uses pathfinding to catch up.
It won't get stuck at least, but may feel unnatural at times.
A perfect follow like in classic RPGs mimics your every action and doesnt collide with the player
Essentially replaying your actions with a delay.
And there is a wide range of smarter AI that does all kinds of problem solving and other states.
Pick yo poison.
 
i just need him to follow when he player enters in range
 
7:31 PM
So your approach will work. If in range, point towards player and move in that direction.
 
7:44 PM
I have a web application on a server. If I want that web application to run a program when the user performs a certain action, how would I do this?
 
you wouldn't
 
@Nathvi why not?
Let me explain the situation...
I have a bunch of linux clients (raspberry pi's). There is a web application (IIS/C#) based management interface.
I want to offer the ability to restart the linux client's from the web application.
My idea was to install openSSH on the server and use bash scripts on the clients to facilitate this. That would require command prompt access from the web application.
IF that's not possible, then I guess I could try sshnet.codeplex.com
anyone here?
 
8:40 PM
@Vap0r "require command prompt access from the web application" has me a bit confused
@Vap0r If you own the machine everything is running on and can set the proper security then you should be able to get at the command prompt from virtually anything.
That being said it would be cleaner to use a proper api interface which is what I am assuming sshnet is.
 
 
1 hour later…
10:01 PM
hello guys
 
10:54 PM
lol i think i read this before like 2 year before but saw it again and still make me laugh xD
4427
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 

« first day (2204 days earlier)      last day (2735 days later) »