« first day (3247 days earlier)      last day (1925 days later) » 
00:00 - 18:0018:00 - 00:00

00:46
morn!
ABC
ABC
Morning
I have a question
when I try to console my params
it display {}
because your params are an empty object apparently.
ABC
ABC
01:01
@rlemon how to fix it sir.
fix what?
ABC
ABC
this.route.params.subscribe(params => {
      console.log(params);
    }); empty {}
|| debug i already tried to put in constructor and ngOnInit but still the params is empty.
is it because the setting in the router?
no clue, don't use angular
I'd investigate if that object is every meant to be empty tho and work up from there
ABC
ABC
ok sir
 
1 hour later…
ABC
ABC
02:31
.
konnichiwa
Ohayo
 
5 hours later…
07:39
@rlemon why?
@Dwigh is it a problem to not use angular?
I only tried it for once and skipped it afterwards. Went to react (with mobx integration) or vue for personal projects
ABC
ABC
@KarelG I already solve the problem sir.
but now I have a new problem which is Access to XMLHttpRequest at ********** from origin 'localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
because I run the angular in port:4200 and I open a mamp which is port: 8888
> No 'Access-Control-Allow-Origin' header is present on the requested resource.
@KarelG i did not say it's a problem to not use angular. he said not to use angular. hence my question
i have an object
    [{OneID = 1, TwoID = 1 }, {OneID = 2, TwoID = 1},{OneID = 1, TwoID = 2 }]

i want the result in an array of "TwoID" against "OneID = 1". Expected output:
  [1,2]
07:46
@ABC the error is informative. Please don't re-ask your question often. That is not okay. Please check the room rules again.
how i can achieve it?

  var filtered = data.filter(function(item) {
                        return item.UserId === userID;
                    });
