« first day (3902 days earlier)      last day (1029 days later) » 

mr5
1:24 AM
Do you guys know if ngrok can expose local router to the public internet?
 
2:04 AM
@mr5 probably but you shouldn't
 
mr5
@JBis do you know how?
 
ngrok http 192.168.1.1:8080
 
mr5
by doing that, you need connect your device to the router first right?
 
Client <--> ngrok <--> Your computer <--> router
so yes
 
mr5
oic, but I'm looking for some solution where I can access this local DNS in the public internet
 
2:14 AM
i sense an xy
what are you trying to do?
 
mr5
we have this satellite antenna that can communicate to the internet, but it needs a router. So it acts like an ISP and the router would act like an access point. We want to access this satellite antenna's internet remotely, but since router's IP is limited within its vicinity only, we can't
 
So you want to use it as it a proxy of some sort?
what does "router's IP is limited within its vicinity only" mean?
 
mr5
I'm not sure if it falls in proxy category
I mean, you can only see the router's IP when you're near from it right?
 
that doesn't make sense to me
 
mr5
or should I say DNS
 
2:19 AM
that makes less sense to me
If the router is wireless, it has a certain range. Is that what you are talking about?
 
mr5
yes
 
So you need a wifi extender
 
mr5
yeah, I forgot to mention about wireless connectivity
WiFi extender can extend this worldwide like internet?
 
Ah I think I understand
No, you want a VPN.
Setup a VPN server connected to the router and then you can access it anywhere in the world like you are on the network.
 
mr5
so the satellite antenna will be the internet provider?
 
2:23 AM
That's not how I would word it but sure
 
mr5
but in a VPN, can you have multiple connection? Like, you are connected to that antenna but also connected to a reliable WiFi?
sorry, I'm not educated enough in networking
so my words sounds too dumb
 
> A virtual private network (VPN) extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.
 
0
Q: how to make the third party cookies in capacitor project to work for ios

pooja_1205I m working on a capacitor project that uses wkwebview, facing issue in writing cookies with ios, android works fine. Adding this to config file didn't work, "server": { "hostname": "subdomain.example.com" } Please advise me if i m missing out something.

anyone have any idea about this
 
Client <---WiFI--> Their Router <---Internet---><---Your antenna--->Your Router<---> Your VPN server <---> anything on the local network
@pooja_1205 is that javascript?
@mr5 that is a simplified path of whats going on
Out of curiosity, where the heck did you get an internet connected satellite antenna from?
 
@JBis this is angularjs, ionic using capacitor
wkwebview in capacitor is not allowing the cookies for ios
 
2:32 AM
I don't really understand your question
 
mr5
@JBis dunno. All I know is it just works, and I am far from them, they are from a different continent.
 
What domain are you on? How are you setting the cookies? What isn't working
@mr5 well can you access them now?
if not someone who can needs to setup a VPN so you can connect
 
mr5
I think it's like a budget version of Starlink
I can't access it, so I'm looking for a way to access it remotely.
 
you'll need someone to setup a vpn for you
 
mr5
yeah I can tell them to do that for me.
So I can hack their entire system ^_^
So the main goal is to have this satellite as a "backup" in case the mobile data (default connection) can't access the internet.
 
2:38 AM
@JBis for authentication i have to send the cookies to the server, but the cookies are not getting set in the app
 
@mr5 if you can't connect to the internet then you can't connect to the internet. You can't use something halfway around the world to connect to the internet wirelessly.
@pooja_1205 "What domain are you on? How are you setting the cookies?"
 
mr5
@JBis so you're telling me to abandon this idea?
 
@mr5 Your idea doesn't make sense.
 
mr5
it's not my idea.
it seems you didn't understand.
 
Maybe not. Try to explain again.
 
mr5
3:03 AM
welp, I think I have another idea which would work.
connect the device from the WiFi which has an internet, and this router's ethernet which is connected to the antenna.
and use ngrok to expose this router in the internet
 
but if you can't connect to the internet you can't connect to ngrok you cant connect to the antenna
it's like the chicken and egg problem except theres no chicken and no egg
 
