« first day (3197 days earlier)      last day (1750 days later) » 

user8729657
1:09 AM
Is it worth it to build my own VOIP server or just to buy a service from ISP?
 
1:31 AM
ovie trix ~= obie trice ?
 
1:45 AM
morn
 
 
3 hours later…
user8729657
4:37 AM
Real name no gimmick
 
6:09 AM
oi
 
6:31 AM
@OvieTrix for internal use; why not?
but you still need a provider if you want to have calls from outside the company
@Tavo to go on best speed asap, go full throttle and shift gear on time!
^ was for java room btw, Tavo
 
ok
sup man
 
6:46 AM
@taco sup is good yeah
😉
 
user6718998
Hi. Is there a way to listen to some url for a change and grab params with vanilla Js ?
 
you mean when a navigation happens?
listen to hashchange event from window
 
user6718998
i need to listen to a separate url, not the one from current window
 
can you clarify with an example?
 
@Thewise you can use websockets to establish a connection to the server
 
user6718998
6:51 AM
I have an url localhost:3000?animal=dog and I have another app running at localhost:4000 with an index file which has a script, and in that scripts.js I want to grab animal
 
@Thewise you need to use CORS for cross-domain requests
even if only the port changes, it's considered to be a completely different domain
You can navigate to a page on another domain, but you can't be on one page in one domain and then perform an ajax call on another
 
user6718998
can you share some example ?
 
maybe you can bypass for now? /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security
found that on google
 
user6718998
7:20 AM
thx
 
Goddamnit... someone wants to remove ' from a string, and I get downvoted for using a regex replace...
Because you can just .substring -.-
 
@Cerbrus take my compensation upvote
 
Thinking about the next project during a removal of characters from a simple string is called "premature optimization". That is the worst of all programming evils. replace is too much for this scenario. Don't measure the length of a carrot when you want to slice off the top and bottom of it ;) — Charlie H 58 secs ago
replace is too much if you want to remove a specific character from a string? It's what that function was made for! — Cerbrus 18 secs ago
Thanks @Neil :D
This guy...
 
premature optimization is not the worst of all programming evils.. I can think of way worse..
 
And to call this premature optimization...
Are we trying to write bad code on purpose, because writing it properly is premature?
 
7:26 AM
yeah, I wouldn't call using regular expressions as an optimization
usually they're slower if anything
 
True, even if it's negligible :P
 
yeah, but it's not a fair assessment to call something a premature optimization if it is technically slower
 
@Cerbrus LMAO, that's not even what he wanted. The input is '2, 3, 7' :D
OP just clarified in the question.
 
It's a premature worsening if anything :P
 
Yea, we're not going to agree. I'll write good code from the start (prematurely), you can update your code when it eventually breaks. — Cerbrus 16 secs ago
I shouldn't, but it's too much fun :D
 
7:31 AM
I'll upvote that comment because I'm the kind of guy that likes throwing gasoline on a bonfire
2
 
@Cerbrus favoritism for nina?
and her answer is eww
 
haha
 
@KarelG Guess why it has a downvote...
Mostt of her answers technically "work"... But she seems to be a developper that's very good at writing working code only she understands.
 
That is only opinion based. As I have said in my answer, "don't measure the length of a carrot when you want to slice off the top and bottom of it" ;) — Charlie H 10 mins ago
The analogy police have arrived. What's the crime?
 
I don't know, but the punishment is a oversized carrot up his <redacted>
 
7:37 AM
G'day officer! I found an accomplice!!!
@CharlieH: What if the top of the carrot already broke off during harvesting? — Cerbrus 12 mins ago
:P
Anyway, both of you can check the update of the OP in the question and find that neither of your answers is valid because that's not what OP needs.
And instead dupe close it with the suggestion made by str in the comments.
 
@geisterfurz007 Alright, grab my extra set of cuffs. Book'em both
 
@Cerbrus *cough* farm by digits with regex
 
@Cerbrus Please don't DV me if you didn't read the update in the question <3
 
@geisterfurz007 Yea, because I must have seen that update.
Corrected that, though.
 
Cheers :) Given that I mentioned it twice before, I thought you did, sorry.
 
7:42 AM
do you know what I have been talking about Cerbrus?
 
np
No, karel?
 
!!> "'2,3,7'".match(/\d+/g)
 
@KarelG ["2","3","7"]
 
embrace the power
2 jobs in one.
if you want number, just .map afterwards.
But seriously
you and nina have dupe-voted it after posting an answer?
eww the dupe question contains a lot old answers
 
The question got updated, making at least 4 answers invalid because the question was misunderstood.
The update also made it a dupe.
 
7:45 AM
how about this, you use a loop from 0 to the end of the string - 1 and a nested loop from i until the end of the string, and for every possible substring, you attempt to convert to a number
if it converts to a number, push it on the array
that would also solve the problem of the premature optimization ;)
 
@geisterfurz007 the first edit made the question going the different way. tsss
 
@KarelG The original question wasn't a good dupe
 