my above try returns me an object array.
but i just need an array out of this object.
I am confused with your expected output
what is the best approach? i can make loops but i am looking for ready map fast iterators.
07:48
1 message moved to friendly bin
please stop with that.
[1,2] are integer values of property "TwoID" where OneID = 1
aah
so?
use .reduce or .flatMap after your filter
since those are objects, use the former
they return array of single property?
07:53
eh, I meant latter
something like
(just noticed that yours objects in the array are invalid. FML)
!!> [{OneID: 1, TwoID: 1 }, {OneID: 2, TwoID: 1},{OneID: 1, TwoID: 2 }].filter(o => o.OneID===1).flatMap(obj => obj.TwoID)
@KarelG [1,2]
next time, please come with valid javascript stuff @ARr0w
@KarelG cmon man have some tolerance :( i'm working with c# and javascript altogether
things get mixed some times. :(
c# object creation accepts equals and javascript well colons. FML
by the way, ty.
1 message moved to Trash can
@Aurelius Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
@KevinB this is what I meant:
React.useEffect(() => {

  return () => // cleanup
}, []);
if I should remove them there
as cleanup/unmount
09:04
I have an select box and an texarea fields I want to create jquery function when
I select an option then the texarea will be filled with the value from selected option. what should I be searching? I tried this but not working.
<select name="standard_reasons_options" id="standard_reasons_options" >options</select>
<textarea rows=10 name="reason" id="reason_textfield" />
 // apply a change event
$('#standard_reasons_options').change(function() {
// update input box with the currently selected value
$('#reason_textfield').val($(this).val());
 });
ABC
ABC
Hallo
@luffy It should work without problems if I look at that code.
ABC
ABC
@KarelG Sir
can I ask
I'm going to post here the code but dont remove, remove after you saw it
you are free to ask, but don't spam it multiple times
ABC
ABC
09:17
how do I get the data from the api.
Can one of you kind javascript folks !!unban me please
also I pointed you to the room rules. Did you really read it? (especially the second and third bullet)
ABC
ABC
ok sir.
@CaptainSquirrel ask it to the person that has banned you. It should be only him/her that can lift it.
Yeah about that
in C#, 1 min ago, by Caprica Six
@Squirrelintraining You do not have permission to use the command unban
09:20
@CaptainSquirrel Why are you banned?
unban is a privileged command. And again, go ask the person that banned you.
@BenFortune one of the other c# RO's thought it'd be funny i guess
ok ... I saw the convo
@KarelG that's my point, he tried already
ye
lel
09:21
I don't even know who the other person would be that ran it lmao
!!unban CaptainSquirrel
@BenFortune CaptainSquirrel freed from mindjail!
Much thanks <3
!!backup
@BenFortune Donna Noble has left The Library Donna Noble has been saved.
09:22
that was so funny.
laughing while I should shut up and work :x
lmao
I have the excuse of waiting for a build to finish :D
I stroll reddit for that
ABC
ABC
09:49
Hello Sir
How do I filter the data from api?
example I have a this.global.getData(`/services/getData.php`)
.subscribe((res: any) => {} then I have a this.rowData = this.rowData.filter()
advance thanks for helping
you have to be clear and concise with your question. It really depends what the data is that you receive from an api. If it is an array, you can use .filter yes. If it is an object, you have to pick those key:value pair(s) that you need
10:26
@BenFortune cheap jokes, a cliche love story, fake dog winks... great movie :D
I was genuinely about to cry at various points
before this gets flagged with no context
10:53
i should pet myself
what above is about?

well

my plugin now embeds the third party plugins in specified columns  and returns its

for example : object from grid.rows[rowIndex]["ColumnName"].thirdPartyObject
@KarelG cool, right? :D
@Dwigh I don't use it. You misunderstood
11:09
ah
@KarelG ahhh
@Dwigh you sat on something?
11:54
Has anyone built chrome extensions here? I just want to understand "when" does the background script "start"? When does it become alive?
And when does it die?
12:24
Happy birthday Robert! @rlemon
ohh thanks :)
By the way: I am flying to speak at SmashingConf tomorrow - if anyone is coming hit me up! Plans for aftterwards are Athens (end of October), Warsaw (for frontend-con), Tokyo (forJSConf Japan 80%) Montreal (80% chance for Node+JS Interactive) and Node.TLV (but I am in Tel Aviv anyway). If anyone is attending any of those and wants to hang ping me!
12:45
Is there a way when using node --inspect to not kill the process when on error? ie

VM54 invoker.js:389 Unhandled rejection
it makes debuging node annoying vs, client debuggging where the website still runs
keep having to restart the backend
Got a question about CSP
efused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'", a keyword or hash
but how would I go about getting this hash from my script?
the hash is different depending on which pc it run it off our test environment
that hash should be reproducible
How could I get it?
Not sure how I get a hash from just the script
(I don't handle the CSP stuff normally)
13:03
sha256sum
13:23
How do i use an external library, like say a js mqtt client, inside of background script in google chrome extension?
import it
and bundle
you mean something like webpack bundle?
my webpack skills have disappeared... :/
user8331407
@rlemon hp birthday man
thanks
13:51
@Dwigh heh, rlemon is just a trustworthy brother in arms. If there is war, i would trust him with my life.
mhm
just checked SE meta
> Effective today, all Subscriber Content on Stack Overflow and Stack Exchange network will be available under the terms of version 4.0 of the Creative Commons Attribution ShareAlike (CC-BY-SA) license. src
14:11
@BenjaminGruenbaum how relevant is Node.js still? I understand how stupid of a question that can be, but I feel like the hype came and went, and while Node can be a great solution to some problems, most companies shy away from it.
Also, if I wanted to contribute, is there a chat where node contributors hang out? Or should I simply go to issues and try to grab one?
still relevant imo. Thing is, it is not "powerful" enough when comparing it to ASP.NET or java EE which already offer complete MVC solutions at it own
What do you mean by powerful? The standard API it ships with?
yes. Despite the enormous open source libraries you can find via npm, it lacks the certainty to have a continuous support.
there are plenty projects that were useful but did not got maintained anymore after a year or two. That is not helpful for companies.
I feel like that could be said about JS in general, so I get your point
I'd love to dig in with C++, but I feel like Rust's ecosystem is more conducive for WASM, so I feel torn
moz loves rust, and they're putting a ton of work into the rust>wasm compiler
14:20
Yeah
thing is, many current IT jobs are about on working on legacy codes, which is usually from those major platforms .
for new tech, you have to check either startups or companies that has budget to invest in such tech (which is kinda rare)
like I am currently working with a CRM that ran with java 6 (especially java EE 4). I could move it over to java 8 (we are going to plan to move to java 11 later).
Still though, look at the amount of PHP/wordpress sites that still exist
but I still have to work with those crappy jsp based scripts (java code within jsp)
fortunately I managed to get some budget/resources/time to move it over to the modern technology
14:44
I've been fortunate to work on new projects for the past 2 years, so I haven't had to deal with much legacy code, and I like that Rust is new, because there aren't going to be many legacy projects using it.
user8729657
I just got a new project to work on in C# :)
user8729657
The pay is good too.
15:23
o/
-1
Q: How to efficiently display array elements using AJAX and jQuery

VelvetRoosterI've retrieved data (6 users) from an API using AJAX, and I want to display the names and avatars of each user using only JavaScript. The problem is that when I when I run the code, it displays 6 copies of the same user and I don't know why. I've already played around with $.each and other meth...

how can I get this
 const trigger = useScrollTrigger({
    target: window ? window() : undefined,
    disableHysteresis: true,
    threshold: 100,
  });
to measure distance from the bottom instead of from the top?
I dunno, what is useScrollTrigger?
15:45
hello
!!/sandbox
@StephanS Please go and play in the Sandbox
does anyone knowthe git for Caprica Six?
What would cause the firefox debugger to not let you put a breakpoint on certain functions?
sourcemap funkiness, trying to put it on a weird line, I dunno
is this
maybe just using a different target with a different id
15:54
@ndugger ping me on fb? Node is still growing a lot but honestly I am not a fan of that and I want less adversary in this market
Like who cares who is "winning"
But #node-dev on irc and thr issue tracker
Afk Orit's birthday
I don't use facebook anymore. I wasn't trying to create adversary, I was just curious from your perspective if it's still a good road to go down
16:06
I fucking hate js on the server
but you write cobol and cold fusion
typescript's okay on the server
I don't do cold fusion, I think that's sterling
I don't think he does CF anymore, but I thought someone here still did
Hey everyone
user11867329
16:54
Guys, I need help. Paying $20-$50 to fix a 50 line script that bugs.
user11867329
should be child's play for JS expert.
define "bugs"
user11867329
I would've preferred: define 20-50, but ok.

We spoke a couple of days ago.
I speak to a lot of people
user11867329
Script that fetches .card-title element of a website (i assume you do, speak to a lot of people) and outputs "Lot#" to ids.json

Then checks the website again and compares to ids.json.

If new element, it triggers js function.

For some reason, without any identifiable triggers, it stopped working and now adds a new line and declares new items even if it's the exact same lot#
user11867329
16:58
just adds it onto another line and declares "new items found"
user11867329
rendering the script useless (based for instant notification when a website adds a product)
Put your code in a gist or something for us to see
user11867329
1s
user11867329
I have it as my latest question, but that'll probably just collect me a couple of other negative feedbacks for my question, so yeah, 1m I'll upload.
nah, looking at your Q now
user11867329
17:00
Ok.
does console.log("new items found: " + newItems.length); also print out 38?
user11867329
That's where it happens.
user11867329
lemme screencap
user11867329
It loops New items found: 38 instead of 0.
And adds a new line instead of comparing
Can you show me what your JSON looks like that it's saving?
user11867329
17:06
also, saveItems(knownItems); seems wrong. Should you be saving the new items?
well 33 the first time, 13 the second time
user11867329
Well, I mean, maybe it saves and then compare to previous line.
Something is up
SHow me your JSON
user11867329
1s
user11867329
I will format them and place it correctly with notepad++ cause it's all messed up. I'll send you both (unformatted and formatted)
17:08
don't send me unformatted anything
user11867329
Ok.
user11867329
formatted
From just reading it, I bet it looks something like [ {...}, {...}, 1, 2, 3, 4 ]. Your known items is an array of objects containing the text content and the href. However, you're concatenating a list of ids, which I think are numbers
lemme look at the json
hm
user11867329
you're mostly correct.
17:11
Well a bunch of nulls in there is probably the issue
user11867329
is there a line that I can add that can remove "nulls" before saving to file?
const linkIDs = links.map(l => {
        parts = l.href.split('/');
        parts.pop();
        return +parts.pop();
    });
user11867329
or would that not fix the source issue
this is your culprit
NaN serialized in JSON is null
user11867329
elaborate? (also send btc address if we fix it im actually paying.)
17:12
I think the parts you're popping and converting to a number at the end is resulting in a NaN
user11867329
Nishnawbe Aski Nation?
user11867329
lol
I would set some breakpoints, or log to the console what parts is, what it is after your first pop, and what it is after your second pop after converted to a number
Not a Number
It's an object in JS
user11867329
gotchA.
You will probably see NaN, which serializes to null in JSON
user11867329
17:13
Would simple filtering out the "nulls" be possible/work?
I would rewrite most of that script in the first place, but I would definitely rewrite that chunk of the code
I don't think you want to just filter them out, I think you want to fix your code
user11867329
For how much would you >_>
More than you can afford
I'd rather have you fix it than me do it for you
So you can learn
user11867329
oof, we got an omniscientist over here
user11867329
Sure thing, thanks for the lead.
17:16
@KevinB I'm going to ping you every time I help someone just to rub it in your face
user11867329
@KevinB issue not resolved tho
user11867329
Well I mean, if you gonna rub something on someone's face, make sure it's not cashmere.
Well that was unnecessary
user11867329
Ok ok, lemme make a better one:

Helped your mood like a cop giving a warning instead of a ticket
user11867329
17:18
It's not perfect, but it's that.
@OTLT-LCar remove the second .pop and it might just work. I went to the page to look at their URLs
user11867329
send btc address
user11867329
lemme try first tho
I'd honestly just not use pop, or use a regex
user11867329
return +parts.pop(); (remove entirely?)
17:23
I'd definitely use a regex
why not a url parser? where is this? node or client
user11867329
Thing is, I don't have strong JS knowledge foundations. I can't understand a full script with ease.
user11867329
Node
user11867329
I used regex with my PHP alpha script
user11867329
17:23
but no async (parrallel tho)
I haven't read up tho
so if you're just trying to get parts of a url. use the parser
user11867329
I don't think I am. As stated above, I simple need to fetch elements (product #) of 1 page "domain.com/all" and save then compare
user11867329
if new, trigger
return link.href.match(/https:\/\/www.restockcrc.com\/(\d+?)\//)[ 1 ]
user11867329
Woah, that's the regex? Man you fast.
17:25
I mean, rlemon has a good suggestion too
to parse the URL and extract it that way
would be safer
user11867329
I don't understand why you're talking about parsing the URL?
to get the ID from the path
user11867329
I also don't want to waste your time to teach me about it.
are you using express.js by chance?
he is
user11867329
17:27
Is that how the script does? Can't it simple look for the ".card-title" element and fetch the number that follows the "#" ascii character?
user11867329
yes I am
router.get('/:id', ( req, res, next ) => {
  const { id } = req.params;
});
that has nothing to do with his problem
get id from url on node
is what I understand the problem to be
user11867329
@rlemon but I would have to redo the entire script, no?
17:28
He's screen scraping, extracting the URL from links on the page, and extracting out the numeric ID from the URL
ahh.
using url.parse would be a good fit here
like I said, I didn't read up. just saw you guys trying to hand parse urls
user11867329
Consensus?
user11867329
17:30
lol ffs
user11867329
remove the second .pop and it might just work. I went to the page to look at their URLs
user11867329
you said that
user11867329
I answered: remove the whole line?
I did say that, and I think I was wrong
user11867329
ok
user11867329
17:31
sorry.
you should use the url module and parse the href, and extract the pathname, then pass it to the Number constructor to convert it
user11867329
gotcha.
should look something like, but not exactly like, Number(url.parse(link).pathname)
user11867329
When you say that, you have to provide the backthought also, cause as it stands, for real, I have no idea where this would be going.
Just do as I say and never question me
user11867329
17:34
I do not understand what you say. What then.
Lunch is over, you're on your own from here
user11867329
Like, I barely understand how my script works. Which is why I was saying paying wtv $50 to fix (because I assumed it would easily be fixable... it worked fine for a week) AND I know that teaching me code is a task that would take eons.
user11867329
I know.
user11867329
but thank you! I mean, if I ever have "more than I can afford" and need a script, I know who to call.
Guys , I have a question related to DB , i know i am in wrong room but i believe peope here can help me

in my datebase i have the following tables
A=> B = > C = > D => E

relations is 1 to many

A is the parent / E is the last child table

in case i am in E table and i want an information from A , I know i should have make join and quiries to get the info i need

to speed things up and to speed query , if i add a reference of A in E direct
is that correct ? is that against DB Concepts ?
so B reference A
C reference B
D reference C
E reference D & A
user11867329
17:41
@ndugger is there anything I can do for you?
mass ping KevinB and tell him how helpful I am
user11867329
does he have a cellphone #?
yeah, it's 911
user11867329
fair
can someone help
user11867329
17:43
I have a GCP instance with a T100 GPU, could lend it to you for a week?
user11867329
@Bassem no idea, sorry.
user11867329
a quick deploy of pytorch and BOOM, rule the world.
Nice day all
@OTL just a FYI, when you only type 3 chars and hit enter. it still pings them
no need to further correct it
element.scrollIntoView(false, { behavior: 'smooth' });
how can I specify both false alignTop
and smooth?
as I am doing there doesn't work
user11867329
17:52
@ndugger What about this: I have $100 that I can give you right away. THEN, if all goes along proper and I can sell it to the right peopl, I'll give you a cut of how much I could sell it for. (We primarily use it for ourselves) If it works for us, no reason not to try to push it.
well that's what the docs say
@rlemon what do you mean?
that you can't do it that way
@OTLT-LCar nobody is going to buy a simple screen scraper from you, let's be realistic
you pass it a single argument
17:53
chat.scrollIntoView({ behavior: 'smooth', alignTop: false });
making up new function signatures doesn't often work
like that?
are those options on the docs?
user11867329
@ndugger hmm, lemme fetch this email I got from the GM...
I'll repeat. making up function signatures (or flags) often won't work out. you have the documentation. you can see that
17:54
@rlemon which options? Can you please stop making fun? I don't know what mean if you make fun
I'm not making fun of you
I'm giving you advice
alignToTop Optional
Is a Boolean value:
If true, the top of the element will be aligned to the top of the visible area of the scrollable ancestor. Corresponds to scrollIntoViewOptions: {block: "start", inline: "nearest"}. This is the default value.
If false, the bottom of the element will be aligned to the bottom of the visible area of the scrollable ancestor. Corresponds to scrollIntoViewOptions: {block: "end", inline: "nearest"}.
scrollIntoViewOptions Optional
you linked the docs. you can see the options you have available to you.
this is the doc
so yes it is present
you can pass it a boolean flag OR an options object.
not both.
and the options object has defined properties it accepts.
17:55
okay thanks
but I want to scroll to bottom and have smoth scrolling
why can't that be acheived?
it can
just not with that method.
It's one of the examples in the docs
Unless I'm misreading it
or maybe it can
user11867329
@ndugger

> Interesting… who use this application if you don’t mind ?
> If it’s the customer that I think of for use I may be interested to offer it on my
> website as it will save us time (depending on cost)
developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView -- you can make this method do smooth scrolling
scrollIntoView
17:56
but just adding in stuff that doesn't exist in the documentation or the spec is not often going to work out. that's all I was trying to get across.
you'll be chasing made up stuff
user11867329
Realistically though, it probably isn't the user they think about.
user11867329
but some items are bid related and I already have a good pitch to them.
chat.scrollIntoView({behavior: "smooth", block: "end"});
$100 would buy you about 30-45 minutes of my time. I could probably rewrite your entire script in that time, but I have my own work to do. You'd be much better off learning and doing it on your own
user11867329
17:58
I have a couple of fantastic studies that shows the increase of final bid price in auctions when notifications are involved.
user11867329
I know I should and I am trying. Nothing is stopping me from doing both.
00:00 - 18:0018:00 - 00:00

« first day (3247 days earlier)      last day (1925 days later) »