« first day (3828 days earlier)      last day (1122 days later) » 
00:00 - 18:0018:00 - 20:00

6:03 PM
I love when people start throwing $.noConflict somewhere as if it will somehow fix conflicts between their code being incorrect and the library they're using
kinda like people setting "nocors" on cors requests
 
I just do that after every line to be safe
Similar to people who just create logs for everything, eh. Sign the person doesn't quite understand what they're doing, they just know how to create bandaid fixes
 
> I added this line import something and now the error is gone but i get a new error about import
so remove the import line
> but if i remove the import line i get the old error again
 
6:21 PM
remove that line too
 
Hello,
can anyone tell me why this not work as intended ? I want each of these functions to happen 1 after another. not instantly together.
the last one for example, need to happen after 3.3second, but it still happen instantly after I click the button ?

$('#product').val(BB_Name);
setTimeout(searchProducts(), 200);
setTimeout(B2BSetProduct(BB_ID), 1800);
setTimeout(B2BAddProduct(), 2300);
setTimeout(B2BSetPrice(), 3300);
 
well, there's several problems
 
put setTimeout inside another
 
setTimeout(searchProducts(), 200); runs searchProducts immediately, not after 200ms
the setTmeout's are effectively doing nothing as written
 
why is that ? I thought it will run each of them after the specified ms.
 
6:25 PM
it will run the value of the first parameter after 200 ms
the value in your case is the return of the function you called
let a = foo; is quite different from let a = foo();
 
hmmm I just googled for this and saw this : w3schools.com/jsref/met_win_settimeout.asp then used the example and replaced the function...
 
@Pedram w3schools is a terrible resource. We suggest using MDN. Here's an potentially equivalent page: WindowOrWorkerGlobalScope.setTimeout() - Web APIs | MDN
 
lool
 
!!shrug
 
¯\_(ツ)_/¯
 
6:29 PM
$('#product').val(BB_Name);
setTimeout(() => {
  searchProducts();
  setTimeout(() => {
    B2BSetProduct(BB_ID);
      setTimeout(() => {
        B2BAddProduct();
        setTimeout(() => {
          B2BSetPrice();
        }, 3300);
      }, 2300);
  }, 1800);
}, 200);
 
@SagarV Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
should make james wait a few seconds before responding with that, to make james seem more alive
 
@SagarV Thanks a lot. will test it now.
Ok wow, it all working perfectly now, Thanks a lot again.
 
You're welcome. if you copied it, no need to star the message as no one else will find it helpful
 
yeah copied it, I am not the one who stared it, I was wondering if I should or not coz it's specific reply lol
 
6:34 PM
i starred it because it's laughably horrible, even if it does the job
 
lol
 
ah yeah. I personally won't use that much timeouts.
 
Well, I could only come up with this way, since each of these functions do some Ajax and add new content to the page, and writing them without timeout would not work as they all work before the first ajax even finish. so I have to either make some other event like on element changes the 2nd function happen or make it simple with small timeouts lol
 
@Pedram execute them on ajax callbacks. or use async await/ promise
 
I would do that, but this is a "plugin" working over the core.

So I do not want to edit 2 of these functions, the searchProduct() and addProduct() are from Jquery/JS files which I do not want to change. so I want to just add this new functions to the existing ones.
 
6:47 PM
I haven't used jQuery since '18 and I'm proud of it.
 
:D
I've been C# and WPF programmer since 10 years ago, just recently learn php and now first time I am using jquery seriously since last week.
 
hello
 
big mistake
You could've used .net instead of php
\o
 
how could i call a function from the console automatically, for example instead of myFunction(); is there a way I could run myFunction using console.log('myFunction();')
this looks like a job for... @JBis man!
lol
 
|| mdn eval
 
DO NOT ignore the warning
> Warning: Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use eval(). See Never use eval()!, below.
 
I did work on .net before, sadly I need to work on a php based website and write some plugin for it atm.
 
In fact whatever reason you think you want to do that is probably a bad idea anyway. So don't do it.
 
@JBis u were just like
 
6:54 PM
@JamesBot uses a bunch protections in order to achieve secure eval
and he still doesn't work right
||> console._items.push("5")
 
@JBis 1 Logged: 5 Took: 0ms
 
many people prefer php because of cms like wordpress, woocommerce, etc.
 
many people prefer whatever it is they had to learn
 
many people hate php because of cms like wordpress, woocommerce, etc.
 
||> eval('eval("5+5")')
 
6:55 PM
@paul23 10 Logged: `` Took: 0ms
 
That's oging to be hard to fix
 
security in php is always a headache. I stopped using that thing like 7-8 years ago.
 
what needs to be fixed
 
well if you want nested evals to be safe
considering the language is turing complete
 
that's a feature
 
6:58 PM
turing.. I heard that word in the past. Can't remember where
 
I'm talking about if you wish the bot to be safe against things like halting.
 
@paul23 Try to kill the bot or break out of sandbox. No ones been successful.
 
so the function I'm trying to run is called getDaBeat(); (it's to play the music for a game I'm coding and calling it normally doesn't work), and console.log(eval('getDaBeat();')) returns in the console => getDaBeat(); => undefined, just like it would if I called it manually from the console, except it doesn't work.
 
so the function doesn't work and your solution is to eval it in console.log?
:)
Try fixing the function itself
 
anybody here used deno for large scale apps?
 
7:08 PM
@KevinB can you call || sudo restart
 
¯\_(ツ)_/¯
(testing extensions)
¯\_(ツ)_/¯
werid
it wouldn't let me post shrug into tavern, but did when i turned off dark chat
works fine here with it on
this is so frustrating
it makes no sense
!! sudo restart
 
@KevinB You are not authorized to administer this command
 
@KevinB norton again? :D
 
it's off
only things really left on are adlbocks
 
try || sudo disable
 
7:11 PM
!!sudo disable
 
@KevinB You are not authorized to administer this command
 
alright need to fix that
 
!!echo "!!sudo disable"
 
!!sudo
!!sudo disable
 
I'm going to adjust some permissions for the bot before I go to school and add a docs page. Y'all will be able to disable and shutdown the bot in case of any issues. I expect to be around, just much less frequently.
 
7:16 PM
0
Q: Music in html/javascript game won't play?

LlamaButtI have a game I'm coding with the HTML canvas, and the music I picked out refuses to play. I've tried making it a hidden HTML element interacted with via DOM, using the download URL in the new Audio() method instead of the filename, using const instead of var, creating the audio inside of the pla...

 
@LlamaButt im not sure if the question or answer is worse
have a good weekend y'all o/
 
o/
 
00:00 - 18:0018:00 - 20:00

« first day (3828 days earlier)      last day (1122 days later) »