« first day (3267 days earlier)      last day (1681 days later) » 
01:00 - 20:0020:00 - 00:00

1:23 AM
morn
 
 
2 hours later…
3:29 AM
People had too much fun making these lol en.wikipedia.org/wiki/Hexspeak
 
user8871181
3:41 AM
What would be the best technique for creating behaviour similar to Discord's Guild Switching?
When you click a Guild Icon, in Discord, it displays all the channels and messages. I have two methods in mind:

- Create a window/element for each Guild with display: none; until display is needed.
- Have a single window and replace & appened new elements to it on Guild switch.

Which would be the better route, or is there another way?
 
5:17 AM
Can someone pls help me understand the error here in this pen
https://codepen.io/llaammaa/pen/ExYMBbe
 
what error?
 
Uncaught TypeError: {} is not a function
And it only happens when I enclose the array in (). like ([1,2,3])
 
You are missing semicolons. When looking in the devtools into the script that is run, you will find this:
 var s2Obj = {}(
  s1Arr).forEach
So it tries to call {} as a function because it found parenthesis after it
@CaptainHere
 
ohh. I thought I should be careful with semicolons only in return statements.
 
5:33 AM
I guess in JS you should always be careful with semicolons :D
 
user8871181
Any advice on the scenario I posted above?
 
Thanks @geisterfurz007
 
I am used to them from Java so I automatically set them. I don't think it's a bad habit; otherwise you should know your pitfalls :D
No problem!
@demonhunter24 I guess you can do either one. I guess all the bigger frameworks nowadays (like React, Vue, Angular) and a lot of the smaller ones are usually used with some kind of router allowing you to build a Single Page Application.
 
6:15 AM
yup, javascript doesn't oblige you, and sometimes it can get you into trouble
the moral of the story is always use semicolons and never worry
 
6:53 AM
hola, Rahul
 
 
2 hours later…
8:29 AM
Whats the purpose of pattern attribute if you can remove it from the devtools in anytime?
 
9:21 AM
@SilverSurfer pre-validation
you are making the mistake that the client can validate everything. Do your validation again at the server. never trust data from clients
that pattern attribute prevents forms being submitted if its basic validation is not right. That spares a request and prevents resource consumption at the server
 
10:20 AM
Tried SWIFTUI and developing exclusively for Apple Platform
FML this is so smooth :P
so much more productivity even without async await
 
10:36 AM
@ShrekOverflow you may like this Q&A
and lel forgot that the test period has ended (3 votes to close something)
 
Hi, I have a hidden form input element which I change through code (like document.getElementById("blah").value = 5), and I want to trigger a function when ever that input element changes. I tried using onchange=my_function() inside my input tag element, but it doesn't fire.... what do I do?
 
@AbdurRehmanKhan 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.
 
11:03 AM
@AbdurRehmanKhan you have to fire it. changes made on inputs from javascript does not fire up those "user" events.
that onchange=my_function() just sets a listener to change and let it call the result of that function (huh)
you have two options: either call the function directly or do
yourInputElement.dispatchEvent(new Event('change'));
 
Hey im curious, why does Javascript sometimes output the error "'foo' is not a function"
yet its a function
and theres no typos
My javascript game was working perfectly yesterday, and then today, Im testing the onclick function, and it outputs:
Uncaught TypeError: mine is not a function
    at HTMLButtonElement.onclick (wvwOpKP:74)
mine() is very much a function
Actually, Ill go check something, im sure idiot me accidently forgot parenthesis
 
11:19 AM
@KarelG Thanks, how would I call the function directly in this case? Like how do I detect when the input element changes and then call the function? Meanwhile I'll try the dispatchEvent thing.
 
Ugh... Event listeners
so bulky compared to onclick="".
Why did they deprecate Onclick and replace it with event listeners
im guessing its "faster" or "safer" because thats usually why they deprecate useful things
But I guess one day Ill have to move to using them
codepen.io/SkylerSpark/pen/wvwOpKP Hey is this the most efficient way to go about for saving data?
I use variable lists to store all the data in a large variable so I can save that whole variable to the localStorage
but, is that the most efficient way of doing so?
 
