These are chat archives for FreeCodeCamp/HelpJavaScript

14th
Jun 2018
Mike Kordiak
@kordiak55
Jun 14 2018 00:56 UTC
Question campers
I noticed the new certs are finally out
I also noticed I have green check boxes next to all the js algorithms cert
Anyone else complete the old front end cert and notice this?
Coy Sanders
@coymeetsworld
Jun 14 2018 00:59 UTC
@kordiak55 yes I noticed that too, your previous work doesn't go away, it carries over
Mike Kordiak
@kordiak55
Jun 14 2018 01:00 UTC
@coymeetsworld The weird thing is, if I click on the projects my code isn't there
Also - I don't have the cert?
Coy Sanders
@coymeetsworld
Jun 14 2018 01:02 UTC
my certs didn't go away, links I guess are gone because now they have testing for projects
Mike Kordiak
@kordiak55
Jun 14 2018 01:02 UTC
my old cert is still there. I'm just curious if I have to go back and re-paste all my old code if the projects are already checked off
Coy Sanders
@coymeetsworld
Jun 14 2018 01:03 UTC
you'll probably need to do more, tests are looking for specific things now to verify
e.g. User Story #1: My chart should have a title with a corresponding id="title".
Mike Kordiak
@kordiak55
Jun 14 2018 01:03 UTC
There's no step to "complete cert"
you're probably right, I should just spend the time copy pasting code and see what's not sticking
Coy Sanders
@coymeetsworld
Jun 14 2018 01:04 UTC
yeah I'm not sure about complete cert, it may be on your home page
I forgot what I did to get the algorithms one, I didn't have to do any extra coding since I already had all the solutions
Mike Kordiak
@kordiak55
Jun 14 2018 01:05 UTC
you nailed it, you claim it on your profile settings page
same just grabbed it. That feels nice lol
and 3/5th of the front end too
Coy Sanders
@coymeetsworld
Jun 14 2018 01:06 UTC
yeah haha, just did a few things they added for HTML/CSS, going to look at rest at some point
Ryan Williams
@Ryanwfile
Jun 14 2018 01:14 UTC
I am working on a multi level dropdown menu using Bootstrap, Jquery in React and I'm having difficulty closing one of the menu's when another one is selected, how do I go about closing an opened menu when another is selected or the user clicks away from the menus? Here is the codepen, any help is greatly appreciated.
https://codepen.io/Ryanwfile/pen/bMwYam
Greg Duncan
@GregatGit
Jun 14 2018 02:39 UTC
@Ryanwfile are you married to jQuery? If you aren't I recommend dropping it
There is a lot of opinions on whether or not to use jQuery with react. Worth looking into
anthonygallina1
@anthonygallina1
Jun 14 2018 02:49 UTC
@Ryanwfile MAybe use a event handler https://api.jquery.com/mouseout/ and set state?
On click looks good here
Ryan Williams
@Ryanwfile
Jun 14 2018 03:00 UTC
@GregatGit @anthonygallina1 Thanks for the help, just seems like such a common problem with the dropdown, thought there might be an obvious quick solution
Greg Duncan
@GregatGit
Jun 14 2018 03:03 UTC
@Ryanwfile I used react-sanfona and it worked well https://daviferreira.github.io/react-sanfona/
Ryan Williams
@Ryanwfile
Jun 14 2018 03:04 UTC
@GregatGit I have not heard of that, looks promising I will check it out thanks
@GregatGit That works with multi level drop down menus as well?
Greg Duncan
@GregatGit
Jun 14 2018 03:10 UTC
@Ryanwfile I'm not sure
@Ryanwfile if it doesn't I would look for a library designed specificly for react. I'm pretty sure there is a react-bootstrap
Ryan Williams
@Ryanwfile
Jun 14 2018 03:21 UTC
@GregatGit That's a good idea thank you
Claudio Restifo
@Marmiz
Jun 14 2018 03:57 UTC

@Ryanwfile

Jquery in React

the two don't really play along together well. JQuery is full of DOM manipulation.
React uses a virtual DOM and tells you to try to avoid direct DOM manipulation as much as possible :smile:

