« first day (1974 days earlier)      last day (2968 days later) » 

12:03 AM
@NoMore_CodeMaster - Why not use DateTime?
 
@TravisJ I would like to use it but, this application is going to be used by social workers. The need to enter refugees information and most of the times refugees don't remember the correct date, they might provide day and year or even day and month.
I asked this question few days ago and all online users said, it's better to use separated int? fields for that.
 
hm
 
exactly, hmm
it's really unclean to use this way but it seems there is no other way...
 
I would make the assumption of 1 if they do not remember.
 
yes, for example most of the refugees from Somalia don't remember their date of birth
or even don't remember when some incidents has happened to them.
 
12:08 AM
Okay, so someone says "2015". From a heuristic standpoint, if that number were to be used at all, what part of the year would it be used with?
 
During Insert it's lot easier because I provide two textboxes for day and year and one dropdown for month. But as soon as I want to display them I get into problem.
 
Yeah there is the same issue with assumption
Do you assume 1? The midpoint? The end?
 
@TravisJ They will say, this thing happened to me 5 years ago. and then when you asked them do you remember the day or month, they will say no, then it means we can only save 2011
 
Perhaps if you offered a radio group as an alternative with the three sets: "early, mid, late" and then used 1, 6, 12 for months, or for days 1,15,28
 
This was also an option but per DHS and US State Department, you are not allowed to guess anything.
Anything that comes out of their mouth should be saved.
 
12:11 AM
then save it only as a string
 
I've got many limitations with this.
 
your chances of data are shot from it
Incident Date: "sometime in 2011"
 
string for day, month and year?
 
No for the entire date.
"Exactly April 5th, 2014"
"Perhaps late 2013"
And that way when you display it, there is also no guessing.
 
they can write this inside note/comment section, but we need to save in date format for later as we use for Reporting.
 
12:13 AM
You cannot use it for reporting, that would be guessing.
 
this type of information could be their DOB (date of birth)
@TravisJ exactly
 
So then there is no need to retain the data in a format which allows for reporting
 
but they need to get Age from these dates
Just by having the Year, we can get the Age
 
lol have them enter in an age then
What year were you born? Sometime in the 60's. How old are you? Oh, exactly 48.
 
they can't, because as soon as this data in entered is almost old, because next year it won't accurate anymore.
 
12:15 AM
=/ you aren't using temporal data?
 
Example: They will run ongoing reports where it says, show me people where they age is between 40 and 60
@TravisJ I'm afraid not
 
You really should be.
 
how's that?
I've never tried that or even heard about it.
 
@NoMore_CodeMaster - You include as columns in every table DateCreated, DateModified for the record and then when you persist data to the database you make sure to populate those if it is an Add() or an Edit(). Optionally include who did it.
 
Aha, I've got CreateDate and UpdateDate in each table
 
12:19 AM
nice
 
and also CreatedBy and UpdatedBy
 
Okay, so that means if they enter their real age you can relate it to that timestamp
 
aha, so basically some extra calculation between that age on that day and today's date?
 
right, if you wanted to see it in the future for example and make sure it was still accurate
 
@NoMore_CodeMaster Hooray for monads ;)
 
12:22 AM
hmm... it's a quick solution but not a clean one. So there is no way to convert the given month (int) to Month name? because basically this is the only part that it might get error message during conversion, the rest like day and year don't need to be converted.
@KendallFrey :D
 
@NoMore_CodeMaster DateTime.ToString, surely
 
@KendallFrey exactly, but this requires to have full date, right?
 
Yes
How can you have a partial date?
 
@NoMore_CodeMaster - Yeah but if they don't remember the full date, it is the closest approx.
 
my ideas was: I'm saving 3 separate int values for Day, Month, Year
Example: If Day is missing, I would like to get this:
- Feb 1985
Example: If Month is missing:
12 - 1985
Example: If Year is missing:
12 Feb -
I tried this inside Razor, it's working until I have null Month:
@(member.BirthDay ?? "-") @(@System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedMonthName(Convert.ToInt32(member.BirthMonth)) ?? "-") @(member.BirthYear ?? "-")
 
12:30 AM
That should probably just be a method in your viewmodel for member called BirthDate that returns a string approx of the composition so you aren't constantly doing it in the view like that.
 
@TravisJ I'm looking for an example to do this, because I've never done this inside ViewModel
My current Razor code is not approved by me, it's not the right way.
 
class viewmodel{
//stuff
public string BirthDate(){ return this.BirthYear ?? "-" + "otherstuff"; }
}

in razor

@member.BirthDate()
 
@TravisJ Thanks for your quick response.
I will try it now.
 
