[QUOTE=DrTaxi;48304948][img]http://i.imgur.com/8ExF218.png[/img]
[url]https://twitter.com/scinos/status/625511937049104385[/url][/QUOTE]
I'd be fucking PISSED. I love this so much.
-0xC0000005-
On a website that I've been studying the source for fun:
[code]
function yesNoFormat(value){
if(value == true || value == 'true'){
value = 'yes';
}else if(value == false || value == 'false'){
value = 'no';
}
return value
}
[/code]
Obviously, multiple people have been working on the site and the server, so you often see post requests that are so inconsistent, why can't people just send true. I've seen ones where they try to send 'true' (as a string).
There is one value in the form data you post, which asks if you started the quiz, when you are about to begin, it is:
inQuiz = 'no'
then when you start, it is
inQuiz = true
:v: :suicide:
I mean, I don't know heaps about web side stuff, but you can send booleans through a post request right?
[QUOTE=Rocket;48311026][img]http://i.imgur.com/Pwx04Pg.png[/img][/QUOTE]
Just last time I was pissed as fuck because there is new javascript framework popping out every second it seems.
Not bad thing but how the fuck are we supposed to learn all this shit
Famo.US can be cool too, and JQuery has helped me a lot.
EDGE.JS is cool too.
[editline]29th July 2015[/editline]
Lets not forget Three.JS, it's the bomb
I once had to use MVVM for a Windows 8.1 app in an internship.
I cannot even begin to explain the pain that was to fucking comply to that thing.
It gets to a point where you're doing so much extra code just to follow the pattern that doing the simplest shit becomes a huge pain in the ass to code.
And then there's some things that you just can't do with the pattern, which forces you to break it and produce even uglier code.
I agree that with some types of applications, a simple MVC pattern can have organizational benefits, but if you can, avoid the crazy unnecessary complex stuff at all costs.
[QUOTE=Rocket;48318207]Basically, there are two ways to add logic to your HTML: put the logic in the HTML, or put the HTML in the logic. Angular does the first, React does the second. It's all up to personal preference, really, both have their advantages and disadvantages.
Unless I misread the point of your post and you're opposed to any kind of web app, in which case you might be better off in 1995 before they were invented.[/QUOTE]
I think I know what you mean, lots of web spiders (Google..) rely on clear semantic HTML, not generated one.
Just make a replacement for javascript that runs a random check before executing commands.
Everything was ok before all of these web "developers" decided they want to "contribute" in firefox, webkit, chromium...
programming together dumb features like this: [IMG]https://mdn.mozillademos.org/files/3625/3dview.png[/IMG]
(attempting to start a flame war about web browsers and javascript)
they weren't bloated. even some video games i used to consider heavy on system resources are working faster than firefox.
Personally what i really hate is the fact one tab in firefox can freeze the whole browser. It's sometimes [I]really[/I] pissing me off.
[QUOTE=helifreak;48342855]Just make a replacement for javascript that runs a random check before executing commands.[/QUOTE]
[URL="https://github.com/mongodb/mongo-java-driver/blob/1d2e6faa80aeb5287a26d0348f18f4b51d566759/src/main/com/mongodb/ConnectionStatus.java#L213"]MongoDB did it first[/URL]
What the fuck, this makes MongoDB scary to use in commercial project
[editline]3rd August 2015[/editline]
[code]
void Update(float tick){ //tick is delta time
if(Math.Random() > 0.9){
//tack! you just lost the job
Company.FindEmployee(this.Author).FireFromCompany()
}
}
[/code]
[QUOTE=Fourier;48361277]What the fuck, this makes MongoDB scary to use in commercial project[/QUOTE]
You mean it wasn't before?
[QUOTE=Fourier;48361277]What the fuck, this makes MongoDB scary to use in commercial project
[editline]3rd August 2015[/editline]
[code]
void Update(float tick){ //tick is delta time
if(Math.Random() > 0.9){
//tack! you just lost the job
Company.FindEmployee(this.Author).FireFromCompany()
}
}
[/code][/QUOTE]
[url=https://jira.mongodb.org/browse/JAVA-836]Not actually as[/url] bad [url=https://github.com/mongodb/mongo-java-driver/commit/ee7543a4f7cc26618cf78eab2a18bd33b3e101cc]as it seems[/url]. When those errors occur, there's a lot of them, and you don't want them spamming your log.
If you put Math.random in your driver i'm going to punch your face regardless
I was inspired by Microsoft.
[code]
void Error( string errorString )
{
cout << "Something happened\n";
}
[/code]
[quote=@brad_frost]
"Rock and roll is very simple." [url]https://youtu.be/h73kd6wsBq0?t=37s[/url] … This video is the perfect analogy for modern web development.
[/quote]
[IMG]https://i.imgur.com/Z4FmUdl.jpg[/IMG]
What's the most used language in programming?
[sp]Profanity[/sp]
Quantum bugs, they disappear when you try to observe and fix them.
[URL]https://www.reddit.com/r/csharp/comments/3hxyut/using_ienumerator_and_yield_to_implement_a_delay/[/URL]
[QUOTE]So I am a Java guy who's completely new to C#. In fact, I'm not necessarily even learning C# at the moment. However, I came across something curious that I wanted to get others' thoughts on.
Recently, I was watching a YouTube video about some guy using Unity to create the basics for a game. The scripting language he was using within Unity was C#. Now, at one point, he was wanting to implement a screen fade-in and fade-out feature, and did so in a way that made me cringe. Or at least want to cringe, if you catch my drift.
It was a little bit more complex than this, but in a nutshell, he had the following code:
[CODE]public void doSomething() {
// do some stuff
// ok, need to fade to black, and wait until done before continuing execution
fadeToBlack();
// do some other stuff
}
public IEnumerator fadeToBlack() {
isFading = true;
// trigger the actual fading animation in Unity
while (isFading) {
yield return null;
}
}[/CODE]So, assuming I'm understanding this correctly, the fadeToBlack() method will sit and spin around and around in a while loop until the isFading variable changes from true to false (which happens once the animation is complete - sorry, didn't include that code). And each cycle in that loop, it's essentially generating a piece of garbage data (in this case, a null value) and streaming it back to the function caller as part of a collection.
Since the caller doesn't care about the collection, it basically just sits there and waits for this stream of null values to stop, at which point it throws the IEnumerator instance on the floor and continues on its merry way.
Is that correct? Or am I missing something fundamental to C# here? Is this sort of thing commonplace, or part of a known best practice?
I'm just wondering, because to me, this feels pretty janky. I feel like the proper way to handle this would be to implement some sort of asynchronous relationship (callback, messaging, whatever) so that the fadeToBlack method just has to notify some other entity when it's done, rather than wasting time (and clock cycles) generating and streaming back useless data.
Any thoughts?
EDIT: formatting[/QUOTE]
Probably mentioned already, but what the hell
In order to understand recursion, you must first understand recursion!
:v:
[QUOTE=Amiga OS;48563190]A programmer's wife tells him, "While you're at the grocery store, buy some eggs."
[/QUOTE]
Alternate endings:
#1
He returns a couple of hours later, barely carrying many stacked egg cartons.
"Sorry Honey, I had a Stack-Overflow"
#2
He passed away, written on his tombstone, "Was terminated for a NullPayment Exception"
[IMG]http://www.strategicinformatics.com/wp-content/uploads/2008/06/e1023ed1-c600-41eb-8eb9-72d84eccbefe.jpg[/IMG]
Old but gold
Sorry, you need to Log In to post a reply to this thread.