« first day (3257 days earlier)      last day (1683 days later) » 
00:00 - 20:0020:00 - 00:00

12:03 AM
hi
someone here?
 
12:13 AM
@AlexHunter sort of
 
can someone help me with a regex for this format MM/DD/YY
numbers only
???
 
12:53 AM
??????????
please
 
@helloworld sure. What do you need to match?
Valid dates?
 
ABC
Hi
how do I add datazoom inside the setOption?
 
no just that format
@JBis
digits
plz help
MM/DD/YY
 
ABC
1:10 AM
@helloworld format?
 
MM/DD/YY that match @ABC
 
@helloworld Look a the link
 
how do i convert a date into a cron job
?
 
user11867329
2:11 AM
Lemon
 
user11867329
Maybe you can logic me this:

3 categories and the number of units:

*= 760
** = 2188
*** = 645

I need to create 3 containers of combination of *, ** & *** with the following logic...

* is worth 0-1,
** is worth 1-5
*** is worth 5-25

container 1 is sold for 5
container 2 is sold for 10
container 3 is sold for 20

How can I calculate what's the smartest combinations for these containers?

I currently have a draft, first thought, of
container1 = 5*+ 5** //
container2 = 5* + 15** //
container 3 = 5* + 34** + 1 OR 2***
 
user11867329
Condition: If any category drops to 0 unit, selling stops.
 
