« first day (1563 days earlier)      last day (3397 days later) » 

5:01 AM
 
5:14 AM
Anyone got Angular and ASP.Net MVC experience?
 
@AnimalStyle I think @Squiggle has
 
Trying to figure out the relationship if I use a bunch of partial views each with their own angular controller and how to get multiple controllers working together with a bunch of partial views.
@BenjaminDiele cool thanks
 
 
1 hour later…
6:47 AM
i am trying to understand how to inject my code as plugin into already compiled exe, just like how licensing system works, will show form license / check the license before the real program start
 
7:06 AM
Heya :D
Sup?
 
Hi
frustrated at my ineptitude at EF :D
 
7:38 AM
Morning all
@BenjaminDiele: Still struggling with the ef modeling?
 
hey @scheien
yeah
 
Did the comparison get you any further with code-first?
 
At work right now, so I'm not really able to dedicate my time to it
not really
but I think my problem is larger than Meter => Premise
that's why I'm trying to convert to a model first
 
It's not always easy to model the database to match the exact domain
 
Indeed, and it's not helping that I don't know all that much about the complicated stuff of EF
 
8:19 AM
Hmm, is it possible to go from a CodeFirst approach to a ModelFirst? I'm trying to remodel a part. But it seems like my application remembers more columns than needed. e.g. I had a Discriminator column in my Meter table (inheritance). Removed that, remodeled it via the designer. Now my code is complaining about an invalid column name "Discriminator"
 
 
1 hour later…
F4z
9:43 AM
hello
 
 
1 hour later…
11:12 AM
1446
Q: Cycles in family tree software

Partick HöseI am the developer of some family tree software (written in C++ and Qt). I had no problems until one of my customers mailed me a bug report. The problem is that he has two children with his own daughter, and, as a result, he can't use my software because of errors. Those errors are the result of...

 
11:24 AM
ye, many wierdos around the world.
 
It's not that weird if you look at history.
 
Yeah, just look at the mentally stable roman emperors
 
11:42 AM
I would still call it weird, even if it happened often in a couple of centuries ago.
 
12:04 PM
how can i copy ?
console's output
 
@scheien Meh, it's just dictated by today's standards. If you take that away, it might not be all that weird. We're just boxing in our culture with preconceptions on things that are 'normal' (aka boring stupid people doing boring stupid things) and those that are 'weird'. In other cultures it might not be considered weird at all.
 
@CustomizedName Alt+Space and select Mark
 
@RoelvanUden It's not all that weird though. Inbred species are less resistent to a lot of stuff.
 
@BenjaminDiele that only happens with direct siblings whom essentially share 100% of their genes; it isn't the case when there is less (e.g. cousins, half-siblings, etc). Albeit I personally think that parent/daughter is a bit weird, too, it is considered acceptable in some cultures and does not have the gene problem
 
@RoelvanUden *50%
 
12:14 PM
My colleagues had a good laugh at that question
 
@RoelvanUden and it does have the gene problem
 
that would imply that cousins would have the same problem, and they don't
 
They do
but they're less similar, so it's slightly less of an issue
 
Look up the research again. ;-) That's just culture talking right there.
 
I thought it was the genes talking
If two cousins share a recessive gene for some disorder (inherited from their grandparent) then their children may well have the disorder.
 
12:17 PM
@KendallFrey execellent thank you
 
>Traill et al. reported a median MVP of 4,169 individuals.
So I think that yes, even cousins are not immune to genetic funky stuff
/me removes search history
 
@RoelvanUden: Can you look up a culture where incest is a regular accepted behaviour?
 
I know of one not too far from where I live
Not siblings AFAIK, but cousins sometimes marry
 
@KendallFrey America?
 
in Canada
 
12:21 PM
Almost the entirety of asia, too
 
Iceland has a very limited gene pool. I know they undertake genetic studies there.
 
I heard that pretty much everyone is related to a fairly high degree in Iceland... and accidentally hooking up with a family member is more common than they care to admit
 
