These are chat archives for FreeCodeCamp/Help

30th
Jul 2018
manarsalah
@manarsalah
Jul 30 2018 00:14

Hi ..can you please help me with this code
{
class Program
{
static void Main(string[] args)
{
for (int i = 1; i <= 10; i++)
{
{
Console.WriteLine(i);
}
{

                for (int i = 10; i >= 1; i--)
                {
                    {
                        Console.WriteLine(i);
                    }
                }
            }
        }
    }
}

}

Stephen James
@sjames1958gm
Jul 30 2018 00:39
@manarsalah What is the question>
manarsalah
@manarsalah
Jul 30 2018 00:49
it should be counting from 1 to 10 ascending and descending..I run and it starts from 7 donknow why and it's also random in order @sjames1958gm
manarsalah
@manarsalah
Jul 30 2018 00:58
oh.I got it ..I should had different var name for each function..any way can you teach me about those curly brackets ..I never know which order they follow
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:18
guys with Inmotion hosting where I simply drag my site files like js, css, html and it hosts my site i heard you can't do the same thing to host sites with php or nodejs server side components is that true? I wanted to include a contact form that emails me on my site and I used nodejs to implement it now theres a lot more files than just html/css/js what should i do to host a site with nodejs code included?
Claudio Restifo
@Marmiz
Jul 30 2018 04:35
Install node on that machine, than it will be able to read and run it :)
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:36
@Marmiz yep i can run it on mine but problem is how does it work when you host the site onto a website? It won't have node installed on the server so how will it use my email form
Karma Drukpa
@coderkarma
Jul 30 2018 04:38
@Marmiz @thekholm80 quick question in a triangle if i want to get the row elements we i need to do 2 for loops ?
Claudio Restifo
@Marmiz
Jul 30 2018 04:38
@darkphotonKN do you have control over the hosting server?
@coderkarma what? a triangle row ?
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:39
@Marmiz uuuh its inmotion.com can you have a look for me their hosting service? I basically paid for hosting any site i want, i can put files in a "public" folder on my log in panel and my site just loads at the url
@Marmiz but so far i only have css html and js code and it works fine, adding nodejs it doesnt work
@Marmiz even if it works on my machine
Claudio Restifo
@Marmiz
Jul 30 2018 04:39

can you have a look for me their hosting service?

nope :smile:
But I'm sure you can contact them and ask for advice

Karma Drukpa
@coderkarma
Jul 30 2018 04:40
          3     5
       7     9    11
   13    15    17    19
21    23    25    27    29
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:40
@Marmiz hmm i was just more asking in general is there a different type of hosting that accepts server-side coding languages like php or node, as of right now it only seems to be able to host client side stuff like frontend
Claudio Restifo
@Marmiz
Jul 30 2018 04:40
@darkphotonKN the reason why html - js -css works is because it get interpreted by the browser.
node on the other hand needs to be run on the server, so the machine need access to the node binaries to actually be able to run it :)
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:41
@Marmiz ah ok that makes sense, so are there more special hosting sites that are for people with nodejs / php / any server-side code?
Karma Drukpa
@coderkarma
Jul 30 2018 04:41
I just want to add to elements of that triangle but I was just wondering should I have to two for loops ?
Claudio Restifo
@Marmiz
Jul 30 2018 04:42

@darkphotonKN again, it depends on the server, not the language. Even if it were go php or elixir you still need to install the binaries on the server to make it work. Like you had to install node on your local computer to make it work.

it's not the language, but the machine.

btw there are tons of nodes hosting providers out there :)

@coderkarma looks like CS50 first problem, the mario thingy :)
Karma Drukpa
@coderkarma
Jul 30 2018 04:43
nah!! just codewars problem
Claudio Restifo
@Marmiz
Jul 30 2018 04:43
@coderkarma that's a visual representation ,but how exactly is the data source?
an array? a list? a tree ? an object? a touple?
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:45
@Marmiz but i have node installed on my local pc, and the code works fine on localhost i can go on my site and fill in a form and click submit it sends an email to me. The code for that was written in node. Uploaded onto a website with inmotion hosting it doesnt work anymore. The site works but the form doesn't
@Marmiz so i just ned to swap to a provider that supports nodejs?
just a triangle
I am sure this problem is not that hard
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:46
@Marmiz thats the thing if thats the case I don't know what kind of hosting services I should be looking for. When I search the guides and help are for general websites no mention of if node or any server side language is supported
Karma Drukpa
@coderkarma
Jul 30 2018 04:46
just need to find the sum of rows odd number of triangle
Claudio Restifo
@Marmiz
Jul 30 2018 04:47

@darkphotonKN gain it works on localhost because you have node installed. I bet the immotion (that btw I've never heard of, I generally use aws) server doesn't.

Go on their website and see how you can "add" a new language on the server

Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:48
@Marmiz ahhh right sorry i didnt sleep all night so i didnt quite get you the first time, cuz you said "YOU still need to install the binaries on the server to make it work" i thought you meant me lol, but readin it again obviously you meant the servers
@Marmiz thanks a lot ill try figure it out on the service, have you heard of any other sites that support it that you know of? Not asking you to look for me just if you heard of any that support it or for example if anyone you knew or heard of have put a site up with server side code and it works fine
Claudio Restifo
@Marmiz
Jul 30 2018 04:49
@darkphotonKN YOU need to install the binaries to the SERVER. (or see how your provider can do it for you)
@darkphotonKN now is my favourite node hosting provider.
Or you can go with Heroku
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 04:52
@Marmiz ah i get it now so sorry lol xD. Thanks, so for those I need to install the binaries to the server too? or it works a different way with now and Heroku?
Claudio Restifo
@Marmiz
Jul 30 2018 05:00

have you heard of any other sites that support it that you know of

now and heroku

so for those I need to install the binaries to the server too

.... really? Feel like we are chasing tails here.

So let me google that for you... that's what they both said on the first page:

Now:

now allows you to take your JavaScript (Node.js) or Docker powered websites, applications and services to the cloud with ease,
speed and reliability. In practical terms, any directory that contains a package.json or Dockerfile  [...bla..bla..bla]

Heroku: a big images with all the languages they support. Including a big NodeJS logo

yeah I guess they support it out of the box.

Aditya
@ezioda004
Jul 30 2018 05:17
@coderkarma Theres a pattern in each row.
王铭涛
@Bestboy125
Jul 30 2018 05:31
how can i ues "a"
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 05:37

@darkphotonKN YOU need to install the binaries to the SERVER. (or see how your provider can do it for you)
@darkphotonKN now is my favourite node hosting provider.
Or you can go with Heroku

To me someone with completely no knowledge of this it seems like you said I need to check if there is binaries with the first line (you mentioned earlier i need to check if inmotion hosting has it), and because of have no idea how it works or what "node hosting" provider is, i just assumed maybe on those hosting sites they will automatically allow you to install the binaries or whatever without needing to check if theres the option (or manually figure out how to do it), and if not maybe theres another way hence i asked. Even still when you say "yeah I guess it supports it out of the box", I still don't know in what way or what that means. There is no need to be condescending and act like I can't google, you told me about those sites I was simply asking you to clarify if they need to install or in what way is it done as I have no idea how the hosting for server side languages works so I have no idea what it means if a site allows node hosting. Does it mean you drag your node files onto a folder on the hosting site and everything works? Will my node contact form email work? Or there is some set up first still etc I don't know. So what you pasted there about the info they give about node and the icon of node is still meaningless to someone who knows nothing about the difference between hosting that allows node and doesn't - hence why i asked the question in the first place. I already googled up hosting sites and I also landed on heroku earlier, but i can't tell in what way they allow node to be used.

@Marmiz I know i was asking some stupid questions, im really exhausted, thats why i apologized. I'm also a complete noob.
@Marmiz anyway I get it now, been reading through the info on the now site so thank you, appreciate it
Claudio Restifo
@Marmiz
Jul 30 2018 07:06

@darkphotonKN a key skill to have as a dev is to also know how to ask questions. The promise of it is "read and search".
So in general, if you want more helpful reply than some generic answer that you could have just by googling, you need to be more specific.

For instace: "what's a binary" would be a start.
or "how exactly my computer run node? Why my server does not?" ---> "how can I install node on a XXX machine?"

or " hey mate, I've read now docs and they mention package.json or dockerfile, what are those?"

I already googled up hosting sites and I also landed on heroku earlier, but i can't tell in what way they allow node to be used.

This is actually a well written and posed question. You did your research and still can't understand how.
When you run an app with node it will have a package.json at its root folder. Heroku will read it, "understeand" that you are trying to run a node app, and will set up a "server" for you with node already installed :)