makes it easier to test too
 
That's correct. I would do the same thing for Place of Birth. Like: KENYA, Nairobi
 
12:35 AM
nice
 
Thanks a lot.
Wish you a great weekend.
 
public string CalculateBirthDate(int age){ return (2016 - age).ToString(); }
just writing top notch code wanted to share
 
I've got other question, I might ask it some other time. It's about SQL Server FILESTREAM. Whether it's a good idea to use this feature to save documents and mostly profile picture or it's better to save it directly in database.
 
 
1 hour later…
1:39 AM
@NoMore_CodeMaster (c) none of the above
 
 
1 hour later…
2:45 AM
hello
 
 
2 hours later…
user47589
4:43 AM
hello mr g.
 
4:58 AM
Hi! Can anyone help me with a question I had about a observable collection updating way too often?
 
 
3 hours later…
8:24 AM
@DestinyFaith do you mean firing change events more often than you'd expect it to?
 
 
1 hour later…
9:33 AM
@mikeTheLiar running through something quite similar to what you were doing now. I have an empty aspnet core site (didn't want the extra crap the full site template adds in) and am trying to work out what the bare minimum is to get an MVC controller wired up
Aha. You still have to have a ViewStart. I thought that had gone away
 
10:07 AM
@ErwinOkken as that just disappeared I guess you figured it out?
 
Yes, I'm quite wtf-ing now. I just tried randomly putting ( and ) around some SQL and it's working.. Couldn't find it on the net :S
SELECT (CASE
WHEN scoreuser1 > scoreuser2 THEN user1
ELSE user2
END) as userwon
FROM poolmatch
People in this chat told me that the best practice is to create a view for it, but I didn't knew what these were so I looked at a youtube vid and now fixing it. Love this chat :D
 
Syntax, how the fuck do they work
 
On the internet, I couldn't find a single ( or ) sign.. so I was like, does MySQL actually support this? :D
 
Not too familiar with SQL. I can usually guess what the right syntax is for a given problem but usually can't explain why
 
SQL is wicked-fun.
I'm trying to get my head around microservice architecture.
Any have any good resources? Would particularly like some practical examples.
 
10:23 AM
@Squiggle well that implies that people are doing it, rather than just going on about it :P
 
...indeed
 
I think someone at LinkedIn posted an article about it a while back
i.e. "How we're doing microservices"
 
My background is business apps, which are traditionally monolithic.
 
Why are some things just too hard.. stackoverflow.com/questions/17839015/…
 
Eck, that does sound difficult to do in SQL
I'd give it a good punt though.
 
10:27 AM
I think I just create a column 'winstreak' and keep it up-to-date. This is beyond my programming skills :P
 
Easy to do in C# with entities :)
Involving heavy use of TakeWhile() I expect
 
I can loop through a descending list and whenever the 'won' = 0, break the loop. That means I have to get all records, and I REALLY don't want that, I suppose ;D
If I create a view with SELECT * in it (20 columns) or just selecting 2 columns, does that affects performance?
 
Aha, I reckon you can do this with LINQ aggregates, one sec
Nevermind, cba
 
What is the name of the com library.
I want to control Internet Explorer using the COM interface in Windows.
But I was unable to find the name of the COM interface library.
 
10:48 AM
Dies that still exist? I thought it was deprecated long ago
@ErwinOkken awesome question :) you could also save yourself the hassle by adding the logic up front to compute a value in a win streaks table when you insert the result rows for future queries, you could also compute the initial set with your question answer
 
@Wardy That was my plan. But it's also cool to be able to see your longest winstreak ever, and not only the current winstreak. So I'm a bit convinced. However, I'm not sure about performance etc.
 
At least that way then you could get a history of win streaks for a team by doing something like ... Select * from winstreaks where teamid = @teamid
@ErwinOkken yeh that was my thinking ... To allow for such a case
 
O man that would be a nice view.. currentstreak and longeststreak ;D
 
Sweet, I may have a little bit of coding mojo coming back :)
I'm making up a silly example for an excuse to write an MVC site
 
Lol tom ... I have a ton of projects I don't have time to do
 
11:01 AM
@Wardy yeah I'm quite lame with personal projects
 
Personal projects for 1 full lifetime. I will never be done :)
 
Yeah. COM works atleast in Windows 8. Maybe they removed it in 10. I'll have to check
 
I had this neat idea about building an app that let's you define a business proc and then define objects with properties for that proc then add views of those objects as steps to the proc ... Off the back of that I could generate a whole mvc app to full fill the business proc
 
@Wardy so a workflow
My last project used something that sounds like that, called K2 BlackPearl
Workflow Foundation + loads of other junk
 
