« first day (3341 days earlier)      last day (1590 days later) » 

2:43 AM
morn
 
3:29 AM
hey I know you can make custom elements for html with js, but is there a way to modify existing Element's attributes
or add new ones
 
 
1 hour later…
4:54 AM
In AngularJS, does "locationChangeStart" trigger when window.location is used to change the URL?
 
@TaylorS There is a way to extend existing HTML elements but it's not supported in all browsers. You're better off creating a new element and defining your own custom attributes.
To add custom attributes you'll need to tell the browser to look for them via the `observedAttributes` method.

Then you can tell the element what to do with the new value via the `attributeChangedCallback` method.
This org was created for vanilla implementations of Web Components. You should be able to find plenty of examples.
 
5:12 AM
I have a python program running called main_account.py and on javascript side im trying to detect if its running but the problem is when i type ps aux, all i get are 2 processes (bash, ps) and on windows side when i type tasklist i do indeed detect python program running but it doesn't say its name main_account.py, it only says python.

1) How can I get it to be detected in ps aux? (im using windows 10 bash)
2) If not, then how can i make it show its real name in tasklist? (instead of just showing python.exe)
The thing is, i start the process with command python main_account.py
Python being added to environment variables of my windows.

If i try doing it with /usr/bin/python3 then it says no such file. So maybe this is the fix? I should fix this and run program with /usr/bin/python3 instead from windows.
This is why windows is trash for development
idk what im talking about i need help pls
 
5:59 AM
good afternoon.
I have a webpack question.
import moment from 'moment';
export const hello = () => ({ timestamp: moment().unix(), message: 'hello'});
export const bye = () => ({ message: 'bye'});
when I build it with webpack, I'd like to see hello.js and bye.js
in hello.js it has moment, in bye.js it has no moment
is it possible with webpack configuration?
 
 
2 hours later…
7:43 AM
@JBis copy just has a good insight how the x86 processor + memory + IO works. That's essentially the heart of any computer systems. That got translated into its javascript variant. Then you only need a javascript variant for the other hardware components (such keyboard - which is just reading keystrokes via js key up/press events)
Same for the mouse (mouse events). Once you got that, you only have to connect these with each other to have that virtual machine.
 
8:06 AM
@ShrekOverflow An acquaintance of mine works for a community service and they want to build a website. It is done in WordPress and asked me if I could add an authentication functionality. But I am not well versed with auth methods for WordPress. Do you know some articles/modules/pointers I can use to handle it?
(eg the current best practice :P)
 
@Wietlol I actually crashed and burned yesterday hard. I went to sleep at like 8PM (7 minutes before your reminder) and slept for about 13 hours straight.
So apologies for not responding and trying to break your bot 😁
 
8:52 AM
np
sleep is important... I should try some this week
 
 
2 hours later…
10:46 AM
@KarelG i am not a wordpress engineer, we do have a wordpess plugin vOv which would probably handle most of user management
afaik otob the wordpress login is neat as is (unless you want social and rich user management)
 
it is just for some role based access (adding events, articles ect) nothing special.
the website is meant for information (events / "about" the group ect )
@ShrekOverflow if you share the link, I would be happy :)
 
gimme a bit of time
getting my bearings
 
11:30 AM
1 message moved to Trash can
@PooyaPanahandeh Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
var listOfItem = ["dataprotection", "digitalGeneral", "countrySpecific", "centralOrdering"]
for(let i = 0 ; i < listOfItem.length ; i++){
	$("span:contains(listOfItem[i])").closest('p').parent('div').parent('div').parent('div').hide();
}
do you have any Idea, How can I make work?
 
cussing cussing
How do you think will it work?
or why should it work?
 
I need to make it work, do you have any idea how can I fix it?
 
Ofcourse
try reading your code
you are trying to pass a variable but instead have achieved to create an immutable string
 
"span:contains(listOfItem[i])" is just that each time you loop through it
 
11:37 AM
Do you have any Idea how can I pass the array element here?
$("span:contains(listOfItem[i])")
 
