« first day (3855 days earlier)      last day (1076 days later) » 

3:26 AM
 
 
2 hours later…
5:14 AM
posted on May 06, 2021 by Krishna Govind

Hi everyone! We've just released Chrome Beta 91 (91.0.4472.35/.37) for Android: it's now available on Google Play. You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here. If you find a new issue, please let us know by filing a bug. Krishna Govind Google Chrome

 
 
1 hour later…
6:22 AM
My company has started using whitesourcing software for node_modules and code, we had to remove package-lock.json to comply with the standards and making unnecessary fixes, anybody else faced the same?
 
 
2 hours later…
8:01 AM
lol what
package-lock.json is pretty much a necessity nowadays for reproducible builds
your company is stupid
4
 
 
1 hour later…
9:24 AM
@JBis you know, I was reading that as "5 june" until 5 july"
 
10:09 AM
@BenFortune they are going to walk around with usb sticks to share their packages
plug 'n share 😉
 
@kar
@KarelG We still have package.json file so no issues for installing node_modules and in most of the cases it don't cause compatibility issues, but package-lock.json helps to solve the package compatibility issue for which yarn came .. NO NEED OF USB STICKS I GUESS :P
 
maybe the decision is made so that there's more love between the colleagues
more interaction
 
10:31 AM
Haha
 
 
2 hours later…
12:06 PM
Took me 3 days to setup a camera in three.js
:3
Fruit of my labor ^
Had to do some research and found a nice article with a "debugging" window of sorts
allows you to see your own camera
 
12:59 PM
So apparently reloading the page and hitting submit again is now a felony and could land you 16 years in jail
also I love how that article describes it as hacking
 
What the actual fuck
Thats screwed up
Ive done way worse then that
and Im like... 16
my god the government and judicial system is actually stupid.
These are the types of things that really make me lose hope in our dumb society
 
For reference, Manslaughter is only 15 years
 
1:15 PM
@JBis I would just disqualify her
a felony charge for that is really an exaggeration of exaggerating
 
1:31 PM
Still don't work, giving this error
Uncaught TypeError: Cannot set property 'magFilter' of undefined
at loadGeometry (script.js:167)
at main (script.js:107)
at script.js:160
 
@KarelG Thats an exaggeration to the power of ten
 
2:14 PM
meh
 
 
2 hours later…
3:46 PM
Hey, just curious, am I doing module classes wrong?

I have a simple class in a javascript file. I then have an export keyword before the class. Im importing it with the snippet below.

Im getting a "CGameEngine3D is not a constructor" error.
import * as CGameEngine3D from './CGame3D.js';

const gme = new CGameEngine3D("Sample Game");
 
4:27 PM
I figured it out ;3
 
4:37 PM
Hey
 
||> ~-10
 
@MisterSirCode 9 Logged: `` Took: 0ms
 