Ryan Williams
@Ryanwfile
Jun 14 2018 04:19 UTC
@Marmiz Thanks for the help
Claudio Restifo
@Marmiz
Jun 14 2018 04:24 UTC
@Ryanwfile here's the list of supported synthetic event from React
iso
@iso1048
Jun 14 2018 07:02 UTC
Hi. Anyone online?
Dhaval Vira
@dhavalveera
Jun 14 2018 07:05 UTC
Hi
Rajat
@rajataudichya
Jun 14 2018 07:52 UTC
I have got a json files that show names like this Borussia M\u00c3\u00b6nchengladbach and the while the real name is borussia mönchengladbach
how can I change that
plus some names are also shown like this Roman Bürki is shown as Roman B\u00c3\u00bcrki
Simon Cordova
@gbsimon87
Jun 14 2018 08:21 UTC
Morning morning
Simon Cordova
@gbsimon87
Jun 14 2018 09:28 UTC
Hey all!
After about 2.5 years working front-end, I'm thinking of starting to dive into the back end world.
Seeing that I especialise in JS, I'm thinking Node JS and perhaps MongoDB as well.
Anybody have any good/solid resources they recommend I look at?
Thanks in advance :)
Dhaval Vira
@dhavalveera
Jun 14 2018 09:28 UTC
from where you are learning
Simon Cordova
@gbsimon87
Jun 14 2018 09:29 UTC
I started with Dummies books, then FCC, then got professional jobs and learned A LOT there, but currently using Udemy and Lynda
But any resource is appreciated.
Dhaval Vira
@dhavalveera
Jun 14 2018 09:30 UTC
Udemy & Lynda both have best resources
vission_han
@DissHan
Jun 14 2018 09:30 UTC
hey
Simon Cordova
@gbsimon87
Jun 14 2018 09:30 UTC
@dhavalveera have you taken any specific ones?
Dhaval Vira
@dhavalveera
Jun 14 2018 09:31 UTC
No I am not there right now
Simon Cordova
@gbsimon87
Jun 14 2018 09:31 UTC
Ok cool, thank you :)
Dhaval Vira
@dhavalveera
Jun 14 2018 09:32 UTC
your welcome
abraham anak agung
@padunk
Jun 14 2018 09:35 UTC
@rajataudichya try this
function decode_utf8(s) {
  return decodeURIComponent(escape(s));
}
Claudio Restifo
@Marmiz
Jun 14 2018 09:50 UTC

@gbsimon87 build things.

start with microservices that do one thing, scailing up to fully loaded back end services.

Also personal opinion: have a grasp on both sql and nonsql db :)
at least to know when to choose one over the other

Simon Cordova
@gbsimon87
Jun 14 2018 10:00 UTC
@Marmiz thanks for the advice, do you personally have any resources you have used that you feel are worth sharing?
Anabel
@AnabelSalomone
Jun 14 2018 11:57 UTC
Hey everyone! :)
Need help with ES6
Vladislav Ivanov
@developer4eto
Jun 14 2018 11:58 UTC
@AnabelSalomone what's the problem?
Anabel
@AnabelSalomone
Jun 14 2018 11:59 UTC

anyone there to help?

given this code


export const defaultUnit = {
  starred: false,
  name: 'Appartement #1',
  inflowTemperature: 80,
  outflowTemperature: 60,
  subUnits: [{...defaultSubUnit}]
}

export defaultUnitCount {
   nbUnits: 4
} 

export default {
  defaultUnitCount,
  units: [{...defaultUnit}]
}

How can I make 'units' have as many defaultUnits as nbUnits?

Nate Mallison
@NJM8
Jun 14 2018 12:42 UTC
you mean you want "units" to carry in this case 4 default units?
Mel Macaluso
@MelMacaluso
Jun 14 2018 12:44 UTC

Hello guys, I am about to launch a new JS library. Doing some crossbrowser testing I noticed that firefox complains about:

event not defined