see also the Spanish royal family circa 1700 - en.wikipedia.org/wiki/Charles_II_of_Spain
 
@Squiggle I think almost every royal family of a few hundred years ago
 
@BenjaminDiele the Spaniards had it worse than most.
 
12:24 PM
the phrase "blood purity" comes to mind, it was pretty common for royal families
Apparently googling that turns up harry potter though.
attach the royals and off you go :p
 
But we'll never be roooooyaaaaaals
 
its /really/ not in our blood
 
This is a first: I bought the next year's version of a game I already own.
 
oh? Is The Sims franchise still going?
 
yes, but no
 
12:33 PM
Barbie then?
 
Sims 4: lets rip out all the content of our last games edition
 
/me punches @BenjaminDiele to Jool
 
@JamesTrotter You know what you're getting into when you're buying EA
 
@JamesTrotter I hear there's lots of sex now
 
@KendallFrey So I was right?
 
12:34 PM
as far from it as Jool is from here
 
@KendallFrey sold.
 
@JamesTrotter no brothels, afaik
zooom
 
@KendallFrey EA are probably holding it back for a $40 expansion pack
 
What, the Sims?
oh
 
12:55 PM
Anyone have a reference to the practice that you should catch FileNotFoundException instead of using File.Exists?
 
1:11 PM
depends entirely on your assumptions
is it an expectation that the file might not exist? Or is the file not existing an error?
 
13
Q: How does using the try statement avoid a race condition?

Honest AbeWhen determining whether or not a file exists, how does using the try statement avoid a "race condition"? I'm asking because a highly upvoted answer (update: it was deleted) seems to imply that using os.path.exists() creates an opportunity that would not exist otherwise. The example given is: ...

That isn't C#, but explains it well enough for my purpose.
 
so it's more a question about threading and file handling?
 
Nothing about threading
 
oh, so just mainly about best practice?
 
Just the race condition where you check whether a file exists before opening it.
I won't go so far as to say "best" practice; that's up for debate.
Achievement Get! Use a semicolon appropriately
3
 
1:20 PM
you could technically use both approaches, if you're super-paranoid about the file being deleted by a competing thread...
(could have been a normal comma, too)
(or even a hyphen)
 
I think a File.Exists might be a good solution to avoid 99.9% of the overhead of throwing when a file doesn't exist.
it's not foolproof by itself though
@Squiggle A dash, you mean?
@Squiggle I think I'd have had to tweak the sentence to put a comma in
 
@KendallFrey: If you do a File.Exists(), you could still get a FileNotFoundException, if the file is deleted/moved etc after the inital check.
 
That's right
 
Aye. But the pragmatic part of me says "is that really going to happen?"
 
Do you always program after that statement?
:p
 
1:25 PM
@Squiggle Yes*
 
Assumption is the mother of all fuck ups
 
*not to you, but to someone
@scheien No, the Holocaust was the mother of all fuck-ups
 
It's a good candidate nonetheless
 
@KendallFrey That depends from which side you're looking at it.
 
The holocaust was merely an extrapolation of the assumption that the aryan race a) existed, b) was inherently superior and c) was entitled to murder those with competing or 'lesser' ideologies
Assumptions are fine in coding. Without them I cannot have a well defined specification...
 
1:42 PM
I agree that you can assume certain things, but in this case, I would have done the try/catch in addition to check for a exist, since it may very well be deleted outside of the application. I sure don't want to break because of a silly error like that.
 
I completely agree.
 
@BradleyDotNET It's not a C# problem. I have some trouble with my randomizer. My formula does not work as expected and i need a different approach. If you are good in maths let me know. If you are experienced in math stuff, you could solve the problem within 1-2 hours i think. We pay you. Let me know if you are interested in more details.
 
M J
2:11 PM
hi guys
 
ehyup
 
M J
Attempted to read or write protected memory problem
is happening
 
OK... what sort of project is it?
 
M J
@Squiggle CSharp
 
