« first day (3053 days earlier)      last day (2120 days later) » 

 
2 hours later…
02:20
@KevinB whats your avatar? Reminds me of like a manta
02:52
it’s an axe
03:51
Hey guys, just got 20 rep.
@TypeError 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.
Why copy function is not working in HTML but it's working in DevTools Console. Why is it happening?
 
6 hours later…
09:36
ok I'm encountering a weird thing
check this out
notice how the exported function requires two arguments
I don't have a clue how to supply that second arg, and the project doesn't document how to import it
looks like it's trying to get it from root, which would mean I'd have to bind it to the global scope before importing this? smh
 
6 hours later…
15:41
Hi Guys
is there any trick to run exec child process on windows ?, I can run the script normally on mac, but not on windows :(
logger -
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 6, kind: Other, message: "The handle is invalid." }':
16:03
I have a chatroom and when someone logs in its gets the chat history for the data base, is it a good idea to return the users profile along with their messages so its instant if they want to view their profile instead of having to make a request for it?
each profile is about 0.15kb
@RachelDockter How likely is it that they'll need it right away?
You can always request it in the background after everything has rendered.
thats what im doing at the moment, everything needs to load but i just thought is it bad practise to return potentially hundreds of profiles on the slight chance one of them will get clicked
but then again each profile is very small, so im not sure
@RachelDockter Preload only what you think is more likely than not to be required.
Consider this chat, when you click on a user's picture, their bio is loaded on demand
so when this chat history comes back, each message object contains the persons bio?
and then if u want to click their profile, it will then make a request for it right?
16:57
@RachelDockter No, the history does not contain the bio
Only the user ID
When you click on an image, you make a request for the bio
ah i see, hmm
17:30
moment valueOf() function is not returing the same value as new Date("string").GetTime(), is this a knows issue or am i doing something incorrectly?
@kingtreelo 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…
19:15
Any idea why this doesnt work
let final = fs.createWriteStream(this.final_file, {flags: 'a', encoding: null});
			final.on('open',async () => {
				let x = 0;
				for (const part of this.parts) {
					console.log(part.file.path);
					await new Promise((resolve,reject)=>{
						const r = fs.createReadStream(part.file.path);
						//r.on('close', resolve);
						r.on('error', (err)=>{console.log(err)});
						r.pipe(final,()=>{
							console.log("done?");
							resolve();
						});
					});
					console.log(++x + " done");
console.log("done?"); nor console.log(++x + " done"); ever prints. It just hangs.
but the file is written to
19:45
figured it out
19:58
I wonder how many people comment on question without reading it. I just had a comment that was 100% debunked in my original topic (as in "I can't do this because....)
@kingtreelo Who guaranteed that they would be the same?
20:16
@paul23 probably a similar number to the number of people who upvote things without reading them
const candidateSolutions = (customerPreferences) => function* getNext() {
    // total number of possible combinations is obtained by multiplying the number of
    // element in every set of preferences (1 set per customer)
    const combinations = customerPreferences.reduce((acc, curr) => acc * curr.length, 1)
    for (let i = 0; i < combinations; i++) {
        console.log(yield getCandidateSolution(i, customerPreferences), 'giuva')
        yield getCandidateSolution(i, customerPreferences)
    }
guys whats the easiest way to rewrite the above not using generators? maybe with async/await
is anything in that asynchronous?
const candidates = candidateSolutions(finalObj.clientChoice);


    for (let candidate of candidates()) {
        console.log(candidate)
    }
this is how is being called
if not, you wouldn't need async/await
no thats why I am asking
I don't wana use generators neither as I am trying to rewrite that code
20:22
Hi, Hope you don't mind a request for search terms that I could use to help solve a problem. On this page: opstra.definedge.com/historical-results-timings , there is a stock menu to choose from that has a scroll bar. I want to be able to move the scroll bar to the bottom of the list (or find a way to get a full list of the stocks within). There is no element indicated for the scroll bar and I can't right-click inspect to find more about it.
I am at a loss for what search terms to use to research how to solve this.
I would appreciate any pointers.
@KevinB any idea on how to rewrite that? I tried but I am confused on how generator really works
@QHarr Are you using any UI framework or plain old JS?
Oh, nvm I misread your question; no clue :/
I will either do this via selenium python but intended to use it to execute javascript if I cannot determine how to do it just with python and selenium alone.
I am used to scrollbars which are labelled as such but this I don't know how to handle.
As elements seem to be added dynamically I also don't have a fixed end point in mind I could try to use in a scroll to.
My other thought is that the stock list must be being retrieved from somewhere.
21:03
Ah... found them.
21:37
@ShrekOverflow our chief architect turned off username/password authentication on our app at 5pm last friday... just thought you might like to share my pain
1 message moved to Trash can
@Andrew Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
1 message moved to Trash can
@Andrew Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
I formatted it this time using ctrl + k ...
function BadIdea(){
  let element = document.createElement("p");
  element.appendChild( document.createTextNode("bad idea!") )

  return <div ref={r=> r.appendChild(element)} />;
};
there
Thank you, david.

Would this be my best option if I had no choice but to append a Dom-element into a React-element?
dunno, i think that will create a new dom element every time render is called, is that okay?
21:51
Would React update that exact component, BadIdea, if it has no props or state? I thought React doesn't touch anything unless it explicitly requires an update... I suppose it would re-render BadIdea if somewhere up the tree the reference to BadIdea was lost. But perhaps putting a "key" on the item would tell React to be more careful with it.
The reason I'm doing this is for an embedded iframe using YouTube's api
22:04
I'm thinking as an added safety measure I could also use state to prevent unnecessary creations of DOM elements.

« first day (3053 days earlier)      last day (2120 days later) »