@KarelG Who said I believe in the client?
 
yours comment history
 
Where? I dont see it
 
@AbdurRehmanKhan you wanted to have the onchange behavior when you change its value via JavaScript.
changing a value of an input via JavaScript does not fire up any events.
it is by design
 
11:36 AM
Karel I didnt said that
 
If im flooring values via a function, should I just use Math.floor(equation) or use my function to shorten everything? I use a LOT of Math.floors in the project
function f(e) {
 var y = Math.floor(e);
 return y;
}
 
@KarelG Ah I see, I was trying to make it a hidden input element inside a form, and then fire a function when ever it would change, would there be a more appropriate element for that then? I tried dispatching a change event on it and it still doesn't fire O_O
 
It works fine, I just want to know if I should use Math.floor on its own instead
 
@AbdurRehmanKhan fyi, you have to check why there is an onchange event on an hidden input.
seems doing an odd thing to do imo
 
@AbdurRehmanKhan use contenteditable div element, (Its basically a textarea that allows elements in it)

and then use JQuery or JS to detect if its empty or full, or use JQuery to detect onchange https://stackoverflow.com/questions/6813227/how-do-i-check-if-an-html-element-is-empty-using-jquery
Jquery always seems to work better than JS when it comes to event listeners.
 
11:40 AM
how are you listening to the onchange effect and how did you fire it?
 
Another reference, Sitepoint helps me out a lot, try this page (How to Check That an HTML Form has Updated): sitepoint.com/detect-html-form-changes
 
@TaylorSpark Wow thanks let me try that.

@KarelG Sorry, I'm new to JavaScript so I may be doing this wrong, but I did:
var element = document.getElementById("id_input");
var event = new Event('change');
element.dispatchEvent(event);
Yikes, sorry pressed enter before I meant to >_>
And on the id_input element I had onchange=my_function()
 
Dont worry, Inputs and .value and form event listeners were the biggest thing that tripped me up when I started JS nearly a year ago
 
I'm just trying to detect when my element changes, through both user input and through code.
Haha that makes me feel much better @TaylorSpark, I'll keep trying :D
 
@AbdurRehmanKhan example fiddle
it does work at my end though. Where is that script statement placed? After the input element (end of <body>?)
 
12:38 PM
@All hi
just need to know, is there anyway i can save a file to mongodb without using GridFS or similar libraries
@AbdurRehmanKhan salam
 
 
1 hour later…
1:50 PM
hi people
is gojs good library for creating org charts?
 
yes
 
 
1 hour later…
3:02 PM
Quick question foes
How would you set a second level option ,
Like : this.opts.gallery[o] = true
If gallery is undefined
 
C4d
Hi guys. Does anyone has an idea why escaping \' inside a input-mask leads to " in the input field? codepen.io/chriscoyier/pen/PbOEqL
Single quote becomes a double quote..
 
@Baldráni by setting gallery to an object or array first 😉
or do you mean how to check that?
 
3:20 PM
Yes I just found out about autovivication
Its interesting
Never heard this world before haha
 
3:41 PM
7 messages moved to Trash
 
OOf.
Wheres caprica though?
 
looks at user list
right there
!!magic
 
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
 
caprica never seems to work for me
 
user8729657
4:29 PM
Does the order of your media queries matter?
 
as much as the order of anything else in css does.
 
user8729657
Lol, that's a funny answer. I google'd just now and I found this stackoverflow.com/questions/8790321/…
 
4:46 PM
@TaylorSpark because you were banned from Cap
 