@TomW yeh the app would be a workflow app basically that's generates apps to fullfill workflows
 
11:05 AM
Expensive and complicated commercial product
 
I wouldn't use wf though
@TomW yeh I bet it would have some pretty good value ... I already have a pretty good stack to handle this though :)
The one but I ain't figured out is the html editorfor or display lfor extension bits I would need fir it
@html.editorfor(m => some meta from a db)
 
That sounds like it's going into CMS territory
Have a look at Umbraco
Only as it's FOSS, I'm not familiar with it
 
Cns us easy ... Been there done that
Jeez typing on a mobile blows
 
Yeah so customisation of view logic for a given type, with stuff pulled from data sources etc, sounds like exactly what CMS is for
 
Whats the point of workflow foundation? Never heard of it
I mean whats the difference between myself making a workflow and this
 
11:11 AM
CMS is purely about content blocks and managing those ... I'm thinking more dynamic form construction
@misha130 a heavy lump of balls you don't need
 
Good so I didnt miss anything
 
I've never actually seen anything that wf made easier
 
I had like private people asking me to build a CRM with a calculator of their choice inside so they can charge people for calculations of complicated business stuff
was looking for something that I could build it with easily
but I guess just my two hands
 
Calculator?
 
yea like they input data and then they have math on the side that gives output
probably using extrenal data or something
forget it
 
11:16 AM
@SteffenWinkler haha, that's funny :)
 
Is there an alternative for Google Custom Search Api ? Being limited to 100 searches a day is useless while testing.
 
@Wardy I've seen CMS logic considerably more complicated than that
 
WF is a handy tool, but difficult to persist.
 
Sitecore for example lets you embed snippets of Razor or XSLT into your layouts
Not that I'm endorsing Sitecore. Ugh.
 
@R593B mock it :P
 
11:22 AM
I found : duckduckgo.com/api but they state that the API does not include all of their links and I'd like to get as much results as possible.
 
@Squiggle LOL Google, laaame
^ mocking
 
arf.
@R593B what are you testing that requires live records?
doesn't sound like testing to me
 
Are you familiar with custom searches in google?
I want to search this type of stuff : documentary filetype:torrent
Then list the results in a listview or something.
 
ah, not really. Played about with it a few years ago but nothing since.
 
Then eventually I want to make it so when you click the link you can stream the torrent (Sort of popcorn time cloneish but for personal use)
But the first step is listing the results but google custom search API limits you to 100 searches a day. (Which I would surpass easily with personal use alone ;p)
 
11:26 AM
@R593B isn't it better to get the most relevant hits? Quality over quantity?
 
@scheien Hmm yes but still 100 searches a day is nothing.
The problem with DuckDuckGo seems to be that the newest "torrents" wouldn't show up I think
 
Well, I assume to limit is there so that you'd have to pay to use it. 100 searches is more than enough to get your concept up and running. It's the same with google maps, and automatic markers.
 
@scheien Exactly but why should I pay for something that is free to use on the internet though ?.?
 
You pay for the ability to use their api
 
Since its only for personal use X)
 
11:30 AM
It has to do with computers vs humans
 
Hmm is there a way to do a google search without their api?
 
Through the API you can do thousand upon thousand searches in very little time. A human can't do that. The workload for automated searches is way higher than a human could do
 
It is pretty amazing how quick Google is
 
Therefore you have to pay to use it.
 
You can paste a whole phrase that it may never have seen before and the delay in getting a page of results is imperceptible
 
11:32 AM
Enormous data centers with all data in-memory with an highly optimized search algorithm.
 
For single keywords I can see how that could be cached quite efficiently
Well yes obviously it's optimised
 
Is this an option for me? stackoverflow.com/questions/2259671/…
Just going to give it a try, doesn't seem there's many more options sadly, guess thats what you get when you give one company all the power >.>
 
I need something that can parse a block of math or c# for discount calcs
 
@Wardy I considered this sort of problem a little while back. In my case it was to do with scoring candidates
According to tests with numerical results. They wanted a linear combination of different tests for an overall score. Just adds and multiplies, basically
I believe the .net Expression Tree library is perfectly suitable as the abstract syntax tree part of the job. But I guess you're looking specifically for parsing which is indeed what you said
Might be a port of Yacc to C#?
 
@TomW possibly we have a system that allows pur clients to define the criteria for applying a discount on an invoice value right now they have to setup a lot of stuff ... Could be made easier if I gave them a box and they basically write simple math in there with the params I make availible
 
11:44 AM
You might also consider a rules engine
 
I just made a basic 10%,10%,... kind of template back in the day
with a list that you can add to
 