Windows forms? WPF? hosted web service? computer game? windows phone? :)
 
M J
2:15 PM
@Squiggle Windows form
 
also have you tried running it on more than one machine? Can you replicate the problem every time?
could be a hardware issue, or compiling the wrong type of binary(?)
 
M J
@Squiggle I try with three machine
two machines throw this Exception.
 
Can you post the exception?
 
also @MJ can you tell me whether each machine is 32bit or 64bit?
 
M J
32 bit system
 
2:22 PM
all three of them are 32bit?
 
r u the real michael jekson?
 
M J
@Squiggle Checking it
@Squiggle All three are 32 Bit
 
Anyone here got experience with Sharepoint?
 
M J
Kindly Check and Let me Know
 
2:37 PM
Got the code that throws that exception?
 
M J
prtdoc.Print()
@scheien i'm trying to print the Document
 
Paste the whole method if it is not too long.
 
M J
It Throw this Exception
Private Sub prtdoc_PrintPage(ByVal sender As System.Object, ByVal ev As System.Drawing.Printing.PrintPageEventArgs) Handles prtdoc.PrintPage
Dim linesPerPage As Single = 0
Dim yPosition As Single = 0
Dim count As Integer = 0
Dim leftMargin As Single = 25 'ev.MarginBounds.Left
Dim topMargin As Single = 50 'ev.MarginBounds.Top
Dim line As String = Nothing
Dim printFont As Font = New System.Drawing.Font("Lucida Console", 10.25!, FontStyle.Regular, GraphicsUnit.Point) ' Me.richTextBox1.Font
Dim myBrush As New SolidBrush(Drawing.Color.Black)
 
Nice c# btw
 
M J
@scheien ????
 
2:45 PM
@MJ This is a C# chat room...
 
M J
@DavidG Bro I know. Tell me Solution if you know?
 
@MJ I guess you're using the wrong drivers for your video cards.
:)
 
@MJ If you know this room is for C#, why are you posting VB?
 
@MJ install gentoo
 
M J
@JamesTrotter okay i try
@Squiggle i will check
@DavidG Sorry Bro i Can't Find chat room for vb.net. thats the Problem
 
2:59 PM
@MJ I bet the machine on which it works has a different graphics card or different driver version than the other two. I had that problem once, fixed it with a driver update.
 
M J
@Squiggle okay bro i check it now
 
word, bro.
homez mucka chump blud
 
M J
@Squiggle Brother
 
3:42 PM
Hey everyone.
 
hi @Greg
 
@TravisJ Hey, how've you been?
 
good, just got back from a weekend of skiing :)
 
4:01 PM
That is nice, we don't have much snow on Mount Hood right now.
Most of it is manufactured, very little fresh powder.
 
Hey, can someone tell me how to draw 6 ellipses in a 360 way, like this image, i started like this:
for (int i = 0; i < 6; i += 360 / circleSize)
{

}
i am onPaint event
 
@Greg - Yeah no powder, all manufactured. But Bear Mountain has the largest man made snow setup in the US.
@KraziiKiiD - That isn't much of a start.
 
@TravisJ i don't know ho to continue, if you could help me it would be great.
 
I haven't worked with using onPaint. I do web technologies. I could tell you how to make them in css or on a canvas :)
 
@TravisJ Nice, how have things been? Haven't spoken to you in awhile.
 
4:06 PM
@TravisJ well it would be similar like c#?
i mean how can i get the positions like this?
i know x and y should have like: i * ? / ?
 
@Greg - Been good, implementing some assignment logic now that the forecast logic was updated.
@KraziiKiiD - everything should be trig based
 
@TravisJ what does it mean?
 
really?
Trigonometry (from Greek trigōnon, "triangle" and metron, "measure") is a branch of mathematics that studies relationships involving lengths and angles of triangles. The field emerged during the 3rd century BC from applications of geometry to astronomical studies. The 3rd-century astronomers first noted that the lengths of the sides of a right-angle triangle and the angles between those sides have fixed relationships: that is, if at least the length of one side and the value of one angle is known, then all other angles and lengths can be determined algorithmically. These calculations soon came...
It's kind of a big subject
 