mr5
okay, here's what I did to test it. I have a router right now which doesn't have an internet, I am connected to it via ethernet. I'm also connected to a mobile hotspot WiFi which has an internet. I am able to connect to the internet and access the router's admin page.
from my router's admin page.
 
3:23 AM
Ok...?
 
mr5
if this works in my device, I think I can access their router (which is connected to a satellite antenna) remotely.
 
Yeah if you plug an eithernet cord into it
 
mr5
Ok...?
 
3:38 AM
...but you can't do that if it's on a different continent
 
mr5
that is why I will tell them to tunnel the router using ngrok
 
And then what?
You can't connect to ngrok without a connecting to the internet
also even if you could ngrok wouldn't work, you need a VPN
Can you type a diagram of how you expect the connection to work? (Like I did above)
 
mr5
3:53 AM
then explain this
I'm using a Windows laptop that is connected to both a router via ethernet without an internet and a WiFi with an internet which is provided by my phone using cellular data.
Windows laptop
 ethernet -> router (no internet) -> some random ethernet wire (basically, it acts like an access point)
 WiFi -> mobile hotspot -> Android phone
                              mobile data -> local ISP
                              mobile hotspot -> provides

 ngrok -> tunnel router dashboard -> works!
 
4:24 AM
@mr5 yes you are connected to the internet
im sorry I'm just not understanding
you can try again asking tom when more people are around
 
 
1 hour later…
5:32 AM
@JBis The first login screen can load without problem.
But I find out the angular frontend is not able to save any cookies. Therefore, I am not able to login again.
The capacitor wrapper is working fine on Android. Cookies can be saved normally. This only happened on iOS.
 
mr5
6:27 AM
@JBis from the image, it says the the router is not connected in the internet but I'm also able to tunnel and access it using ngrok, and at the same time, post that image here, which means I can access the internet :)
So my device is connected to two networks.
Oh, it's called bridge connection. I'm not sure if other OS is capable of doing this.
 
 
3 hours later…
9:57 AM
@mr5 windows has it as a feature somewhere deep in network & internet config settings
same story for linux distro's, there is even a package for that
bridgeutils or something
 
 
2 hours later…
12:09 PM
WHOOOZ
 
 
2 hours later…
1:41 PM
Hi guys
I have a db postgress and I need to find a value in all table
For example: I have this value 'Alida' I need to obtain all tables that has like column value 'alida'
 
2:23 PM
you can put an union query but that's a stupid requirement if you have to check all tables
if you add one, then you need to update the union query ect
and what about retrieving the information?
since union requires having same result set, you can probably fetch only the record id
i have a model id, type in a big union query, aggregating through 5 tables
 
3:05 PM
@mr5 yes
@mr5 i dont think it's called this
@Doflamingo19 are you making a search thing?
i'd do multiple queries
As I use other langs, i'm starting to hate working in JS more and more
Node's standard library is shit
And I spend an hour getting configs to work properly
 
I'm quite the opposite
though the other langs i use are all shit
 
you've already hit the rock bottom with ColdFusion?
grmbl there should be a means to focus out of dev console
 
I think using ColdFusion is rock bottom ;)
 
function ceiling pNumber
	## Check we have been passed a number
	if pNumber is not a number then
		return "Error: not a number"
	end if

	## Check if the number is already an integer or is negative
	if pNumber < zero or pNumber is an integer then
		## truncating gives the ceiling
		return trunc(pNumber)
	else
		## truncate the number and add 1 to get the ceiling
		return trunc(pNumber) + 1
	end if
end ceiling
this is the dumbest shit
 
are those comments added by you or it is already in the codebase?
 
3:16 PM
that's literal code
that's a code sample taken from their website
trunc is a core method, ceiling is a method they made as an example
 
those comments are noise. big ones
 
"make sure to comment your code"
 
right? the language is written to be like spoken psuedocode
 
it reminds me of AppleScript
 
and the UI is built using drag&drop on a fixed size space
to support multiple resolutions/sizes, you need multiple UI's to toggle between
 
3:18 PM
> Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
TS could have seen that before I went onto deploying some js shit I wrote
 