yeah noticed the edit once geister has mentioned it
that dude CharlieH caused an unintended confusion. The op literally wrote '2,3,7' as a string
but he backticked around that, leading to the interpretation that there are quotes in the string.
 
How to remove quotes from the string "'2,3,7'"?
function singleQuoteRemover() { return '2,3,7'; }
simple, guys
 
sick
 
7:58 AM
@Neil Will there always be quotes in the string?
Or are they optional?
 
@MadaraUchiha the function will always remove them
 
@Neil I'm asking about the input, not the output.
 
Even if the string is "2,3,7", it correctly returns "2,3,7"
 
Oh, I misread the conversation.
 
it does a bit extra as well.. supposing your input were with gibberish "@@@@2,3,7".. the function still returns correctly "2,3,7"
 
8:01 AM
@Neil So... you want to extract the numbers?
askjfhasjkgfhsdfjkdsh1,2,3sdfjyhsdfjksdhgfsdkjh => 1,2,3?
 
@MadaraUchiha function singleQuoteRemover() { return '1,2,3'; }
simple
 
what if I want a ... 4?
 
@KarelG function singleQuoteRemover() { return '1,2,3,4'; }
 
I want a 4! Not those other numbers D:
 
@KarelG function singleQuoteRemover() { return '4'; }
 
8:05 AM
good
 
@KarelG simple, no?
 
What if the functionality changes? Like you want to count dead babies in a car?
 
the ol' dice roll value
@taco the return is always 0
 
chosen by fair dice roll
 
yeah, I like to roll the dice with babies in the summer
 
8:06 AM
@KarelG if you're a good person
 
who wants to have stinky decaying babies in their car.
drop them in bins lol
/s
 
oh ya good idea lol
 
!!xkcd 221
@Neil ^
 
classic 221
 
8:27 AM
what does exactly happen if you install a global npm package that does already exists? Will it always be updated or is the process just interrupted?
 
try it out :)
 
@elsololobo Updated
 
thanks
 
how the hell does he do this trick?
unless the "victim" was an actor or something, I can't explain it
 
8:49 AM
summary?
or should I watch?
 
@KarelG this guy who's actually a magician is pretending to be a locksmith training a new guy
somebody in a red shirt is inside a house locked inside and they're trying to open the lock
they manage to get the door open, and the magician switches places with the guy inside
the "locksmith" is some other guy
 
eh scenes got cut out
 
ah so you think it's fake?
 
when the apprentice is busy to unlock the door, he is not (or barely) aware of the changes in the background (focusing on something). It is then easier to swap with actors
 
well ok, admittedly the apprentice is distracted
still not an easy trick to pull off
he's got to get into the house and swap with the other guy and both have to change clothes
 
8:54 AM
I think that it may have failed on some occasions, just that they did not include in their show
 
the van's picture changes too, don't know if you noticed
though I suppose they could have kept somebody in the van to switch it out while he wasn't looking
 
eh, swapping clothing gets barely noticed. I have seen such candid cam joke
 
that reaction is priceless though
it doesn't look faked, so if that's an actor, he did a good job
 
not sure if you have seen that: a man is having a dinner with a female. When she goes to the restroom, she swaps clothing and returns to the table
that often does not get noticed.
 
@KarelG I think you'd notice, but it isn't so apparent that you'd say something
it takes quite a bit to make someone admit that they're seeing things which they cannot explain
it is a bit like admitting you may be crazy
 
9:09 AM
that is just the fun behind such candid cams. Those reactions
it depends of the awareness of the target tho. Like me, I have a high situational awareness.
 
I don't know if I can say that, but I'm very good about noticing differences
I probably would be very confused if I were on such a show
 
my colleagues tried to pull it off with me.
Our office room contains of multiple "isles", 4 desks with screens in a square. Each one has their own office. I was working with another one at a desk.
the office behind the screen is, lets say, from Kevin.
after a while, I stood up. Then someone asked me if I noticed something odd. I found it a weird question. Then he proceeds with "something has changed while you were working". Then it came in mind that another person, let's say, Barry has sit there (at Kevin's desk) for a while. So I said "maybe because Barry was there for a moment before Kevin went back at his desk?". He was baffled.
 
well if the desk is closeby, I can see how you'd notice something like that
 
they tried it with other colleagues. It worked there. Just not with me.
got responses like "superman vision" or "megamind"
that was a fun afternoon, telling gags about super heros instead of working for a hour
 
9:29 AM
It's a good time to be in the JavaScript room. Madara isn't here to demolish me with evil JavaScript things...
 
Madara is always vigilant. Beware
 
@geisterfurz007 :P I can come up with some recent funny discoveries about javascript
like that you can have a variable v where v == 1 && v == 2 yields true
 
Hah! I know that one (:
 
yeah it is abusing how == works
like
 
I read the stackoverflow question on that a while ago when it was hot :)
 
9:39 AM
!!> let o = (_=>{let v = 0; return {toString: () => ++v};})(); o==1 && o==2 &&o==3
 
@KarelG true
 
