« first day (2218 days earlier)      last day (2715 days later) » 

8:00 PM
167
A: Why RegExp with global flag in Javascript give wrong results?

Ionuศ› G. StanThe RegExp object keeps track of the lastIndex where a match occurred, so on subsequent matches it will start from the last used index, instead of 0. Take a look: var query = 'Foo B'; var re = new RegExp(query, 'gi'); var result = []; result.push(re.test('Foo Bar')); alert(re.lastIndex); resul...

 
Ok. So how to reset the state?
 
you tell me
 
thx. Your link brought clarity.
 
3
Q: Why does JavaScript's RegExp maintain state between calls?

J.P.Today I came across a very strange JavaScript regular expression issue. When using the global modifier (//g), RegExp.test() yields different values in subsequent calls. Can anyone explain why? var s = "youtube.com/watch?v=XyeebVA3DNk"; var re1 = /^youtube\.com\/watch[a-zA-Z0-9_\-\?\&\=\/]+/g;...

 
I don't mean to be rude, but "why does this happen" > here is a link describing everything in detail > "okay, how do I do it" > you didn't read jack shit
 
8:02 PM
@KevinB, that "no" felt stronger than Arnold Schwarzenegger's arms. — Sajib Acharya 48 secs ago
 
@rlemon actually very rude.
 
try harder then
you asked and I provided detailed sources, you didn't read them and asked again
@KevinB ohhh that dude who answered -- name is a direct correlation to Cap in this room iirc.
 
yeah i was wondering about that
 
I complained about his username on meta (was "dropped on japan" and his picture was little boy or something) being in bad taste, and I think they suggested he change it or changed it for him. he retaliated with that iirc
 
so rude
 
8:05 PM
we're a bunch of rude people today
it's friday we're supposed to be happy
 
AJAX calls can't be redirected? wtf
 
well, you can't redirect the page by redirecting the ajax call
 
I lead that with "I don't mean to be rude" to cushion it, nothing I said was rude. ๐Ÿ˜ƒ
but vamps gon vamp
@KevinB found it -- meta.stackexchange.com/questions/147519/… god the meta split made a mess
 
@KevinB I think his problem is the first call setting up a session cookie.
 
I don't know where to look anymore
 
8:13 PM
$(location).attr('href', 'http://example.com') lmao
 
@ssube the HoH is retarded difficult
I auto'd B1 no sweat, B2 didn't even get close to clearing stage 1
 
@SterlingArcher they always are. It's a fence, since the monster is usually pretty good.
 
@SterlingArcher Don't use buffs and it won't be so bad.
 
I've heard bad things about this one, but Ran and Akia have both shown up before, so...
 
$({jQueryCode:(url)=>location.replace(url)}).attr("jQueryCode")("http://example‌​.com")
 
8:14 PM
@ssube huh?
 
I'm saving up energy packs to run it tonight.
 
@Trasiva all my mons use buffs lol
 
@SterlingArcher compared to past HoH monsters, the light brownie is not supposed to be very good.
It's not the best brownie, while the other have been the best of their class.
 
I only have like 7 good mons decently runed, the rest are crap or food
 
@SterlingArcher His passive boosts his atk by 50% if the target has a buff, and then strips it on attack if you've got more buffs han him.
@ssube Rule of thumb is to always save the light/darks though, because they tend to get the most frequent changes to them.
 
8:16 PM
@Trasiva I save almost all my ld mons, that's why I have like 30 of em. :P
only ld I've thrown away was the dark harpu
got like 6 and they are garbage
 
I'm glad I didn't feed Dias.
'cause Dias now is amazing.
Before he was a little lackluster.
 
I have a light Elven Ranger and a Light Martial Cat and that's it
 
dark harpy, however...
@SterlingArcher light cat is fun enough to keep but will never be an end game carry
rangers are a dime a dozen
 
Yeah
LD scrolls are super hard to come across
 
The fire ranger is for Necro though.
 
8:18 PM
I've got a couple interesting ones, like Rasheed, but nothing super good.
 
So keep that in mind.
 
@SterlingArcher you can buy them in the guild shop
or somewhere
 
Not l/d scrolls
 
yeah only legendary and almighty
You can get them in the Magic Shop, but rare af
 
And the legendary are -pieces-
 
8:19 PM
^
 
legendary pieces are easy to farm
 
You need four thousand guild points to make one.
 
I could have sworn I've seen ld pieces somewhere
 
tbh i could have sworn the same thing
maybe it was removed
 
@Trasiva yeah, I spent my first 3k or so on finishing up a legendary, and got something pretty meh
now I'm just going to do all the ifrits
 
8:20 PM
You can buy the l/d pieces in the magic shop sometimes.
And the world boss on occassion
 
My glory points go to 4* rainbows, then energy plant, then stat buffs
Guild points to devilmons, then scrolls I guess
Maybe ifrit? so many though
 
you get 10 of the 100 pieces every 450 points
it's not bad for a guaranteed ifrit
 
I know it's ridiculous lol
 
it's a shame the cowgirl won't pull l/d, otherwise I'd buy those
 
I have a dark cowgirl
 
8:21 PM
@SterlingArcher it's like 10 weeks, tops
half that if you're in a good farming guild
 
I mean.. I get 18 guild points twice a day?
 
@SterlingArcher Honestly, you should keep buying the angels first this early. It'll help you get some 6*s a lot sooner.
 
The occasional defense 10 points
 
@SterlingArcher you should get 4 per round, 2 rounds per fight, 3 fights per battle, 2 battles per day...
it's like 48/day
 
I need 20 points for my first ifrit scroll, then I'm going back to focusing on angels first, because I need more six stars.
 
8:23 PM
plus bonus points for winning
 
@Trasiva angels? I don't really need those I get some many unknown scrolls i have no issue leveling or evolving mons
@ssube wat? My farming guild must suck then
We never win
 
@SterlingArcher You've clearly not tried to 6* or 5* much.
 
@SterlingArcher oh, if you win, you get double points (if you've earned X, they give you another X at the end)
that's why you set no/low defense and farm
 
Up to four isn't bad, it gets slow at five, and kills at six.
 
I do the same with arena, have a pair of trophies as my def (arta and gina or rasheed)
 
8:25 PM
@Trasiva i need more mons worthy of 6* tbh
 
@SterlingArcher you have a few
6 your farmer first, then your healer, then your tank
 
@ssube that's what I do, but we always get matched against war guilds and get wrecked
 
You've got a few you should be pushing that way now.
 
@SterlingArcher oh, you have a shitty guild boss who can't control where you sit in the rankings then
or doesn't enforce poor def to keep you low
 
Jun is my farmer, Bella/Colleen/Emma my healers, and Dagora my tank
 
8:26 PM
6* your colleen or something
 
I guess, but Im getting easy guild points so im happy
 
any of those three are worth it
 
You have a Raoq you said?
 
Yeah, I'm saving rainbowmons and prepping to 6* prolly bella
No, no Raoq
 
you're past needing or using raoq
 
8:27 PM
I've got my Raoq set up to farm Faimon hard in like 28 seconds.
 
fucker's just a little glass cannon that likes to miss
 
My xp/hr is something like 73000
 
Oh I can farm Chiruka hard with Jun and a healer
Not as efficient, idk if I have any mon that can solo a hard
 
I did the math, using Raoq to solo farm hard is much more efficient than Dagora on Hell.
 
raoq, water archer, and teon were my carries early game and are going to be food here soon
 
8:29 PM
I got Jun pretty early so I didn't use any of those
 
trying to use raoq all game is like trying to scale mongo
 
Jun and Fire Assassin were my top 2 mons for early game
 
fire assassin is nifty, but I'm not sure who I want to build as a damage blocker
 
yay MS from DB4
She's a heavy hitter with ignore defense iirc
 
@Trasiva which of Darion, Priz, or Lexy should I build?
 
8:31 PM
Man
 
my Darion is ok, but can't do much of anything but block
 
Depends on your goal
Priz would definitely be better for giants.
 
and I have enough healer-tanks that blocking is pretty meh
that's kinda what I was thinking
not for giants specifically, but it's the only one with good skills otherwise
 
Fire assassin is more for Necro
 
I have much better options for a necro team
 
8:33 PM
Except it's a race, so Lexy also gives you a leg up with the defense break and the brand.
 
brand is nice, although one of the doods I pulled last night has a brand
def break, they'll probably be teamed with somebody who has that (half my fucking mons have def break)
 
Though honestly, you'd need Chasun to really balance out that recovery debuff.
 
I have a functional Chasun, since arch+chasun is raid breaking
 
Though, I guess if you get someone who can just consistantly apply heal block the whole fight, it doesn't matter.
 
the raid dragon can't prevent chasun from healing the arch and the arch can heal chasun...
I guess lexy isn't a real option, being fusion food
 
8:36 PM
Who's she fusion food for?
 
wind valk?
 
Nope
She's not fusion food dude, lol.
 
yeah, I think I was confusing her with red succ
 
Isn't red succ fusion for vero?
 
and a couple other things
that's why you can fuse it
they make fusion really easy except for one little ingredient
for vero, that's the stupid yeti
 
8:44 PM
I would think that's the easiest one
 
that's what they want you to think
SW is run by the shadow government
 
Well, he's a 3* and you're bound to find somebody in global chat who finds a SD
The others are all 4* and you're more likely to fuse them than summon them
 
the ingredients for the others are all common mons, but I've also found more than one of each of the others just normally
and adding random people is tricky
 
Tricky, but easier than awakening ~16 mons for a 5*
It took some persistence to get bella via chat
 
I don't usually bother friending people just for SDs, tbh
 
8:47 PM
Oh I do lol
 
I just pull as many as I can buy (3, looks like) and wait for friends to get it
but, nice thing with SDs is no monster from them needs more than 40 pieces (4* HoH mons need 50, ifrit needs 100)
so you can run them for 30 pieces (stage 7 drops 3, run it 10x) and fill in the last 10 with almighty
 
Yeah, for 400 guild points
 
@SterlingArcher Yea, the red Succ is.
@SterlingArcher You don't realize how awful the dark yeti is to find, lol.
You guys need the dark yeti still?
If so, running all the HoMs I needed for water mids got me like...100+ dust, I can probably pop off a few dark sds.
 
I'm not really pushing for ifrit fusion
Will take a ton of effort and I want to build my core first
runes > ifrit atm
 
I think I'm coming down with something.
 
8:54 PM
Just remember, Ifirit is a key component to every dragons team from 7 on up.
 
more cowbell?
 
A bad case of getting down on Friday
 
@SterlingArcher you get a pile of them
 
Hello stackers =)
 
9:02 PM
@ilrein 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.
 
lol, this is a thing: Graham's biggest little hexagon
 
9:20 PM
weird question: can one just not use a DM like GDM or lightdm? (display manager)?
And always end up with something you get by doing the ctrl+alt+f1/2/3/4... in linux?
I could just try, but the world burns when I try something like that
 
>:( code dumpers
he ediited: D
 
I am confuse
 
does anyone know if you can enforce a string property in jsonSchema to be an exact value?
I can think of maybe using enum, or regex pattern
 
if it's supposed to be a very specific value... does it need to be in the json at all
 
if it's a future-compatibility thing, I'd go with an enum
just make it a single value for now
 
9:29 PM
Dammit, just found a legendary 4* violent rune but it had shit substats :(all flat
 
well I'm storing it in an object that acts like a database table, but I'm using this specific value to enforce that the table only ever has one value in it (so its basically serving as the unique identifier or key)
which never changes
 
that's all very strange and sounds prone to bugs
 
heh maybe, but how else would you restrict a table to only one record?
 
If it can ever only have one value it's not a table
 
yes but say you were restricted in the sense that you had to use a table to do this
 
9:35 PM
check if any records exist?
COUNT(id) FROM foo; === 1
 
Then it's time to make yourself unpopular with whatever BS white tower architect who set that rule
 
obviously that leaves you open to race conditions
 
A_V
Hello !
 
what are race conditions?
never mind I found the definition :)
 
if you have two threads or processes or servers hitting the same database and each one runs two queries, SELECT * FROM foo; and INSERT ... INTO foo;, can they conflict?
in a race condition, yes, because the read and write can happen with another read and/or write in between
 
A_V
9:39 PM
I am currently looking at a potential website project. Thing is it'll have to be hosted on linux with a mysql DB and I've only ever used windows environments. What kind of code backend are available in such conditions ?
 
In the new PC world I suppose it should be called a time conflict, but yeah
 
one of the classic examples is checking if a file exists and deleting it. They're two different calls and somebody else could delete the file in between.
@ivarni it's a race to the kernel
anything like that has to go through the kernel, so whoever gets there first typically wins
 
I know what it is, I was trying to make a joke
 
you did not succeed
 
One of us failed, I'll give you that
 
9:41 PM
well you guys convinced me, I'll write functions the programmer has to use to access this single row 'object' and that way i can enforce it only has one item in it at all times
even though my other way would work, it seemed kind of hackish
 
hey guys who can help me?
Q:
 
Q the omnipotent being?
 
Im trying to write a service
to "outsource" some function in another file
like here:
my question is
first I have to send some code - so that we can discuss:
        req.file('logo').upload({
         maxBytes: 10000000,
         saveAs: function (uploadFile, cb) {
         cb(null, Date.now() + uploadFile.filename);
         },
         dirname: sails.config.appPath + '/assets/images/campaign/'
         }, function (err, uploadedFiles) {
         if (err) {
         return res.json(500, err);
         }
         else if (uploadedFiles.length === 0) {
         // proceed without files
         res.json("Kein Bild zum Uploaden ausgewählt!")
         }
I want this snippet as a service
the problem is in the last else{} statement
this function call:
     sails.controllers.campaign.saveTheCampaign(params, req, res);
 saveTheCampaign: function (params, req, res) {...}
don't be scared of the big code.. my question is not about its content
Q: how can I pass the function as callback to my service?
I wrote a service called UploadService - and it has a function called upload()
        UploadService.upload(option, sails.controllers.campaign.saveTheCampaign(params, req, res));
//problem: params, req, and res are not known at this moment
 
10:12 PM
idk whether I should buy a rig now or wait for 7700k/1080 TI
 
@PomeGRanate, why don't you post your question in SO?
 
I know there's always something coming up but both of these are supposedly due in 2 months
 
depends on how important the newer compents are to you i'd think
 
pretty important
 
@leo.fcx yes
 
10:13 PM
planning on VR
 
I'd just go ahead and update, if what you can get now won't be marginally worse than what you can get in 2 months
 
@leo.fcx hm ok true, I thought maybe its a simple question for some of us here
 
it would be a log worse
 
I think there you will get answers to your quesiton
 
a lot*
 
10:14 PM
true yes
 
like you said, there's always something new if you wait a little longer
 
thx
 
right, but 7700k is like, a 60% discount on current i7 with the same power
meh
if it was only the CPU I'd just buy a cheap one and upgrade
but the 1080 TI is also interesting
 
i picked up a 970 TI a number of months ago, and picked up a 4770k quite a while ago, but i don't plan on messing with VR so no real reason to upgrade either for a bit longer
 
youtube.com/watch?v=eUZk76_h7oA love that canadian accent
cc @KendallFrey ๐Ÿ˜ƒ
 
10:28 PM
@Mosho 1080ti most likely
 
10:39 PM
lol
@Mosho what is actually your goal?
what do you intend to use the system for
and then, what is your budget?
 
work and gaming
 
@tereลกko to hit on ladies
 
^
as well
 
Wanna come up to see my 1080 SLI?
 
heaviest machine he can handle.
game while gain
 
10:40 PM
@Mosho buy a macbook 2016
 
a what
 
aside from apple-hate ...
 
macbook for gaming tho?
 
what is your budget?
 
what did the 2016 macbook lose?
 
10:41 PM
a screen
 
like
 
@KevinB ports
 
$2500
 
@Mosho all on the PC or do you intend to buy a 3k or 4k monitor too ?
 
just the box
 
10:41 PM
hmmm ....
the next big shift in market will be release of Vega/Zen from AMD, which will happen around April of 2017
 
too far
 
Intel/Nvidia wont have anything sooner
 
get a chromebook ๐Ÿ˜†
they game real well
 
I am actually not sure what you would spend $2500 on for a PC
ok .. there is gtx1080 and that's about it
unless you want to by Xeon CPU for some reason
 
@Mosho reddit.com/r/buildapcforme let the masses chime in
 
10:45 PM
it doesn't have to be $2500
if I can do well with less
 
also, I personally find Z170 chipset boards to be shit
seriously, most of them come with the old PCI slots
and unsuitably placed PCIe x1
 
I usually just google for the common rigs for the price
not into customization really
 
@Mosho I recommend this as a baseline: logicalincrements.com
 
oi
 
and then you build by adjusting the recommendation (for example, I usually go with Fractal Design cases)
 
10:48 PM
@Mosho get a nice list from reddit or another pc building site, and then pay @Zirak $30 to put it together and optimize it ๐Ÿ˜ƒ
 
@tereลกko that's interesting, thanks
@rlemon it's true that @Zirak has shown he can be trusted with my delicate parts
 
@Mosho btw, pick the country on that page - different countries have different baseline setups at the same price
 
@Mosho he is a delicate part
can you curl him with one arm?
 
quite possibly
 
I'd pay $5 to get that on video
 
 
btw, how do I clean a folder of changes since my last commit?
 
@Mosho so you not coming back to Canada?
 
@Mosho ?
Git?
 
@rlemon I most likely am actually
in May
 
nice, dinner/drinks?
 
10:54 PM
@taco no, SVN
 
we'll get @KendallFrey in on it as well
 
Can I come with? Trump's gonna probably launch the nukes around then
 
of course it's git
 
have you tried CVS
 
I really wanna go axe throwing again
 
10:54 PM
@rlemon count me in
 
it's all the rage
 
I'm ok at git, but no idea what you mean by "clean folders". Git reset (to unstage) or git stash maybe?
 
just undo everything in a folder
VSCode's UI has a way to do it per file
it's super convenient
wondering how I can do it to a folder
it's not unstaging
 
delete, pull ? ๐Ÿ˜›
 
there are other changes in the repo
 
10:56 PM
Man, that sounds like a nightmare. Good luck with that
 
@Loktar Nice!
 
you could use git blame maybe along with git diff
 
You can do it per file. Carefully.
 
git checkout -q -- client/src/components/user-settings/style.css
that's what it does
 
no wildcards?
/*
?
 
10:57 PM
I think I can just do a folder path
 
Careful, though
 
think that did it
wonder what that q does
 
quiet
suppresses any output from the command
 
right
 
so i guess it's like > /dev/null
if you had omitted -q you would have been able to see the feedback, and then seen if it was successful or not :p
 
11:04 PM
oh well
 
life goes on
wait wut
so @rlemon did you work anything out regarding the emojis?
 
not yet
 
๐Ÿ’ฉ
 
yeah
what a bunch of ๐Ÿ’ฉ
 
๐Ÿ ->๐ŸŽฎ
 
11:12 PM
I'm sorry my free work isn't fast enough for you ๐Ÿ˜ƒ
I'll try harder
 
@rlemon nah i appreciate what you do of course
just curious to how you approach it
 
I was being sarcastic
 
me too
code monkey, code!
=^.^=
 
๐Ÿ™ˆ
 
โ›ท
 
11:19 PM
๐Ÿ‘ฟ
 
hey whatsapp supports gifs now
 
whats whatsapp
 
@KevinB im and voip on your phone
 
@bitten really?
 
sms contact based
 
11:21 PM
yes
 
@littlepootis yeah! just gifed my lady
 
๐Ÿ’ฉ๐Ÿ’ฉ๐Ÿ’ฉ๐Ÿ’ฉ๐Ÿ’ฉ๐Ÿ’ฉ๐Ÿ’ฉ
 
It supports it a few updates ago
 
11:40 PM
๐ŸŒฎ
 
@rlemon these looks exactly like english breakfast muffins
maybe canada is alright
 
11:57 PM
so many sausages
 
@bitten maybe?
๐Ÿ˜›
 

« first day (2218 days earlier)      last day (2715 days later) »