display dialog "Select a type to Encrypt" buttons {"File(s)", "Folder(s)"}
set a to the button returned of the result
if a is "File(s)" then
    set directory to POSIX path of (choose file with prompt "File Location:" default location (path to desktop) with multiple selections allowed)
else
    set directory to POSIX path of (choose folder with prompt "File Location:" default location (path to desktop) with multiple selections allowed)
end if
> set a to the button returned of the result
 
exactly
 
That was my first lang :D
 
i keep running into cases where i don't know what line of irrelevant words the compiler wants me to use
also... all the code is in a binary
good luck version controlling that
 
you compile it and then commit?
 
3:21 PM
Sure, but you can't tell what changed
 
Why do you compile it first?
 
that's how it saves the code
as a binary
there is no code outside of the binary
 
Oh, that's pretty dumb
 
I'm using a framework from a 3rd party that solves that problem though, so,
it lets me create "scripts", and on save, the framework takes the script and makes it part of the binary. so now when i commit, the script has all the changes
 
java is very useful on that matter. there's a dependency which is causing a problem, no one that has worked on the task could figure out the problem
 
3:23 PM
unfortunatly i can't just turn it on and use it, so this existing app has no such feature
 
until I went to "reverse engineer" the jar file
it led to a pretty comprehensible code. Not bad.
😥
*shakes fist to this*
it was not what I thought lol, leading to that error (scroll up)
 
 
2 hours later…
5:24 PM
    anyone know what sum should be?

    import { sum } from '../index';

    test('two positive numbers', () => {
      expect(sum(2, 3)).toBe(5);
      expect(sum(2)(3)).toBe(5);
    });

I had this curry question today in an interview and i was clueless
 
@SuperUberDuper 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
 
5:39 PM
@SuperUberDuper wdym "what sum should be"?
as in what should the function do?
 
||> function sum(a, b){
   if(b){
     return a + b;
   }
   return (c) => a + c
}
console.log(sum(2, 3))
console.log(sum(2)(3))
 
@JBis undefined Logged: 5, 5 Took: 50ms
 
5:55 PM
Does anyone worked with Splide ?
 
cool thx
pretty tricky question in a live interview IMOP
that code is pretty much useless in the real world tho
 
@SuperUberDuper it's pretty common in functional programming tho
 
never had to do it in 10 years professional dev
totally hard to read
 
it allows you to do eg sum 1 2 3 4
I am that person that simply uses a reducer
 
well with JBis code you cant
 
6:09 PM
> create a function that does dumb shit no real function should do
 
i could have used it to fudge the interview tho
 
@KevinB "TypeError: sum(...) is not a function" Logged: 5 Took: 9ms
@KevinB 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.
1 message moved to Trash can
 
wut
it wasn't poorly formatted code
it was a command
 
6:28 PM
posted on June 22, 2021 by Prudhvikumar Bommana

  The Dev channel has been updated to 93.0.4549.3 for Windows,Linux and 93.0.4549.4 for Mac. A partial list of changes is available in the log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Prudhvikumar Bommana Goog

 
6:42 PM
@KevinB there was such similar interview question that rewarded you with lots of reps
the famous (a == 1 && b == 2 && c == 3) being true
you gotcha know the specs very well to know the answer
 
that's what horrifies me about ever looking for another job
 
it got discussed here back then and i believe many of us agreed that it's not appropriate to ask it in job interviews.
 
@KevinB you can format code commands
@KarelG returning a function yes, but conditionally returning a function is bas
Functions should have a single return type
im not so big on optional arguments either
 
the only time i reach for optional arguments is when doing some form of recursion, and even then i avoid that in javascript
 
@JBis I agree. That function you wrote is returning two different types and heh
TS does not allow it TMK
 
6:50 PM
when you pass in an array like {}
what is it?

const asset = new Asset({ [1,2] });
 
i do sometimes like defaults tho
 
honestly this interview was full of trick qu's
 
function something(a, b = 5){

}
 
!!> {[1,2]}
 
@KevinB "SyntaxError: Unexpected token ','" Logged: `` Took: 44ms
 
6:51 PM
oh, right
 
yeah I use defaults from time to time was well
 