Kranti Nebhwani
@darkphotonKN
Jul 30 2018 07:14
@Marmiz ok duly noted... I really need to work on that lol. You're right looking through what I asked my question was messy to begin with. I was confused myself what I wanted to ask, all I knew was that how I used to upload my site with my hosting service doesnt work after I added node to my code, so theres a ton of questions running through my head such as "is there an alternative to node where I don't need to change my hosting service", "do i actually need to change it is there a work around?" "what makes adding node code to my source code unable to be hosted" "if I get a hosting service that supports node what does that mean, do they support it by allowing me to easily drag and drop nodejs along with my css/html/js files like I used to on my original hosting service (without node), or is there a set up to have node included" etc lol, so what came out was a jumbled mess.
Now that you explained that it looks at the package.json file and it will set up a server with node alread installed it's a lot more clear thanks!
Claudio Restifo
@Marmiz
Jul 30 2018 07:16

I was confused myself what I wanted to ask

that's actually the first step :)
no kidding, sometimes in dev interviews they ask so convoluted question not because the answer is difficult, but because they want to see how you actually proceed to "understand what to understand"

Kranti Nebhwani
@darkphotonKN
Jul 30 2018 07:19
@Marmiz ahhh damn yeah its good for me to start thinking about these things as I'm still yet to start applying for jobs and doing interviews, just trying to learn all the web stuff until my current job ends
Claudio Restifo
@Marmiz
Jul 30 2018 07:24
@darkphotonKN as per your question, apperently immotion support node, there's a getting started page. Perhaps that's a good place to start looking since you are already with them
assuming that's actually your hosting provider :smiley:
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 07:27
@Marmiz yeah thats the one, I'm reading through it now :thumbsup:
Kranti Nebhwani
@darkphotonKN
Jul 30 2018 07:32
@Marmiz btw murlocs are awesome
Claudio Restifo
@Marmiz
Jul 30 2018 07:58
best bot we have in the server :smile:
gishy1
@gishy1
Jul 30 2018 09:42
@yagoestevez thanks bro.
have a look at my technical page guys
the sizing is horrible for mobile devices
if you run the pen on smaller devices calamity happens
gishy1
@gishy1
Jul 30 2018 10:05
finally managed to make it work out, have a look and let me know anything i can work on it
correction: let me know what i can improve on.
Ghost
@ghost~59209a78d73408ce4f6102e8
Jul 30 2018 13:39
Im looking for critique on my JS calculator if anyone is willing: https://github.com/willybeans/js_calculator/blob/master/calculator.js
May Kittens Devour Your Soul
@diomed
Jul 30 2018 15:36
in the future - how do I stop npm run build
since I effed up and ran it, and dunno how to stop it
Christopher McCormack
@cmccormack
Jul 30 2018 15:41
@diomed ctrl+c doesn't work?
May Kittens Devour Your Soul
@diomed
Jul 30 2018 15:44
it might.lol. I was not familiar, that's why I asked
Christopher McCormack
@cmccormack
Jul 30 2018 15:46
ctrl+c is used to kill a running process normally
May Kittens Devour Your Soul
@diomed
Jul 30 2018 15:47
ok. thanks. i wrote it down on postit note :D
near my login password
Kyle Holm
@thekholm80
Jul 30 2018 15:49
lol
Alexander R Bott
@Abott1222
Jul 30 2018 18:02
how do I make my media queries not suck?
how many is considered too much?
Kyle Holm
@thekholm80
Jul 30 2018 18:03
i have a good article on that, lemme look it up
Smootimus
@Smootimus
Jul 30 2018 18:08
:D
:wave:
Kyle Holm
@thekholm80
Jul 30 2018 18:09
hey smoo
how's school today?
Alexander R Bott
@Abott1222
Jul 30 2018 18:09
@thekholm80 appreciate it!
Kyle Holm
@thekholm80
Jul 30 2018 18:10
@Abott1222 the author tries a bit hard to be funny, but the info is good
Smootimus
@Smootimus
Jul 30 2018 18:33
It was pretty nice
I had a quiz today in Microsoft Networking Essentials
Got a 91
There was one question that was royally messed up that counted against me when it shouldn't have
:anger:
Kyle Holm
@thekholm80
Jul 30 2018 18:34
i wish you would learn linux networking essentials
Smootimus
@Smootimus
Jul 30 2018 18:34
And just left a doctor's office that wanted to make it out like I'm a drug addict instead of help with the problem
Kyle Holm
@thekholm80
Jul 30 2018 18:34
i spent about an hour yesterday trying to give my vm a static local ip address
Smootimus
@Smootimus
Jul 30 2018 18:34
Oh that is def in the curriculum my friend :D
"Linux Essentials"
Kyle Holm
@thekholm80
Jul 30 2018 18:35
i dislike doctors
Smootimus
@Smootimus
Jul 30 2018 18:35
Same
He didn't even speak English very well
Kyle Holm
@thekholm80
Jul 30 2018 18:35
everything about the entire experience ... office staff, nurses, the whole deal
Smootimus
@Smootimus
Jul 30 2018 18:36
I'm telling him what's going on and he just keeps trying to probe me about drug addiction like he's going to catch me up or something
"Do you party..?"
"No, but I get this pain right here near my live..."
"When's the last time you drank alcohol?"
"Never, dude, this pain though..."
"How about marijuana...."
"..... guy...."
Kyle Holm
@thekholm80
Jul 30 2018 18:36

Hey doc, my BP is kind of high today

how much crack did you smoke?