5:14 PM
Hey guys a question
I've got a data in vue which is like this
        pbModes: {
            'create': {
                actions: [
                    { name:'store', value: 'Conserver', click: 'createPhotos', path: 'M15.003 3h2.997v5h-2.997v-5zm8.997 1v20h-24v-24h20l4 4zm-19 5h14v-7h-14v7zm16 4h-18v9h18v-9z' },
                    { name: 'print', value: 'Imprimer', click: 'printPhotos', path: 'M6 23.73l-3-2.122v-14.2l3 1.359v14.963zm2-14.855v15.125l13-1.954v-15.046l-13 1.875zm5.963-7.875c-2.097 0-3.958 2.005-3.962 4.266l-.001 1.683c0 .305.273.54.575.494.244-.037.425-.247.425-.494v-1.681c.003-1.71 1.416-3.268 2.963-3.268.537 0 1.016.195 1.384.564.42
The thing is considering some options I want to display or not some actions
Like { name:'store', value: 'Conserver', click:...} for exemple
The only way I've found to to it for now is to remove it on mounted
 if(!this.$oauth.opts.gallery.enable_storage) this.pbModes.create.actions = this.pbModes.create.actions.filter(a => a.name !== "store")
I find this absolutly uggly
I'd like to do conditionnal rendering in my object like :

...( !this.$oauth.opts.gallery.enable_storage ? { name: 'store',...} : null)
however
I'm facing 2 problems
First Vue throw me an error telling my I can't spread a non iterable blablabla
🤷‍♂️
And second, my options !this.$oauth.opts.gallery.enable_storage is set after an amount of time since it's comming from api.
How could I clean this up ?
Nobody :(
 
5:37 PM
I designed a rocket
 
I picked my nose
 
ok elon musk
 
user8729657
6:20 PM
Nice rocket!
 
user8729657
looks pretty safe
 
yea, my hamster should survive re-entry
 
what do you guys think of KSP 2
 
i'm skeptical
i'll defer judgement until after i've played it
 
user8729657
I'll never play video games again, after WoW classic robbed me of two weeks.
 
6:35 PM
@ kevinb that's a fair assessment
@ ovie that's a solid strategy
 
They said the only way they'd move away from Unity is if they did a re-write
and they had a new team write KSP 2
and it's still unity
(X)
 
What bothers me is "multiplayer". I've never seen a single player game turned multiplayer that i enjoyed after going multiplayer
 
DST is great
Portal 2, also great
 
it was, but not for the multiplayer portion
 
6:38 PM
tbf I've never played the original DS
ok the singleplayer campaign in P2 was excellent but the co-op was also a lot of fun
 
meh
 
@KevinB gta v?
 
GTA Online is garbage
That's an example in his favor
 
It wasnt a few years ago
 
GTA is far better as a sp game
I've not played ESO but I'm tempted to say that it probably falls into that category as well
Along with RDR and F76
 
6:41 PM
With multiplayer do you include coop?
 
I don't know, are there multiple players
 
never played gta other than on a PS 15+years ago
ESO, eh, It's like FO76 for me. It's fun, until you're forced into the multiplayer parts of the game.
 
idk. I'm excited for MP in KSP. I just hope it's done well
I honestly can't even fathom how they could pull it off
given how the game mechanics work
 
^ that's why i'm skeptical
 
but man, I'd love to run missions with friends.
 
6:43 PM
Dying Light and Dark Souls are very fun in multiplayer
 
DL was made for MP
 
Haven't played either of those
 
dark souls multiplayer is awful
 
DL is great
zombie slasher
 
one could argue that even Minecraft and Terraria are singleplayer games turned multiplayer
 
6:43 PM
Yeah
 
Terraria is not as fun MP imo
 
@KevinB I mean if you play it with a friend
 
No, it isn't
but Minecraft is often more fun mp
really depends on who you're playing with, as with all games
 
Terraria isn't bad MP. nothing really changes.
I just don't think it's a great game for MP
 
I prefer minecraft MP simply because it makes it easier to show off what you've done, and to see what others have done
 
6:44 PM
same with Factorio
but a tonne of people love MP in those games
 
but... actually workign together on stuff?
that's annoying
 
so I'm the outlier I guess.
 
Tekkit Classic + small multiplayer server
that's the sweet spot
 
JC2 MP mod
THAT is a great single to multi mod
 
Right now i'm on a 1.14.4 server with a small group, 12 i think?
 
6:45 PM
1.14? wow I don't ever go past 1.7.10
 
Minecraft with Ray Tracing :D
 
after playing 1.14, i want nothing to do with modded MC until it catches up
Ray tracing isn't coming to the java edition
so... f that
 
@SilverSurfer the newest version of Sonic Ether's shaders mod has genuine RT I think
 
shaders are good enough
 
Yep they are
 
6:47 PM
I saw a teaser clip of super-photorealistic SEUS and I don't know how it COULDN'T be rt
@KevinB why do you say that
there are so many great mods that aren't ever going to catch up
 
Because i've been playing on 1.12 forever
 
1.7.10 is where most of the community settled in
 
hey, does anyone know what is this error implying -->

{ MongoParseError: Invalid connection string
    at parseConnectionString (E:\REACT\mern_shopping_list-master\mern_shopping_list-master\node_modules\mongodb\lib\core\uri_parser.js:507:21)
    at connect (E:\REACT\mern_shopping_list-master\mern_shopping_list-master\node_modules\mongodb\lib\operations\connect.js:266:3)
    at ConnectOperation.execute (E:\REACT\mern_shopping_list-master\mern_shopping_list-master\node_modules\mongodb\lib\operations\connect.js:191:5)
this is my auth.js -->
'use strict';

const Server = require('mongodb-topology-manager').Server;
const co = require('co');
const mongodb = require('mongodb');

co(function*() {
  // Create new instance
  var server = new Server('mongod', {
    auth: null,
    dbpath: '/data/db/27017'
  });

  // Purge the directory
  yield server.purge();

  // Start process
  yield server.start();

    const db = yield mongodb.MongoClient.connect('mongodb://localhost:27017/admin');

    //const db = yield mongodb.MongoClient.connect('mongodb://localhost/admin');
 
there's so much new in 1.14 that allows all kinds of new ways of accomplishing things
 
like what
 
6:48 PM
complete noob here with nodejs and mongoDB,
 
the water mechanics mostly
(which wouldn't change modded MC automation)
 
how did they change the water mechanics
 
I followed the ideas suggested in this link --> https://stackoverflow.com/questions/54721216/mongoparseerror-invalid-connection-string?rq=1


but no luck,
 
@PrabirChoudhury that person is using mongoose
you are not
 
items float instead of sink, you can create water source blocks using kelp, kelp is a new food and fuel source, bamboo as a fuel source, the new blast furances and smokers,
 
6:50 PM
I'm patiently waiting for Pokemon Sword and Shield for the Switch
 
the new ocean biomes, swimming,
 
listen. I won't update my MC until they make water finite
 
@forresthopkinsa i tried to start the back end with nodemon server and I have mongoose installed too, mongod.exe and mongo.,exe both UP,
 
My favorite mod in Beta days was FiniteLiquid
 
turtle eggs which act as a way of aggroing zombies/pigmen/skeletons to run in a particular direciton
tridents
 
6:51 PM
Now THAT was an overhaul
oh that sounds pretty neat
 
soul sand/magma blocks creating a pushing/pulling effect vertically in water
 
@PrabirChoudhury I haven't used the base mongodb client, but it certainly looks like it's upset that your connection string is prefixed with mongodb://
 
items move through water rediculously fast, without ice
 
@forresthopkinsa finite water would ruin most of my Terraria machines :D
 
coral reefs,
which, adds in a new light source for under water
 
6:52 PM
@rlemon Wow that looks cool, is sandbox?
 
@forresthopkinsa hmm....
 
finite water requires some heavy computation but it's excellent
 
@SilverSurfer is what sandbox?
@forresthopkinsa Terraria water is weird anyways
 
@KevinB sounds like vanilla has pipes now
yeah Terraria is kind of hybrid to begin with
 
pretty much, they're just not as compact
 
6:53 PM
Pokemon sword and shield, looks like a open world?
 
it does
 
let me remove the starting mongodb part from the string and try then, @forresthopkinsa
 
it's not out yet.
so I have no more information than you can find on google
 
Thats something pokemon needed
 
@PrabirChoudhury give it a go. The hope is that you will at least get a different exception
 
6:54 PM
dropper elevators are far quieter than water to transport (water makes water sounds and bubble sounds,) but they take up a little extra room and are more expensive
 
@KevinB now give me logistics pipes
 
i mean, filters in minecraft have always been a thing
well, ever since we got comparaters
 
logistics pipes are my favorite thing
much more than filtering
 
It is possible to build a "request" system with infinite storage via chest minecarts that sit inside eachother
or a bulk storage system that packs shulkers with items in chests
 
now that
sounds very cool
I'm into it
but can it be controlled with lua scripts
 
6:56 PM
the latter i'm going to be building this weekend for my flying machine pumpkin farm
 
did you ever play with the RiM mod
Redstone in Motion (or, later, Remain in Motion)
 
doesn't sound familiar
 
I never used it very much but the concept is very cool
you can make "frames" and then you can move the frame throughout the world
and all the blocks inside the frame move with it
 
ah
 
nope no luck with removing the prefix either.
 
6:58 PM
so you can basically have your own, you know, flying machine or whatever
@PrabirChoudhury did you get a different error
 
there was a mod that did that that was super popuplar
RP?
yea
redstone power
but you can do all of that now with just slime blocks
and pistons etc
observers
did 1.12 have observers?
don't think it did
 
oh yeah the original redpower had some of that too
 
observers are awesome
 
when redpower died out a lot of its functionality got fragmented out
 
@forresthopkinsa no!! error is still the exact same!
 
6:59 PM
observers send out a 1 tick pulse when the thing in front of it changes state
 
@PrabirChoudhury Invalid Connection String?
 
including other observers
 
I tried with 127.0.0.1:27017 also, same f** error
 
so you can make underwater redstone lines
 
Is it worth pay for a minecraft server?
 
7:00 PM
or redstone lines going through the air
 
@forresthopkinsa Yes!
 
and because they don't cause a light update, they're not harmful to fps
 
crap. mongodb is utter shit.
nodejs is shit -- specially for a noob
 
Have you ever experience an sub object that has its properties non mutable - if you try to modify them it silently completes but their actual value remain the same - weird to say the least
I had some wanky workaround involving Object.assign and filling a completely new object
 
$target.closest("tr").prev().find("i:first").class.html("far fa-envelope");
 
7:09 PM
what does .class do?
@PrabirChoudhury lol
 
reference a property that doesn't exist
 
> this thing I don't actually know is shit.
@KevinB fair enough. I thought you were giving someone in here an answer
now I understand you probably are mocking a main post
 
0
Q: Jquery find() to get Icon <i> Class

FamousAv8erI am very new to jquery and haven't been able to find a solution for my problem. I have a table created for some messages. At the beginning of a messages row there is a fontawesome icon showing the message is not expanded. Once clicked and expanded I want that icon to change to a different one. I...

 
Is setTimeout(,0) the best (or only) way to add something to the end of the stack?
 
you want something pushed off to the next tick (or a later tick) ??
 
7:16 PM
I don't really care when it's done as long as it doesn't block my app
 
ahh, so back to the baindaids :D
use a webworker
 
I think I can use process.nextTick in node, but what about client side
 
yea, don't fuck with nextTick if you don't know what you're doing
 
@rlemon What about node?
 
fix the issue
don't baindaid it
your async stuff shouldn't be blocking in the first place
 
7:18 PM
I have no clue how to fix. The issue is the library lying about being non blocking.
The library claims to be nonblocking but it is indeed blocking
Worker threads seem to look good
but they are experimental
 
wait what
if it was blocking, you'd have no reason to use setTimeout(0)
 
Would that keep it blocking, but execute it later?
 
depends. technically everything blocks, but i assume you mean it's preventing rendering in a browser from occurring until it is complete, right?
 
Yes
 
Are you passing a large amount of data for it to process
 
7:23 PM
Decent size, so I guess yeah
 
pushing it to next tick will still cause blocking, it's just that the blocking will occur after the next render (depending on implementation ofc)
 
ok
so I guess setTimeout is not helpful
@rlemon I understand that I shouldn't bandaid, but I see no other solution. See below:
> sqlite's C API is synchronous and doesn't use threading, and thus it will always block the node process no matter what. Throwing an async API on top of it is useless - all your doing is making it slower by deferring the computation by a few ticks but when it does run, it's still going to block everything!
> I switched node-sqlite3 with better-sqlite3 in my Electron app and found non-trivial performance gains. Make sure to run it in a separate process - never run sqlite in the main thread or the same renderer process as your app. If you run it in the main thread, it still blocks the renderer process. I wrote an article about this: medium.com/actualbudget/…
Ok so I wasn't crazy, it is blocking
 
have you confirmed it is sqlite?
I mean.. I see what you just said. but have you confirmed it?
related note: this is why it's almost always a good idea to use a query builder
you could be swapping out sqlite for pg right now
 
can a property type in typescript be string AND number, or do I need to just just any?
export interface FilterOption {
  title: string;
  value: string;
}
for value: it can sometimes be a string, sometimes a number depending on usage
 
Why use typescript when you can just as well use JS with JSDoc - intellisense supports it otherwise use (string | number)
 
7:33 PM
Why use js?
 
we are in angular typescript, awesome taking a look
 
Because typescript is dumb
And js is not
 
Lol
 
would not have a job without typescript as they would need a new employee :)
you must be a cushy self employed guy?
 
I myself worked as typescript developer
so it's fine
 
7:35 PM
I don't specialize in any one language
but i do enjoy working with typescript
 
Well help the guy then
lol
 
Ah, i missed the question. Yes, it can be either or
 
@rlemon Again, the db type is already set. I am reading a premade database used for iMessage.
 
@rlemon Yes. If I remove the sql queries theres no issues.
 
7:37 PM
so cool, my first time using (string | number) ... though the formatting on the pipe is italicized for some reason in VSCode so it is leaning to the right like the tower of pisa
 
weird
mine doesn't
 
<<= Winter is Coming theme.. I guess...
yep that was it, they have a no italics version of the theme
 
@JBis is this a db that's being written to from iMessage?
or a copy of a static .db file that you control
 
@rlemon The db is copied when the user selects the db (using the file system). This prevents corruption and inconsistencies when querying if the db is written to.
 
so dump it and use postgres from that point :D
 
7:44 PM
Its not just a one time thing, its an electron app. And I bet it would take more time to convert to postgres.
 
well like, you have three options as far as I can see: fix the queries (this is the correct option), replace the db engine which may or may not fix the problem.. but I suspect you're misusing sqlite, so it might. or lastly, bandaid it with a bunch of messy hacky code.
which you have been trying to do for.. 3 days now?
does sqlite have any options for logging long running queries? or any debugging information?
 
The second option isn't viable. iMessage (iOS and macOS) reads and writes to an sqlite database. My application will copy and read from this database. It is not a one time use. I have no control over how iMessage saves info. Apple chose sqlite so I have to use sqlite. Converting to another db (the only possible thing I could do), would take a long time and is probably gonna cause more issues (still need to query the db which is blocking).
I don't understand what you mean by "fix the queries". The queries are pretty simple and I dont see how they can be fixed.
 
well then you're shit out of luck
 
If the query is slow, make it not slow
:shrug:
 
@rlemon Probably, but again theres no going around an inherit design flaw within sqlite
 
7:52 PM
there probably is
 
@rlemon No, not if I use another thread or something. fs seems to do this some how and I am doing more research on how to accomplish this. If you have any suggestions or know anything about this, it would be helpful :)
 
you got my suggestions. look into why the queries are slow, and fix that.
I've seen your queries. you're running a fuck tonne concurrently. transaction them, or find a new flow that doesn't require you do this.
but I'm still highly suspect of you copying around a db another application uses
that doesn't sound like it will work
esp a sqlite db
 
"you're running a fuck tonne concurrently"? Wdym? I have tried many different approaches. Queuing a bunch of small queries, very few larger queries, complicated queries (sqlite does the computation), simple queries (js does the computation). In all instances sqlite has been the issue.
@rlemon Yeah, ik. Another native app does the same thing and it works pretty well. Their design and features sucks and its macOS only so I thought I would build a better version.
 
01:00 - 20:0020:00 - 00:00

« first day (3267 days earlier)      last day (1681 days later) »