@Neoares That's fine and dandy, WoD did well on the levelling story too. It's the end game that's fucking awful.
Three hours just doing the same fucking garrison missions, and then trying to PuG raids and flopping because people can't dodge the simplified mechanics.
Anybody know of a good solution/script for taking user input and doing math and string concatenation safely? I've found some math libraries but I haven't seen any that allow for both math and string evaulation.
@Josiah Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
@Josiah Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
function prepExpression(exp) {
var reg = /\s*([-\+\/\*])\s*/, // using () captures the delimiter. Using [] matches the set. \s* removes spaces.
pieces = exp.split(reg);
for (var i = 0; i<pieces.length; i++) {
var pc = pieces[i];
if (/[^-\+\/\*\d*]/.test(pc)) { //it has something other than numbers and math operators.
var safe = pc.replace(/'/g, "\\'"); // quote it so it can't be called during eval.
pieces[i] = "'" + safe + "'";
}
}
var manipulation = pieces.join(" ");
@Shauzab Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
If one happens to exist in your browser... you shouldn't use it anyway, unless you're building for one browser i guess and are ok with it randomly breaking.
@littlepootis yes but his title / intro reasoning doesn't touch the fact that being iterable doesn't add the prototype methods, they've decided to do that on their own
being interable means I don't have to steal the array Symbol.iterator
@corvid there's then 2 ways you can handle that client side when navigating directly to the url, serve up a common index and have that look at the url, or have the server generate the view for that url then use progressive enhancement (which is what github does)
@corvid for single page, yes, alternatively sites like github use progressive markup so will generate the page for that route server side, and mostly just use pushstate to get a nicer client navigation. Such as only re-loading specific sections of the page, and animating them.
@ndugger rather than the timings (which are almost identical), there is an interesting semantic difference when handling NaNstackoverflow.com/questions/35370222/…
@ChrisChilvers you mean includes, but I would still have used it to get gains on browsers that are actually good, and then polyfill it with indexOf for shitty ones
btw, it just linked to this after the message I wrote: bbc.com/news/…
contents of that are: বাংলাদেশের রাজধানী ঢাকার মিরপুরে সন্দেহভাজন জঙ্গীদের এক আস্তানায অভিযানের সময় একজন সন্দেহভাজন জঙ্গী নিহত হয়েছে, আহত হয়েছে তিন পুলিশ সদস্য। ঢাকা মহানগর পুলিশের একজন মুখপাত্র মাসুদুর রহমান জানিয়েছেন, পুলিশের এই অভিযান এখনো চলছে। আহত পুলিশ সদস্যদের মধ্যে ঢাকার রূপনগর থাকার ভারপ্রাপ্ত কর্মকর্তাও রয়েছেন।
@littlepootis It happens a lot more than you think. It used to be a regular issue for the people I dealt with in the military because we had to give them root.
Put Scripts at the Bottom
The problem caused by scripts is that
they block parallel downloads. The
HTTP/1.1 specification suggests that
browsers download no more than two
components in parallel per hostname.
If you serve your images from multiple
hostnames, you can get more than t...
Is there any better way to rewrite this:
$('element').removeClass('class1').removeClass('class2');
Can't use removeClass(); as it would remove ALL classes, which I don't want.
Thanks
I'd like to thank everyone who helped me and supported me during these first steps of my project. First of all thanks to my mom for giving me birth. Thanks to my sister who endured my bad mood when nothing worked about my project. And thanks to @BenFortune
@NullPoiиteя W3schools teaches poor practices and habits that will make any new programmer a nightmare to deal with once they enter the work force. Go ahead, hire a bunch of new devs and let them work from W3S examples.
I am currently creating a web application that allows users to store and share files, 1 MB - 10 MB in size.
It seems to me that storing the files in a database will significantly slow down database access.
Is this a valid concern? Is it better to store the files in the file system and save the ...
Well I did some research and I think I'll just put them in the filesystem. That way people can very easily access it and modify everything to their needs. Next to this no need for me to learn something new to databases, that way I can focus on the more important things.
I'll just write some PHP code to get the files from the filesystem and display them on some local webpage.
Redux question: should a toggle action fire off a toggle event where the reducer describes the state, or should the toggle function get the state and decide which action to use?
@KevinB storing files in filesystem is more of performance thing also I see no reason to store it in db and cause more complexity also make developer worry about db size
@littlepootis Not in the situation of "it's not the voltage that kills you, it's the current"
Yes, a van de Graaff generator generates high voltage, but if you form a circuit with the ground, there's no corresponding high current because the voltage drops.