« first day (3255 days earlier)      last day (1707 days later) » 

ABC
1:24 AM
Hello
how do I get the paramater of
[
    {
        "0": "2017-10-19 08:36:45",
        "dateandtime": "2017-10-19 08:36:45",
        "1": "SewingSection",
        "sensor": "SewingSection",
        "2": "25.6",
        "temperature": "25.6",
        "3": "54",
        "humidity": "54",
        "4": "1",
        "id": "1"
    },
    {
        "0": "2017-10-19 08:38:01",
        "dateandtime": "2017-10-19 08:38:01",
        "1": "SewingSection",
        "sensor": "SewingSection",
        "2": "25.6",
        "temperature": "25.6",
 
 
3 hours later…
4:32 AM
1 message moved to Trash can
:47302615 "SyntaxError: expected expression, got end of script"
@JBis Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
5:09 AM
@BenjaminGruenbaum I am. It's good to be back home. In addition, I like the work I'm doing.
So, are you working on any interesting open source projects?
 
I'm working on some interesting projects, most are open source.
 
5:28 AM
Some even use JavaScript!
 
 
2 hours later…
7:26 AM
@AaditMShah Node mostly nowadays - although I really want to open source some of what I do at Testim
 
8:11 AM
import fetch from 'isomorphic-unfetch';
should I always use that or can I just use fetch normally without the polyfill
 
hi
 
@JSON4Live Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
can i ask question related to pm2?
 
9:04 AM
> If you have a question, just post it, and if anyone's free and interested they'll help.
@Aurelius It's a polyfill, you use it if you're planning on supporting a platform that doesn't have fetch.
 
9:25 AM
Hi, my website has an issue with the layout on the apple safari browser. i don't have a mac and now i have no idea how i can fix the css without a safari browser. does anyone has an idea what i could do?
except buying a mac :D
 
@qd0r Emulate a mac
 
could you recommend a software?
 
9:48 AM
No.
 
10:05 AM
what's the best way to check if two objects contain the same keys
or also if two arrays have the same elements, not in the same order
 
10:43 AM
object.hasOwnProperty('propName')
 
@KhalilLaleh Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
like a bot
 
function aux(s) {
    return [...s].length
}
What does [...s] mean?
Could you help me understand that function?
 
 
1 hour later…
12:14 PM
@SilverSurfer it's called spread operator, takes s and puts its elements into an array
 
12:37 PM
def fun(a, b = 1)
is this the correct way to have b as optional parameter with default 1?
 
12:49 PM
def fun ? is this javascript?
 
 
1 hour later…
1:50 PM
@dievardump No right, wrong chat
 
 
1 hour later…
3:08 PM
> ** is translated in the parser to ^, but this was undocumented for many years. It appears as an index entry in Becker et al (1988), pointing to the help for Deprecated but is not actually mentioned on that page. Even though it had been deprecated in S for 20 years, it was still accepted in R in 2008.
this is great
 
4:04 PM
anyone with bootstrap 4 experience ?
 
 
3 hours later…
6:54 PM
yo
 
7:05 PM
hey
how is it going
ok i have a question
<button type="button" class="btn btn-lg btn-block btn-outline-primary mt-auto choice " data-ch1 = 'number1 ' >first</button>

<button type="button" class="btn btn-lg btn-block btn-outline-primary mt-auto choice " data-ch1 = 'number2 ' >second</button>
so i have those two buttons i remeber we can get the value of data-ch1
but i forgot how
i just want to make a function that get the data-ch1 of the selected/focus button
 
7:19 PM
nvm i got it
 
7:39 PM
is there is alternitive to this in js
$('.button').click(function() {
   $('.button').removeClass('active');
   $(this).addClass('active');
});
i'm trying to make 2 regular buttons to act like radio using bootstrap 4 and js
3
Q: HTML make regular buttons act like a group of radio buttons

Adrien BeI want to get some "regular" buttons to act like a group of radio buttons. I found a jQueryUI plugin that does exactly what I want: http://jqueryui.com/demos/button/#radio But I'd like to avoid adding another library to my project. Any idea how this could be done using pure HTML + javascript/jQ...

i understood the Jquery answer but iam using plain js
 
8:14 PM
hello
 
hello
 
alright webkit sucks
 
dam right
 
........
 
8:32 PM
ok does anyone happen to know a simple way to turn regular buttons into radio ?
using js only not jq
 
Hey I know I can get a variables value by using window[variableName]

But how do i get its value if the value IS NOT a string
I tried getting the value of a var whos value was just 12, not a string, and it returned undefined
 
for (i = 0; i < choiceVar.length; i++) {
    console.log('choiceVar[i] = ' , choiceVar[i]);
    choiceVar[i].document.addEventListener("click" ,chooseIt);
  }
choiceVar[i] logs fine
but when i try to add eventlistener it says
 
Cannot read property 'addEventListener' of undefined
 
Strings return the value fine
but i cant return numbers :(
cant find any info on why this is
Anyone got any ideas?
 
8:50 PM
have you tried putting line two at line 5 ?
 
ignore that, i just sortof clicked it 3 times
its a console log I made
line 2 just means I tried to edit the value on accident
I implemented a system of being able to edit the variables value
like if I type exStr = hello and hit "Edit Var" it outputs:
4 VarFunction.exStr.String.value = hello
 
amazon, glad I could help XD
 
and exStr = 12 + "Edit Var" it outputs:
2 VarFunction.exStr.String.value = 12
but if I type exStr = a12

it outputs undefined
it should output as a string instead
 
Ok Chromium doesn't suck but it has a big bug
 
never use chromium
use chrome
 
8:55 PM
If a table is absolutely position and transformed like the following, big bugs occur
 
blame electron
thats what its built off of I think
 
table {
    position: absolute:
    top: 50%;
    left: 0;
    tranform(0,-50%);
}
Instead of one table display two will. If you use a workaround to fix it, than one of the row will not vertical align the text properly and there will be a weird big space in the middle.
@TaylorSpark I hope your joking.
 
about what?
 
Chrome uses Chromium.
Electron is irrelevant
@diamond wdym?
Like only one can be selected or something?
 
var choiceVar = document.querySelectorAll(".choice");
  console.log('choiceVar = ',choiceVar);
  for (i = 0; i < choiceVar.length; i++) {
    console.log('choiceVar[i] = ' , choiceVar[i]);
    choiceVar[i].document.addEventListener("click" ,chooseIt);
  }
 
9:00 PM
Chromium just sucks
Chrome just uses it in a way that DOESNT suck
anyways I was thinking of another app, ignore me and my "electron" claims
 
@JBis
console.log('choiceVar[i] = ' , choiceVar[i]); //this logs fine in console
<button> id= 'some id' class='stuff</button>
 
@TaylorSpark just no
 
plz stop pinging me
Im busy
 
what are you trying to do @diamond?
@TaylorSpark You couldn't be more hypocritical
 
@JBis i'm trying to make those fancy buttons acts like Radio
 
9:02 PM
2 days ago, by Cerbrus
Right. @TaylorSpark, don't ping random people. If someone sees your question and wants to help, they will.
 
Screw you and your 2 day remarks
:L
 
its not working
i tried to post it :(
@JBis
onload function doesnt run
the last one is much better example
i removed the onload function cos its not working anyway
 
I am not sure what you are trying to achieve
sorry
 
make buttons <button> act like radio
3
Q: HTML make regular buttons act like a group of radio buttons

Adrien BeI want to get some "regular" buttons to act like a group of radio buttons. I found a jQueryUI plugin that does exactly what I want: http://jqueryui.com/demos/button/#radio But I'd like to avoid adding another library to my project. Any idea how this could be done using pure HTML + javascript/jQ...

like this but this answer in JQUERY
i only use js
what is weird about that example is that i couldn't add event listener to the freakin variable for some reason
https://jsfiddle.net/rmk5ge9n/

why i cant add the eventlistener ?
@JBis
 
9:39 PM
I see.
 
!!slidepoop
 
Mar 13 '13 at 1:40, by rlemon
(Random Fact, when rlemon was 13 he pooped on a slide. he isn't proud of it, but he felt it was time to confess. I'm sorry slide.)
 
!!hmmmmm
 
document.querySelectorAll("button").forEach(el => el.addEventListener("click", evt => {
     document.querySelectorAll("button").forEach(but => but.removeAttribute("active"));
     evt.target.setAttribute("active","");
}));
 
9:49 PM
rlly... why do people !!slidepoop lol
 
why does anyone do anything?
 
because humans are humans
if you really think about it, life is really depressing, because the only reason us humans evolved to speak, or think, is simply to make getting food easier.

The meaning of life is food.
lul
 
we get food so we can have more children so life is about offspring
 
10:07 PM
Sorta
The meaning of life is Food, Shelter, and Reproduction.

the meaning of life in terms of evolution is just getting those things easier
it really is sad.. :L
 
life is sad, and one day we'll all be dead, but do you know what will never die?
JQuery
 

« first day (3255 days earlier)      last day (1707 days later) »