CornBurrito
Member
Bitwise OR, XOR and AND:
https://en.wikipedia.org/wiki/Operators_in_C_and_C++#Compound_assignment_operators
Thank you.
Bitwise OR, XOR and AND:
https://en.wikipedia.org/wiki/Operators_in_C_and_C++#Compound_assignment_operators
Are there any online resources for AI dev? Unlike everything else, there aren't really any "Paths" posted anywhere. My university has class and programs, but they're all upper-level and graduate courses and I'm kind of impatient.
I cannot wrap my head around using classes with Tkinter or updating the GUI with user input in Python.
This is probably too long for anyone to really go over but basically what I'm trying to do:
1) Start off with a start screen that gives two options: a) type in a character's name to get some info about their social network b) type in two characters' names to get a list of issues they both appear in.
2) Once a user hits submit on one of the two options with a name in the entry box, "draw" a new page that holds all the info for that character's social network.
I have everything working as separate programs and separate GUIs but I can't figure out how to put it all together. Particularly, once I've gotten the character's name from the user, how do I use it to draw a new frame that will now show the social network info?
My code's really long so I feel bad posting about it in this thread, but if anyone wants to take a look at it let me know.
My code's really long so I feel bad posting about it in this thread, but if anyone wants to take a look at it let me know.
Are there any online resources for AI dev? Unlike everything else, there aren't really any "Paths" posted anywhere. My university has class and programs, but they're all upper-level and graduate courses and I'm kind of impatient.
Thanks! I feel a bit more shy posting about it on other places but I need to get over that. D:I can't help you with this problem specifically, but you can post long code pieces on http://gist.github.com.
Thank you!If you want, you can PM me the code. I haven't used Tkinter that much, but I'll see what can I do.
Gists are tied to your GitHub account and can be either secret or public. You don't have to share it.Thanks! I feel a bit more shy posting about it on other places but I need to get over that. D:
Vulkan and DX12 share the same principle: less abstraction on the GPU. You need to write a lot more graphic code to make it work.Has anyone messed with the Vulkan API before? If so is it more complex to code like DX12 is vs DX11?
Vulkan and DX12 share the same principle: less abstraction on the GPU. You need to write a lot more graphic code to make it work.
Famously, here's the code to write a triangle in Vulkan: https://github.com/SaschaWillems/Vulkan/blob/master/triangle/triangle.cpp . It's an extreme case, but it should tell you something
Hey Gaf, I have a series of questions for you. I'm currently wrapping my head around several things.
Anyone know what the file extensions .msi and .sha256sum are for?
In C++, how come we can't recursively call the main function?
Hey Gaf, I have a series of questions for you. I'm currently wrapping my head around several things.
Anyone know what the file extensions .msi and .sha256sum are for?
In C++, how come we can't recursively call the main function?
I really hate C# now. I can't believe it. Language of choice for years. Ready for something like Swift or F# to kill it.
I really hate C# now. I can't believe it. Language of choice for years. Ready for something like Swift or F# to kill it.
I have a religious belief that variables are the devil. I love F# and think Swift is an acceptable compromise. I try to write stateless code at my day job but C# makes it so hard. My code generally ends up extremely testable because of it, but it sure is janky. Struct and readonly keywords everywhere. I wrote some extension methods for function currying and composition, but I can't get it to work with methods - just Actions and Funcs. No nested type aliases and I can only declare them in the header. No member bindings. If C# got discriminated unions and pattern matching I'd be a lot happier. Just do it like Swift does it and make it so I don't have to use the default case if I've matched every case.Why? I still love it, although I almost never get to use it
I have a religious belief that variables are the devil. I love F# and think Swift is an acceptable compromise. I try to write stateless code at my day job but C# makes it so hard. My code generally ends up extremely testable because of it, but it sure is janky. Struct and readonly keywords everywhere. I wrote some extension methods for function currying and composition, but I can't get it to work with methods - just Actions and Funcs. No nested type aliases and I can only declare them in the header. No member bindings. If C# got discriminated unions and pattern matching I'd be a lot happier. Just do it like Swift does it and make it so I don't have to use the default case if I've matched every case.
I agree... I prefer adapting the language to the paradigms I want than trying to apply a paradigm to a language that normaly don't use it.A better option would be to find a job where you can use F# or Swift instead of C#.
Tips on essential programming/software development books that don't address a specific language? So far I have (but not read) The Pragmatic Programmer and Gang of four.
F#'s pretty unpopular. Not too easy to find that job. Swift is more plausible but I don't know the iOS API at all or want to lock myself into iOS development. Maybe after it goes multiplatform.Meh, I mean it sounds like you're trying to hit a square nail into a round hole. It's hard to write stateless code in C# because it's not really designed to be good at writing stateless code. State may very well be the source of a lot of problems as a general principle, but I'd argue that using languages incorrectly is a net negative. A better option would be to find a job where you can use F# or Swift instead of C#.
Due to new ventures at work I am now going to learn Scala, pretty exciting actually.
Have you ever used a functional language before?Due to new ventures at work I am now going to learn Scala, pretty exciting actually.
Cool! How are they teaching you? Is it Spark? Play Framework, or something else? I'm looking to learn myself, but Scala adoption seems to be so low that there's not much of a community that I can find.
Have you ever used a functional language before?
Yipee, failed my Android cert by getting every "select 2 (or 3)" question partially wrong. Great.
24 hours and $189 sure.That sucks. Can you retake?
Yipee, failed my Android cert by getting every "select 2 (or 3)" question partially wrong. Great.
The Scala learning curve in words.Due to new ventures at work I am now going to learn Scala, pretty exciting actually.
JS doesn't follow the functional paradigm that closely, but you will see.I am a JavaScript dev mostly and many of the modern paradigms in JavaScript are based on or benefit from functional programming so the concepts and their uses are pretty well known to me I guess. Overall I don't think that the change is going to be too drastic: modern JavaScript and Scala seem to share many of the concepts and are rather close in syntax so I am not too worried
#Import the CSV file containing the data. Table of one column with value of 1 or 2
# 1 = Male; 2 = Female
# n = 925
gamingGender.data <- read.csv(file.choose())
#Calculate the sample proportion point estimate of video game players who are women
n = 925
w = sum(gamingGender.data == 2)
pbar = w/n
#Calcualte the standard error of the sample
se = sqrt(pbar*(1-pbar)/n)
#Resamples
N <- 10^4
#Resample vector
resample <- numeric(N)
resampleW <- numeric(N)
my.bootprop <- numeric(N)
x <- gamingGender.data
#Bootstrap algorithm
for (i in 1:N)
{
resample <- (sample(x, replace=TRUE))
#Number of women in resample i
resampleW[i] = sum(resample == 2)
#Proportion of women in resample i
my.bootprop[i] = resampleW[i]/n
}
mean(my.bootprop)
Anyone here work with R? I'm trying to figure out how to bootstrap the proportion of a population from a simple sample, but I don't think I'm doing it right. All my resamples have seem to have the same exact proportion as my original sample. And I can't seem to find any example online that don't use R's boot package.
That makes sense, but then I should be resampling from where? A binomial distribution with p equal to the sample proportion?Isn't (sample(x, replace=TRUE)) just a permutation of x, therefore has the same exact proportion?
That makes sense, but then I should be resampling from where? A binomial distribution with p equal to the sample proportion?
No. I was wrong, (sample(x, replace=TRUE)) works as intended. Did you check my.bootprop or just the mean?
All 10000 samples have the same exact proportion. D:
Gaf, what debuggers do you recommend to parse C++ code?
I'm not using an IDE, so I don't have access to built-in debuggers. :
What os?
Windows 10
I'm looking at the number of successes and yeah, they're all the same. So it's not just rounding...print out resample and manually check. could be a bug.
x <- rbinom(925, 1, (468/925))
I tried changing it to:
Code:x <- rbinom(925, 1, (468/925))
And I actually get different samples, but I have no idea if that's a legitimate way of doing it.
resample <- vector(mode="numeric", length=n)
for (i in 1:n)
{
t <- sample(1:n, 1)
resample[i]=x[t]
}
Where are you taking this "Android cert"?
pushad
mov eax, [esp+40]
mov ecx, [eax]
mov ebx, [esp+36]
mov edx, [ebx]
mov [eax], edx
mov [ebx], ecx
popad
ret 8
push ebp
mov ebp, esp
mov eax, [ebp+8]
mov ecx, [eax]
mov ebx, [ebp+12]
mov edx, [ebx]
mov [eax], edx
mov [ebx], ecx
pop ebp
ret 8