« first day (2984 days earlier)      last day (2188 days later) » 
01:00 - 22:0022:00 - 00:00

01:05
morn
01:37
morn boi
Knu
Knu
02:19
ever had a "Uncaught (in promise)" in Chrome with an actual catch?
I am dumbfounded, I am catching the error but it still logs that
02:51
if it still logs it then you're not catching it
you might be catching something else
Knu
Knu
my code looks like that
promise.then(foo)
.then(qux, bar)
.catch(baz)
inside foo something throw (response.clone)
I catch the error, but still Chrome logs "Uncaught (in promise)".
I can even catch the same error using window.addEventListener("unhandledrejection"…
Is something being thrown from inside the .catch()? Or does that throw a different error?
Knu
Knu
nop
well
at first there were 2 things throwing in foo
but I removed the second one just to be sure
it shouldn't change anything but who knows
I think Iv stumbled on a bug, or maybe that's by design
03:06
it's incredibly unlikely that you've found a bug, something is happening beyond what you're telling us
make an mcve in a jsfiddle
It could always be thrown somewhere else in the code unless your codebase consist only of the Promise.then().then().catch() (or near enough)
Knu
Knu
well Iv reduced the function to two lines but yeah a mcve could be useful
post the contents of foo
probably throwing an error instead of rejecting
I thought throwing an error inside a Promise behaved the same way as rejecting?
depends
03:15
Ah wait, yeah
Apparently if it's thrown from a nested async call?
It doesn't result in a reject
Knu
Knu
> probably throwing an error instead of rejecting
nothing async like settimeout
it can be even simplified to
return response.clone();
gimme a second Ill create a jsbin
Are you seeing something that I don't?
@Meredith just did
03:33
Hmm odd
Probably I'm not understanding fully
Knu
Knu
pretty much reduced to the minimum
you can add a breakpoint ull see the error on the clone
it's an AbortError
Knu
Knu
03:55
try catch to the rescue, but that's really ugly
04:14
@Knu huh, you may actually be right, that's a weird interaction between the abort and the clone
Idk about that specific issue
but it doesnt seem right to abort it and then return the response
Knu
Knu
04:34
of course it's not right, it's a test
but I did it because it may happen
well Iv reproduced it (abort in between 2 then)
@david thanks I knew I wasn't crazy
and that means Iv gotta update one of my answers on SO
.text() may throw on Chrome
04:47
If you really want to find out what's up then Benjamin is probably the best person to ask, he knows a fair bit about promises.
Knu
Knu
Last time I asked to yutakahirano and he was wrong in the end.
Well he's probably right spec wise.
But browsers have bugs.
Knu
Knu
05:00
@david it's not limited to the clone method nor to Chrome.
In fact it's quite useful when you want to abort a stream.
 
2 hours later…
07:22
AbortController is an ugly thing.
not sure that you can .clone a Response object
as I thought. ctrl.abort() has touched the body it seems
I did not have checked that AbortController in depth though (because it is just an ugly fix to allow fetch having an abort feature)
08:11
@Knu You wouldn't though, because the Promise will reject.
@KarelG You can
Are did you mean clone it after it was Aborted?
yarr the line is not complete
lemme have my own blue monday
hello everyone! can you please help. I trying to set 2 setIntervals to my animation : here you can see the Link: https://jsfiddle.net/OliviaPantera34/L6q4nsko/
if(al >= 20) I want to make the animation slow and if(al >= 100) I want to do the animation faster. 2 diferent setInterval values work but after al >= 100 it does not stop anymore even if I stop it with clearTimeout();
the native file picker UI is broken on Chrome 63.
08:27
@OliviaP. since you are working with canvas, I recommend to use requestAnimationFrame
your error is that you have done sim = setInterval and in an attempt to clear it, you are using clearTimeout(sim). Both are different handlers 😉
you need clearInterval
(even if the id is from same pool)
08:45
How to disable jump between two disabled dates in bootstrap datetimepicker prntscr.com/lvxb5v
@ВикторЛернер 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.
?
I have code like this
jQuery("#formSearchUpDate3").on("dp.change", function (e) {
jQuery("#formSearchOffDate3").data("DateTimePicker").minDate(e.date);
});
1 message moved to Trash can
@ВикторЛернер Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
@ВикторЛернер don't you have to update it?
@KarelG hi
I have 8 objects inside an array. each object contains 2 params like total: 15, name: "vijayaragavan"
so from that array i want to get 3 objects as an array and 2 objects as an array and 3 objects as an array
how to do that
what i have done is
const interviews = [allEnumValues[0], allEnumValues[1], allEnumValues[5]];
const totalIntervies = countData.filter(function(itm){
return interviews.indexOf(itm._id) > -1;
});
const sumOfInterviews = totalIntervies.reduce(function (previous, current) {
return previous + current.total;
09:31
o.o
got it @KarelG
I had to decrypt that
> i want to get 3 objects as an array and 2 objects as an array and 3 objects as an array
@_@
i anyway i have filtered like this
const acceptedArray = [];
    map(countData, (el, i) => {
      if(el._id.indexOf('ACCEPTED') > -1 && el._id.indexOf('INTERVIEW') === -1){
        acceptedArray.push(el);
      }
    })
it works
good
09:50
:)
I love Archer
wow did I just realize about the existence of such a great series
10:08
Yoooo
I'm struggling with CSS... I'm hoping you guys can help me out. I can't get text to auto hide.
like "really super extensive long sentence" becoming "really super ext... "
and then wrapping around an X icon in the end.
hello
i need some advice to starting web development
well ... i know basics of HTML and PHP eg: create a form,accept some data ,put the data in my mysqldatabase
i want to build a web app with some fancy stuff eg: User uploads a file,show a cool progress bar
let the user upload an image ,process the image (server side) show the progress ,finally show the image available for download
in the above scenario ,what is the best way to start
which language should i learn
kindly advice
@Thaenor word-wrap I mixed it with something else. I meant text-overflow
We have a local test cucumber project, is their any way to run webdriver to IE11 on virtualbox?
@KarelG codepen.io/Thaenor/pen/REaNYV?editors=1100 this is what it looks like
The code is a bit messy... I apologise for that
yeah I'm using text-overflow: ellipsis;
I heard the issue is because I'm not giving that element a widht... but I set that too.
@techno stick with javascript to handle front-end and PHP to serve HTML, accept file uploads and storage of it.
do the basic thing firsT: a simple html page that allows you to upload a file and a PHP page to show page + accept file and store it
10:23
@Thaenor apply overflow: hidden as well
then do fancy stuff
@Thaenor word of advice, I should not hide the whole sidebar link message
@JLeggatt Worked like a charm!
@KarelG dont i need fancy stuff like laravel,react?
either come with short sentences or a different menu for articles
now the padding on those sidebar items looks a bit weird... but I think I can tweak those values to get it right.
10:27
@techno No not really, I would stick to what Karel is saying. Learn the basics/fundamentals before you move into libraries/frameworks
to do the stuff i want i just need php and javascript only i guess @JLeggatt
@techno it is better to do a basic thing first. You can use react to upload files but if you don't understand how it works, then you can have problems later when it is not programmed correctly. There are enough resources of that on the web. And laravel... mhm I would not advice it because it offers a lot while you are kinda new in programming. So same advise appeal here.
@KarelG yeah.I'm not new to programming i know c#,swift,java,php(core) ... but i have done most of my work for desktop environment
im new to web development
then you know that having basics is important :)
i think i will just start with the basics.. i just want to be compliant to what industry uses currently
10:30
btw, you can use C# or Java as backend software
yeah... but php is better on the server side i guess
i only have used php for server backend
nah. It is not a very good platform but you can host websites with it. keh
when i try to research on web development there are a lot of fancy names and frameworks
If you want to learn javascript, you can combine javascript for front-end and node.js ("backend javascript") as backend to get hold of javascript.
okay.. that sounds like a great idea
atleast i will be compliant with what the industry wants today
i mean skills
i just learned swift recently to develop something
10:34
then stick at native javascript only. If you are capable to use that language very well, then it is fairly easy to adopt on those frameworks that is spouting nowadays
like jQuery
okay...
so i will get started with javascript and node.js to do the backend stuff
i guess
kind of
okay
thanks
to learn JS i would start like you would any programming language, by using it through the console, nothing more, learn syntax first, then the standard library, then start worrying about everything else
10:57
I need another push on this spacing thing with that sidebar.
If you open that sidebar I want the first phrase to break with "..." a little sooner to give space for that X
if I give flex space-around on that first single li
the X disapears.
and I think something else happened that the "..." disapeared :/
should you not re-think about that menu?
11:24
@KarelG ok. but how or where can I bind the other setInterval speed . because what I want to do is to give to my animation 2 different Speeds. Llike here: jsfiddle.net/OliviaPantera34/L6q4nsko/5
@KarelG I create a function name : speed()
@KarelG maybe...
Hey guys, I tried using WebStorm to create a React Native project, but I keep getting EPERM errors, it keeps telling me that it doesn't have permission to access C:/Users/Jacob
My Home folder is C:/Users/Jacob Schneider/Code
I even tried creating the project in C:/Tmp
@OliviaP. is it ok to fork it publicly or do you want to keep it "hidden"?
Don't have a fiddle account :P
I am working around that with a simple edit: use setTimeout
@KarelG yes it is not a problem fork it publicly
ctx.stroke();
if (al >= 10) {
  window.setTimeout = (progressSim, 2 * baseSpeed); // makes things twice faster
}
else {
  window.setTimeout = (progressSim, baseSpeed);
}
al++;
// end of that if block
that is what I was going to do
11:40
how do you translate rgba(0,0,0,0.5) into HEX?
It's possible right?
#00000000
because I'm using that but because the opacity is relative, when I get two elements to overlap both with that opacity setting it actually increases.
How can I use grids in react semantic ?
it can't be pure black... with 0.5 opacity it needs to be some shade of gray.... right?
11:42
I want to create 3 boxes but I am not able to understand what will be the width for red box ? see screenshot above
@Thaenor it is pure black. The opacity level is not part of the hex color stuff
rgba is a different "scheme"
so pick hex value from that and set opacity level with the last value
Oh I forgot alpha is 0-1
So #80000000
By trial and error I managed to get to #808080
@JLeggatt I have seen it but I am not able to understand how to insert a vertical box in grid ? If grid blue and green are taking 12 width then should I add width of 4 for red box ?
11:46
@funjoker also to help maybe look into having two columns, one column would hold the red box, the other column would hold the blue and the green box
that's opaque gray, not semitransparent black
in practice if you have white and increase opacity you will cycle all shades of grey until you reach pure black.
So then the column which holds the green and blue box will have full width rows in them. Does that make sense? @funjoker
So in theory there is an HEX that corresponds to that.
In any other scenario I would just opacity
@KarelG the baspeed is the variable with the : setInterval(progressSim, 1000)?
11:47
But that breaks as soon as you're not using white
but in this case, when the user scrolls the two opacities will overlap and it looks messy.
hex supports opacity, see my message
oh i got the order wrong though
#00000080
@OliviaP. yes. better to pick a local constant for that so that you have to edit one line if the speed has to be adjusted
@KendallFrey TIL. I always went with "hex triplet". Is it wrong that it just work on web browsers only, that they strip those last two values if the length is 8? <.<
11:56
What strips the opacity?
@JLeggatt Yes I have seen that too but how should I set the width for red box which is vertical ?
oooooooooone more question :P:P :P
let's say I'm injecting a class with javascript. Say sidebar-expanded. For when the sidebar opens.
if I have a @media screen and (max-height: 450px) will it also apply?
the browser when reading in #12345678 string where #123456 is the hex value for a color and then 78 to do some post-processing (the opacity of it)
or do I need some js magic so it's also taken in consideration?
@Thaenor a class is a class, it will be added to the DOM element and will be indistinguishable from a regular one
so as long as you select that class in your media query, it will work
12:05
so this should work, right?
1 message moved to Trash can
@Thaenor 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
ahhh sorry I screwed up the formating
right, I forgot
.sidebar-expanded {
  width: 250px;
}

@media screen and (max-height: 450px) {
  .sidebar-expanded {
    width: 50%;
  }
}
if I add this class to an element with JS will it take the media query in consideration?
@KarelG if (al >= 10) it say : from here to al === 100 do this window.setTimeout = (progressSim, 2 * sim); the problem is how to set the maximun run to 100 ? and I dont have Idea... :-(
@funjoker using the example

import React from 'react'
import { Grid, Segment } from 'semantic-ui-react'

const GridExampleStretched = () => (
  <Grid columns={3} divided>
    <Grid.Row stretched>
      <Grid.Column>
        <Segment>23f12hj3v21hj3gh2j1 3h2j1k312h 3fhggdjkfdsghfjkhdsjfkhdsjkfhdsjkfhdsjkfhdsjkfh jkdshfjkdhfjksd 23f12hj3v21hj3gh2j1 3h2j1k312h 3fhggdjkfdsghfjkhdsjfkhdsjkfhdsjkfhdsjkfhdsjkfh jkdshfjkdhfjksd23f12hj3v21hj3gh2j1 3h2j1k312h 3fhggdjkfdsghfjkhdsjfkhdsjkfhdsjkfhdsjkfhdsjkfh jkdshfjkdhfjksd23f12hj3v21hj3gh2j1 3h2j1k312h 3fhggdjkfdsghfjkhdsjfkhdsjkfhdsjkfhdsjkfhdsjkfh j
@Thaenor yes, why wouldn't it?
12:10
@KarelG it works now but the animation does not have an end ...
media queries are just conditional triggers that enable rules if condition is met
well, a little more than that but the general gist is there
@JLeggatt Thanks understood
@funjoker no worries but like I said you could have two columns, which splits the boxes left and right. Then have one of the columns holding the rows for the other boxes. Then you wouldn't need to worry about widths :)
Oh ok understood
@JLeggatt How can I remove that line which separates the left and right part ?
12:27
@funjoker removed the divided prop from the grid
@OliviaP. just expand the if / else to if / else if / else where the settimeout is not called anymore
Ok got it
yet there is a requestanimationframe. I suggest to look into that if you have time
hmm I forgot what I should do on this desk....
!!afk figuring out why I am in a server room
12:44
@KarelG who do you work for?
@JacobSchneider KarelG is afk: figuring out why I am in a server room
12:55
I'd use vw
vw is a percentage that works over the whole viewport instead of the nearest positioned element
if your screen is 40 px and you want your element to be 10px, use a width of 25vw
so will then the page look cool on mobile too?
g
to make it look good on mobile you need a special meta ta
and which tag is that?
paste this into your head section
<meta name="viewport" content="width=device-width, initial-scale=1.0">
makes it look good on mobile
:thumbsup:
13:02
already have this tag
:tada:
oh you do?
vscode emment does this for me
aah sweet
unless you've messed with layouts and font sizes big time, you should be fine
btw my web-page doesn't looks identical even on different computers, I'm just getting started
13:21
someone that can help with babel 7?
hi there+
can anyone tell me how to append images to browser notifications ???
  var options = {
      body: body,
      icon: icon
  };
  var n = new Notification(title, options);
@Riccardo
@Gilad just ask your question
@Neil I've asked the wrong question this code fails because I fail to register the service worker
ah, ok, I'll take your word for it then :)
13:27
```
import BaseGenerator from '../base';
^^^^^^

SyntaxError: Unexpected token import
```
do you know how to register the service worker @Neil
????
i get this when running jest @KamilSolecki
no service workers no push notifications
the build completes fine, and i have import "@babel/polyfill"; on the test file
@Riccardo nope, sorry
13:31
thank you anyway
@Gilad im assuming your environiment is Node, right?
yes
use babel-register
or babel-jest
one of these was the fix I dont remember
i have babel-jest
i tried upgrading to babel 7 even with babel-upgrade but its a mess
the package doesn't run now:
TypeError: Class constructor Generator cannot be invoked without 'new'
ok little progress
now Cannot find module '@babel/runtime/helpers/interopRequireDefault' from 'helpers.js'
13:43
@ShivamSharma 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.
 
2 hours later…
15:52
posted on December 17, 2018 by CommitStrip

16:22
💀
nothing to say!
17:17
omg just do a laptop rotation you noobs
17:45
@LuckyKleinschmidt So does your laptop have an intel optane chip?
(20 GB Ram shmoozle)
18:27
 
2 hours later…
20:03
looking for stuff to fiddle with
vim, tmux, w3m... what other neat stuff is there?
trying to make my life more livable by never starting an x session
for starters, it's hard because my job is front-end, but X can be my work-only stuff, eventually
wut
fiddle with PoE builds
what's PoE mean here?
path of exile
you mean play games?
i mean, sure you could play it too
20:11
I'm not familiar with that game. What else did you mean?
the game has a crazy passive skill system and a wide variety of stats that can roll on gear and build-changing unique items, so you can put together builds, or, templates, that do effective dps while being tanky enough to survive less than perfect gameplay
I think I'll go learn about c++ more in-depth
I don't want to work in frontend forever
learn coldfusion
tis a very niche market
Don't listen to him
@Feeds just study more than 1 year per year
20:23
@Neoares innovative
20:56
I'm trying to download a file generated by a server-side function that receives a (potentially) long int array as a parameter. I know I can use ajax to download it, but then I just have it a JS variable. How to I actually give it to the user as a file?
why would a json string hash entirely different depending on one item extra in an array?
@DavidKamer that's how hashes work
no
I should be more clear
I have a body that I need to hash
and I have a header with the key
and when I do one item in an array, the header key sent to me matches my hash
when I add one item more to that array I get the wrong hash
so somehow the same process doesn't work when my array has two item but works completely find when my array has one item
so you're uhh
iterating through the array and hashing each element?
no
are you familar with express?
21:02
vaguely
ok, so you have request, response as parameters
used it for a couple prototypes
sure
now I am don'g JSON.stringify(request.body)
and taking that string and hashing it to try to emulate this in php:
file_get_contents('php://input');
so I want the "rawBody" of the request...
hold on, I have an idea...
never mind that won't work..
ew
there's a better way
hang on, it'l take 5 minutes to switch workspaces
thanks for helping
21:14
bodyParser.json({
  type: '*/*',
  limit: '50mb',
  verify: function (req, res, buffer) {
    if (req.url.includes('whatevertolookfor')) {
      req.rawBody = buffer;
    }
  }
})
now req.rawBody will contain the json as it was sent, and body will contain the parsed json
in my case i do this for any url containing the word "webhook"
huh, I'm not even using body parser anymore, and I have a buffer in rawbody.. I'll try what you have, I'll let you know if it works. Thank you
i assume you need it to verify a token that is being sent
I'm hashing the body of a post request to verify its integrity and origin
I have an MVC project with a controller function that takes in an int array and spits out an XML file (excel format and extention). I'm calling this function through Ajax, but I can't figure out how to let the user actually save it it as a file.
21:32
150
A: JavaScript: Create and save file

KanchuA very minor improvement of the code by Awesomeness01 (no need for anchor tag) with addition as suggested by trueimage (support for IE): // Function to download data to a file function download(data, filename, type) { var file = new Blob([data], {type: type}); if (window.navigator.msSave...

is this insufficient?
Can you not call the function through ajax?
@KevinB are you using node's crypto lib?
21:53
yes
hi all! I am learning Vue js. Is it a bad practice to have methods in components that should loop (v-for) ? For eg I have <item> component with template and methods...I presume it will re-define methods for each loop...?
and how should I bubble an emit that having values?
01:00 - 22:0022:00 - 00:00

« first day (2984 days earlier)      last day (2188 days later) »