The BizTalk Rules Engine is the one I'm familiar but since that's only with a BizTalk server licence which is 40 grand per core...
 
Okay so : " From the TOS: "You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers)"

But someone replied on that with (Which I 100% agree with) : "Yes it breaks the terms of service but personally I wouldn't worry about that. Google can handle a little bit of scraping, after all they have made a fortune scraping other peoples sites."
 
@Wardy maybe look at the Roslyn code and find the part that comprehends * / + - = and numeric literals :)
And rip out everything else
 
write in C++, not C# if you want to do that kind of stuff
 
11:51 AM
Parsing seems like the kind of thing that the JIT should do a good job on optimising. I'd be surprised if it was wildly different
 
But last updated in 2014 so lets hope it still works.
The only downside : Limited to TPB but for what I want to do that seems fine :)
 
@TomW I have considered doing that but thought that there has to be a simpler solution
 
@Wardy copy-paste driven development. What could be simpler? ;)
 
lol come on
 
12:17 PM
Is there any way I can save this in the database?

SET @userid=3;
SELECT completeddate, (CASE WHEN userwon=@userid THEN 'W' ELSE 'L' END) AS won FROM matchresult

So everytime I can set the userid variable to use it?
 
12:37 PM
what do you mean 'save this in the database'?
you're just describing a query
 
12:51 PM
a query with a variable, but I want to "call" a query, and give a variable to it
 
Does anyone know if FTP supports modifying an existing file? Like pushing content somewhere in the middle of the file? :o
 
@RoelvanUden good lord I hope not.
 
@ErwinOkken well if you build the query dynamically, sure.
 
@Squiggle But is there a way / how is it called?
 
@ErwinOkken it's called "a SQL query". I'm not sure what your question is.
how are you building your query? Is this in C#?
there's probably another way to do it so you can just plug in a 'where' clause instead
 
1:00 PM
No not C#. But Im building a very large query. But I learned about view's yesterday. They are just a statement that's basically being saved, but it doesnt support variables.
 
ah OK.
:-/ you're diving in at the deep end of SQL, for sure!
 
The word stored procedures went by, but I'm not sure if I should use that
 
nah. They're powerful, but often a last resort if you want something more programmish
 
I found this tutorial: http://www.sqlteam.com/article/detecting-runs-or-streaks-in-your-data

But I have that same data for X users. So I'm not really sure about what the best method is to do this.
 