I am not consistent in that code snippet. How bad 😕
 
he knows the bits of js
 
10:01 AM
cya guys
 
byeee
 
how can I import javascript files made for the broswer thus using window, document etc. in a react application with webpack?
 
10:16 AM
Can someone perf typescript es5 vs es20xx ?
I wonder if leaving that to default is bad bad
 
that is confusing because es5 = 2009 (I think)
don't you mean es5 vs es6 ?
 
No
TypeScript targets to es5 by default
since more modern browsers support well, more modern stuff I am curious if someone has studied the performance impact of that
for instance, es5 .binds vs () => {} etc etc
 
10:34 AM
that is actually a good question
I rarely look at performance when developing in javascript. I aim for ideal approaches such as using .map for readability. But it happens that I .map first, then .filter, then .reduce which si not good in js (in contrary to other HL languages)
I just .reduce directly instead
 
10:58 AM
Hey guys, I'm using node version 12.6.0 and npm version 6.10.1. Are these the latest versions?
I'm getting the following warning when using npm version 6.10.1 with node version 12.6.0.
npm WARN npm npm does not support Node.js v12.6.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10.
npm WARN npm You can find the latest version at nodejs.org
How do I get rid of this warning?
 
@AaditMShah version 10.16.0 of node.js is distributed with npm 6.9.0
node 12 is still somewhat experimental I think
also based on the site 12.6.0 still comes with npm 6.9.0
so I suppose you should just switch to npm 6.9.0
or switch down node.js to 10.16.0
 
I get the same error with npm version 6.9.0. I guess I'll switch to lts/dubnium then.
 
11:13 AM
@KarelG I got to a point where I am now writing the same code in Safari / Mozilla
aiiyaaiiyaai the whole extension thing is fucked up
they are all designing apis as Plugins not platforms :facepalm:
 
11:29 AM
there is no uniform code among those extensions
So far, I never have approved to use extensions to solve a problem. Extensions should be only used as "assistant" or "support" while browsing.
 
@KarelG I am writing a devtool extension
that is a lot different then your assistant / support scenario
this alleviates pain by enabling actual debugging
 
I would say "I don't want to kill myself" instead
or that I want to keep my sanity
 
12:08 PM
@KarelG ???
 
@ShrekOverflow if you were my manager, don't ask me to write that kind of extensions
 
@KarelG I own this project / TBH didn't realize creating a devtools extension would be this painful
I wouldn't put someone through something I can't personally do :P
 
o/
 
7
 
12:12 PM
\o
@jAndy cccc combo breaker
 
that's what I'm known for
there is still no reliable way to create fixed margins in an ascii text without block letters is there? Are there any new unicode magic characters which can do that or anything?
 
@jAndy nope
On a much more serious note, what do ya'll think about github.com/bsonntag/react-use-promise ?
 
1 message moved to Trash can
@SamuraiJack Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
How does one test this:
 activeBomOfSelectedItem: Observable<any>;
saveForm() {
    this.activeBomOfSelectedItem.subscribe((response) => {
 //some code to be tested
}
 
it's amazing that we went through all this years and progress to end up with the DOS-BASIC syntax again somehow
 
12:16 PM
@jAndy retro is "in"...
 
double post is double
 
hmm is it possible to have version control
 
yes
 
yes, this is a possible thing
 
12:43 PM
I mean for databases
 
also yes
 
1:00 PM
@SamuraiJack are there any good gifs/xkcd/comics on developer tools?
 
1:18 PM
1 message moved to Trash can
@RaheelAslam Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
Hi
db.schema.orderBy('id').reverse().where({section_id: section_id}).offset(offsetNumber).toArray().then( function (data) {
console.log("Data" , data);
callback(data);
});
I am using index with dexie.org/docs/Collection/Collection.offset() but when i add where clause its throw orderBy is not function
When i remove the where clause it's working but with where it's not work
?
I have lot of try to change position of where but same error
Is any other way to do this. ?
 
1:39 PM
How does one unit test that an observable has been subscribed?
SomeMethod(){
   this.graphItemsService.currentProperties.subscribe((data) => {
     //...
    });
}
 
is there a way for me to grab a particular parameter from url, say i have a URL like: Main.aspx?mode=edit&DID=106&Status=inprog
and i'm trying to grab just the value of STATUS
the internet shows that this might work, but in my case it isn't:

CancelStatus = urlParams.get('Status');
console.log(CancelStatus);
 
!!> new window.URL('http://example.com/Main.aspx?mode=edit&DID=106&Status=inprog').searchParams.get('Status')
 
@rlemon "ReferenceError: window is not defined"
 
bah
!!> new URL('http://example.com/Main.aspx?mode=edit&DID=106&Status=inprog').searchParams.get('Status')
 
@rlemon "ReferenceError: URL is not defined"
 
1:46 PM
bah
well that works
if it doesn't for you, you are not using it correctly.
 
@rlemon yeah I told exactly that to the client
but he doesn't listen
 

« first day (3197 days earlier)      last day (1750 days later) »