any clues? no problem in chrome safari or edge
specifically: "ReferenceError: event is not defined"
I have function that gets 2 arguments, the event and a function you want to pass it to:
function nameOfTheFunction(event, func) {
  window.addEventListener('click', func, true);
}
and then I call it likes this inside my self invoking function
  const NAMEOFAPP = (() => {

  // Apply tracking
  nameOfTheFunction(event, otherFunction);

})();
any clues?
Nate Mallison
@NJM8
Jun 14 2018 12:49 UTC
@AnabelSalomone do something like so Array.from('x'.repeat(5))
@MelMacaluso Is event supposed to be the type of event you want to listen to?
Mel Macaluso
@MelMacaluso
Jun 14 2018 12:53 UTC
as in mouseEvent etc?
(everything is working in chrome,safari,and edge, so I guess it is otherwise I would be able in the "otherfunction" to do the rest of the calls like dot notation etc.)
I read a bit they talk about the fact that in firefox you need to supply to the function the event? but quite unsure how to do that
I tried to edit the code to:
function nameOfTheFunction(event, func) {
  window.addEventListener('click', func(event), true);
}
and
  const NAMEOFAPP = (() => {

  // Apply tracking
  nameOfTheFunction(event, otherFunction(event));

})();
with no luck...
Mel Macaluso
@MelMacaluso
Jun 14 2018 13:00 UTC
I might have solved it...
  const NAMEOFAPP = (() => {
   const event = event || window.event;
  // Apply tracking
  nameOfTheFunction(event, otherFunction(event));

})();
will test...
wannapha062
@wannapha062
Jun 14 2018 13:05 UTC
@MelMacaluso you may try this
function nameOfTheFunction(func) {
  window.addEventListener('click', func);
}
  const NAMEOFAPP = (() => {

  nameOfTheFunction(otherFunction);

})();
you can get event object in 'otherFunction'
Mel Macaluso
@MelMacaluso
Jun 14 2018 13:07 UTC
Will surely try
thanks !!!
wannapha062
@wannapha062
Jun 14 2018 13:08 UTC
yvw!!
koder3
@koder3
Jun 14 2018 13:08 UTC
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords/ can someone explain why the variable is 3 when var is used but is 2 when let is used?
Blauelf
@Blauelf
Jun 14 2018 13:19 UTC
@koder3 var is function-scoped. A var declared variable exists in the whole function, and you cannot have multiple in the same function, they are all the same. As the function evaluates the variable when it's called, not when it's created, it will return the value at call time. let is block-scoped. Any block can have its own variable of any given name, shadowing outer variables of the same name. With loops, this becomes interesting: The let variable is created in the scope of the current iteration. Next iteration, next variable. So the variable is still evaluated on calling the function, but this time we got our own variable that did not get changed afterwards.
koder3
@koder3
Jun 14 2018 13:20 UTC
i see
Blauelf
@Blauelf
Jun 14 2018 13:20 UTC
A bit more complicated than this, but it fixes the need for many IIFEs.
koder3
@koder3
Jun 14 2018 13:20 UTC
So with var it gets changed but with let it wont?
Blauelf
@Blauelf
Jun 14 2018 13:25 UTC
let makes all new variables. Which makes me wonder... What will be the output of this?
for (let i = 0; i < 3; i++) {
  console.log("Value now: " + i)
  window.setTimeout(()=>console.log("And delayed: " + i), 100);
  i++;
}
Somehow for seems to copy the value to a new variable, so my i++ in the body affects the loop, even though next iteration has its own variable.
koder3
@koder3
Jun 14 2018 13:32 UTC
@Blauelf thanks
wannapha062
@wannapha062
Jun 14 2018 13:38 UTC
@Blauelf very interesting for loop!
NikolaNbgd
@NikolaNbgd
Jun 14 2018 13:41 UTC

Hi folks! Does anyone know what this can be?

Uncaught SyntaxError: Unexpected identifier

I want to import an external function to other js file.