:(
oh wait
||> ~-10+1
 
@MisterSirCode 10 Logged: `` Took: 0ms
 
||> ~-10000+1
 
4:38 PM
@MisterSirCode 10000 Logged: `` Took: 0ms
 
good bot
didnt know you could translate positives with that
very neat
 
Thought JamesBot was dead
 
No idea
||> ~10+1
 
@MisterSirCode -10 Logged: `` Took: 0ms
 
ah, it inverts it
not really want I want :3
damn
@BeerusDev I believe he said it would be on maintenence. He couldve finished early and just left it on
 
4:44 PM
Gotcha
 
I let my bot run when Im doing maintenence
not a good idea for discord bots, but I do it cuz its small enough and only 10 servers use it
(its better to have two bots, a stable one, and a private experimental one that you use to test features before pushing public)
Kinda hard on SO chat though
 
5:07 PM
@BeerusDev intermittently, likely starting late 5/6 ending late 5/7
anyone know how I can generate a unique unpredictable 10 digit id?
 
5:21 PM
Hexidecimal or number?

Because if you want something quick and dirty, you can use javascript's math.random.

If you want an ID with letters and numbers, something like hexidecimal, you can use bitwise or you can cheat by just shifting through an array of characters with math.random and a for loop.
as for unpredictable...
I dont believe theres any non-psuedo random algorithms for JS
 
@MisterSirCode decimal, but math.random won't be unique
 
you can make really complex algorithms by multiplying randoms by randoms and using lots of bitwise malforming, but in some form or fashion, itll always be predictable
AFAIK theres just no feasible way to do true randomness in javascript
https://gist.github.com/banksean/300494

Algorithms like these are the closest youll get to "True" randomness
Like I said, tons of malforming bits and some math, and you can make it virtually unique
Atleast to a level thats so complex, that its basically true randomness, when in actuality, its not
You also must remember... The shorter a digit is, the higher the chance to get repeated IDs becomes
 
5:41 PM
usually... when you want something unique, a chance for it not being unique is a non-starter
regardless of how many "algorithms" you apply to it
random on it's own is often not enough for a uuid
it must be seeded with something sequential
so no two id's have the same seed
and thus can't possibly repeat
 
What you can do, which I have done in the past is use "random" and upon generating the ID, check for its existence. If it already exists, generate a new one until you get an ID that doesn't already exist.
 
@BrandonMcConnell yes but when 90% of the keyspace is used it'll take forever to generate new id's
 
@JBis Unfortunately, after some research I couldnt find a way to generate random seeds without NOT using math.random or date.now
however
you could always use something like this: I threw this together based off your requirements with a little research
var n = Date.now(); n ^= n << 13; n ^= n >> 17; n ^= n << 5; n = n < 0 ? ~n + 1 : n; n = n.toString().length > 10 ? n / (10 ** (n.toString().length - 10)) : n; n = n.toString().length < 10 ? n * (10 ** (10 - n.toString().length)) : n;
||> var n = Date.now(); n ^= n << 13; n ^= n >> 17; n ^= n << 5; n = n < 0 ? ~n + 1 : n; n = n.toString().length > 10 ? n / (10 ** (n.toString().length - 10)) : n; n = n.toString().length < 10 ? n * (10 ** (10 - n.toString().length)) : n;
 
@MisterSirCode 2079652780 Logged: `` Took: 0ms
 
Itll always generate a 10 digit psuedorandom decimal number
 
5:53 PM
but, that's the point
you're looking to generate random results
unique non-sequential doesn't necessarily mean random
even though the result should look random
 
He should just use UUIDs then
If you want something that will almost never (and will never with an conditional) have a duplicate result... then a high character UUID generator would be the best choice
thats what most applications use
 
6:36 PM
UUID isn't 10 digits
 
I am using react native for an ios app and firebase for authentication. Every time I leave the app and come back, it asks for login. I want to persist the firebase login but don't really know where to put it.
const signIn = async () => {
    setLoading(true);
    try {
      await firebase.signIn(email, password);
      const uid = firebase.getCurrentUser().uid;
      const userInfo = await firebase.getUserInfo(uid);
      const emailArr = userInfo.email.split("@");
      setUser({
        username: emailArr[0],
        email: userInfo.email,
        uid,
        isLoggedIn: true,
      });
    } catch (error) {
      alert(error.message);
    } finally {
      isMounted.current && setLoading(false);
I know I need to put this in:
firebase.auth.Auth.Persistence.LOCAL
that signIn function is in the sign in screen and is run when the sign in button it pressed. I also have signing in firebase context
const Firebase = {
  getCurrentUser: () => {
    return firebase.auth().currentUser;
  },

  signIn: async (email, password) => {
    return firebase.auth().signInWithEmailAndPassword(email, password);
  },

  getUserInfo: async (uid) => {
    try {
      const user = await db.collection("users").doc(uid).get();
      if (user.exists) {
        return user.data();
      }
    } catch (error) {
      console.log("Error @getUserInfo", error);
    }
  },

  logOut: async () => {
    return firebase
any help would be greatly appreciated
 
 
3 hours later…
9:41 PM
https://jsfiddle.net/otLz3uxe/2/
why cursor is moving to the beggining of the #block when Im pressing enter?
and how can I prevent it
 
because you replaced the innerhtml
 
hm. is there any way to do it as I want?
 
you'd need to get the cursor location and then update it to where it should be after your change
 
ok
 
i don't know how to accomplish that
or if it's even possible
 
9:45 PM
:(
 

« first day (3855 days earlier)      last day (1076 days later) »