i didn't know trig term
but i don't know hwo to apply trigonometry
here
 
@TravisJ - Do you use Angular?
 
4:14 PM
Angular <3
 
@Squiggle - Think you could help me? I have a kendo autocomplete textbox bound to the $scope.Company member but when kendo triggers the read method the $scope.Company member is null. :(
 
I haven't used Kendo tools, but perhaps I could help
 
@SpencerRuport - No, not a fan of regexing innerHTML, placing inline definitions for events, nor overcomplicating views under the pretense of OOP.
 
@TravisJ - Yeah I'm not a big fan of it either. Knockout made a lot more sense.
 
@TravisJ That is cool, I'm reading that book you recommended on Dependency Injection. Exceptional book, then I'm hoping to get into applied mathematics for Cryptography.
 
4:17 PM
@Greg - I haven't read any crypto books, but a good place to start would be in the basic coverage of the topic in discrete mathematics.
 
@TravisJ Want to become more familiar with security exploits, vulnerabilities, attacks, so I can better prevent them.
 
The DI book is phenomenal imo
 
@SpencerRuport you really need to use the two together? Angular works on digest cycles, so i'm guessing the Kendo stuff is being resolved first
 
@Greg - Let MS handle the security :)
 
@SpencerRuport demos.telerik.com/kendo-ui/autocomplete/angular is this what you're using as a reference?
 
4:19 PM
@Squiggle - I think that's exactly what's happening.
 
@SpencerRuport are you using $resource?
 
@Squiggle - No because telerik in their infinite wisdom does not include an example of an AJAX autocomplete.
 
@TravisJ I want to get better at it though, that field really intrigues me.
 