user11867329
btw does anyone want drugs, I have 3 strengths (It's a joke.)
 
user11867329
2:26 AM
Edit:
container 1 is sold for 5 (10 units fixed limit)
container 2 is sold for 10 (20 units fixed limit)
container 3 is sold for $20 (40 units fixed limit)
 
2:54 AM
@OTLT-LCar What does "container *** is worth 5-25" mean? Does it mean the container has a cost and it may cost more than it is worth when it is filled?
 
user11867329
it means that units in category *** are worth anything from 5-25
 
user11867329
and yes, it most probably will
 
user11867329
see, I have 3.XK of units to sell
 
user11867329
3 combo, * = 10 units ** = 20 units *** = 40 units
 
user11867329
Virtually everytime, containers will be filled with more than their selling price (aiming a steady percentage would be nice)
 
2:58 AM
So... for example you can pay $20 to buy a container 3 to fill it with 40x *** (or any other combinations) and the filled container can be sold for 40x($5 to $20). Minus the container cost ($20) and the reminder is profit. Is that right?
 
user11867329
something like value of container needs to be between %350-%500 more than the price of the container
 
user11867329
No, let me clarify
 
user11867329
container is sold for fixed amounts.
 
user11867329
container 1 = 5
 
user11867329
2 = 10
 
user11867329
3:00 AM
3 = 20
 
user11867329
the goal is to make the most money, hence, averaging what the containers will look like in terms of category combinations (Like: container 2 = 15 ** + 5*)
 
user11867329
we NEED to dispose of all units, as uniformly as possible
 
user11867329
ideally to have something that calculate what combination is needed, real time, based on container to sell AND container 1/2/3
 
user11867329
so that, having 3 different boxes with 3 different unit category
 
What I don't understand is, if container 3 is worth exactly 4 times as much as container 1, and takes exactly 4 times as much units to fill, you always ends up 10 units = $5, regardless of class.
 
user11867329
3:03 AM
Yes.
 
user11867329
The incentive I thought of was using the *** products
 
It's a constant, and there is no different between solutions. No point to write a program to calculate and compare constant results.
 
user11867329
since their worth can be way up 25
 
user11867329
say we take unit values instead, can't we make an average of value, say container 1 = %350, container 2 = %425 3 = %550
 
user11867329
We have to understand the values are a range
 
user11867329
3:07 AM
and there needs to be an incentive for buying bigger containers
 
user11867329
these can be fairly static
 
Sorry I can't catch up with the train of thought. Wish you best luck!
 
Anyone else have something stop working without touching the code and then you look at the code and wonder why it ever worked?
 
user11867329
It's pretty simple.

Need algo/logic to:
Determine what combination of unit category needs to be inserted to a given request for a container (1, 2 or 3) with the condition of an incentive (of higher value) relative to the size of the container (1 small;3 big).
(Exemple: Requesting Container 1... (5* + 5**) // Requesting Container 3... (5* + 32** + 3***)

Based on:
1. Value (either specific and accurate for each unit OR by category/range)
2. Inventory
3. Container's fixed unit restriction

To:
Average out the monetary value of containers && dispose of the inventory properly
 
user11867329
@JBis No idea what you talking about.
 
3:23 AM
@JBis Refactor to the rescue.
 
user11867329
Basically, I have 3000 units that are worth 1-25$ for a total value of 11k. I need to sell 1 combo per bill up to twenny (5/10/20) with a fixed amount of unit equal to double the bill amount (e.g. 0.5 attributed selling value per unit, so 5$ = 10 units)

Higher bill = higher value (%) - $10 needs to have a higher value % than $5 but less than $20

How do I logically find which item to put where.
 
user11867329
The reason for the category thing is because I'll sort the items in 3 categories to make it easier for manual labor
 
user11867329
@Sheepy it's not constant, the inventory is dynamic (needs to determine combo based on inventory)
 
Hi
 
@John 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.
 
3:36 AM
Can someone help me?
Ive been looking for answers in realtime
 
@OTLT-LCar I've no idea what the incentives are and what different does the inventory make if they all sell at the same profit. If you can't explain the rules (assuming the rules has been decided), knowing the context / big picture of the situation may help us understand the requirements.
@John State your question. If someone is free and can help, you'll get help. It really depends on what help you need.
 
Someone familiar with biometrics?
 
user11867329
@Sheepy I mentionned the incentives. I even gave you exemples.
 
@John I keep a tab on my toddler's weight and height and cloth / shoe size. Does that count as biometric?
@OTLT-LCar Like I said, I am too stupid and I am sorry I can't help. Hope someone smarter can help you >_<
 
hahahahah LOL
I mean Bio-metric devices like finger print scanner?
 
user11867329
3:40 AM
The incentives being a higher value %, if you want a specific number, I also provided them:

%350 container one (Clarification = Container sells $5, value needs to be %350 of that, roughly)
%450 container two
%600 container three

(Those are just examples, for the sake of understanding)
 
user11867329
>_>
 
What does the incentive applies to? Selling price?
 
user11867329
Yes
 
user11867329
and collaterally, the value inside the container
 
user11867329
Look, I got this 11k MSRP 3000 unit thing for $200
 
user11867329
3:41 AM
so, I just need to get rid of them
 
In that case container 3 does not sell 40 units for $20. It sells for $120. Or may be $140, if the incentive is on top instead of total. Is this what you mean?
 
user11867329
40 units of category 1 would mean roughly $40 sell price for $40 value
 
user11867329
we NEED to know for $5/$10/$20
 
user11867329
as these will be the bills accepted
 
@John I haven't used them, sorry.
 
user11867329
3:43 AM
Container 3 sells for $20, fixed amount.
 
user11867329
I don't understand what you don't understand
 
hey guys i'm trying to deploy an built angular app on heroku but it is giving 500 internal server error iwth the follwoing log :-

2019-09-16T03:34:07.379261+00:00 app[web.1]: at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)

2019-09-16T03:34:07.379262+00:00 app[web.1]: at next (/app/node_modules/express/lib/router/index.js:275:10)

2019-09-16T03:34:07.379265+00:00 app[web.1]: at SendStream.error (/app/node_modules/serve-static/index.js:121:7)

2019-09-16T03:34:07.379266+00:00 app[web.1]: at SendStream.emit (events.js:198:13)
can anybody tell me how i can resolver this ?
 
@Sheepy That's okay.
Anyways I am trying to create an Attendance Monitoring System(Web) with the use of a bio-metric device(finger pint scanner).
Don't know how to extract the data from the device to my application...
 
user11867329
@Sheepy going to sleep, should I stay a bit or not really
 
@OTLT-LCar A sleep may be nice. The bed is a good place to muse about programming problems :D
 
user11867329
3:50 AM
never as much as a think tank
 
user11867329
gnight
 
4:36 AM
@OTLT-LCar I tried to re-read your requirements and I'm still confused. Maybe you can try post a question on softwareengineering.stackexchange.com.
 
5:34 AM
Hi
 
6:32 AM
is there any good library to make JS code sync ?
 
6:49 AM
what do you mean, "sync"?
 
7:10 AM
TIL there is a tag,
 
mmmm guacamole
When I was younger, I was wary about anything green, but man that stuff has grown on me big time
 
7:26 AM
G'morning!
 
@Mathematics but js is already sync...
 
@MohammadQuanit 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.
 
(Hopefully) quick question: I got my react native project that I want to write tests for. I already did some stuff but now I am getting to the point where I'd need to mock fetch. I tried to assign jest.fn() to each global.fetch, window.fetch and fetch but neither of them work. The former two because global/window are not found and the latter because "fetch is not a variable". In a JS project I wrote a year ago, assigning to fetch worked so it appears to be TS that is being annoying.
I tried to search for the error message but only found a github issue that didn't hlep me out and an npm modu
 
7:57 AM
ew, what did chrome do to the favicon
 
a little loading animation around it
 
8:13 AM
I was missing @types/node. Only took me some half an hour to get there.
And some.... other stuff apparently. I think I won't even bother and try to understand this incredibly annoying mystery, TS is
 
ABC
@KarelG
 
yes?
@geisterfurz007 pro-tip from @MadaraUchiha : "don't google TS playground" 😉
 
Ok, nevermind. Still doesn't work. Fun. I absolutely love this language.
 
TS is peng
 
Because there is nothing better and making you feel more productive than searching how to get one single thing to work just to find it out it still doesn't.
 
8:24 AM
It's pretty much unusable without vscode though lol
 
Especially when your IDE suggests something to be available
But then it still isn't because why should it be
 
the sublime and atom integrations are trash
 
ABC
@KarelG how to make echarts interval 10mins change using select option which there's a choices 1 minute, 2 minutes and then when you choice 1 minute it will change the interval of echart
 
VSCode got made by a team that was/is part of the TS team
IIRC they worked heavily on VSCode so that people could get into TS more easily
@ABC window.setInterval returns with an identifier. Store it somewhere. IF the option change, stop that interval (clearInterval) and make a new one. Store the new identifier.
setInterval - MDN and clearInterval - MDN is all what you need.
 
I am trying to create an Attendance Monitoring System(Web) with the use of a bio-metric device(finger pint scanner).
Don't know how to extract the data from the device to my application...
Can someone help me
 
8:32 AM
browser extension
tbh; it depends of the device API/firmware
you have to dig in the docs to see how they transfer the data from the device itself to the pc. Do they have a supporting library or something so that the data can be used on the computer.
 
@John Would it be easier if you try to detect the face through a library or web service? It's hard to face the camera when you are sleeping.
 
@KarelG Actually I have not chosen any device yet. Im still getting some feedback on what to do.
Ive seen some that provides SDKs and APIs for PHP but I still dont understand the process.
 
@John You can probably use the webusb protocol
 
what do you mean with that last part, about not understanding the process?
 
@KarelG the process of how they transfer data from the device to the app.
Whether using SDK or Web API.
 
8:38 AM
if it is not documented, do some experiments then (use your research budget)
@BenFortune it only works if the fingerprint device actually register themselves to a specific regkey repo (windows)
I recall a scanner device not doing that. After checking it with their CS, I decided to bin it.
(the manager claims that it is unsafe to do that, but heck he suggested to use java applet to overcome it. wtf he's a turd.)
 
@KarelG I dont know if I have the research budget..
Im doing this for my Capstone project..
Ive seen some examples that they manually download the data from the device in a form of excel or flat files then upload it to the database.
But I downloading every time a new record is added?
I dont think its a good idea..
 
@KarelG Should work for anything, you just need the vendor ids
As long as it can install a driver, even a generic windows serial driver
I've used it a bunch of times for cheapy chinese usb devices
 
8:54 AM
the generic driver probably register it correctly. Whelp.
John, if you have a physical device atm (to test), you can plug it in and use chrome://usb-internals to see if it can be seen from chrome
 
Does mouse/keyboard count?
 
Well, no
Your fingerprint scanner
 
@BenFortune Dont have a fingerprint scanner yet. Sorry.
 
Well then you can't test it 😃
 
Have you tried using a biometric device?
thank you for the response..
The Php room are not responding to me.
 
9:21 AM
1. compile a list of possible usable devices (background research)
2. compare each other
3. select the best options
4. write report -> get manager -> purchase one/two best devices to begin with
5. experiment with the device(s)
6. test working unit with some candidates at work (or use yours own)
7. write report
8. decide yourself/let the manager decide which one to roll out.
@John ^ rough list of how-to research
you are probably at step 5, skipping 2-3-4
 
@Neil by Sync I mean, lines of code excute one by one and excution wait for executing a line before going to next
like C#
 
9:42 AM
Hi
 
@Mathematics this is how javascript works by default
 
how do I hide username and password while sending ajax request to API
 
the only things which are async are async calls like ajax and even then, only if you don't specify that it should be sync
 
method1();
method2();
method3();
method4();


javascript doesn't waits for method1 to complete to move to method2, C# does that, JS executes methods one by one but doesn't waits until we use await and async keywords...
how to make js behave like c# if that makes sense
 
@Mathematics procedural code? That is what javascript is, in essence. Simplified it executes codes in blocks. In each block, a code is executed sequentially. When a block is done, it checks which block in the event chain is the next one to run.
 
9:46 AM
@Mathematics you don't know what is happening in method1(), but I assure you, method2() doesn't start until method1() returns
now that doesn't mean that method1() doesn't itself launch an async task
 
@Mathematics you have four blocks of code. Each one is called in order but its content is not called in order
 
as you've written it, these four methods will be called in order
 
"content" is a bad wording :|
 
they will be called in order, but I don't want JS to go to method2 until method1 is completed, it includes any work method1 depends on as well
 
its result. behavior. whatever
@Mathematics use Promises
 
9:48 AM
@KarelG I tried but even then I am having partial success
they don't work 100% the way I want them to work
 
make method1 return a Promise, and then chain method2 to be called once method1 resolves
 
then you aren't using it right
 
possibly
 
in this way, even if method1 is sync or async, it still works as you'd expect
 
I can make my js code completely procedural
 
9:49 AM
that's why I want to know if there's any library I could get help from
 
promises are native in javascript now
 
@KarelG would you use any library or recommend one to do so
I am doing this
0
Q: Lamda function not working within then function using async await

MathematicsHad to update my question to provide more details... Here is the code flow I want, // iterate through a array list // create some directories as some methods are async and some are sync However what's happening is that foreach loop is calling methods as intended but it's using array's first...

 
@KarelG Apparently got fixed by Google
 
did they put a custom routine on that? heh
nice.
*tries out*
NOOOOO
 
10:02 AM
@Mathematics JavaScript does not suit ya. keh.
 
10:15 AM
@KarelG that's so true :(
sadly
my code in python, c# and all that looks so elegant but my javascript code just sucks...
i just don't like the non procedural approach
 
it takes some getting used to
one thing we learned early on is that callback hell is a bad approach
not because it doesn't work but because it's unreadable
promises were supposed to make async read sequentially, thus making it a little easier to understand
 
@Mathematics it is just a different paradigm
eg Haskell requires a different take as well.
btw functional programming might be the future
 
10:30 AM
as someone coming from an OOP approach, functional programming seems stupid and inflexible at first
 
How I wait until a youtube video is rendered?
Im trying to do it with mutation observer, but not work because the iframe is rendered, but the video not
$(this).html('<iframe allowfullscreen class="embed-responsive-item" src="https://www.youtube.com/embed/' + $(this).data("videoid") + '"></iframe>');
var observer3 = new MutationObserver(function(mutations) {
    if ($("iframe").length) {
        $(this).click();
        observer3.disconnect();
    }
});
observer3.observe(document.body, {
    attributes: true,
    childList: true,
    subtree: true
});
 
with "rendered" you mean video frame got loaded or is playing content?
or whole video got loaded?
 
The video frame, with its own controls to play it
I want to play the video when its ready
Well, I just found a way, adding "?autoplay=1" at the end of url
 
10:48 AM
easy aint it ? :P
but be aware that it may be an annoyance for the user if a video is autoplaying.
 
 
1 hour later…
12:00 PM
So I solved my BSOD by moving to Ubuntu then hitting Ubuntu with the heaviest workload I could create, turns out the problem was the SSD becoming thermally soaked :). Moved the SSD to a diff slot (with some airflow) back to windows no BSODs anymore. I suspect the GPU froze loading textures or something from the SSD which was unresponsive due to temperature.
I lost 10 FPS but I am staying with Ubuntu 😃
@SterlingArcher o/
 
🤨
 
any one experienced ih high chart integration
 
@KarelG ?
If you are stunned about the BSOD, so am I xD, but well seems to be fixed what I wonder though, how janky Windows Kernel is if even with WinDBG I couldn't debug that :(
it was as easy as dmesg on nix 😬
 
at a price of 10 fps right?
 
12:09 PM
Yes
I am now on Ubuntu
at 195 FPS
instead of 205 on Windows
Since I have a 60 Hz 1080p panel
the diffference is pointless
 
with 5+ ms input lag sure?
 
That I haven't measured 😛
 
@KarelG Isnt annoy because the the user clicks the video first, and the it is loaded and played
 
I actually have a 60Hz monitor with 1ms
 
do you think nix will have more lag than windows?
 
12:10 PM
I was like "neat".
 
I have a Dell U series they get pretty good
 
that depends of the driver software
 
I am sure DX / Windows will have better everything
but it's atleast more peace of mind to me
because now if it panics I can tell why and fix it in minutes
(WHich I def. attribute to me not wanting to learn windows)
 
 
2 hours later…
1:59 PM
hi , iam far past that point but i'd like to learn why that code didn't work
 
What do you mean with "didn't work"?
 
i couldn't add an event listener to a DEFINED object and the error clams "its not defined " i just didnt get it . what makes it not defined ? i thought if it appears on Console then it's defined
 
It's not the same thing you are printing and the thing you are trying to add the listener to.
choiceVar[i] is what you are printing
choiceVar[i].document is what you are trying to add the listener to
This is where it should show up:
 
@geisterfurz007 thank you sir !!!!
thank you so much !
no i got my mind back lol
 
2:25 PM
So, I made this console logging function for executing functions:
function conLogFunc() {
 cElemt.innerHTML +=
  "<font color='purple'>" +
  fCount +
  "</font> Attempting to Execute: <font color='#FF5C04'>" +
  window[cmd.input] +
  "</font><br id='br" +
  fCount +
  "'>";
 fCount++;
 window[cmd.input]();
}
and I want it to be able to execute functions with arguments
 
@diamond Ummm, you're welcome! Glad I could help!
 
window["functionName"](Arguments): Allows me to execute a function via a string
but it doesnt allow me to use a string as the arguments
So if anyone knows a way BESIDES eval() that can do this, Id appreciate it.
 
2:38 PM
Screw it, Im using Eval XD
 
2:55 PM
or don't
your code is frightening
in very bad ways
 
3:22 PM
 
@ndugger Apologies, thats codepen's fault, it expands my code horribly
For some reason whenever I use the addition code to add two strings together, codepen likes to add returns in between every single one... Its annoying as hell.l
 
3:55 PM
Hello, I need a small help to react js. Any help will be appreciated.
https://codesandbox.io/s/nifty-noyce-cj466
What I want is to display different paragraph on select of options. I have tried sending it via json in this.state.
 
4:12 PM
what's not workin?
 
4:44 PM
is it a common thing to name a .js file with a random string? If so, why would they do it? Is it to mask what the script do? (of couse if don't look at the souce). I'm talking about Google and Facebook, i saw on facebook that they name the .js files with random strings like "AkGWgb_GHadgbb.js", "Hmb_TagwmfoN.js". And on google it 's a bit more complex (the name)
 
it's just a generated string for a build process.
makes sure you're not getting the old cached file
 
4:59 PM
hello boys and girls
if anyone is into modern planes, i got a tiny DEMO of a demo thing to look at but struggling to get a code to load all images so the page doesn;t load fast :-) Anyone to help> :-) I'm a noob. Here is the link, enjoy :-)
Hello R lemon, glad to see you are still going
 
 
2 hours later…
7:23 PM
@AlexH Very cool little airplane fighting site.