Simon Cordova
@gbsimon87
Jun 14 2018 13:43 UTC
@NikolaNbgd do you have a code sample?
NikolaNbgd
@NikolaNbgd
Jun 14 2018 13:44 UTC
I have a project with 1500 lines of js :D
I think this error appears because of webpack...
I am using webpack 3, presets: ['es2015']
Simon Cordova
@gbsimon87
Jun 14 2018 13:46 UTC
It's at least giving a clue that it involves syntax
Do you have a linter installed on your IDE?
NikolaNbgd
@NikolaNbgd
Jun 14 2018 13:47 UTC
I think now, I am using vs code
not*
@gbsimon87 Do you think that can helps?
Simon Cordova
@gbsimon87
Jun 14 2018 14:00 UTC
@NikolaNbgd it certainly will
NikolaNbgd
@NikolaNbgd
Jun 14 2018 14:05 UTC
@gbsimon87 can you give me a little insight how to use it?
Simon Cordova
@gbsimon87
Jun 14 2018 14:12 UTC
@NikolaNbgd follow the instructions here
https://github.com/eslint/eslint#local-installation-and-usage
I'd be willing to help out more but unfortunately I have to run. I'm sure others here will lend a help if need be.
Good luck!
NikolaNbgd
@NikolaNbgd
Jun 14 2018 14:19 UTC
@gbsimon87 thank you!
Jack Shijin
@Jackshijin
Jun 14 2018 14:51 UTC
hello everyone ! begin coding
Kaz Baig
@kbaig
Jun 14 2018 14:52 UTC
@Jackshijin welcome :wave:
Jack Shijin
@Jackshijin
Jun 14 2018 14:53 UTC
I begin to learn jquery, can I get some advice?
many people say it is out of date
Vladislav Ivanov
@developer4eto
Jun 14 2018 15:02 UTC
@Jackshijin that's a lie
Blauelf
@Blauelf
Jun 14 2018 15:06 UTC

That avatar is 工藤 新一 (Kudou Shinichi) XD

@Jackshijin I'd say jQuery is defintely past its peak, but isn't dead yet (will be around for a few years).

jQuery used to provide a unified experience across different browsers. With current browsers (other than Internet Exploder, of course), the differences aren't so big any more. Many parts of how jQuery selects elements have become part of the standard. But it's still convenient for doing AJAX requests.