needs to be an expression
tldr {} in that location is superfluous
 
@SuperUberDuper that cannot be evaluated
 
[1,2] was set to a var
 
that changes things
lol
{somevar} is shorthand
 
6:52 PM
...
CHEATER!
😄
 
const foo = [10, 9, 9];
const asset = new Asset({ foo});
 
@SuperUberDuper i don't think that's valid
 
@SuperUberDuper think a bit :)
 
i thought enough
hate interviews like these esp by devs 10 years younger throwing trick qu's at me
 
i don't think the question is a good one but you should be able to answer it
it wasn't really that complicated of a question imo
 
6:55 PM
doing {<var>} just makes {<var>: <eval var>}
 
isn't there a context where {[1,2]} wouldn't throw an error?
 
yet I won't use it in my code tbh. Many aren't familiar with this
 
{foo} creates an object with a foo property that has foo's value
 
why would they stick these in a 40 m test
 
6:56 PM
because they want to know how much of the language you know
 
||> {
[1,2]
}
 
@JBis "SyntaxError: Unexpected token ','" Logged: `` Took: 0ms
 
@KevinB pfft, pleb language. Give me something technical
 
as a hint, {[1,2]} in the dev console is fine
because {} is just a block in that case
 
huh?
ah right yeah
 
6:57 PM
yeah james doesn't like it but it's valid
 
but i forget why
 
another weird quirk
 
is it because it's evaluated as an expression? or, just a bug of the console?
sticking it as a function argument fails
 
scoped execution
 
it's an expression yeah
it's like writing 5; or "test"; in the middle of your script
 
6:59 PM
throw ({})
:)
 
grr
I have a bunch of issues with the app i'm trying to make
First off, the app has a background script that needs to run independently of the electron frontend. How can I start this background script if node isn't installed? I can't find a node executable bundled with electron.
Second, the background app needs to run as root. I've figured out how to do this in production but doing it while developing seems impossible without entering my sudo password everytime.
Third, the app needs to ssh into another computer and interact with the file system (not through something like sftp but actually through ssh). Is there any way to execute node code through ssh if node isn't installed on the other computer?
Anyone got any ideas for those issues
 
7:47 PM
Dont really know anything about Electron sorry man. Sounds interesting building desktop apps with javascript
With the second you must mean you're stopping and recompiling the server a lot or?
 
o/
 
so why on earth would the interviewer throw in

{[1,2]}
vs~
[1,2]
as an arg
 
wasn't it {foo} not {[1,2]}?
the difference is important
 
8:04 PM
he's like a regular customer, ever changing the requirements
 
hi everyone
can you check this question?
it's been two weeks that i am struggling to solve this problem
much appreciated
 
@ArdalanNahavandi 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.
 
0
Q: removing an imported CSS from react and replace it with new CSS