If you want your images to load faster, I suggest either putting them on a VERY fast hosting site, or loading them locally..

If you load them locally it will load (usually) as fast as the site loads.

Or you can make them into more efficient image types
some people use like webp and other formats
webm
etc
 
Lol
 
I'm starting python for the second time. Wish me luck.
 
Your a curious one... You always just appear out of thin air and "lol" a lot
 
@AlexH I'm glad someone is showing respect to the senior citizens, despite their rotting corpses and fruit-like names
 
> fruit-like names
Hah!
I think you meant *Fruit-like smells
seniors always smell like plums :>
 
7:26 PM
nah, he smells great
 
or... applesauce
 
at least, he has been every day for the last month
 
depends on which hemisphere they live in XD
Did no one get that joke?
oof you guys arent men of culture
 
no, you're just too bored
 
It is true im veryy bored right now
anyways, I guess I should work on my new API
Cya guys, im going to go move around the stuff in my room, been the same for nearly 2 years
 
7:41 PM
@TaylorSpark Thanks! I am trying to install this to -pre load all images on the page but it comes up with an Array error (imageSrcArray) as undefined :-( stackoverflow.com/questions/11071314/…
@TaylorSpark that script uses callbacks or/ and promises and when i hear those i run away as far as i can for the moment :-) Maybe you could look into it?
 
00:00 - 20:0020:00 - 00:00

« first day (3257 days earlier)      last day (1683 days later) »