$scope.companyAutoComplete = {
    dataSource: new kendo.data.DataSource({
        transport: {
            read: {
                url: config.WebApiUrl + '/company/all',
                dataType: "json",
                data: { accountName: 'test' + $scope.Company },
                type: "GET",
                contentType: 'application/json; charset=utf-8',
                cache: false,
                complete: function () { console.log("Requested data: " + $scope.Company); }
            }
        }
 
@Squiggle Telerik has wisdom?
 
4:20 PM
The complete method shows the appropriate value but the GET method fires before $scope.Company value is set.
 
@SpencerRuport how are you initialising $scope.Company?
 
$scope.Company = null;
 
and loading it?
 
So not at all really.
 
oh sorry
 
4:21 PM
Loading it?
 
n/m sorry I'm being dumb.
 
<input type="text" kendo-auto-complete ng-model="Company" k-data-source="companyAutoComplete.dataSource" class="form-control" id="txtCompany" />
 
urgh. Very difficult to pick that apart without having all of the code.
 
That's really all the code there is.
 
I mean without being able to debug it locally
 
4:25 PM
Can you give me an example of how it should work?
I just need a way to populate the URL with the appropriate search value.
 
@TravisJ What would be the difference between Discrete Mathematics vs Applied Mathematics?
 
WindowsIdentity.GetCurrent().Name; is used to get the username of the user currently logged into windows correct?
 
@Greg read the wikipedia articles on both
they aren't mutually exclusive
 
@SpencerRuport looks to me like the recommended approach is to use Kendo's own datasource filtering docs.telerik.com/kendo-ui/api/javascript/data/…
 
but when I do Response.Write(WindowsIdentity.GetCurrent().Name); i get
NT AUTHORITY\NETWORK SERVICE instead of "domain\user"
 
4:34 PM
but even then, I would suggest not trying to get it to resolve the $scope property
 
why?
I have identity impersonate set to true in my web.config
 
@KendallFrey I'll have to check it out.
 
@Squiggle - I don't see how that stuff applies when you're doing an AJAX call. They never combine the two examples.
All the AJAX examples don't query by any criteria as far as I can tell
It's all well and good when it's filtering a static list but when I need Kendo to provide the value to the AJAX call I can't figure out how that's done.
 
@Greg - Technically applied mathematics (vague term btw) is the practical use of math in a real world scenario. You could basically call discrete math a form of applied mathematics, but the term is so broad that it is kind of useless. Applied mathematics doesn't come up much in engineering because it is not specific enough.
 
Ah, @TravisJ thank you.
 
4:40 PM
@Greg - They use that at most ivy league schools. UCB, UCSB, MIT, Standford, Harvard, etc
 
is it different if the person is using Active directory?
 
@TravisJ Hm, I'll have to check into it. I want to get better at security.
 
@Greg - I believe chapter 9 is the one that uses mod for encryption (which is where you would want to start)
 
Should functions always return a value for good TDD practices?
 
after that, you should buy a security book, but I am not sure which one because I didn't go that route
 
4:42 PM
void is an evil?
 
@Teomanshipahi - Not if it modifies state
 
Hmm, so they should not be unit tested?
or can be?
 
The unit test would look at the change in state and not at the returned value
 
ah ok
makes sense thanks for clarification
 
@TravisJ Okay
 
4:57 PM
@SpencerRuport - You are familiar with jQuery right?
Check out this edge case: jsfiddle.net/d2kL7ohr
 
Is Discrete Mathematics going to be so difficult I should take a class on it?
 
@TravisJ - I'm not sure what's happening there.
I've never seen someone use $()
 
@Greg - Perhaps :)
@SpencerRuport - $() is just a jQuery empty set.
But .add() is supposed to modify the set, and its not because apparently it returns a new object with the modified set. Anyway, found it interesting and thought I would share
 
That is interesting.
 
@TravisJ - I think this might explain what's going on better.
When you add an existing element it doesn't actually move the dom element but it does allow you to cascade things like css properties.
Unless I've misunderstood you completely.
 
5:10 PM
@SpencerRuport - Right, because add returns this for chaining. So really you are only going to be using the result of add for the css modification while b has really not changed at all.
 
b has changed though
 
nope ;)
Well, b's set has had its css changed because it was part of this
but b itself is unchanged
 
oh yes yes
you're right
 
5:24 PM
Evening!
Simple question: the int variables occupy 16 or 32 bits?
I want to make sure I found a mistake in this textbook, page 27.
 
@qd0r I'm decent at math, if you can explain the problem I'll take a look at it.
@IonicăBizău which int?
the int keyword is a synonym for Int32
which is obviously 32 bit
 
@BradleyDotNET sounds great. may i send you an e mail with a summary or add you on skype?
 
but there is also Int16, which has the keyword short
 
@BradleyDotNET What other types of int there are? I remember I used BigInteger in a project.
See the link I posted above.
 
5:28 PM
@qd0r You can send me an email at bradley.dotnet(at)gmail.com, or just explain it here if its simple enough
 
It says:

> short | signed integer, 16 bits
> int | signed integer 16 bits
 
@IonicăBizău You'll have to send me an english translation :)
int in C# is a signed 32 bit integer
since it maps to Int32
 
In this context I guess the second row should be signed integer 32 bits.
 
in other languages (and this may apply to C#), the size of an int is platform dependent anyways
Although I believe its 32 bit on any modern system
 
5:31 PM
It certainly seems the book has a typo
 
When I saw that, I wanted to post a SO question about What's the difference between short and int?, but checked the docs first and I saw that int occupy 32 bits.
 
@BradleyDotNET This doesn't apply to C#
The C# specification defines exact lengths for all numeric types.
 
F4z
1
Q: TextBox Indexof and LastIndexOf

F4zBecause TextBox doesn't have a find function, I've created and modified my own version of it to my needs. I've created to functions. One for Search Next and another for Search Previous My problem is that: If my search term is more than 1 character long and I've searched for the term four times...

 
@KendallFrey Thanks for the clarification
Thats nice to know that its platform independent
 
@F4z Can you debug your code and narrow down the problem? People on Stack Overflow don't want to debug your code.
 
F4z
5:35 PM
@KendallFrey I already mentioned my problem.
If my search term is more than 1 character long and I've searched for the term four times, IF on the 4th term I decide the click on search previous it goes back to the previous search term and that works fine. Now because I clicked on search previous 4 times and I went to the 3rd search term using previous, IF I decide to go the 4th term again using Find Next, I have to double click on find next and then it selects the 4th term.

If my search term is 1 character long and I want to search for a character, I type the character e.g. 'o' and it goes through each character in the textbox but onc
 
@F4z No, you described your symptoms
symptoms are fine if you're talking to a doctor, but not if you're talking to someone who shouldn't be debugging your code.
 
F4z
@KendallFrey If I described my problem further I would confuse myself and that leads to confusing the people in StackOverflow.
well I assume if anyone wants to help they could *try to debug the program and see the problem clearly. It's one of those problems where you run it and you can understand.
I was planning on showing a gif oh it but..i dunno as long as it explains the problem
 
5:50 PM
Hi
 
Hi @KeremZaman
 
@TravisJ Is it fair to say, Cryptography is really just Algebra?
 
@F4z I agree with @KendallFrey's sentiments even though you have clearly described whats going wrong, and shown the code, there's quite a bit to go through to find the error.
It would be great if you could narrow down the source at all
 
first day at my new job, morning guys :)
 
@Greg - No :)
 
