« first day (3208 days earlier)      last day (1962 days later) » 

01:14
Good day. I would like to know if someone can help me to recognize specific characters on an image. I'm trying with Tesseract but I don't get a perfect result back. Thanks in advance
@ClintTheron 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.
 
4 hours later…
04:47
hello
hello
I have a jquery click on list-group-item event code and multiple list-group-items if I click on anyone I get the same result how I can specify the action by loop for example for specific list-group-item
$(".list-group-item").click(function()
 { alert('hi'); });
for complete explanation of my prb
foreach php loop
{
echo  '<ul class="list-group"> ';
echo '<li class="list-group-item">';
echo '</li>';
echo '</ul>';
}
05:06
Can you re-frame your question?
@StephanS Simply if I have multiple classes has the same name list-group-item and I click on one of them I will get alert true?
you'll get 'hi'
if you have multiple elements with the same class (class="list-group-item") and any of them are clicked you'll get an alert box with "hi" in it
@StephanS So How I can get hi on the second item only
my JQuery is a little outdated but i would have written it

$('.list-group-item').on( "click", function(){
alert('hi');
});
@StephanS Once I click on the first item I get hi,and once I click on the second item I get hi also.
that don't what I wanted
I want to get hi when I click on the second list-group-item (only)
05:22
there's something made just for that but I don't remember what it is and I don't want to read anything right now so count the siblings
     var classinquestion = (".list-group-item");
     var element_count = $(classinquestion).length;

     if (element_count === 2){
     alert("hi");
     };
put that inside the function
there's two other way to get what you want, which are much cleaner then that, just let me know if it was what you were looking for
@Tavo morning
@StephanS this loop is better
$(".list-group-item").each(function( index )
 {
 alert( index + ": " + $( this ).text() );
 });
cool
06:19
1 message moved to Trash can
@MaximTroitsky Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
1 message moved to Trash can
@MaximTroitsky Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
1 message moved to Trash can
@MaximTroitsky Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
who knows Protractor, why does the first test fail with ScriptTimeoutError but the second works?

https://jsfiddle.net/ukr6ewjb/
06:49
0
Q: Multer Does not upload files

Red BaronI have a Button in form Post Upload in Html which takes the image and with use of Filereader read the file using readAsDataURL and save the reader.result save in array <mat-card> <mat-spinner *ngIf="isLoading"></mat-spinner> <form [formGroup]='form' (submit)="onSavePost()" *ngIf="!isLoading"> ...

