Her LinkedIn profile says:
> I'm also proficient in many areas of development, including creating environments, textures, normal mapping, Unreal, producing complex cutscenes, and producing voice acting. > > Skills: Maya, Unreal Development Kit, zBrush, Photoshop, Illustrator, Final Cut Pro
Her game was written in Unreal Engine 4, and with a tool like that, sometimes you don't have to write as much code and can spend more time on level design and art assets. But she should probably describe herself as a "game designer" rather than "game developer".
> string strtolower ( string $string )
> Returns string with all alphabetic characters converted to lowercase.
> Note that 'alphabetic' is determined by the current locale. This means that e.g. in the default "C" locale, characters such as umlaut-A (Ä) will not be converted.
Was this written before mb_strtolower()
was available, or was the developer simply unaware of it?
In any case, this is a beautiful and compact example of the weirdness of PHP. Even in this short sample, things like the unpredictable naming of standard functions are clearly visible (i.e. why not str_to_lower()
and strreplace()
?).
~~Why not just use <code>json_encode</code>?~~
Note to self, don't start writing a comment on /r/shittyprogramming before you've read the whole comment your commenting on... *facepalm*
But how would he use a for loop to access variables with numbers hardcoded into the name?
Only PHP can solve such a problem.
Edit: I even started the loop at 0 instead of 1, and PHP handled it gracefully
The maximum length of a URL is about 2047 characters, so discounting 255 chars for domain names, plus 1 for a separator /
, and another 3 for a .js
extension, it would be safe to say that we can use at least 1788 bytes for JS library names.
That is, if we only used a-zA-Z0-9._
characters for the names, we would get a 64^1788 namespace, or 2^10728 for the purists.
Since life on Earth is expected to last for the next 10^9 years, or 2^55 seconds, and we have a population of less than 7.5 billion, or 2^33 people, this means we should increase our current rate of JS library production to at least 2^10000 per second per person if we have any hope of achieving any level of namespace completeness.
Of course an equal amount of population increase would also be acceptable, with 2^10033 people working at a leisurely pace of one JS library per second per person.
Disclaimer: this delectable factoid brought to you courtesy of 7ZzODMvA<1772_characters_skipped>sfCjswbY.js
You should try HolyC. It's the purest and cleanest language out there, since it came down directly from God. There won't be any backdoor worm from the world government in your compiled program. Your simulation will reflect the truth as God sees it, not the "truth" that they want you to see.
It's pretty easy to see why when you look at it in binary: http://ideone.com/m2vsbz
Also TIL signed integer overflow in C is undefined behavior.
Edit: Changed the order of digits from little endian to big endian
It's simple, really. Out of all the strings ordered primarily by length and secondarily lexicographically, print the first one with 12 chars that's lexicographically larger than "Hello World ". ('!'
comes after ' '
.)
Should only take between 256^(11) (3*10^(26)) and 256^12 (8*10^(28)) iterations. :3
People use "this" to approve the comment they are replying to here on Reddit. Similarly, you can use it in code to emphasize how awesome your code is. french numbers
I'm not an expert™ but object properties follow the same naming rules as variables, which means when using them directly via an identifier they follow the same rules as variable identifiers (for example they can't start with number). However, as with variables, you can access variables which "break" these rules using {} notation. Take look at this piece of code for example.
${'aa'} = 'bb'; echo $aa; //prints: bb echo ${'aa'}; //prints: bb
${'00'} = 'zerozero'; echo $00; // error echo ${'00'}; // prints: zerozero
more on this: http://php.net/manual/en/language.variables.variable.php
You know, that got me to thinking, and I tried something...
As long as you aren't trying to fight a different type of specificity (e.g., spamming classes alone won't override an ID), it does seem that adding the same selector multiple times still bumps up the weight in the specificity battle.
<div class="outer"> <div class="inner">Green dotted border</div> </div>
with...
.inner.inner.inner { border: 3px dotted green; }
.outer > .inner { border: 3px solid red; }
gives a green dotted border, not a red solid one. (Tried on Ffx and Chrome.)
So you could fight someone's shitty over-specific
.main .content > .to .people .who .wrote .hideously .deeply .nested .less .files .because .it .looks .prettier > a big.fuck-you { ... }
with
a big.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you.fuck-you { ... }
Except ~~it's not guaranteed to evaluate the left side first,~~ complicated shit, so simply replacing semicolons with commas all over the place will very quickly result in undefined behaviour.
as per the spec:
https://nodejs.org/api/timers.html#timers_settimeout_callback_delay_args
When delay is larger than 2147483647 or less than 1, the delay will be set to 1. Non-integer delays are truncated to an integer.
So it's still constant time, but that does expose a limitation in the accuracy of the sort algorithm.
Actually, in C "null" isn't defined as a keyword or a value. You only have NULL, which is a preprocessor constant representing the null pointer (remember that identifiers in C are case-sensitive, even elements defined by the pre-processor).
So even this define wouldn't, ahem, break the marvelous URL embedding feature of C. It's a very robust language after all!
edit - a demonstration: http://codepad.org/3N7itEtl
> * templates, template metaprogramming, CRTP,
not even a mention of SFINAE? I don't think you know what template (meta)programming is about.
My all-time favorite of crazy C++ template thingies: Boost Spirit, a parser generation library.
Seriously, have a look at it. They have a 250 lines example file that can parse simple XML (everything without attributes or <start-and-close-tags />
AFAICT).
This is as close as I could get
I had to use an extra child element because I needed a outer div to hide the overflow, otherwise it cause a horizontal scroll to appear. To get the child to go offscreen to the left, I combined it with translateX to get it completely offscreen before wrapping without going farther than necessary.
God forbid the day they deprecate <marquee>, but should such a dark day come, we have this solution.
If anyone can come up with a childless solution (without having to modify html or body), I'd love to see it.
I added the original marquee for comparison. Unfortunately I can't replicate the shakiness, which I assume is a feature to help attract the eye even more.
Indeed, JQueryUI has an autocomplete library built-in, you only have to give it a URL to send the search terms to and then on the server you return a JSON with the search results. It's super easy.
Poe's Law, I guess. Unfortunately you can find articles like this which are almost definitely not satire:
Some 19xx lines later.
File "prog.py", line 9, in bible File "prog.py", line 6, in god File "prog.py", line 9, in bible File "prog.py", line 6, in god File "prog.py", line 9, in bible File "prog.py", line 6, in god File "prog.py", line 9, in bible RuntimeError: maximum recursion depth exceeded
Python prevents stack overflow with run time errors, max recursion depth is 1000[or 999.. 998...]
^source display's the full output in case you don't know....
Now tell that to SPJ: http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#recursive-do-notation
Though I agree with you, I don't think it should be used for do-expressions. It's very common for records and lists though.
Hmm, you're going to have to go to control panel -> uninstall programs and click Python, then run through the uninstaller. Afterwards you should go to http://unity3d.com/ and download it, then you should be done!
If this was on the website, I would immediately first think to blame PHP's magic_quotes since that is what I've been fighting to clean up for the past few weeks at my job. Its a mess because they escape things but provide no real security at all. From my experience with this... feature... is that when you are working to disable them you find that there are lots of entries that are stored in the database with escaped quotes. "Well, just strip the slashes!" You might think, but that is complicated if some of the data that was entered already had the slashes stripped BEFORE entry. So you end up with a hodgepodge of half escaped, half not escaped data and you can't tell what's intentional and what was caused by \"magic_quotes\" anymore. The best way to deal with it is to turn it off, but if that's not allowed good luck! Best you can do is stripslashes on every page that gets user input before you save it to the DB and try to rewrite all the affected DB entries. Totally not ranting about the current situation at my job :p The worst part is where \"magic_quotes\" decided it would be a good idea to escape the user's password, but we stripslashes on login and not registering and we don't strip slashes when changing passwords but we do when resetting the password, but not when admin changes a password so at any given point if a user password has a " in it, it may or may not work as it could be hashed with a \" instead. That was a fun bug to figure out.
So yeah. Umm. Remember, kids, don't do PHP. (Or at least not magic_quotes)
> You can't ever change your mind and make them public, or share them with anyone, without also sharing the secrets in your repo's history.
git filter-branch
// here's the code if you need it for some reason import { opine } from "https://deno.land/x/opine@main/mod.ts";
function denoVersion() { return new Promise((resolve, reject) => { opine().use((req) => { resolve(req.headers.get("User-Agent")?.substr(5)); }).listen(3000);
fetch("http://localhost:3000").catch(reject); }); }
if ( await denoVersion() === "1.1.2" || await denoVersion() === "1.1.1" || await denoVersion() === "1.1.0" || await denoVersion() === "1.0.5" || await denoVersion() === "1.0.4" || await denoVersion() === "1.0.3" || await denoVersion() === "1.0.2" || await denoVersion() === "1.0.1" || await denoVersion() === "1.0.0" || await denoVersion() === "1.0.0-rc3" || await denoVersion() === "1.0.0-rc2" || await denoVersion() === "1.0.0-rc1" || await denoVersion() === "0.42.0" || await denoVersion() === "0.41.0" || await denoVersion() === "0.40.0" || await denoVersion() === "0.39.0" || await denoVersion() === "0.38.0" || await denoVersion() === "0.37.1" || await denoVersion() === "0.37.0" || await denoVersion() === "0.36.0" || await denoVersion() === "0.35.0" || await denoVersion() === "0.34.0" || await denoVersion() === "0.33.0" || await denoVersion() === "0.32.0" || await denoVersion() === "0.31.0" || await denoVersion() === "0.30.0" || await denoVersion() === "0.29.0" || await denoVersion() === "0.28.1" || await denoVersion() === "0.28.0" ) { console.log("You are NOT on the latest version! Updating..."); Deno.run({ cmd: 'deno upgrade --version 1.1.3'.split(' ') }) } else { console.log('You are on the latest version!') }
npm WARN deprecated [email protected]: We're super 😸 excited that you're trying to use ES2017+ syntax, but instead of making more yearly presets 😭 , Babel now has a better preset that we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can ship native ES2015+ to user 😎 ! We are also in the process of releasing v7, so please give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and help test it out in beta! Thanks so much for using Babel 🙏, please give us a follow on Twitter @babeljs for news on Babel, join slack.babeljs.io for discussion/development and help support the project at opencollective.com/babel
This is clearly not copyrightable. It's all over the internet, it's an old joke.
Here's this comment on a newsgroup from 2009 about it: Hidden Features and Dark Corners of C++/STL
gc
is the name of the Go compiler in golang/go
, gccgo
is an alternative (which should, however, behave the same, since they both work from the same spec, which is detailed about handling of Unicode classes. U+3164 is Lo, therefore it is unicode_letter
, therefore it is letter
, therefore it can appear anywhere in an identifier.
Yup, faster but not smaller. Think loop unravelling etc. I should note that it has been shown that in some cases, -Os
could produce smaller and faster code than -O[1-3]
. This is a good read for those interested in optimisation
Non-shitty answer: Are you familiar with Inform? It's a programming language designed for writing interactive fiction. You might find it interesting.
Not sure if you're serious (you did post in /r/shittyprogramming which is probably the worst place for serious programming advice) but I'll pretend you are.
If you want to have full control over your app, you shouldn't use "codeless" app builders. I recommend using proper IDEs and taking some time to learn them. It should be easy enough, there are tons of free tutorials available all over the Internet.
For Android, you should use Android Studio as it's the official and best-supported one. It's based off IntelliJ IDEA so if you have some Java experience, you should be able to jump right in.
I can't really speak about iOS as I've never used it before, but it appears that Xcode is the recommended IDE of choice.
TL;DR: Use proper IDE, not codeless app builder.
Have you tried stepping through the code to see what exactly is happening?
In Chrome: https://developer.chrome.com/devtools/docs/javascript-debugging
In Firefox: https://developer.mozilla.org/en-US/docs/Tools/Debugger
And since you're initializing temp to 2, you could at least take out the -1 and 2 cases.
There's also <code>mb_strtolower()</code>, which they should be using if they use UTF-8 (which they should be using, if they're handling more than just the subset of Latin characters that English uses).
you can do:
session_start();
// your business logic here
$_SESSION['foo'] = 1;
session_destroy();
// no more session logic here
Even though you've called session_destroy()
you can still access session variables the next time session_start()
is called.
According to PHP's operator precedence and type juggling, concatenation (.
) and addition (+
) are the same precedence, and strings are automatically converted to ints for addition, and ints converted to strings for concatenation.
So it happens from left to right:
php > var_dump('Hello there my age is ' . $imAnInt); string(23) "Hello there my age is 1" php > var_dump((int)('Hello there my age is ' . $imAnInt)); int(0) php > var_dump(0 + $imAnInt); int(1) php > var_dump(1 . ' and that\'s that'); string(17) "1 and that's that"
Why do you ask this on /r/shittyprogramming? And I think learnpython.org should be fast enough. You might want to try out http://www.codecademy.com, but I doubt that it's faster. If you only need a quick introduction and already know a similar programming language, then this might help you.
The only way I can see the Exception might ever occur is if it was thrown in a tick function... though I'm not really sure where exactly in the call stack the tick function is, so it might not actually be caught even if it's does get thrownen either before or after $result = 1
Oh, you want to run older versions of minecraft? That's pretty easy now!
First, download the launcher from minecraft.net. Once you've run that, you can select "New profile" in the bottom left corner of the screen. From there, you can edit the version. If you want to chose versions before 1.0, you'll need to check the checkboxes above that. You shouldn't need to fiddle with any of the other settings (well, you might want to change the game directory if you're going to use an old version just so that you don't break anything).
You can chose versions pretty far back. (Down to some versions of "Cave game").
If you need to get a server (though I doubt you will), you can use this site.
Except that I actually said that you should use a fourth level for when in a class. Add a fifth for namespace declaration, I forgot about that (I don't regularly use languages with namespace declarations).
Do you also get paid more than this guy?
<dru> can you overload c++ operators with reflection stuff to do comparisons/checks on variable names?
<ek> dru: I don't think so
<dru> i.e. can I overload == to check to see if the two things being compared are an int (8) and a variable named "D", and if so print lol
<dru> otherwise do normal ==
<ek> Don't think so at all
<ek> https://stackoverflow.com/questions/4444427/variable-name-from-template-argument
<ek> As teh answer says "Variable names cannto be programatically manipulated..."
<dru> bleh
<ek> I suspect there's no way to touch them at all as I think they completely vanish during the compilation stage
<ek> as in
<dru> I know it's possible in perl and php and likely other scripted languages
<ek> look at the assembly generated
<dru> yeah
<dru> I guess I'll stick to #define 8==D std::cout<<"lol"
<ek> Your program doesn't have the source code; it has no var name references
<lm
> dru: /maaaaybe/ with macros. Probably not. C++'s reflection stuff is very weird
:(
A preprocessor might help. I personally prefer LESS but there are others, SASS being a well-known one.
A big thing I like about LESS (but again you can do this with the others) is that you can define variables at the top like colors. I had a site the other week, a personal project, where I had white on black (it was for a punk band) and then a spot color for some form elements and stuff. I just defined the color's hue at the top, now I can change the hue and now the entire site's forms can go from blue to green in just ten seconds.
Also you can nest selectors. So you can do this:
p.article { // do article style stuff here
img.illustration { // this selector compiles to "p.article img.illustration" } }
I highly recommend looking into this because it makes your stylesheets so much more readable. Front-end frameworks like uikit and Bootstrap use LESS very well, if you want examples of what can be done with it.
Also, if you're dealing with a large number of files and/or need to do anything with the file metadata, stay away from the Directory.___Files functions entirely and check this out.
Their graph really makes me think that might actually be satire. That just looks like made-up data to begin with, but at the same time the data set is severely flawed anyway.
Websites saying one language is the best, and then making a joke about how bad VB6 is, would be included as saying VB6 is the best.
You're wrong, I am not. References are not copies of an object, they refer (hence the name) to an object somewhere else in memory.
The way the computer accomplishes this is with a pointer. C++ may not call it a pointer, and may not expose it as such, and may not allow you to manipulate it in the same way as a pointer, but at the end of the day it's a pointer.
#include <iomanip> #include <iostream>
class foo {
int & i;
};
int main (void) {
std::cout << std::boolalpha << (sizeof(foo)==sizeof(int *)) << std::endl;
}
Prints "<em>true</em>".
Sometimes when they return errors, they actually (not even joking) return an array of 23 arbitrary things and one of the keys to one array is another array and within that array is an error message.
For my app http://reditr.com to parse those responses, I don't parse the JSON, I regex for that string...
Actually i never played with extensions so i said wtf lets google and have some fun. Unfortunately found out it needs 5$ to upload it so i said fuck it. Here is the extension and you can sideload it with developer mode or if anyone wants 2 upload it on his personal account feel free http://www.filedropper.com/removepasteblocks
No I can't as I didn't say there was one that wouldn't be true my point was that all nonzero values are true.
and in programming they do generally evaluate to the number if they are numeric equation (x = 7) evaluates to 7 which is true. (x = 0) evaluates to 0 which is false. (x = -7) evaluates to -7 which is true.
That's because you're using stripe.js. You could just send the data from a form to your backend and use the python library (or whatever other language you use) to process it which would avoid JS.
Reasonable explanation: gm_get_conf reads from a really simple configuration file, probably just key=value
pairs, and the parser doesn't bother trying to guess data types and returns everything as a string.
Circle-jerk explanation: http://codepad.org/4rAxIYiS
Not exactly, on page two of https://searchcode.com/?q=if%28version,startswith%28%22windows+9%22%29, the logic is:
If(string.StartsWith("Windows") and string.containsChar("9")) Then version = Windows_9x
Beauty truly is in the eye of the beholder.
I don't see anything inherently wrong with reflection, but personally I would have preferred explicit checking in a method attached to the relevant type.
This is more along what I'd do: http://751364c6003e0d4b.paste.se/
Maybe a bit blunt, but very clear. You're just a good editor away from replacing every instance of the field name on each of those lines in less than a minute.
Speaking as a sole full stack web developer who only gets provided mockups to implement in full into enterprise grade web software
I haven't had to use an !important in years. Thank you LESS
It is a little pricy but totally worth it, you can use the trial version for 30 days. Also check out https://laracasts.com/series/how-to-be-awesome-in-phpstorm to really learn how powerful it is as an IDE.
Not sure if it's intended behaviour, but your suggestion GetSites(num=1)
is semantically different. Check what happens when you call <code>GetSites(0)</code>.
I think you're confusing "True/False" with objects that are "Truthy/Falsy." Example
Also, why do you have a problem with the integers/strings thing? A number wrapped in quotes should be the ascii representation of the number.
The Netbeans are just part of the picture. You also need an Elastic Beanstalk which will connect you to where the beans are, in the clouds. Just make sure you buy a long enough piece otherwise the elastic will snap.
You should check out Julia. Matrix manipulation built-in, beautiful clean syntax, functional language, REPL console, super-fast (approaching that of statically compiled C) and no need to worry about "vectorizing" operations because for-loops are just as fast...
If you can find a book on "C++: An Introduction to Programming" co-authored by Jesse Liberty and Jim Keogh. It is still sold on Amazon.
I actually got that from both /r/C_Programming (a post about object-oriented programming in C) and Programming: Principles and Practice Using C++, independently. I bet you could dig through The C++ Programming Language and find it somewhere as well. Keep in mind there are other systems for polymorphism, I just mentioned the C++ version (which happens to be a somewhat elegant solution, although there are faster solutions available as well).
Also, to do what you wanted, you could hack the vtable. The only issue is it hacks the vtable shared between every instance of the subclass, so it would essentially be wasting the vtable. For a specific case of calling a method of the parent class in the subclass, all you have to do is call Parent::method()
within a method of your subclass. Otherwise, you need to store the function pointer separately and pass your subclass instance as a parameter.
It's inconvenient, but not really a huge issue in practice.
The standard isn't so much for learning, but for specifying all the obscure details that go into making a conforming implementation. So for the most part it fills a completely different role from learning materials like The C Programming Language which are more end-user focused.
There are cases where it's be handy to have a standard lying around as an end-user (I know I've run into a few cases where I found cppreference.com documentation lacking), but in these cases a free draft of the standard is usually sufficient.