Smootimus
@Smootimus
Jul 30 2018 18:36
Yeah, pretty much
"Would you take a tox screen for me?"
"Dude, what does that have to do with anything"
Kyle Holm
@thekholm80
Jul 30 2018 18:37
my last doc was quite the opposite. i'd say "i have a problem with X" and he'd just start listing drugs asking which i wanted
Smootimus
@Smootimus
Jul 30 2018 18:38
Like I had a ultrasound and everything and they said my "bile duct was dilated"
So that means I'm a drug addict?
Thought it meant gall stones
But I guess I'm wrong and need to lay off crack
Kyle Holm
@thekholm80
Jul 30 2018 18:38
classic symptom of snorting the pot
Smootimus
@Smootimus
Jul 30 2018 18:38
Yep
Alexander R Bott
@Abott1222
Jul 30 2018 18:48
my last doc was quite the opposite. i'd say "i have a problem with X" and he'd just start listing drugs asking which i wanted
Smootimus
@Smootimus
Jul 30 2018 18:48
So I walked out and I'm waiting to cool off before I confront asking for a new primary care dr
Alexander R Bott
@Abott1222
Jul 30 2018 18:48
can you give me his #?
Smootimus
@Smootimus
Jul 30 2018 18:48
That was the first time I saw this dr
LOL @Abott1222
Alexander R Bott
@Abott1222
Jul 30 2018 18:50
I tried to go to a therapist because I was sick of being offered pills for depression and she referred me to an energy healer.
Its no wonder so many people have mental health issues in the US
Smootimus
@Smootimus
Jul 30 2018 18:51
It really is terrible
This was at the Veteran Affairs, too
So it's like... Oh, okay. Just gonna accuse all veterans of being drug addicts and force them to take drug tests to get health care?
Because my gall bladder? Hmm. Makes sense
Kyle Holm
@thekholm80
Jul 30 2018 19:08
that's just sad
i need a react ninja for some code-style advice
Smootimus
@Smootimus
Jul 30 2018 19:11
I have yet to dabble much in react :'(
Kyle Holm
@thekholm80
Jul 30 2018 19:12
i'm a big fan
Smootimus
@Smootimus
Jul 30 2018 19:12
I'm picking up a load of laptops though from my financial advocate :)
Kyle Holm
@thekholm80
Jul 30 2018 19:12
anything good?
Smootimus
@Smootimus
Jul 30 2018 19:12
Gonna clean them up and get them ready for distribution for veterans :D
I dunno, maybe. I'm gonna go through them and pick out the best one lol
He said "take the best one for yourself"
I have yet to see the pickings :)
Kyle Holm
@thekholm80
Jul 30 2018 19:14
i'd love a thinkpad p71 with a xeon processor
Smootimus
@Smootimus
Jul 30 2018 19:14
Going over subnetting now in MS Networking :eyes:
Yeah I would love to get a ThinkPad as well, I had one when I was working for my last company
I think that's what this guy is using right now, I dunno what model but he can get his hands on them
Kyle Holm
@thekholm80
Jul 30 2018 19:15
i have a thinkpad x230 right now. it's my 3rd thinkpad lol i love them
Smootimus
@Smootimus
Jul 30 2018 19:15
I'm running my ASUS Zenbook UX550 :eyes:
ultrabook
Karma Drukpa
@coderkarma
Jul 30 2018 19:15
@thekholm80 @Smootimus need help.
Smootimus
@Smootimus
Jul 30 2018 19:15
Pretty much what I'm always on and have attached to my hip
What's up my dude
@coderkarma
Kyle Holm
@thekholm80
Jul 30 2018 19:16
but the p71 you can get with a xeon processor, up to 64 gb ram and a 16 gb NVIDIA Quadro card. it'd be better than my gaming desktop lol
Christopher McCormack
@cmccormack
Jul 30 2018 19:16
ohh subnetting, if you have any questions, let me know @Smootimus , network engineer for a living
Smootimus
@Smootimus
Jul 30 2018 19:17
How's your for loop knowledge? :)
Karma Drukpa
@coderkarma
Jul 30 2018 19:17
wondering, how can I loop through rows of triangle.?
Smootimus
@Smootimus
Jul 30 2018 19:17
Hehe
Kyle Holm
@thekholm80
Jul 30 2018 19:18
don't think of it as a triangle
Smootimus
@Smootimus
Jul 30 2018 19:18
This is a tricky algorithm that'll get ya thinking. About the size of the spaces
Karma Drukpa
@coderkarma
Jul 30 2018 19:20
trying to understand how that diagram formed but It's quite not making sense to me.
Smootimus
@Smootimus
Jul 30 2018 19:21
Well yeah it's not really asking you to output the triangle :eyes:
Kyle Holm
@thekholm80
Jul 30 2018 19:21
each row has a set number of numbers, the top has a single number, the second row has 2, 3rd is 3, etc. the rows are populated with odd numbers in the range up to the given number n
Smootimus
@Smootimus
Jul 30 2018 19:21
So like Kyle said, don't bother with the shape of it
That's fluff to distract you
Yeah
Kyle Holm
@thekholm80
Jul 30 2018 19:22
so the triangle could be represented as const triangle = [[1], [3, 5], [7, 9, 11], [13, 15, 17, 19], [21, 23, 25, 27, 29]];
Karma Drukpa
@coderkarma
Jul 30 2018 19:22
hm...
Smootimus
@Smootimus
Jul 30 2018 19:22
And you're wanting to add those and tell what the sum for the row the user asks about
Karma Drukpa
@coderkarma
Jul 30 2018 19:23
oh so i need a two loops
Smootimus
@Smootimus
Jul 30 2018 19:23
You could use two for loops
Kyle Holm
@thekholm80
Jul 30 2018 19:29
i hate math
@cmccormack you've played with react some?
Christopher McCormack
@cmccormack
Jul 30 2018 19:30
@thekholm80 yessir
Kyle Holm
@thekholm80
Jul 30 2018 19:30
mind giving your opinion on something?
i have 2 nearly identical components
HelloWithWrapper and HelloWithoutWrapper
Christopher McCormack
@cmccormack
Jul 30 2018 19:31
it's still loading
Kyle Holm
@thekholm80
Jul 30 2018 19:31
the one without has direct access to the context api, the one with uses a wrapper component (HOC) to get access to the context api
i'm leaning towards using the wrapper so i don't have to rewrite the context api boilerplate in every component accessing the context api
Christopher McCormack
@cmccormack
Jul 30 2018 19:32
@thekholm80 I do that too
Kyle Holm
@thekholm80
Jul 30 2018 19:32
but i'm not sure if i'm making it needlessly complex
Christopher McCormack
@cmccormack
Jul 30 2018 19:32
context lends itself well to creating HoCs
Kyle Holm
@thekholm80
Jul 30 2018 19:33
i think the code looks cleaner, for sure
Christopher McCormack
@cmccormack
Jul 30 2018 19:33
like for auth, I made a withAuth HoC that I could easily wrap around anything that needed it
but withAuth was in my context file
Smootimus
@Smootimus
Jul 30 2018 19:33
@coderkarma Or you can use a while
Christopher McCormack
@cmccormack
Jul 30 2018 19:34
there are dangers in using multiple HoCs so beware, like if both use the same prop names the innermost will get overwritten
Karma Drukpa
@coderkarma
Jul 30 2018 19:35
@Smootimus Honestly nothing is coming in my mind except doing for loops and summing number.
Christopher McCormack
@cmccormack
Jul 30 2018 19:37
@thekholm80 why multiple files for the context?
Kyle Holm
@thekholm80
Jul 30 2018 19:37
what do you mean?
separating the context and the provider?
Christopher McCormack
@cmccormack
Jul 30 2018 19:38
You have MyProvider and MyContext
yeah
Kyle Holm
@thekholm80
Jul 30 2018 19:38
so i can have a single export
Christopher McCormack
@cmccormack
Jul 30 2018 19:39
I'm not certain you are actually using the context api correctly, shouldn't you have MyContext.Consumer and MyContext.Provider?
oh I see it
duh
Kyle Holm
@thekholm80
Jul 30 2018 19:39
the provider is in MyProvider lol
Smootimus
@Smootimus
Jul 30 2018 19:39
I'm seeing a pattern
Kyle Holm
@thekholm80
Jul 30 2018 19:39
the consumer is in the wrapper
Smootimus
@Smootimus
Jul 30 2018 19:39
In it
Christopher McCormack
@cmccormack
Jul 30 2018 19:39
sorry been a few months since I used context
Kyle Holm
@thekholm80
Jul 30 2018 19:39
no worries. it's still pretty new to me
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:40
hello
I'm new
pls need help
Christopher McCormack
@cmccormack
Jul 30 2018 19:40
@diomed this channel is full sorry
Kyle Holm
@thekholm80
Jul 30 2018 19:40
@diomed those are not your radio buttons
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:40
pls css help
@cmccormack I got in . hehe
so my question is...
if I make a fixed menu on the side of page, how can I fix that menu only to one section
not to whole page
Christopher McCormack
@cmccormack
Jul 30 2018 19:42
@thekholm80 last context I made if you're interested. I probably abused only a single context (ignore that it's in views, I was lazy)
Kyle Holm
@thekholm80
Jul 30 2018 19:42
.menu {
  position: glued-to-side;
}
Christopher McCormack
@cmccormack
Jul 30 2018 19:42
@thekholm80 that... that's not real is it?
Kyle Holm
@thekholm80
Jul 30 2018 19:43
:imp:
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:43
.menu {
position: aside-fixed; ? ? ?
}
Christopher McCormack
@cmccormack
Jul 30 2018 19:43
@diomed you can position it absolute to another element
Smootimus
@Smootimus
Jul 30 2018 19:43
@coderkarma (n * n) - (n -1)
Will give you the first digit
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:43
like, position it absolute to section
Christopher McCormack
@cmccormack
Jul 30 2018 19:44
The parent has to be configured as relative though, not static
Kyle Holm
@thekholm80
Jul 30 2018 19:44
@cmccormack that's insane
@diomed grid makes that kind of stuff really easy
Christopher McCormack
@cmccormack
Jul 30 2018 19:44
@thekholm80 too long?
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:44
does it really?
Smootimus
@Smootimus
Jul 30 2018 19:44
And something like while (count < n)
Christopher McCormack
@cmccormack
Jul 30 2018 19:44
I loved having most state and handlers in one file, made it so easy
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:45
does that mean - while count is smaller than number?
@Smootimus
Smootimus
@Smootimus
Jul 30 2018 19:45
if (firstDigit % 2 !== 0)
Kyle Holm
@thekholm80
Jul 30 2018 19:45
@cmccormack looking at other people's code gives me panic attacks
Smootimus
@Smootimus
Jul 30 2018 19:45
Yeah it's for someone else lol
Christopher McCormack
@cmccormack
Jul 30 2018 19:46
@thekholm80 i'll be honest I'm a little uncomfortable reading it even after only a month or so
Kyle Holm
@thekholm80
Jul 30 2018 19:47
@cmccormack lol it's good code, i just expect everyone to use the same formatting & style that i use because obviously my way is the only way of doing things lol
get you some eslint
Christopher McCormack
@cmccormack
Jul 30 2018 19:48
I use eslint
but my own way, I'm my own man!
Kyle Holm
@thekholm80
Jul 30 2018 19:48
and it doesn't yell at you for never including a single ;?
pylint yells at me for all my ; lol
Christopher McCormack
@cmccormack
Jul 30 2018 19:48
no because ; can go drown itself
Smootimus
@Smootimus
Jul 30 2018 19:49
@coderkarma
```
Christopher McCormack
@cmccormack
Jul 30 2018 19:49
my eslint config
Smootimus
@Smootimus
Jul 30 2018 19:49
....
function rowSumOddNumbers(n) {
    // TODO
  let firstDigit = (n * n) - (n - 1);
  let ans = 0;
  let count = 0;

  while (count < n) {
    if (firstDigit % 2 !== 0) {
      ans += firstDigit;
      cout++;
    }
    firstDigit++;
  }

  return ans;
}
You could try something like that
Christopher McCormack
@cmccormack
Jul 30 2018 19:49
@thekholm80 see I came from the other direction, lots of Python before touching JS
Kyle Holm
@thekholm80
Jul 30 2018 19:50
my eslint
Christopher McCormack
@cmccormack
Jul 30 2018 19:50
cout?
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:50
Kyle Holm
@thekholm80
Jul 30 2018 19:50
lol
Fay Vor
@phavor
Jul 30 2018 19:50

I have this bug that has kept me all day... I need help in figuring out why it wouldn't work

// Action Generator
const addExpense = ({
  description = "",
  note = "",
  amount = 0,
  createdAt = 0
} = {}) => ({
  type: "ADD_EXPENSE",
  id: uuid(),
  description,
  note,
  amount,
  createdAt
});

// expense reducer
const expensesReducerDefaultState = [];

const expensesReducer = (state = expensesReducerDefaultState, action) => {
  switch (action.type) {
    case "ADD_EXPENSE":
      return state.concat(action.expense);

    default:
      return state;
  }
};

// Create store
const store = createStore(
  combineReducers({
    expenses: expensesReducer,
  })
);

store.subscribe(() => {
  console.log(store.getState());
});

// dispatch action
store.dispatch(addExpense({ description: "Rent", amount: 500 }));
store.dispatch(
  addExpense({
    description: "Data",
    amount: 100,
    note: "Got data for web development"
  })
);

When I check the browser console the expense property returns undefined for both dispatch calls.

Christopher McCormack
@cmccormack
Jul 30 2018 19:50
@thekholm80 no prop-types? you rebel
Kyle Holm
@thekholm80
Jul 30 2018 19:51
i used to, but meh
Christopher McCormack
@cmccormack
Jul 30 2018 19:51
@thekholm80 it actually helps quite a bit, there are little bugs that are easy to miss without it
Kyle Holm
@thekholm80
Jul 30 2018 19:51
oh, i don't write bugs
my code is awesome
Christopher McCormack
@cmccormack
Jul 30 2018 19:51
like a value that should never be undefined my be undefined at first but only express itself in rare cases
like a component unmounting early or something
hah I bet
Kyle Holm
@thekholm80
Jul 30 2018 19:52
lol
Christopher McCormack
@cmccormack
Jul 30 2018 19:52
you don't write code you write poetry
Kyle Holm
@thekholm80
Jul 30 2018 19:52
it is pretty, i'll give you that
Christopher McCormack
@cmccormack
Jul 30 2018 19:53
except all those ugly semicolons
alpox
@alpox
Jul 30 2018 19:53
@cmccormack You should program the frontend in Elm :D no undefined or null ever!
Fay Vor
@phavor
Jul 30 2018 19:53

I have this bug that has kept me all day... I need help in figuring out why it wouldn't work

// Action Generator
const addExpense = ({
  description = "",
  note = "",
  amount = 0,
  createdAt = 0
} = {}) => ({
  type: "ADD_EXPENSE",
  id: uuid(),
  description,
  note,
  amount,
  createdAt
});

// expense reducer
const expensesReducerDefaultState = [];

const expensesReducer = (state = expensesReducerDefaultState, action) => {
  switch (action.type) {
    case "ADD_EXPENSE":
      return state.concat(action.expense);

    default:
      return state;
  }
};

// Create store
const store = createStore(
  combineReducers({
    expenses: expensesReducer,
  })
);

store.subscribe(() => {
  console.log(store.getState());
});

// dispatch action
store.dispatch(addExpense({ description: "Rent", amount: 500 }));
store.dispatch(
  addExpense({
    description: "Data",
    amount: 100,
    note: "Got data for web development"
  })
);

When I check the browser console the expense property returns undefined for both dispatch calls.

can anyone help?

Christopher McCormack
@cmccormack
Jul 30 2018 19:53
@phavor don't spam please, if someone is familiar and willing to help they will try
Fay Vor
@phavor
Jul 30 2018 19:54
@cmccormack am not trying to do that.
Kyle Holm
@thekholm80
Jul 30 2018 19:54
i only know one way of doing redux. i find a way that works and i never learn any other ways
but with the context api i doubt i'll ever use redux again
alpox
@alpox
Jul 30 2018 19:55
@phavor action.expense doesn't exist because you list the expense on the same level as the type.
You probably wanted.
const addExpense = ({
  description = "",
  note = "",
  amount = 0,
  createdAt = 0
} = {}) => ({
  type: "ADD_EXPENSE",
  expense: {
    id: uuid(),
    description,
    note,
    amount,
    createdAt
  }
});
Christopher McCormack
@cmccormack
Jul 30 2018 19:55
@alpox ah stop throwing new things to learn at me, I only have so many hours in a day!! :)
alpox
@alpox
Jul 30 2018 19:55
@cmccormack We all do :(
And yet I'm all in for clojure!
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:56
my gf told me to undress her with words, so I told her - there's a spider in your bra
alpox
@alpox
Jul 30 2018 19:56
@diomed Totally works
Smootimus
@Smootimus
Jul 30 2018 19:56
About to write up a Bio Page for my homework in HTML, CSS and JS class
=\
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:56
haha...
I'm just kidding. . .
what's a gf?
I copied that from reddit.
alpox
@alpox
Jul 30 2018 19:57
@diomed My gf would not just undress, she would run to another country :D
May Kittens Devour Your Soul
@diomed
Jul 30 2018 19:57
classic gf move
Smootimus
@Smootimus
Jul 30 2018 19:57
LoL
Fay Vor
@phavor
Jul 30 2018 19:59
@alpox thanks. it worked
alpox
@alpox
Jul 30 2018 19:59
@phavor You're welcome
Smootimus
@Smootimus
Jul 30 2018 20:03
Lets see how long it takes me to do this assignment
I just started
Kyle Holm
@thekholm80
Jul 30 2018 20:04
i wonder what setting up authorization is like in a sql server? in mongo it's not my favorite thing ever
alpox
@alpox
Jul 30 2018 20:05
@thekholm80 Not much different actually
Christopher McCormack
@cmccormack
Jul 30 2018 20:05
you mean like local auth? or authenticating users on the db itself?
Kyle Holm
@thekholm80
Jul 30 2018 20:06
i set up my db on a vm, but to connect to it from another vm i had to enable authentication. it was a learning experience, but not a fun one
i guess i'll never pursue my dreams of becoming a database administrator
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:11
sql server or mysql?
Kyle Holm
@thekholm80
Jul 30 2018 20:12
neither
i will be taking a peek at sqlite one of these days though
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:13
Isn't sqlite like some sort of file and nothing else?
Kyle Holm
@thekholm80
Jul 30 2018 20:13
yep
let's you have persistent storage without installing a db or doing your own nasty read/write file stuff
Smootimus
@Smootimus
Jul 30 2018 20:15
:D
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:15
Ye. Though I think it's only viable for small projects. Probably gets rly slow very fast. As strange as that sounds xD
Smootimus
@Smootimus
Jul 30 2018 20:15
Oh sheee, I gotta put this on pause
Kyle Holm
@thekholm80
Jul 30 2018 20:15
i only make small things
Smootimus
@Smootimus
Jul 30 2018 20:15
be back in a bit :'(
Kyle Holm
@thekholm80
Jul 30 2018 20:15
:wave:
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:16
I just had to completely restart my mysql server due to a stupid mistake on my end, lol
alpox
@alpox
Jul 30 2018 20:16
Kind of all sql databases are nothing else than a file in the end :D
In postgres you can even say which table you want in which file
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:17
Ye ok. It has to be saved somewhere at some point, lol
Kyle Holm
@thekholm80
Jul 30 2018 20:18
i just like that it has a standardized kind of api - even if it is sql. i don't think i'd want to go to the trouble of writing my own package to read/write like that
maybe there's a mongodblite out there
alpox
@alpox
Jul 30 2018 20:19
@thekholm80 I'd absolutely LOVE to use Datomic as database. Sadly its not cheap :(
Kyle Holm
@thekholm80
Jul 30 2018 20:19
mongodb docs recommend NeDB
alpox
@alpox
Jul 30 2018 20:19
That one is written in Clojure and the access works directly through Clojure datastructures - in very good ways
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:20
Nah I made a persistent connection to my mysql server from my websocket. As this gives a bit of a performance increase. I kinda forgot that the websocket never stops running though. Even if you kill it, it never closes the connection properly. So ye, kinda locked myself out of my database xD
Kyle Holm
@thekholm80
Jul 30 2018 20:20
#hackerman
alpox
@alpox
Jul 30 2018 20:20
@bjorno43 it... Does not? What crap of websocket is that o.O
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:21
@alpox Don't blame the websocket. It doesn't even work with MySQL. Blame the programmer (me) for doing that with a persistent connection xD
This was kind of the problem:
<?php
namespace MyChat;
use \PDO;

Class Database {
    private $host = DB_HOST;
    private $user = DB_USER;
    private $pass = DB_PASS;
    private $dbname = DB_NAME;

    private $dbh;
    private $error;

    private $stmt;

    public function __construct(){
        // Set DSN
        $dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->dbname;
        // Set options
        $options = array(
            // This was the problem
            PDO::ATTR_PERSISTENT    => true,
            PDO::ATTR_ERRMODE       => PDO::ERRMODE_EXCEPTION
        );
        // Create a new PDO instanace
        try{
            $this->dbh = new PDO($dsn, $this->user, $this->pass, $options);
        }
        // Catch any errors
        catch(PDOException $e){
            $this->error = $e->getMessage();
            return $this->error;
        }
    }
}
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:27
Simply put: It's fine to use a persistent connection, IF you close it regurly and reconnect after. Just don't be stupid like me and create an infinite persistent connection :P
Smootimus
@Smootimus
Jul 30 2018 20:28
Love havin' my time wasted >.>
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:30
Ye that sux, lol
Alexander R Bott
@Abott1222
Jul 30 2018 20:31
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:31
Btw, did anyone else notice that Gitter's SSL certificate is having issues? Telling me the page contains insecure content
Alexander R Bott
@Abott1222
Jul 30 2018 20:32

The only basic qualification for the apprentice role is that the individual have a demonstrated history of independent coding related projects or solving problems with code. There is a wide range of activities that will qualify. Some examples include:

Open source contributions

Personal projects hosted on Github, etc.

Hardware hacking with tools like Arduino

Automating job functions via scripting or macros

Complex spreadsheet formula creation or maintenance

Querying databases

@bjorno43 it says it is secure on my end
Kyle Holm
@thekholm80
Jul 30 2018 20:33
i wonder if i'd like writing code if i did it for a living?
Smootimus
@Smootimus
Jul 30 2018 20:33
:)
This would be COOL @Abott1222
Thanks for sharing that
Alexander R Bott
@Abott1222
Jul 30 2018 20:34
i just got the email. wanted to share with my gitter peeps
Kyle Holm
@thekholm80
Jul 30 2018 20:34
We will accept applications for 2 days or until we receive 400 applications
Alexander R Bott
@Abott1222
Jul 30 2018 20:35
"whichever comes later" hahahaa
Kyle Holm
@thekholm80
Jul 30 2018 20:35
bet they get 400 in the first hour
Alexander R Bott
@Abott1222
Jul 30 2018 20:35
you can still apply you just aren't guaranteed a review
the only thing I am missing is work with excel :(
Kyle Holm
@thekholm80
Jul 30 2018 20:35
i saw something a tech recruiter had written about his experience hiring jr devs. he said he'd usually get over 1000 applications within an hour of posting a jr dev position
Alexander R Bott
@Abott1222
Jul 30 2018 20:36
oh ya its nuts
I just started hearing about these apprenticeship programs(which I think is what we need to fight against the onslaught of competitive jr roles)
alpox
@alpox
Jul 30 2018 20:36
@bjorno43 i would usually say that the biggest problem I see with the code is that its PHP :D
But then again, it seems that PHP came a long way and got better. And yet I would still not use it :D
Kyle Holm
@thekholm80
Jul 30 2018 20:37
@bjorno43 cries in PHP
poor bob, the lone champion of a dying technology
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:37
Well the amount of PHP haters in here is quite large :P I wonder how many ppl have a good reason for hating PHP (like actually have experience with it) and how many are just following the hipe train though, lol
Kyle Holm
@thekholm80
Jul 30 2018 20:38
python is king now, long live the king
Smootimus
@Smootimus
Jul 30 2018 20:38
I would push an application their way but I'm gonna continue writing up these two webpages for my class assignment first lol
Kyle Holm
@thekholm80
Jul 30 2018 20:39
i don't want them rummaging through my github and seeing how crappy i am at writing code
alpox
@alpox
Jul 30 2018 20:39
@bjorno43 i know it from the old way of writing PHP bit know it got much better :D what I still hate is the syntax (yea thats personal preference) and ofc. OOP. :/
Alexander R Bott
@Abott1222
Jul 30 2018 20:39
@Smootimus seriously apply dude. It is very hard to find these opportunities and the timing is perfect
alpox
@alpox
Jul 30 2018 20:40
@bjorno43 but* not bit :D
Alexander R Bott
@Abott1222
Jul 30 2018 20:40
just crank out the assignment today haha
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:41
@alpox Honestly I don't believe there's something wrong with OOP. Just because functional programming became a thing lately, doesn't nessesarily make OOP a bad thing all of the sudden. Though as for syntax, ye I kinda agree some improvements can be made there.
alpox
@alpox
Jul 30 2018 20:42
@bjorno43 i had lots of experience with both paradigms and just see that functional programming leads to less troublesome code in general
Alexander R Bott
@Abott1222
Jul 30 2018 20:44
@alpox in what way?
OOP is more readable to me
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:44
@alpox Not saying functional programming isn't better. I think it's pretty much proven to be better. Just saying that it doesn't make OOP bad. It's not like it's suddenly insecure or anything.
alpox
@alpox
Jul 30 2018 20:44
Ofc. It doesnt mean that OOP is bad in general. For me it just means that FP helps to have better testable, better maintainable and less cognitive intertwisting
I was just giving a reason why i dont like to use PHP myself :D
Alexander R Bott
@Abott1222
Jul 30 2018 20:46
I am curious about FP but I am not familiar with it. I know pure OOP through SmallTalk and dont have the time to play around with haskall right now so I have no valid opinions of the true FP way.
Kyle Holm
@thekholm80
Jul 30 2018 20:47
to me, OOP seems needlessly complicated some times. but maybe that's because i learned FP first
Alexander R Bott
@Abott1222
Jul 30 2018 20:47
I think the non-mutability of fp overcomplicates things
Kyle Holm
@thekholm80
Jul 30 2018 20:47
that's my favorite part lol
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:47
The reason why I like PHP is because it used to be one of the few options you had with server side languages back when I started as a dev. NodeJS didn't exist yet and the only other major server side lang I knew was Perl. So ye, I kinda grew up with PHP
Alexander R Bott
@Abott1222
Jul 30 2018 20:48
I think its a matter of what language we learned first that taught us the "proper" way to think like a computer scientist.
alpox
@alpox
Jul 30 2018 20:49
@Abott1222 i didnt use smalltalk myself but from what ive heard/saw, the pure OOP like in smalltalk doesnt have the problems which OOP of other imperative languages have. I could be wrong though.
Alexander R Bott
@Abott1222
Jul 30 2018 20:49
plus when I was learning I really looked up to Alan Kay so that might influence my love of OOP hah
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:49
Btw. Perl used to be king at eating up server RAM :P
Alexander R Bott
@Abott1222
Jul 30 2018 20:49
@alpox oh ya we failed in OOP ever since C++ lol
alpox
@alpox
Jul 30 2018 20:49
I started web dev with PHP.
Could never believe why its used
Smootimus
@Smootimus
Jul 30 2018 20:50
LoL Man I shelled those two pages out quick
Got a RUFF sketch up nice and easy
Alexander R Bott
@Abott1222
Jul 30 2018 20:51
fuck I have an interview with nordstroms in an hour. Dont even know the position I am applying for. I put in so much work to be a web dev and I think its for SDE lol :(
i suck at their coding tests so guaranteed to fail it lol
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:52
@Abott1222 Good luck anyway
Alexander R Bott
@Abott1222
Jul 30 2018 20:52
I have such bad anxiety the reason I put so much care in my self-learning is so that once I start work I wont have as many panic attacks
@bjorno43 well I appreciate it
Smootimus
@Smootimus
Jul 30 2018 20:52
I'm guessing you just email them at reach@linkedin.com
Alexander R Bott
@Abott1222
Jul 30 2018 20:52
just wait until the day they open in and there should probably be a button to apply
otherwise ya email them
but they tell you the questions they want you to answer so I was planning on drafting them up today
idk if you would be interested but maybe we could proof read eachothers applications? @bjorno43 @thekholm80 and whoever else is applying
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:54
I'm not applying :P
Alexander R Bott
@Abott1222
Jul 30 2018 20:54
i like how they dont accept resumes
Smootimus
@Smootimus
Jul 30 2018 20:54
That's 12PM tomorrow for mre
Me
Alexander R Bott
@Abott1222
Jul 30 2018 20:54
its purely based on your essays
Smootimus
@Smootimus
Jul 30 2018 20:54
:eyes:
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:55
Though once finished, they should give me f*cking medal for this chatsystem I'm programming here..
Kyle Holm
@thekholm80
Jul 30 2018 20:58
i'm gonna have to think about it. moving to the bay area isn't on my list of things i'd like to do
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:59
icechat.png
Kyle Holm
@thekholm80
Jul 30 2018 20:59
ouch, my eyes
Bjorn van de Peut
@bjorno43
Jul 30 2018 20:59
Ghehehe
Tyriq Riggins
@jiggyriggy65
Jul 30 2018 21:00
hey to all! i'm having trouble with saving files on terminal my text editor i use is atom and i'm trying to save my atom files to terminal
alpox
@alpox
Jul 30 2018 21:01
@bjorno43 i hope you find some better color once that is done :D
Kyle Holm
@thekholm80
Jul 30 2018 21:01
what do you mean 'save to terminal'? @jiggyriggy65
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:01
@alpox Ghehe of course :P That's just mockup I made for testing. Later on everyone can just pick their own colors
alpox
@alpox
Jul 30 2018 21:02
Okay :D
Smootimus
@Smootimus
Jul 30 2018 21:02
Can't get my main content to center :eyes:
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:02
Smootimus
@Smootimus
Jul 30 2018 21:02
NVM
Just got it to xD
I had it set as a class instead of an id in the css
u.u
Noob mistake
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:02
@Smootimus This is a handy one to keep at hand: https://css-tricks.com/centering-css-complete-guide/
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:03
I installed this and it asks me to Configure npm scripts
Smootimus
@Smootimus
Jul 30 2018 21:03
Changed that and it snapped to liek I wanted xD
I <3 css-tricks.com
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:03
then shows this code
{
  "scripts": {
    "dev": "saber dev",
    "build": "saber build"
  }
}
can someone tell me where this goes?
Kyle Holm
@thekholm80
Jul 30 2018 21:03
in your package.json file
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:04
{
  "devDependencies": {
    "saber": "^0.1.10"
  }
}
does it go after that or inside existing brackets?
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:05
I see. Thank You, Kyle.
Kyle Holm
@thekholm80
Jul 30 2018 21:05
it should be added to the dependencies automatically when you run npm install --save-dev saber
Tyriq Riggins
@jiggyriggy65
Jul 30 2018 21:06
I have to save my atom files to gitbash but i'm a bit confused
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:07
Bought myself one of those Chromecast thingys
Have to say. I'm impressed. Streamed a 2 hour movie from my phone to it with Netflix. Not a single glitch and in the end it seriously only cost me 1% of the phone's battery
Christopher McCormack
@cmccormack
Jul 30 2018 21:09
it doesn't use the phone
Kyle Holm
@thekholm80
Jul 30 2018 21:09
lol
Christopher McCormack
@cmccormack
Jul 30 2018 21:09
Chromecast pings a server and streams on its own
unless you cast your device itself
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:09
Rly?! That explains why! lol xD
Christopher McCormack
@cmccormack
Jul 30 2018 21:09
yup :)
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:10
I got that one long time ago
then sold it
Kyle Holm
@thekholm80
Jul 30 2018 21:10
i guess you could hotspot your phone, connect the chromecast to the hotspot, then cast from your phone to your chromecast using the phone's data
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:10
then after I did that, Netflix became available in Croatia
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:11
Well you can actually cast the phone. I guess if you do that and than play the movie on the phone, it'll work :P
Christopher McCormack
@cmccormack
Jul 30 2018 21:11
you don't need to do that either just cast your screen :)
Kyle Holm
@thekholm80
Jul 30 2018 21:11
i used to cast to my roku, but it's not worth the effort
just add more monitors to your pc instead
Christopher McCormack
@cmccormack
Jul 30 2018 21:12
implying people never leave their pc
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:12
But ye, that explains why there was almost no battery drain while watching a full movie, lol. I thought that was way too impressive, ghehe
Kyle Holm
@thekholm80
Jul 30 2018 21:12
@cmccormack exactly
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:12
By default it uses . as base directory - wtf this means
Christopher McCormack
@cmccormack
Jul 30 2018 21:12
@diomed what did?
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:13
. as a base directory
Christopher McCormack
@cmccormack
Jul 30 2018 21:13
@diomed what did
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:13
:interrobang:
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:13
What uses the dot :P
Christopher McCormack
@cmccormack
Jul 30 2018 21:14
CONTEXT SIR
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:14
this thing I'm installing
Christopher McCormack
@cmccormack
Jul 30 2018 21:14
. just means the directory you're in
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:15
oh
Alexander R Bott
@Abott1222
Jul 30 2018 21:15
the invasion of vue has begun
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:15
bloody hell. how can one know that?
Christopher McCormack
@cmccormack
Jul 30 2018 21:15
Learn unix/linux
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:15
@diomed Pretty much unix default.
Though perhaps it would've been more clear with ./ instead of just .
May Kittens Devour Your Soul
@diomed
Jul 30 2018 21:16
would not
Alexander R Bott
@Abott1222
Jul 30 2018 21:16
unix isnt clear until you learn it lol
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:17
True lol
Though if you have a reasonable bit of experience with server side programming, you're probably formilliar with ./ = current directory and ../ = previous directory
Alexander R Bott
@Abott1222
Jul 30 2018 21:18
took me a long time to realize that I could get out of root app dir using ".." lol
well not long because I looked it up but I was confused for a few minutes lol
Kyle Holm
@thekholm80
Jul 30 2018 21:18
that means /.. is next directory and /../.. is next-next ... i think we figured out time travel
Alexander R Bott
@Abott1222
Jul 30 2018 21:19
@thekholm80 lol
Bjorn van de Peut
@bjorno43
Jul 30 2018 21:20
@thekholm80 Right. Should've said "up one directory" :P As previous is technically wrong xD
Smootimus
@Smootimus
Jul 30 2018 21:21
:)
This MS Networking class keeps me the most busy, I would say :eyes:
It's like a requirement to keep the class streaming just to keep up xD
Kyle Holm
@thekholm80
Jul 30 2018 21:43
sometimes my job makes me really sad
Christopher McCormack
@cmccormack
Jul 30 2018 21:44
@thekholm80 you don't work here?
Kyle Holm
@thekholm80
Jul 30 2018 21:46
i would but the pay is crappy
Smootimus
@Smootimus
Jul 30 2018 22:02
:D
Alexander R Bott
@Abott1222
Jul 30 2018 22:23
@thekholm80 what are you working on?
Kyle Holm
@thekholm80
Jul 30 2018 22:24
right now i'm building a task management thingy
not to get all technical
Christopher McCormack
@cmccormack
Jul 30 2018 22:25
way over my head
Kyle Holm
@thekholm80
Jul 30 2018 22:25
basically it's a place i can keep all my meeting notes and stuff like that, instead of sending myself emails or trying to decypher all my scribbles on a legal pad
Christopher McCormack
@cmccormack
Jul 30 2018 22:26
I know it's a MS product but OneNote is pretty great for that
Kyle Holm
@thekholm80
Jul 30 2018 22:26
i've tried onenote, evernote, google keep
they're all okay, but not quite what i'm looking for
Christopher McCormack
@cmccormack
Jul 30 2018 22:28
Will it work with cuneiform?
Kyle Holm
@thekholm80
Jul 30 2018 22:28
i'd really be perfectly happy to keep using outlook, but after 10 years at this company i'm running out of room lol. we're limited to 1.8 gig for our entire outlook storage and i'm constantly having to clean stuff up
cu·ne·i·form
kyo͞oˈnēəˌfôrm,ˈkyo͞onəˌfôrm,ˈkyo͞onēəˌfôrm/Submit
adjective
1.
denoting or relating to the wedge-shaped characters used in the ancient writing systems of Mesopotamia, Persia, and Ugarit, surviving mainly impressed on clay tablets.
that was actually my #1 priority
Christopher McCormack
@cmccormack
Jul 30 2018 22:29
I mean why wouldn't it be?
Kyle Holm
@thekholm80
Jul 30 2018 22:29
i think i can build an OCR to handle that bit
can't be all that hard
Smootimus
@Smootimus
Jul 30 2018 22:31
Downloading my Windows Server 2016 ISO to throw on my VMware Workstation Pro 14 :D
That I got all for free
Kyle Holm
@thekholm80
Jul 30 2018 22:31
that's how they get you, man. the drug dealers give you your first taste for free
next thing you know you're at the doctor with stomach pain and he's asking you to pee in a cup
Smootimus
@Smootimus
Jul 30 2018 22:32
I KNOW RIGHT?!
xD!!!
Kyle Holm
@thekholm80
Jul 30 2018 22:32
how many windows have you installed today, sir?
in doctor accent
Smootimus
@Smootimus
Jul 30 2018 22:33
LOL I dunno how you get that quote thing
Kyle Holm
@thekholm80
Jul 30 2018 22:33
> text
text
Smootimus
@Smootimus
Jul 30 2018 22:33
Aaaah
I've actually had that happen with this face >.>
And didn't know what it was doing!!
how ridiculous
Kyle Holm
@thekholm80
Jul 30 2018 22:34
lol
gotta escape those special characters
Smootimus
@Smootimus
Jul 30 2018 22:35
Went to make a sandwhich, there's mold on my bread...
Could this day get any worse? lol
Christopher McCormack
@cmccormack
Jul 30 2018 22:35
you could get hit by a car
driven by moldy bread
Smootimus
@Smootimus
Jul 30 2018 22:35
I mean it's honestly like... a direct parallel to how today is going
Mold on the bread
LOL! I mean I don't think I would even be upset if tha thappened
Christopher McCormack
@cmccormack
Jul 30 2018 22:36
Think of the brightside! You'll be skinnier after the food poisoning is over!
Alexander R Bott
@Abott1222
Jul 30 2018 22:36
lol
Smootimus
@Smootimus
Jul 30 2018 22:36
THat would be the second case of food poisoning in the past 3 weeks :D
Alexander R Bott
@Abott1222
Jul 30 2018 22:37
who knows the moldy bread might be hallucinogenic
Christopher McCormack
@cmccormack
Jul 30 2018 22:37
I like your diet!
Smootimus
@Smootimus
Jul 30 2018 22:37
Speaking of which, that's honestly what got me to make the damn dr appointment to begin with!!
That crossed my mind, @Abott1222
Smootimus
@Smootimus
Jul 30 2018 22:37
*maybe I shouldn't eat this, I might trip
u.u RIP
Kyle Holm
@thekholm80
Jul 30 2018 22:38
gotta get that rye bread if you want the trippy mold
Smootimus
@Smootimus
Jul 30 2018 22:38
Yis
Kyle Holm
@thekholm80
Jul 30 2018 22:38
white bread just makes you listen to Jim Croce
Karma Drukpa
@coderkarma
Jul 30 2018 22:38
@Smootimus @thekholm80
Smootimus
@Smootimus
Jul 30 2018 22:38
LOL!! Jim Croche
@coderkarma
Karma Drukpa
@coderkarma
Jul 30 2018 22:38
answer for the earlier was super easy
Smootimus
@Smootimus
Jul 30 2018 22:38
Yeah did you see what I posted?
Karma Drukpa
@coderkarma
Jul 30 2018 22:38
n n n
no
Smootimus
@Smootimus
Jul 30 2018 22:39
:'(
Karma Drukpa
@coderkarma
Jul 30 2018 22:39
nnn
Smootimus
@Smootimus
Jul 30 2018 22:39
lol
You could do that, too
Kyle Holm
@thekholm80
Jul 30 2018 22:41
gotta escape those special characters lol
Smootimus
@Smootimus
Jul 30 2018 22:41
LOL
Kyle Holm
@thekholm80
Jul 30 2018 22:41
n*n*n
nnn
Karma Drukpa
@coderkarma
Jul 30 2018 22:42
wth, I was over thinking on that to, when I sum up elements in row, i saw the diferences in output by n times
@thekholm80 sorry
lol
n*n*n
Kyle Holm
@thekholm80
Jul 30 2018 22:42
n*n*n
is n\*n\*n
escaped
Karma Drukpa
@coderkarma
Jul 30 2018 22:44
one more thing , in order to find the nth number can we just do n (n -1)?
Christopher McCormack
@cmccormack
Jul 30 2018 22:47
I was going to suggest something like that
Smootimus
@Smootimus
Jul 30 2018 22:51
You could
My laptop is so sick, it has no issue at all running virtual machines and whatnot
While doing all the tasks I'm still doing
Kyle Holm
@thekholm80
Jul 30 2018 22:53
having capable hardware is a huge advantage
Christopher McCormack
@cmccormack
Jul 30 2018 22:53
sick like eating moldy bread sick, or like 80s slang?
Kyle Holm
@thekholm80
Jul 30 2018 22:53
like super funky fly dope ill
#rapperman
i was looking at a web dev program the university near me offers, and they require everyone to have a mac book air or pro to take the course. it's pretty much the only reason i haven't signed up for it
Christopher McCormack
@cmccormack
Jul 30 2018 22:57
That's a weird requirement
Kyle Holm
@thekholm80
Jul 30 2018 22:57
i assume it's because the instructor doesn't want to help people in other environments
Christopher McCormack
@cmccormack
Jul 30 2018 22:57
I get they probably want some amount of homogeneity but requiring a $1k+ device is odd
Kyle Holm
@thekholm80
Jul 30 2018 22:58
they're happy to add the purchase price to your tuition
under 'Tuition and Fees"
Christopher McCormack
@cmccormack
Jul 30 2018 22:59
Cheaper to just try and get a job in webdev and learn on the fly
Kyle Holm
@thekholm80
Jul 30 2018 22:59
yeah
Smootimus
@Smootimus
Jul 30 2018 23:26
Back at school :eyes:
Got these giant OMEN monitors in the game lab
Karma Drukpa
@coderkarma
Jul 30 2018 23:27
@thekholm80
Smootimus
@Smootimus
Jul 30 2018 23:27
They make my heart swell
Karma Drukpa
@coderkarma
Jul 30 2018 23:27
@Smootimus
Kyle Holm
@thekholm80
Jul 30 2018 23:28
@coderkarma
Karma Drukpa
@coderkarma
Jul 30 2018 23:28
this is really easy question just to alternate the chars oppsitely
String.prototype.toAlternatingCase = function (str) {
My question and confusion is why my solution is not working even though it is correct.
Kyle Holm
@thekholm80
Jul 30 2018 23:30
@Smootimus are they ips 4k panels?
Karma Drukpa
@coderkarma
Jul 30 2018 23:32
String.prototype.toAlternatingCase = function (str) {
  var newWord = [];
    // loop through string
    for (let i = 0; i < str.length; i += 1){
        let currentChar = str[i];
     // if char is uppercase covert to lowerCASE
      if (currentChar === str[i].toUpperCase()){
         newWord.push(currentChar.toLowerCase());
          // If char is lower then convert to upper
      } else if( currentChar === str[i].toLowerCase()){
            newWord.push(currentChar.toUpperCase());
         } 
    }
    return newWord.join('');
  }
String.prototype.toAlternatingCase = function (str) {}, isn't this a function expression @thekholm80
Smootimus
@Smootimus
Jul 30 2018 23:33
HP Omens
Karma Drukpa
@coderkarma
Jul 30 2018 23:33
@Smootimus
Smootimus
@Smootimus
Jul 30 2018 23:33
I think so @thekholm80
Karma Drukpa
@coderkarma
Jul 30 2018 23:34
:(
Smootimus
@Smootimus
Jul 30 2018 23:35
Looks like they are probably the 32 inch as well
Kyle Holm
@thekholm80
Jul 30 2018 23:36
@coderkarma look at their tests, are they only giving you letters?
Karma Drukpa
@coderkarma
Jul 30 2018 23:38
@thekholm80 so what is the parameter do I need to pass then ?
Kyle Holm
@thekholm80
Jul 30 2018 23:42
oh, yeah you can't do this with a parameter
this is modifying the built in object prototype
i really don't have any good resources to suggest learning what this is, but it's the answer to your problem
Manish Giri
@Manish-Giri
Jul 30 2018 23:46
@thekholm80 teach me this
Karma Drukpa
@coderkarma
Jul 30 2018 23:46
but where do i need to put this, ?
@thekholm80 lol
this is this.
maybe just reading the docs will help
Bjorn van de Peut
@bjorno43
Jul 30 2018 23:56
Finally made IM chat functional.. now I still need to implement it in the interface..
Karma Drukpa
@coderkarma
Jul 30 2018 23:57
@thekholm80 so In my above code , can i use this. in for loop?
Kyle Holm
@thekholm80
Jul 30 2018 23:57
@coderkarma you can use it anywhere. but if you don't know what it is or does, then why?
a big clue is looking at how they use your code vs how you think they'll use your code
you may just have to learn what prototype is, along with standard built in objects
worst-case, you'll know more about javascript
Karma Drukpa
@coderkarma
Jul 30 2018 23:59
@thekholm80 true.