Can anyone help me with this?
07:38
Is there a room for Go
Is there a room for Stop?
HAMMERTIME!
:d
i hate you Neil.
07:56
at your service :)
08:29
at your disposal
hey everybody!
Hello, Dr. Nick!
ahhhhh I was worried no one would get the reference!
yay go me!
\o/ \o/ \o/
say, what is this Java Script everyone's talking about? Some kind of coffee you drink in theaters?
in a more serious tone ... what does it do when I do, say > const [ value, setValue ] = useState(). is this setting an unnamed array whose two parameters are value and setValue? Ignore the useState for now ... let's say it's just let [x, y, z].
ahhhhhhh
08:43
no, it's setting both value and setValue
I get it ... it has to do with object destructuring
it's returning an array and having it set to multiple variables (or in this case functions I suppose)
never quite got the hang of that.
I don't use it much myself
I'm too used to the idea of one return
you can search for "destructuring assignment"
08:45
@Neil so useState returns some data plus a function. And that's what you store via that array, right? So you can reference it further down in the code.
@Thaenor it's not an array
they're two separate consts with names value and setValue
I might have to read up on that... people I work with loooooooove object destructuring.
that's just the syntax you'd use to interpret the return array and assign array[0] to value and array[1] to setValue
@Neil so if I wrote const { val, setVal } = useState() it would work the same?
I suppose, yeah
08:47
!!> const fx = _ => [1,2,3,4,5,6]; const [first, second, , last] = fx(); first ${first}, second ${second}, last ${last}
@KarelG "first 1, second 2, last 4"
hmmm I'm trying that out in the console, doesn't seem valid. maybe you can't quite use it like that with objects..
uhh
@KarelG ahhh I think i got it...
oh yeah, of course this also works with objects
const { slideCount, slideWidth, slideHeight, slidesToShow } = this.state;
still, I don't think it would be a waste of time to read up on the documentation.
you can even go nuts and do
var {a: aa = 10, b: bb = 5} = {a: 3};
damn... JS is crazy.
08:54
@Thaenor a and b are undefined I think
09:09
Someone an idea what's the best way to go into such a svg picture and count the free seats? What is the best way/method to do this? It is a stadium plan and in the plan, there are sectors, the sectors have seats and I want to count them.
@dgknca you can see how the occupied seats are defined with respect to the free seats
then create a selector which will count the number of free seats (ensuring you don't accidentally count occupied seats by adding that distinction)
@Neil thank you so much
@dgknca it's not said that you can do it though, depends on how the svg was writtten
@Sathishkumar 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.
09:20
@CapricaSix are you a bot?
yep
!!shrug
¯\_(ツ)_/¯
09:35
@Neil is it not better to create an endpoint with seat statistics for that?
@KarelG what, like a backend?
yerr, that is why I said that a is undefined.
@Neil yes.
yeah, but I assume he's looking on an airplane site or something
going through svg elements with js is odd.
09:39
I don't think he has access to the backend
no. it was a conference/stadium setup
hmm that needs some search in history.
ok
2 days ago, by Spedo De La Rossa
Someone an idea what's the best way to go into such a svg picture and count the free seats? What is the best way/method to do this? It is a stadium plan and in the plan, there are sectors, the sectors have seats and I want to count them. https://tickets.fk-austria.at/shop?shopid=2&wes=empty_session_2&language=1&query_pos=0&query_rows=1000&set_query_pos=0&houseid=436&performanceid=1820&state=3&nextstate=4
31 mins ago, by dgknca
Someone an idea what's the best way to go into such a svg picture and count the free seats? What is the best way/method to do this? It is a stadium plan and in the plan, there are sectors, the sectors have seats and I want to count them.
still doesn't mean he has access to the backend
true, but check the link
going through that html with a lot svg's with js is just too much work instead of just getting the statistic data (which is essentially re-using code since it is used to generate that page)
@KarelG hmm
you have multiple accounts no? :P
09:42
no
I must be in the Matrix then.
is everything a little green?
in editing, supposedly everything filmed in the matrix is tinted slightly green
far more likely we're living in a simulation anyway
WOW!
I can't believe it....
someone did a pull request on one of my repos.
I also can't believe I linked my reddit in that repo... kinda doxxed my programmer life with my lurker (lack-thereof) reddit fursona... GROSS
tip: have multiple github accounts :P
I have 3
work + hobbies (paid membership) + OSS contributing
actually I'm looking at my repos now, because one of the jobs I applied to asked me to do a coding project. But I could also link them my repo and show them some other project "I was proud of".
thing is my past code is complete utter crap...
I don't think any of my projects even work anymore.
09:54
heh, maybe that pull request is to fix it :P
They seem to like Angular a whole lot.. so I figured I'd send them a project I did 3 years ago... but I must've F'ed it so bad there's merge conflicts in the README 😰
@KarelG actually the pull request was to fix some links in a repo that never really was. It was from r/progether - reddit banding programmers together to build stuff... in a massively overly ambitious machine learning project none of us really knew how to tackle, and thus just left it there to die... I think I'll delete it, because it's shameful to keep a repo with only a REAMDE and a license
10:32
o/
What do the cool kids use for Stacks today?
ahem these days.
10:53
@ShrekOverflow a file organizer works well
hi everybody I am newbie in angularjs.I want to add a ui-mask to my input element but I have some problem with it .my ui-mask is 1999/99/99 I want it start by 1 but it dont work correctly
Pfff, today it's not my day ... I miss something to accomplish the following result (see comment section) that's what I try to achieve: jsfiddle.net/8pbx72fj/3
Sigh
11:12
{"PRODUCT_ID": 5}
Do you think is a good idea post a question about "how does window object exactly works?" I havent found a good post well explained speaking about this.
@SilverSurfer it'll get downvoted most likely
Just what I thought
it's just where global variables get saved to
I'll downvoted it. exactly
11:16
if you have a specific question regarding window and how it works, then that probably won't be downvoted
but if it's just a generic "what is window?" then it probably would be, yeah
Hmm
@dgknca yes? :p
@Neil LOL
no :D
now i am tempted to use/implement fs as stack
the slowest stack -- ever
what have you done!
this is a joke mate :(
11:19
Yes, I was just thinking in a good post with a detailed explanation like "other things" have it. But if the question it will be considered trash better not do it.
well just ask us
we'll tell you it's a dumb question, maybe but you'll get an answer most likely ;)
Haha, its fine
@ShrekOverflow tbh, I did not understood your question.
was it programmatically- or furniture-wise?
@SilverSurfer did you have consulted this ?
11:58
shrek overflow :DD
good name
12:23
@ChristianMatthew thank you. I will try and find an angular 7/8 example that gets x-frame-options value using httpclient and httpheaders
is there anyone knowing gulp?
13:01
Still having trouble doing a get on a URL. In fact I am not seeing console.log('2')
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class WebUrlPreviewService {
  fakeUrl = 'https://www.cnn.com';
  returnHeaders: Observable<Headers>;
  constructor(private http: HttpClient) {}

  getData() {
    console.log('1');
    this.http.get(this.fakeUrl).subscribe(res => {
      console.log('2');
13:43
Hello :)
@codebeginner1 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.
o/
13:56
\o
14:21
how do a i make a table not overflow the heck out of the page ?
by not using a table, or by putting it in a container with scrollbars
but I need tables :|
well tabular data atleast
It's similar to how devtools network pane looks
@ndugger how would you do it in that case? Just a div-soup?
having one div to wrap your table is not div soup
div soup is a term made up by people with sticks up their butts
divs are perfectly fine elements to use for layout
14:37
@ndugger I misread your comment :D
I thought you meant do the whole thing as a div soup (by not using a table)
that's one option, yeah
but you could just wrap the table in a single div and add scrollbars to the div
Hi. Can anyone give me some insight on Tesseract?
Loki used it to open up a portal to let in Thanos' army to destroy humanity
hey @ndugger, I think you are responding to me...do you have some time to hear my problem?
@ndugger I still don't get what was the point of that, tbh
14:53
I would like to ask someone about traineddata for OCR
Does anyone know if I can get response headers in angular using this approach I am trying to get working?
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class WebUrlPreviewService {
  fakeUrl = 'https://www.cnn.com';
  returnHeaders: Observable<Headers>;

  constructor(private http: HttpClient) {}

  getXFramesOption(): boolean {
    console.log('2');
    this.getData();
All the examples on the web are for calling /api/ I am trying to check a URL to see if it can be loaded in an IFrame
@MadaraUchiha i mean its just a side-effect
npmjs.com/package/react-table @ndugger I think I'm just gonna go with div-soup
hellow having an issue here with webRTC adding candidate.
@NevilSaulBlemuss 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.
Uncaught (in promise) DOMException: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate this is the error I am getting
14:59
webRTC?
@JoJo yes ?
OCR assistance! anyone?
@ClintTheron LeadTools?
when sending initiating a call from firefox and the receiver is using chrome this error is displayed Uncaught (in promise) DOMException: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': Error processing ICE candidate
Its performance is abysmmal though
so I'll probably just ignore it
15:04
Yes. I'm using Tesseract.js and all the characters doesn't get recognized so I tried to use a traineddata language but I'm not sure if my code uses it. Let me send you a image @JoJo then you can tell me what would be the best solution. If you agree how do I send you a image
I am just dying to get an infection.. okay give me a minute to send you my email address..
awesome, thank you
it might be a long minute
hold on
doesn't matter. take mine so long incase when get disconnected: [email protected] (I know I'm a hackers nightmare )
15:10
lmao
i gotta figure out how to call a url and check response headers in angular 7...
are you gonna email me to assist me in solving my problem?
does it matter that this tutorial is calling an api? is it the same?
https://www.techiediaries.com/angular-httpclient-headers-full-response/
@ClintTheron can you just PayPal me $200 first, if you dont mind that is?
Does anyone know of a WebGL, shader-based implementation of Lloyd's algorithm?
15:15
Darn am coding after so long I ahve completely forgotten flex
if I do

.container {
   display: flex;
}

.content {
    flex: 1;
}

Should content's height be > containers?
No right?
@ShrekOverflow hop on board. get back up to speed - flexboxfroggy.com
pun intended
no money now. start new job next week. I thought you guys do this for free. I would tell you for free how to create your own $200 though: Imagine for 68seconds you have it in your hand, imagine how it would feel like if it's already true, then for an additional 68 seconds imagine what you do with it (like what you would buy, give away etc), then when you are done release the thought and get out of that expectation => focus on something else. @JoJo
I would give it to the people in Haiti
who have to eat out of dumps.
@ShrekOverflow I think I am on level 18
in South Africa, where I live, I could buy a laptop for $200. that is a lot. I wanna make app to get money, if I had I would not be asking you.
can anyone assist me on a ocr problem I'm having?
15:21
I just jsfiddled it out
I wonder what I was expecting :)
Hello
@JoJo If you never intended to share your email address, trolling and baiting like that is not cool.
If you can't/won't help, and have nothing constructive to add, then don't.
To work with $.ajax it is necessary to write function ?
@MadaraUchiha if anyone broke the rules it is the person that asked for my contact info.
@PHPFan i think so
@JoJo You offered.
15:24
she is refering to deception
@MadaraUchiha shut the fuck up, no i didnt
it was a joke. bite me
Fine
Consider yourself bitten.
When you come back in two days, consider how you take and provide constructive feedback.
like function getMessage() {
            $.ajax({function getMessage() {
             });
         } ?
2
lol, you are real @MadaraUchiha (not fake)
no, he's #1 faker
15:27
@PHPFan What makes you think that?
Hello everyone o/
@MadaraUchiha I don't know or I have a little knowledge about ajax, so I find some codes in websites that have functions with Ajax
@PHPFan Wrapping things in functions is a way to abstract them and reuse them
But you are not required to wrap things in functions.
(In general, any code that can run in a function can run without it)
how do I know the tesseract.js used my traineddata to recognized the characters? there's nothing that tells me so in the network tab (ctrl + shift + c)
15:34
Here is the link to my question on webRTC stackoverflow.com/questions/57256828/…
kindly help me see whats the problem
16:07
ohhi
16:21
ihho
 
1 hour later…
17:38
react-table is awful api but really good project
it kinda ignores the reactyness but vOv
17:53
i don't like the name
 
3 hours later…
21:24
🚽
user8729657
21:43
im going to uninstall windows
user8729657
i swear
21:57
Do it
This where I go when I'm having a rough day:
https://devrant.com/
-----

Anywho, does anybody know of a good api creation/management code base for nodejs?
I inherited a project with Loopback, and it's been terrible.
hah
i was gonna say, loopback was the only one i've ever used, and i didn't like it
i roll my own
That's exactly what I would have done, and what feels like I should do.
But, at this point, some people are dependent on the swagger docs, and I don't want to roll that myself.
i use express, and a few other tools, but otherwise just my own organization/logic
Sounds about right.
but none of my api's have needed official looking docs, so... quite a different scenario
22:02
I was thinking of maybe doing feather js (feathersjs.com) and using postman so the team can have a nice looking Ui.
Team's the wrong term. The product manager.
And our marketing intern.
22:18
hello
hey
you wouldn't happen to be an expert on api design, would you?
nope
I'm pretty sure rlemon is good at that type of thing, i'm not sure he's an "expert".
@KevinB do you know anything about api design ?
design? no
i'm no designer
you're not?
you could have fooled me
!!stats KevinB
@StephanS That dude sucks
22:23
😆
I do design.
wrong one
Oh. Api design. derp
!!sandbox
@StephanS Please go and play in the Sandbox
22:24
!!stat
@KevinB You (https://stackoverflow.com/users/400654/kevin-b) have 87369 reputation, earned 22 rep today, asked 7 questions, gave 2313 answers, for a q:a ratio of 7:2313.
avg. rep/post: 37.65. Badges: 13g 146s 163b
i earned 22 rep today, doing nothing... so i must have cast at least 8 downvotes on answers
that's beautiful
it's no jon skeet
user8729657
Thanks @SephReed
lol. it's good shit. (devrant.com)

I used to just come in here every few weeks to tell people DONT USE REACT
DONT DO IT.
22:35
what else would you use?
Me, at this point I'm a month out from a public release of something that every dev user test has told me is way, way better.
And I agree.
But before that, might have chosen Vue.
It's not great either. Reminds me of the first framework I build. called it PINE. It was dud. Wrong approach.
Honestly, I'd generally rather just go vanilla.
Use mobx for state management. Those two are enough to do more than React can.
I was working at a company where we had a web app IDE written in vanilla, and a website written in React. So I did a lot of switching between the two. Always preferred working on the IDE.
I rather something with more of a... well, "expected" structure. I'm leery of going the full vanilla route.
it's not much different than trying to build an entire application with just jQuery, you're left relying on the developer's ability to structure the code/flow etc such that it is maintainable long-term, else being left with an app that needs to be replaced a year or two later
Agreed. I've seen some horrors there. Typescript helps a lot, once you get to something big. But, still, it requires a good organization guideline.
22:46
it can certainly be done right
but... i've seen far more examples of it not done right
If you have a good one, it's better than React IMO. But I would not advise it to just anyone.
we used angular once, paired with loopback and a bunch of modules etc, and we're dealing with the fallout of that still, years later
that was back in angular 1.5 i think? long time ago
I got halfway through the into to angular before the code smell killed my rubber duck.
but there's no way we upgrade that to a more recent version, it'l end up being nearly a full rewrite.
With the react apps we've built since, our reliance on 3rd party packages/modules has been significantly reduced, making keeping everything up to date very easy
I'm similarly not a fan of the whole "define an app" thing as found in vue.
But, for the most part, looking at vue... I could write the necessary code to rescue most of the stuff pretty easily.
22:49
we've even began moving away from using the built-in state in favor of mobx
which is working quite well
Mobx is really dope. It's actually the major inspiration for the framework... not really a framework, thing I've built.
I keep saying "we" like there's more than just me working on code here
No judgement there. Doesn't change the logic, and people who care about bandwagons might as well believe I'm leading one.
yeah, i mean, everyone has their favorite way of doing things, lib/framework authors too. It very well might prove to be one enough people agree with that it picks up some steam
personally... I prefer something that i can change. something that doesn't force me to do things a specific way
that's why I preferred react over angular
yup. The thing I'm making, if you see the word "Helium" come up, maybe check it out.
22:53
vue, i never gave a chance
never looked at it
It's designed entirely around not giving lock in.
Vue has some lock-in... not too bad.
You can access native HTML Elements to a degree.
At my old job, I was the guy who got to figure out stuff like animating from one view to another in React.
react, i don't understand this whole... "hook" push they're doing. i don't get the point, or how a complex page, requiring a bunch of related functions, would look using them. so i just don't use them
mobx is likely making them redundant to my purposes anyway
I've totally checked out on what React is doing. My friend was telling me about hooks a bit, and how they're weird and they don't really get them.
Most of React feels like a band-aid on a band-aid to me. Like they really wanted to have this state object turn into a ui, and have just sort of approached it from there.
Starting with making it functional, and immediately shooting themselves in the foot on how that was done.
So then some people made state managers to help with it.
But a that point the virtual-dom had already been created, forcing people into this strange kind-of-functional but not really territory.

I'm just speculating here though.
.... I could talk about this all day though.

I came here for a purpose, and it was to see if anyone had objections to me dropping loopback and moving over to feathers.
@copy , do you object?
What's feathers?
It's for making apis
23:03
man
how many clicks till i find a code sample, lol
@SephReed Looks fancy, go for it
So you go looking for the code sample first thing too?
Good to know
if you get lucky
nvm, it's 5.
looks like a pretty clean setup
not too difficult to follow
i started at "the basics"
next, next, next, next next, oh, there's a code sample
Yeah, I'm not in love with it... but comparing to loopback, I'm not getting a migrane.
And the hooks concept is nice. Not sure if it really holds water, but only one way to find out.
Thanks for the feedback on this. I'll set aside a day and test it out.

« first day (3208 days earlier)      last day (1962 days later) »