1:36 PM
Gosh my brain can't handle this :(
I think I got it :')
`SET @userid=3;
SELECT result, MIN(completeddate) as startdate, MAX(completeddate) as enddate, COUNT(*) as games FROM (
SELECT completeddate, result,
(SELECT COUNT(*) FROM
(
SELECT completeddate, (CASE WHEN userwon=@userid THEN 'W' ELSE 'L' END) AS result FROM matchresult WHERE user1=@userid OR user2=@userid
) AS m WHERE m.result <> mr.result AND m.completeddate <= mr.completeddate) as rungroup
FROM
(
SELECT completeddate, (CASE WHEN userwon=@userid THEN 'W' ELSE 'L' END) AS result FROM matchresult WHERE user1=@userid OR user2=@userid
 
2:03 PM
I did create a stored procedure for it because it sounded exactly what I needed. And I got it working. Thanks for your support guys <3
 
good morning
 
saturdays~~
 
yea
 
 
1 hour later…
3:27 PM
omg
i think i'm going to buy a new car, somebody talk me out of it
 
@SteveG Is it a cool car?
 
jeep grand cherokee
i've never spent this much, i'm a terrified little baby
 
Buy the goddamn car!
:P
 
lol
 
How much is it? :o
 
3:34 PM
it's like 40k
 
Omai
That is insane
 
is it?
keep talking me out of it
 
I drive a little car. It was 7K, almost new.
Its super cheap on gas, insurance, etc.
I imagine that the 40k, maintenance, tax, insurance and gas is going to hurt like a motherfucker
 
yeah thats what i'm worried about
 
And a cheap car and expensive car both get you from A to B.
 
3:35 PM
have you ever bought new?
do you regret it?
 
I bought one second hand, that was a year old.
 
regret driving off the lot and losing 10%
 
I fucking love that car :P
 
lol
well, jeeps have amazing resale value, so i'm not too worried about that
 
I lose about 1000euro/year on this car.
 
3:36 PM
ya they do - people Love jeeps
 
i'm worried i think i want all this stuff, will never use it, and will only go from point a to point b
 
my prius lost 1k a yr
 
I got a Peugot 107 so close enough I suppose ;-)
 
i've never heard of that
but, i think, once in my life, i should buy new
but, i'm not sure if i talked myself into thinking 40k is reasonable
image not found
 
Something like that. No, exactly like that. That's what I got. I don't regret it one bit.
 
3:39 PM
hmm
 
It's hilariously cheap to buy, in maintenance, in taxes, in insurance, and in gas.
(Which was my motivation really)
 
crap i'm going to spend too much
 
40k? :P
 
lol, well, i can afford it, and it's < 15% of my income, which is one of the things i've found when researching, but then, what else could i have if i don't go all ham on this shit
 
Ham and Brown Sauce on that Jeep? thought it was women covered in mud on the Jeep
 
4:02 PM
@RoelvanUden Fiat Cinquecento =)
 
@SteveG An Oculus Rift
 
4:20 PM
@SteveG: I've had a few cars, some of them new. If you like the car, then buy it. The worst part would be regretting that you didn't buy it, and settled for something less.
With a new car you would probably not have to pay attention to any other than service, and general maintenance.
 
If I have an experience formula for a certain rank (rookie, expert, grandmaster, etc) should I send the current experience to the clients and determine the ranks there, or should I send the rank? I know both options are possibilities but what is a best practice?
 
My opinion : If the old car still drives, Don't buy a new one.
Then again I am cheap like that ;p
 
user47589
4:46 PM
no, get a new car.
 
user47589
ponies like guys with new cars.
 
user47589
60's TV taught me that.
 
At that point your not getting the car for yourself but for someone else @Amy
 
user47589
what do you mean?
 
If you buy the car only to impress others , you are not really buying the car for yourself are you?
Not sure how I could explain it otherwise ;p
 
4:50 PM
what kind of ponies were on tv in the 60's
 
user47589
cute ones
 
5:09 PM
!!youtube muffin the mule
 
Not so cute. Kinda creepy.
 
5:21 PM
i have a question: what does a token do, when i am making external api calls?
i dont know if thats even a valid question :/
 
user47589
auth tokens
 
user47589
used to authenticate
 
@SteveG aah no not an SUV, they're for...erm...foolish people
Want to look like an a-hole get something with a V8
 
ok, i am already using public and private keys
@Amy why need tokens?
i lil more explanation please
 
user47589
193
Q: What is token based authentication?

csharpbabyI want to understand what token-based authentication means. I searched the internet but couldn't find anything understandable.

 
5:23 PM
thank you, ur the best :D
 
5:39 PM
short question-is it any posibble way to make sure a program get launch only from the cmd?
i mean not by the classic 2 click way
 
@TomW lol
but, do you live in a snowy climate @TomW
 
Nope
I guess practicality is a big deal. Still, I hate those things
Cannot see them as a desirable commodity
 
6:03 PM
@Slashy You might get that info from the parent process of your program.
 
7:02 PM
@Slashy add launch parameters that can only be added in cmd
or see if any kernel function does what you want
 
@misha130 what do you mean add launch parameters?
instead of the (string[]args)?
 
like app.exe -l
 
yeah but how to check it
in the program itself?
 
yes
if there was an -l
or not
 
@misha130 i'll try somthing just a second
 
7:31 PM
If you guys havn't checked out a game called "Keep Talking and Nobody Explodes", do it
Then check out this video: youtube.com/watch?v=psiyI6jVpKI
Some serious programming skills
 
If a nuget packet says it has a dependency, and for it example it says "Blahblah(> 7.0.1)"
Can I use "Blahblah version 8.0.1" ?
I'll just see and try I assume the > stands for higher than, Just wanted to be sure I can safely update packages.
 
@misha130 awesome bro.thanks
 
np
 
8:00 PM
Hello.
 
8:17 PM
Hey I finally got something going for a google custom search without API but only get like 10 results at a time this is my code : https://ybin.me/p/0a249d38bf0deda6#+1BoMeWMjFcqzCpeuYApWlrv5wMTJk6RTBJ+PcltCyo=
I can't figure out why it only gives so little results.
 
short question guys
 
okay
VERY SHORT
 
when i use the confiuration,where i can save user settings-it works only if the program launched from the same directory
but if for example i move it to another location,it like the properties does not exist and i need to fill them up again
any idea how to make it corporate for every location in the computer?
somebody
please :)
 
soo
 
user5671675
8:52 PM
Hi, is it possible to add two buttons into one datagridview cell? Would it be worth try if I could make another column with buttons ?
 
user5671675
Other way would be to merge two column headers but I need some help with it too
 
user47589
9:12 PM
how are you saving your configuration, @slashy?
 
11:20 PM
o/
 
user47589
11:34 PM
hi steve
 

« first day (1974 days earlier)      last day (2968 days later) »