Jason Luboff
@JLuboff
Jun 14 2018 15:09 UTC
:wave:
Christopher McCormack
@cmccormack
Jun 14 2018 15:09 UTC
@JLuboff yo
Jason Luboff
@JLuboff
Jun 14 2018 15:10 UTC
What up
Christopher McCormack
@cmccormack
Jun 14 2018 15:11 UTC
Doing a few FCC exercises before working :)
Jason Luboff
@JLuboff
Jun 14 2018 15:11 UTC
Nice
Christopher McCormack
@cmccormack
Jun 14 2018 15:12 UTC
It's kind of weird going back and doing some of the new content that was injected, seems way too simple now.
@JLuboff have you done any of the new projects?
Jason Luboff
@JLuboff
Jun 14 2018 15:16 UTC
No not yet..started going through some of the CSS, thats about it
Grrr...one of my raspberry pi's is locking up
Christopher McCormack
@cmccormack
Jun 14 2018 15:19 UTC
@JLuboff is it scared?
Jason Luboff
@JLuboff
Jun 14 2018 15:21 UTC
No. Not sure whats up. I have it setup to auto boot into chromium kiosk mode...but after a few minutes it goes dark. I close out of chromium and can't do anything. Checking my config files right now
Christopher McCormack
@cmccormack
Jun 14 2018 15:23 UTC
Microsoft is building Office in React Native... what a time to be alive https://twitter.com/TheLarkInn/status/1006746626617008128
those grid challenges are really good @JLuboff
Christopher McCormack
@cmccormack
Jun 14 2018 15:23 UTC
@JLuboff is there a sleep mode?
Jason Luboff
@JLuboff
Jun 14 2018 15:24 UTC
@moT01 Glad to hear, I'd like to get better at using CSS
@cmccormack Mmm... not sure. Trying to debug right now
Christopher McCormack
@cmccormack
Jun 14 2018 15:25 UTC
@JLuboff I recently learned flexbox as that seems to be what many css framworks have been using for their responsive design - totally worth it. Grid is nice too but I find it a bit more confusing and it's not AS supported
theyre all pretty good - ive gone through most of the new ones - but a buddy and i made the grid and css variables ones
Jason Luboff
@JLuboff
Jun 14 2018 15:26 UTC
I tried learning flexbox a long time ago (probably a year or more ago) and found it very confusing at the time
Christopher McCormack
@cmccormack
Jun 14 2018 15:26 UTC
@moT01 so I complain to you if I find issues in it? :D
sure thing
Christopher McCormack
@cmccormack
Jun 14 2018 15:26 UTC
@JLuboff did you use the frog?
jusgoose
@gusd773
Jun 14 2018 15:26 UTC
Hey can anybody tell me what is this "select test suite" thingamajig?
just giving myself some back pats
Christopher McCormack
@cmccormack
Jun 14 2018 15:26 UTC
@JLuboff I jumped right into building something with it and that helped quite a bit
@gusd773 it's an imported script you can use to check some of the projects
jusgoose
@gusd773
Jun 14 2018 15:28 UTC
@cmccormack how does it work?
Christopher McCormack
@cmccormack
Jun 14 2018 15:28 UTC
@gusd773 it parses your source code to determine if you fulfilled all the user stories.
All scripts are viewable if you want to look at its source code :)
Jack Shijin
@Jackshijin
Jun 14 2018 15:29 UTC
everyone here is always willing to help and offer advices. Really inspiring
jusgoose
@gusd773
Jun 14 2018 15:30 UTC
@cmccormack I don't see the code for that anywhere
Christopher McCormack
@cmccormack
Jun 14 2018 15:30 UTC
Looks like it starts around line 21912 of the source code https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js @gusd773 it's using mocha/chai I believe
Jason Luboff
@JLuboff
Jun 14 2018 15:30 UTC
@moT01 Thats pretty neat that you worked on it :smile:
Christopher McCormack
@cmccormack
Jun 14 2018 15:30 UTC
@gusd773 it's in the codepen Javascript settings
you can see the imported bundle.js I linked above
Jason Luboff
@JLuboff
Jun 14 2018 15:31 UTC
@cmccormack I think that was my plan at the time but was struggling to understand the concepts I think.
Christopher McCormack
@cmccormack
Jun 14 2018 15:31 UTC
@gusd773 each test looks something like
describe('#Content', function () {
                        var reqNum = 0;
                        reqNum++;
                        it(reqNum + '. I can see a title with id="title" in H1 sized text.', function () {
                            var title = document.getElementById('title');
                            _chai.assert.isNotNull(title, 'There should be an element with id="title" ');
                            _chai.assert.strictEqual(title.tagName, 'H1', '#title should be in H1 sized text ');
                            _chai.assert.isAbove(title.innerText.length, 0, '#title should contain some text ');
                        });
@JLuboff it's still a lot of guess and check for me haha, when to use align-content/align-items/justify-content, but usually one of the three works
@jlubofff that css-tricks article really helps though
@JLuboff yea, pretty cool seeing some stuff i worked on getting used - and contribute a little to FCC
Christopher McCormack
@cmccormack
Jun 14 2018 15:34 UTC
@moT01 how does that all work anyhow? do you have to fork the whole project add exercises, then submit a pull request?
yup
Christopher McCormack
@cmccormack
Jun 14 2018 15:34 UTC
where do the exercises live?
I tried to find them but couldn't see them
there's some issues running locally right now - i think some stuff is in the process of being re-configured or something - but theyre here https://github.com/freeCodeCamp/freeCodeCamp/tree/staging/seed/challenges
Christopher McCormack
@cmccormack
Jun 14 2018 15:36 UTC
seed eh? Never thought to look in there :D
huh so if everything is in there maybe I'll try my hand at fixing some of the bugs I've found instead of just submitting issues
@moT01 thanks!
like I said there's some issues right with doing things locally right now - or I might be fixing some things myself - but you still might want to make an issue before you do a PR
or i suppose you meant you would do both - i gotcha
Christopher McCormack
@cmccormack
Jun 14 2018 15:39 UTC
@moT01 haha I just realized you're the one that closed my last issue
I probably won't do a pull request but if I can actualy find the bug in the code that might help a lot more in the issue submission I imagine
it definitely helps if you can point out the file or what/where you think the problem might be
yea, i made a pr to fix that issue of yours - spent quite a while digging around freeCodeCamp/freeCodeCamp#17528
Christopher McCormack
@cmccormack
Jun 14 2018 15:44 UTC
I'm reading that now - why are the name and title different?
seems weird to have to very similar entries like that, and is apt to cause just this kind of issue
not sure - maybe the dashes arent allowed somewhere
Christopher McCormack
@cmccormack
Jun 14 2018 15:46 UTC
oh maybe
when you run this locally do you also have access to the db?
no
Christopher McCormack
@cmccormack
Jun 14 2018 15:47 UTC
or do you clone it and run it locally as well
you run a local version of the db
Christopher McCormack
@cmccormack
Jun 14 2018 15:47 UTC
ah cool
@moT01 this is pretty cool thanks for clearing some of this up for me!
Jason Luboff
@JLuboff
Jun 14 2018 15:58 UTC
Shit. My damn raspberry keeps going to a black screen but its setup the same as my other two.
Blauelf
@Blauelf
Jun 14 2018 16:03 UTC
Tried another power supply? The multi-core raspberries are a bit hungry. The 3B+ even more so.
Kaz Baig
@kbaig
Jun 14 2018 16:04 UTC
@JLuboff What are you using it for?
Christopher McCormack
@cmccormack
Jun 14 2018 16:05 UTC
@Blauelf @JLuboff yeah that's a good point - do you know if it's rebooting or just black screen?
Jack Shijin
@Jackshijin
Jun 14 2018 16:05 UTC
var arr1=arr.shift();
var arr2=arr1.push(item);
why is it wrong
Christopher McCormack
@cmccormack
Jun 14 2018 16:06 UTC
@Jackshijin shift returns the removed element not the original array https://mdn.io/shift
Jack Shijin
@Jackshijin
Jun 14 2018 16:06 UTC
try it
Blauelf
@Blauelf
Jun 14 2018 16:08 UTC
@Jackshijin
  1. You are probably at the problem where you are meant to push first, then shift (and return the thing shift removed), both on the same array.
  2. Your variable names are off. shift returns an array element (that could be an array again if you store arrays in your array). At least push never returns an array, but the new length of the array.
Christopher McCormack
@cmccormack
Jun 14 2018 16:08 UTC
@Jackshijin
> var arr = [1, 2, 3, 4]
> var arr1 = arr.shift()
> arr1
1
> var arr2 = arr1.push(5)
TypeError: arr1.push is not a function // In this example arr1 is 1, the item returned when shifting the original array
Jack Shijin
@Jackshijin
Jun 14 2018 16:11 UTC
thanks
function queue(arr, item) {
var arr1=arr.push(item);
var arr2=arr1.shift();
return arr2[arr2.length-1];
}
var testArr = [1,2,3,4,5];
console.log("Before: " + JSON.stringify(testArr));
console.log(queue(testArr, 6));
console.log("After: " + JSON.stringify(testArr));
but it still did not work
Christopher McCormack
@cmccormack
Jun 14 2018 16:12 UTC
@Jackshijin when in doubt, log your variables so you see what they contain
and read what @Blauelf said once more :point_up: June 14, 2018 9:08 AM
Jack Shijin
@Jackshijin
Jun 14 2018 16:13 UTC
ok
Jack Shijin
@Jackshijin
Jun 14 2018 16:28 UTC
done. Good night
it's 12 in midnight
Christopher McCormack
@cmccormack
Jun 14 2018 16:34 UTC
@Jackshijin good night!
Brad
@bradtaniguchi
Jun 14 2018 16:54 UTC
goodmorning :P
Christopher McCormack
@cmccormack
Jun 14 2018 16:54 UTC
@bradtaniguchi hoy hoy
Brad
@bradtaniguchi
Jun 14 2018 16:58 UTC
:wave:
Christopher McCormack
@cmccormack
Jun 14 2018 17:04 UTC
what's happenin @bradtaniguchi
Brad
@bradtaniguchi
Jun 14 2018 17:06 UTC
Gotta redo part of what I did yesterday, I was almost complete with the chunk of a feature then realized I did it wrong :D
Christopher McCormack
@cmccormack
Jun 14 2018 17:08 UTC
@bradtaniguchi at least you realized it :D
Brad
@bradtaniguchi
Jun 14 2018 17:08 UTC
I would of eventually realized it, its pretty late now tho, I had tests and everything going that needs to be changed haha
Jason Luboff
@JLuboff
Jun 14 2018 17:09 UTC
@Blauelf It's actually hooked up directly to a USB power outlet (so amperage might be slightly low..) but two other pi's setup the same work fine.
@kbaig Digital conference room signs
@cmccormack Black screen, fixed it though. Modified /etc/lightdm/lightdm.conf and seems to be staying up now
Christopher McCormack
@cmccormack
Jun 14 2018 17:10 UTC
@JLuboff ¯\_(ツ)_/¯
Jason Luboff
@JLuboff
Jun 14 2018 17:14 UTC
Ya.. dunno. Oh well. At least it's working now
Blauelf
@Blauelf
Jun 14 2018 17:23 UTC

@JLuboff The 3B comes with a 2.1A and 3B+ with a 2.5A power supply. But without cooling, it would probably throttle long before reaching that value. Current Raspberries tend to be hot.

What was that setting you had to change? Power saving, like [SeatDefaults] xserver-command=X -s 0 -dpms?

Jason Luboff
@JLuboff
Jun 14 2018 17:23 UTC
@Blauelf Yup. Thats the one that worked
And just a regular 3B I beleive
Brad
@bradtaniguchi
Jun 14 2018 17:51 UTC
Gotta love it when the internet goes down for a few mins in the office, people start rioting XD
Jason Luboff
@JLuboff
Jun 14 2018 17:52 UTC
Yup. People loose their shit. Or when you have power blips which are in no way your responsibility or anything you can do about it
Blauelf
@Blauelf
Jun 14 2018 17:59 UTC
With build systems freaking out if the npm repo isn't available... (read: We're doomed.)
Blauelf
@Blauelf
Jun 14 2018 18:16 UTC
Reddit is unresponsive. 503 everywhere. The end is nigh.
Brad
@bradtaniguchi
Jun 14 2018 18:20 UTC
good thing I dont read readit haha
Blauelf
@Blauelf
Jun 14 2018 18:45 UTC
Yeah, reddit is another master procrastination tool.
Jason Luboff
@JLuboff
Jun 14 2018 18:55 UTC
@Blauelf Seems they've been having server issues frequently this week..had issues earlier in the week where it was down for 20-30 minutes
Also...I hate the new layout
Kaz Baig
@kbaig
Jun 14 2018 19:04 UTC
old.reddit.com isn't going anywhere for a long while
People thought the server issues were an aware campaign about net neutrality
jusgoose
@gusd773
Jun 14 2018 19:09 UTC
does anybody know why my #main-container margin: x y; dimension isn't working to top and bottom?
https://codepen.io/gusd773/pen/ERvEZG/
in debug mode it looks like this
image.png
Kaz Baig
@kbaig
Jun 14 2018 19:11 UTC
@gusd773 I'm seeing #main-container with a margin of 60px 220px;
jusgoose
@gusd773
Jun 14 2018 19:13 UTC
@kbaig shouldn't that make the form container be more centered? it looks like it's applying 220px just to the left
Kaz Baig
@kbaig
Jun 14 2018 19:13 UTC
Depends on the size of your screen, no?
If you want it centered, apply margin: auto
Jason Luboff
@JLuboff
Jun 14 2018 20:11 UTC
@kbaig Ya which I use...but..I always just type in reddit.com then have to switch. guess I could start adding old.
Kaz Baig
@kbaig
Jun 14 2018 20:11 UTC
@JLuboff bookmark
Jason Luboff
@JLuboff
Jun 14 2018 20:13 UTC
psh.
jusgoose
@gusd773
Jun 14 2018 20:49 UTC
why doesn't it let me split the width of my "row" divs into two with my labels and inputs? when I set them to 50% widths it pushes one onto the next block line?
https://codepen.io/gusd773/pen/ERvEZG/?editors=1100
Kaz Baig
@kbaig
Jun 14 2018 20:50 UTC
@gusd773 inputs have borders
jusgoose
@gusd773
Jun 14 2018 20:52 UTC
ahh tru @kbaig thank you !
jusgoose
@gusd773
Jun 14 2018 21:24 UTC
anybody know how I can make it so I could select only one option in my radio button inputs?
https://codepen.io/gusd773/pen/ERvEZG/?editors=1100
Christopher McCormack
@cmccormack
Jun 14 2018 21:25 UTC
@gusd773 radios are grouped using the name attribute
if they have the same name, only one can be selected
value is what is sent to the backend, so you may want to make it more meaningful than a single number
jusgoose
@gusd773
Jun 14 2018 21:30 UTC
@cmccormack thanks
anthonygallina1
@anthonygallina1
Jun 14 2018 21:38 UTC
:wave:
Christopher McCormack
@cmccormack
Jun 14 2018 21:40 UTC
@anthonygallina1 Hey there
Jason Luboff
@JLuboff
Jun 14 2018 21:51 UTC
:fire:
Jason Luboff
@JLuboff
Jun 14 2018 22:23 UTC
Cool. My pagination works
Christopher McCormack
@cmccormack
Jun 14 2018 22:25 UTC
@JLuboff that's one of those things I dread implementing then realize it's way easier than I thought
Glad you got it working :D
Jason Luboff
@JLuboff
Jun 14 2018 22:25 UTC
@cmccormack Ya, not difficult with SQL atleast.
 Offset ((@page - 1) * 15) rows Fetch Next 15 Rows Only;
Christopher McCormack
@cmccormack
Jun 14 2018 22:26 UTC
mongoose easy too it's like
Model.find({})
.skip(n)
.limit(x)
Jason Luboff
@JLuboff
Jun 14 2018 22:26 UTC
ya thats the same as mongodb...forgot about that lol
It was actually in my front end that I was having a little issue (I wasn't updating the pages available when filtering)
Christopher McCormack
@cmccormack
Jun 14 2018 22:27 UTC
@JLuboff that looks aweful! I'm no longer going to try SQL haha
Jason Luboff
@JLuboff
Jun 14 2018 22:28 UTC
Lol
Its basically the same thing as mongo!
Offset ((@page - 1) * 15) rows == skip Fetch Next 15 Rows Only == limit
Christopher McCormack
@cmccormack
Jun 14 2018 22:29 UTC
yeah so much more succinct :p
Jason Luboff
@JLuboff
Jun 14 2018 22:30 UTC
Alright...time to get this cron job query going...then wrap things up..
Christopher McCormack
@cmccormack
Jun 14 2018 22:30 UTC
Good luck - I'm out of here myself, time for a work happy hour!
Jason Luboff
@JLuboff
Jun 14 2018 22:31 UTC
Adios
anthonygallina1
@anthonygallina1
Jun 14 2018 22:41 UTC
@cmccormack Enjoy :smile:
Jimi Stein
@badbreathhalito_twitter
Jun 14 2018 23:04 UTC
how to solve this puzzle

// Initialize these three variables
var a;
var b;
var c;

// Do not change code below this line

a = a + 1;
b = b + 5;
c = c + " String!";

Jason Luboff
@JLuboff
Jun 14 2018 23:07 UTC
@badbreathhalito_twitter You need to assign the proper values to the variables.

So if in the end a should equal 10 you should have

var a = 9;

As in the code below that (that you shouldn't chanmge) you are adding one to the current value of a