These are chat archives for FreeCodeCamp/Help

15th
Sep 2018
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Sep 15 2018 03:17
Hi, what is the regex to match all the math operators except those inside the parenthesis?
Example:
111+111-111*111/111+(-111)-(-111)
Aditya
@ezioda004
Sep 15 2018 03:35
@isemaj_gitlab This seems to work /(?<!\()[+\-\/*]/g, though it only works with latest browser (ES2018)
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Sep 15 2018 03:36
thank you, but why it only works for latest browser?
Aditya
@ezioda004
Sep 15 2018 03:37
Because it's added (negative lookbehind) this year only.
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Sep 15 2018 03:38
ok
Niraj Nandish
@Nirajn2311
Sep 15 2018 06:22
@eweiss17 to autoplay the video add autoplay=1 to the src in iframe
Aditya
@ezioda004
Sep 15 2018 07:19
Any recommended IDE for C?
YangTao
@doudou20188
Sep 15 2018 08:35
target="_blank" what it means?
May Kittens Devour Your Soul
@diomed
Sep 15 2018 08:38
@doudou20188 it means , open web link in new tab
YangTao
@doudou20188
Sep 15 2018 08:41
thanks
Ghost
@ghost~5b53da7dd73408ce4fa1d2e5
Sep 15 2018 09:46
Hi I'm trying to match any number between parenthesis either with decimal point or without. I use this regex /(\d*\.?\d)/g.exec('(0.28)') and it returns an array which the first two element are empty string.
Luc Martin
@fmartin5
Sep 15 2018 12:57
@isemaj_gitlab You need to escape the ( and ) characters in your regex if you want to match against them; otherwise they mean a group.
So try /\(\d*\.?\d\)/g.exec('(0.28)') :smile:
Kyle Holm
@thekholm80
Sep 15 2018 14:06
@ezioda004 i think @Smootimus uses visual studio. @manish-giri loves the jetbrains stuff, i think their C ide is CLion
The only IDEs I've used are Eclipse and Visual Studio, but it's been a lot of years
Aditya
@ezioda004
Sep 15 2018 14:12
@thekholm80 I was installing Visual Studio but they had something called "workload", couldnt find the one specifically for C but theres one for Desktop apps with C++. I think that can compile C but its too big like 7gigs
Jetbrains is paid I think, though I can apply for student discount..however I'd prefer a free alt instead, meanwhile I'm using repl.it :D
Kyle Holm
@thekholm80
Sep 15 2018 14:13
codelite looks pretty good for a free ide
Aditya
@ezioda004
Sep 15 2018 14:15
That seems alright, will give it a shot. Thanks!
Better have dark theme or its an uninstall
Kyle Holm
@thekholm80
Sep 15 2018 14:17
lol
i saw dark theme in their screenshots
plus, it's open source so you can always make your own
Aditya
@ezioda004
Sep 15 2018 14:18

it's open source so you can always make your own

You think I'm a programmer or something?

Kyle Holm
@thekholm80
Sep 15 2018 14:19
if you're not a programmer you're the closest i've seen
Aditya
@ezioda004
Sep 15 2018 14:21
Kyle Holm
@thekholm80
Sep 15 2018 14:22
lol
AK01993
@AK01993
Sep 15 2018 15:37
Can someone explain how this equals 8?

// Setup
var myArray = [[1,2,3], [4,5,6], [7,8,9], [[10,11,12], 13, 14]];

// Only change code below this line.
var myData = myArray[2][1];

psyperl
@psyperl
Sep 15 2018 15:39
myArray[2] is [7,8,9] and myArray[2][1] is 8
array index starts at 0
AK01993
@AK01993
Sep 15 2018 15:48
I see. Thank you
psyperl
@psyperl
Sep 15 2018 15:48
:thumbsup:
Karma Drukpa
@coderkarma
Sep 15 2018 15:49
Hi
waywardchild
@waywardchild2_twitter
Sep 15 2018 15:53
Can anyone help me understand recursion?

let output = '';
function repeater(char) {
if (output.length === 5) return output
output += char
return repeater(char)
}

repeater('g')

Why does the above code work but not the one below?
let output = '';
function repeater(char) {
if (output.length === 5) return output
return output + repeater(char)
}
Aditya
@ezioda004
Sep 15 2018 15:59
@waywardchild2_twitter In the latter one, repeater(char) is returning an empty string and adding a new call to the stack, so the length of the output isnt increasing and hence stackoverflow.
waywardchild
@waywardchild2_twitter
Sep 15 2018 16:00
ahhhh thank you!
gishy1
@gishy1
Sep 15 2018 16:25
hello guys !!
its been awhile
i need help with a code signal challenge
Kyle Holm
@thekholm80
Sep 15 2018 17:06
@coderkarma :wave:
43477746
@43477746
Sep 15 2018 17:22
How do I do this one who can help me

@waywardchild2_twitter

Can anyone help me understand recursion?

Ene Catalin
@EneCatalin
Sep 15 2018 17:54
great bearded one :wave:
Kyle Holm
@thekholm80
Sep 15 2018 17:56
@EneCatalin :wave:
Ene Catalin
@EneCatalin
Sep 15 2018 17:57
how goes programming ?
or whatever ritual question programmers are supposed to ask
Kyle Holm
@thekholm80
Sep 15 2018 18:02
uh ... slowly lol. i haven't really written anything in a few weeks
you?
Ene Catalin
@EneCatalin
Sep 15 2018 18:08
kinda the same
bored, can't code
making plenty of excuses though
turns out android versions are a bitch too, and android doesn't really warn you about possible issues
(until you get fked over by it during testing on older devices)
Kyle Holm
@thekholm80
Sep 15 2018 18:11
how far back do they suggest you support?
like 5?
Ene Catalin
@EneCatalin
Sep 15 2018 18:13
like the version my phone has, yes, 5 I think
API 14 whichever that is
but due to my phone being shit I tested on the emulator
so now I am effed and need to rewrite quite a bit of code because 14 has no toolbar support
Kyle Holm
@thekholm80
Sep 15 2018 18:14
what a pain
Ene Catalin
@EneCatalin
Sep 15 2018 18:14
(pretty sure I have to rewrite a ton of stuff since I'd need to remove the toolbar and programatically add it then interact with it, great design not telling you about compatibility)
yeah, it was a huge gotcha
I mean now that I know about it it's easy to deal with in the future. In the present massive FU
if not for the need to support 4+ year old devices android dev would be great. The latest apis rock
sadly you really can't use them cause, you know...
psyperl
@psyperl
Sep 15 2018 19:10
i thought i've been coding but just realized i've only been doing it in my head.. checked repo, no commit
Kyle Holm
@thekholm80
Sep 15 2018 19:10
that's a new one
Niraj Nandish
@Nirajn2311
Sep 15 2018 19:11
Theres always a first time for everything
Kyle Holm
@thekholm80
Sep 15 2018 19:11
give it a few years and we'll be able to commit from memory
psyperl
@psyperl
Sep 15 2018 19:11
:D
Bjorn van de Peut
@bjorno43
Sep 15 2018 20:02
@diomed @eweiss17 Well yes, it's possible. But there's not a native function to flatten a multi-level array to a single level in PHP. Probably easiest way to do it using array_walk_recursive().
Bjorn van de Peut
@bjorno43
Sep 15 2018 20:10
Problably something like:
<?php
$myArr = array(array(1,2,3),array(4,5,6));
$result = array();

array_walk_recursive($myArr,function($val) use (&$result){
    $result[] = $val;
});
?>
Kyle Holm
@thekholm80
Sep 15 2018 20:11
something something PHP something
not even worth the effort making fun anymore
Bjorn van de Peut
@bjorno43
Sep 15 2018 20:11
:joy:
Kyle Holm
@thekholm80
Sep 15 2018 20:46
@bjorno43 send me some stroopwafels
they're making them on this show i'm watching and they look sooo good
Bjorn van de Peut
@bjorno43
Sep 15 2018 21:23
@thekholm80 I'll ask my gf. She's a cook :P
Anyway, it's late here so I'm off. Gn8 guys
Kyle Holm
@thekholm80
Sep 15 2018 21:24
g'night