Ardalan NahavandiI have a huge react app which has 4 main huge CSSs(darkLTR, lightLTR, darkRTL, lightRTL) which is not ideal i know, but it was a website template that my boss bought for me and asked me to use it(i wanted to use Material ui which is awesome for theme handling but sadly i wasn't allowed). It came ...

 
err, well, i haven't looked yet, but generally "removing" css is a bit of a weird choice
 
Yes it is kinda weird. But i fully explained the situation
 
8:16 PM
right
i understand the situation
what i'm saying is the method of achieving the goal is weird
 
Well i don't know any way to achieve this goal.
Do you have any suggestions?
 
styled-components is one way
 
But i have to use the provided css files
Thanks for your response
 
8:40 PM
hard to believe that it has been 2 weeks to get that problem solved
 
I wasn't working on it 24/7.
But i couldn't find a solution
 
@KevinB really? i think removing a style sheet is pretty normal for simple theming
 
i'm stuck on the supporting IE bit, since that's no longer an issue, i am less against it
not really a problem i've needed to address in years
 
IE didn't support removing css? why? just recall the render function micorosft
 
8:48 PM
IE didn't support removing css, it did however support disabling it
export default function importStylesheets() {
    const theme = localStorage.getItem('theme')
    const direction = localStorage.getItem('direction')
    if (theme === 'dark' && direction === 'rtl') {
        import('./css/styleDarkrtl.css')
    } else if (theme === 'dark' && direction === 'ltr') {
        import('./css/styleDarkltr.css')
    } else if (theme === 'light' && direction === 'rtl') {
        import('./css/styleLightrtl.css')
    } else if (theme === 'light' && direction === 'ltr') {
my concerns here is, what does import do with a css?
 
@KevinB is there a reason? or just ie bing ie
 
just IE doing IE
 
eh jbis, don't forget that IE came with that stupid [if IE #]
 
if import will download the stylesheets regardless of this conditional in this scenario, it's not a good idea
i see, that's not the case based on your question
your issue is once a stylesheet is removed, importing another one isn't disabling the one that was imported. so, to, remove the stylesheet, you would need to know how webpack is doing what it is doing with it
that looks like a messy problem
 
yeah i agree with kevin, screw the import and just add/remove manually
you may, however, need to copy the css files manually in your build process
 
8:56 PM
yeah i would not spend any time at all researching how to fix that with the current way you're doing it
there's certainly a way to accomplish it, but it will involve having react interact directly with elements that webpack is creating in the DOM
you mightaswell skip the former bit and do that part too to remove any surprises
 
what's a proper class name for having width: 100%; ?
 
.container
 
...
ok
should stop with programming for a while
 
lol
i was mostly trolling, because .container is such an overused class
 
😉
 
8:58 PM
incredibly ambiguous and could mean anythin
 
it's for those little input elements, it should grow to their flex container
input.grow :D
 
input.max-flex
input.swol
 
one of our front-end dudes has created a set of style rules
.flex-w-1 {
   width: 8.333%
}
.flex-w-2 {
   width: 16.666%
}
.flex-w-3 {
   width: 25%
}
...
.flex-w-6 {
   width: 50%
}
ect
.flex-w-12 {
   width: 100%
}
 
that seems backwards to me
w-12 should be for the style that lets 12 flex items fit
 
asked "why"..
he replied: "*well marketing wanted to have this page in that 1-3-3-5 col thing and that seems so re-usable*"
 
9:06 PM
i guess, it's 12 takes up 12 spaces?
1 is 1 space
eh, that's... acceptable
less math that way
 
what is "12 spaces" >:)
 
whats 1-3-3-5?
 
8.33%*12?
+.11
?
err
.04
lol
 
@JBis container with four columns, middle have same size and 1 is ... yeah one and 5 is bigger than 3 :D
we have that dude at marketing that even asks to "move this element a pixel to right"
 
screenshot?
sounds like grid would be better for that
 
9:16 PM
you can categorize it as "marketing slang"
 
nothing is worse than a button in your header that moves from page to page slightly
 
Jun 18 at 18:40, by JBis
Funfact: flex can solve world hunger
told you
 
kek TIL
|| mdn flex
 
gotcha bully him tomorrow 😁
 
9:26 PM
:D
im out cya o/
 
input.block
 
9:51 PM
@KarelG I'M IN LOVE WITH YOUUUUUUUUUUUUUUUUUUUUU
MAAAAAN THAT WORKEDDDDDDDDDDDDDDDDDDD!!!!!!!!!!!!
6
react helmet worked
you know
i should have placed CSSs near index.html inside public folder
thanks a lot
THANKSSSSS
 
10:22 PM
posted on June 22, 2021 by Ben Mason

Hi, everyone! We've just released Chrome 91 (91.0.4472.120) for Android: it'll become available on Google Play over the next few weeks. This release includes stability and performance improvements. You can see a full list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Ben Mason Google Chrome

 
11:05 PM
Anyone here a React pro?
I have built an application in React that is in production with many components and have redirected all my focus to SEO
It seems as if I need to convert everything to NEXT.js. Which is reasonable, I can do that. But I'm still wondering if I can avoid that and still get server rendering for google's bots?
 
11:26 PM
It seems React has been working on building SSR into the framework as opposed to leaving this domain up to Next.js
Seems this guy knows whats up youtube.com/watch?v=NwyQONeqRXA
 

« first day (3902 days earlier)      last day (1029 days later) »