5:53 PM
@Greg Thats a pretty odd statement to make...
 
@TravisJ So what type of math is primarily used for Cryptographic Algorithms?
 
@Greg A lot of crypto algorithms depend on the difficulty of integer factorization for security.
 
F4z
@BradleyDotNET I tried to narrow it down. I guess there is quite a lot of code to look at however i have a feeling it has to do with the selection start and selection length variables being set in the wrong positions which make me want to double click
 
@Greg Would you consider calculus "just Algebra"? Pretty much all math problems boil down to "solve this equation" which many people call "Algebra".
 
SHA-2 is a set of cryptographic hash functions designed by the NSA (U.S. National Security Agency). SHA stands for Secure Hash Algorithm. Cryptographic hash functions are mathematical operations run on digital data; by comparing the computed "hash" (the execution of the algorithm) to a known and expected hash value, a person can determine the data's integrity. For example, computing the hash of a downloaded file and comparing the result to a previously published hash result can show whether the download has been modified or tampered with. A key aspect of cryptographic hash functions is their one...
 
5:56 PM
@BradleyDotNET calculus is based on the fundamental principle of calculus
 
@BradleyDotNET I don't see how you can boil calculus down to "solve this equation"
 
algebra is just the term for using symbols to stand in for numbers
calculus has a couple principles. The fundamental one is "make this number smaller and smaller or bigger and bigger and see what happens"
 
@Pheonixblade9 that's bit of an oversimplification, perhaps
 
@KendallFrey Really? When its all said and done, you are left with an equation to solve
The calculus piece is setting up that equation
 
@BradleyDotNET can you express a limit as "an equation to solve"?
 
5:57 PM
Or you are left with an equation as your answer :)
 
I'm not sure how you could do that
 
@KendallFrey well, that's the english language version of the fundamental principle of calculus :)
 
@KendallFrey Thats a fair point
 
F4z
@KendallFrey @BradleyDotNET this is what I mean :media.giphy.com/media/3xz2BJgF2DrtcCnP1e/giphy.gif
 
Though limits end up just being part of the equation
 
5:58 PM
Fair enough.
 
@F4z I for one don't want to waste time discovering things that you could easily discover by debugging your code.
@BradleyDotNET OK, but limits are definitely not algebraic
 
haha so I have my laptop and nobody has really told me what I'm doing yet. Guess that'll come
 

« first day (1563 days earlier)      last day (3397 days later) »