either use template literals or concatenate your stuff
'span:contains("' + listOfItem[i] + '")"';`
bah
 
@KarelG vOv
You should play more
The people who talk about being nice haven't seen the daily SO monsters ofcurse
 
@KarelG Thanks a lot, it works
 
@KarelG re user managemnt try this first it doesn't work then we upgrade auth0.com/wordpress
Auth0 has roles and permissions now so your use-case should be fine
and < 7000 users it'll be perfectly fine
 
that's an odd requirement/limitation
aah free plan
👍
 
12:08 PM
@KarelG ;)
 
12:20 PM
Morning.
Hey does anyone know of HTML elements that would be nice to have, but arent in the default HTML?
Im out of Ideas, and Improving the Default html sounded fun
 
<marquee />
 
an improved css based marquee
I can work with that
the keyframe part may be a pain though... Is there a way to make an inline keyframe?... or style elements without actually applying a stylesheet or inline style... sortof like a shadow css
 
Hi
is Any Js libaray to reduce the image size with better result ?
?
I have used this but it crop the image https://ytiurin.github.io/downscale/demo/multiselect.html
not loose the quality of image
 
12:36 PM
You mean, you want a program that can improve the clarity of an image?
sure there are programs that can sharpen images, but if an effect or resolution has been applied to an image, it cant be undone perfectly
 
@TaylorS yes clarity not should be 100%
@TaylorS is any lib for better and reduce size result not crop?
 
1:07 PM
@RaheelAslam the purpose of compressing it is ... ?
you usually see that when you need thumbnails of a large image. that plugin is useful for that
 
1:31 PM
i am using chart.js and my x axis goes up in 0.5 of a number at each interval is there a way to make it just integers as it will always be integers? is it one of the options to pass in?
var ctx = $("#chart_canvas");
chart = new Chart(ctx, {
    type: 'bar',
    data: {
        labels: xAxis,
        datasets: [{
            data: repArray,
            backgroundColor: "rgba(163, 33, 54,.5)",
            borderColor: "rgb(163, 33, 54)",
            borderWidth: 1
        }]
    },
    options: {
        maintainAspectRatio: false,
        scales: { yAxes: [{ ticks: { beginAtZero: true } }] },
        legend: { display: false },
        title: {
            display: true,
            text: "@Model.ChartTitle"
 
probably
have you checked out stepSize or precision
 
o/
 
(or look at other axis options)
as ben pointed out: check precision and stepSize
 
its stepSize, thanks guys, i was looking in the wrong place, i was looking at legend rather than axes
 
2:16 PM
I have an object that has to track the values of other objects. Is there an easy way to tell when those objects being tracked have changed?
 
hi
let str = "How are you \n\n<bubble>\n\n doing \\n\\n today? and when <bubble>\n\n will you <something> come";
was wondering why does it take the \\n\\n to print out the \n\n and how can I prevent that?
or how can I use the natural \n\n to be in the final result
 
@ChristianMatthew because a literal "\n" in the text is a newline
if you want the text to be "\n", then you have to escape the first slash, which is to say, treat '\' as an actual slash
So in your case you'd want "\\n\\n" => "\n\n"
 
2:35 PM
I am trying to find the css for a website but when i go to the site with chrome dev tools network tab open i dont see a request for any .css files does anybody know why this is?
 
@Spencer look for a style tag in the html
you don't have to put the stylings in a css file. You can put them directly on a page, like with javascript
 
okay cool i did the style tag thing and i found it, but i still dont get why it wouldnt be in the network tab? the site is taniarascia.com
 
because it's not a separate file
 
just a quick question. I have an online store and on it there is some text that the user can customize. I would like the background colour to be changed based on the product id when the page loads. could anybody point me in the right direction?
 
but this one actually has a css file its not just in the style
 
2:39 PM
Hey guys, I'm new here
 
@vctburk 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.
@CharlesLukes 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.
 
@CharlesLukes hey welcome
@Spencer maybe it's already cached?
 
cached network requests shows up in tab
 
do they? even if nothing was downloaded?
 
i wiped my whole browser history
 
2:40 PM
@vctburk hmm.. background color based on an id seems not very scalable
 
@Spencer Firefox shows me everything just fine. I guess it's some weird chrome issue.
 
@vctburk either you provide the color together with the product info, or you apply some sort of generic rule, like all products of type electronics have background color green..
 
@Neil hey neil. There is only a small number of products on the website.
 
@geisterfurz007Stopthischaos maybe im just dumb ill check again
 
@vctburk still not scalable, though. The day you have to add a new product is the day you'll have to add its background color
 
2:42 PM
@Spencer it is in page source?
 
@vctburk what I would recommend is to give the element in your DOM that you want to have the background color changed as having a class="product" id="addIdHere"
then in your css, you can do #addIdHere.product { background-color: orange; }
strictly speaking you don't need the product part, but I think it's best practice
 
@Neil thanks a million for the help neil. I will give it a shot.
 
user10864482
good moar ning
 
@vctburk good luck :)
 
user10864482
is there a way to 'speak' to a activex control from browser console?
 
2:58 PM
ActiveX is something from the ancient time, it is encouraged to not use it anymore
 
user10864482
@KarelG I know. However I have no control over the implementation. Think of a ladder; I'm at the bottom of it.
 
3:14 PM
@human That's where the latrines are
must smell awful
 
user10864482
3:33 PM
well what is moar awful between activex and nsapi?
 
user10864482
tip: both are installed on my machine
 
Microsoft Foundation Classes MFC
that's what they used before there were checks to make sure you didn't write well beyond the size of memory your pointer was allocated to
fun times
 
4:12 PM
If you have an object myObj = { myProp: 'value' }, myProp can be referenced by myObj['myProp'], right? Is it possible to do this if myProp is set as an array and reference a specific element of the array in the string indexer?
 
user8729657
4:25 PM
Is mongodb, good for storing data for my web application?
 
@Hypersapien yeah, that should work I believe, but wouldnt it be more efficient to use something like myObj = [ 'value' ] if your only using one value, and select it with myObj[0]
or perhaps just use your original statement, but select it with myObh.myProp a couple less characters
 
myObj has a bunch of values, some of which are singular values and some of which are arrays, and I have to run the same algorithm on both, so I was wondering if I could just write a function and pass in which property name I wanted to run it on.
 
well, then just select it how you were doing before
myObj[myProp]
by the way, remove those quotes ' '
since your selecting a property, you only need the pure property name, similarly to how you select a subvariable like myObj.mySubVar
> if I could just write a function and pass in which property name I wanted to run it on
function myObjSelect(property) {
 return myObj[property];
}
dunno why youd want to send it through a function but there ya go
 
5:11 PM
Hello, I am trying to learn Angular (I have Jquery background) but I am having trouble running this simple function codepile.net/pile/9rGyAwVo
I just wanna do an alert when I click the navBar, also despite it not working, I got no errors on console
(I am using angular for different things in the same page and everything else is working fine, for instance ng-repeat)
 
I reccomend using codepen instead btw
also because codepile is blocked on my proxy XD
 
Just a second, sorry about that
 
@TaylorS In school?
 
ooh. Here's a fun error. 'Maximum call stack size exceeded.'
And if I put a breakpoint on the last line of my code in the call stack I get the "Aw Snap" page.
 
5:29 PM
probably infinite recursion
 
I havent seen the Aw Snap page since first grade when i played reading eggs and our wifi was bullshit
8 years ago...
;-;
chrome looked a lot different
Im sure thats probably not true, I just dont remember ever seeing it within that time (or since that time)
 
the worst part of it all is getting no error at all when clicking in the elements, if I had an error I would no where to begin from
 
6:15 PM
 
6:28 PM
Is there a way I can search this chat? I am trying to find a link I posted here
Background: I was talking to a friend about functional programming tutorials. There was one I remember seeing that used practical puppets in a classroom. Very weird, but even weirder was how well the content explained functional programming.
I have tried scouring the web for this video, but I can't find any mention of it anymore.
 
hey I know you can extend features of a default element using web components and the is="" statement, but can you extend custom elements with the features of default components, like making a custom t-console element the same as a canvas element
 
6:46 PM
Hey all, I was wondering if anyone knows a way in node js to create perform some image manipulation where the image is centred and resized to fit in the middle of an A4 sized white image? I'm wondering if this can be done in gm or im and whether they also allow the addition of text that also supports CJK?
 
@cookies 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.
 
I just found out you can style console.log outputs
.-.
Like... What?
console.log('I am a %cbutton', 'color: white; background-color: orange; padding: 2px 5px; border-radius: 2px');
Im going to use this for my console logging APi lol
 
7:41 PM
I've seen a number of libraries log styled output
Google likes doing that
 
7:53 PM
@cookies that sounds like something that would be best left to exec and Imagemagick
 
Just got out of the SAT, brutal
@cookies node wrapper for Imagemagic github.com/rsms/node-imagemagick
hasn't been updated in a while tho
 
looks like this is where the "dead project" links point to
 
8:37 PM
@Felipe Oliveira You don't have much wrong with your code at all. All you need to do is add '[]' after 'coursesModule' as a second parameter. And for the find, you can simply put the tag 'a'. Other than that it should be working just fine.
 
8:48 PM
mornins
 
@JBis Khan Academy SAT course earned me a near-perfect score
afternoon, Felix
 
may y'all specifications be precise
 
@forresthopkinsa this is my first real one, we'll see how i do. If i get over a 1400 I probably won't take again.
 
over 1400 is very very good
 
🙏
 
8:51 PM
in PHP, 8 hours ago, by Mark R
Javascript - I just misstyped undefined as undeefined... and it still worked because undeefined is undefined.
2
 
For me, at least in the math section, it's the careless mistakes. I know the math. But then I accidentally do 7 + 3 = 11.
 
long live JavaScript :P
 
user8729657
Is mongodb a good database to use?
 
user8729657
I always try to install and it never works on windows
 
8:52 PM
@OvieTrix Decent, if you are going for NoSQL.
@FélixGagnon-Grenier This is beautiful.
 
ikr?
like, amazing
 
user8729657
lol
 
Thats going on r/ProgramHumor
 
maybe we've been misspelling undeefined this whole time
 
right? where does it end?!!
 
user8729657
Thanks @JBis, I think I'm going to try out Firebase
 
@forresthopkinsa @JBis thank you :)
 
9:13 PM
Mongodb IS a good db to use. You are doing something incorrectly, obviously.
 
lol
you're trolling, right?
 
of course....
NOT
 
so you really are gonna defend the blanket statement that MongoDB is good to use, without any constraint on the situation?
 
I like it a lot, especially since it has mongodb atlas.
 
"I like it a lot" is really not a valid argument :)
for instance, if you need to create a relational schema, why would you use mongodb, instread of technologies that are proven with relational schemas?
 
9:19 PM
It's way faster at querying and has great scalability compared to sql dbs
 
@FélixGagnon-Grenier Funny video, but mongodb is good for somethings.
 
of course!
when you need a document database, for instance
or when the constraints on the structure are non existent
 
and it was 8 years ago
 
My preference is mongodb. To each their own.
 
9:23 PM
oh, sure, I ain't arguing about anyone's preference. I am saying that a blanket "mongodb is a good database" (or any blanket such statement) is arguably wrong, because the answer depends on the situation.
 
some people just like using inferior tools.
 
Who is the gun pointing at?
I understand you.
 
🔫
 
9:41 PM
💥🤺
 
 
1 hour later…
10:45 PM
Anyone here experienced with $LocationChangeStart in AngularJS?
 
You triggered my PTSD. That is ancient code man
when that code was in use C'Thun was a thing
 
11:04 PM
gods yes
wow, I had forgotten this AngularJS thing
ugh the memories
 
^AngularJS artistic renderation for Hearthstone
 
postinstall (battlecry): summon your weird bugs you have fixed in past 6 months
 
11:29 PM
What’s wrong with AngularJS?
 
11:51 PM
that's a pretty loaded question
 

« first day (3341 days earlier)      last day (1590 days later) »