« first day (3434 days earlier)      last day (1736 days later) » 

user11867329
00:03
h,

anyone how to make the title "clothes" disappear unless hover it triggered?

http://somewhatmystical.com
00:14
h1:hover {
	display: none;
 }
This will make h1 invisible when hovered.
user11867329
I didn't explain myself properly.

It's currently a class let's call it .title-from-banner

and the thing is, it should only be visible when container is hovered
user11867329
Or wait
user11867329
Nevermind.
user11867329
I need to know how to separate the class by IF container is hovered
user11867329
So it's not really about the selector itself
user11867329
00:19
Checking the website, you'll understand
huh?
'I need to know how to separate the class by IF container is hovered'
Okay i see the site....
user11867329
Left picture
user11867329
Clothes should only appear when hover anim is triggered
user11867329
but I'm not certain if it's even doable via CSS
Okay so you want the title "clothes" to be invisible by default but visible when hovered, right?
I'm pretty sure it's doable via css
user11867329
00:25
Yeah but not visible when the element "title" is hovered
user11867329
Well not JUST when the element is hovered
user11867329
but when the container is hovered
then just do the opposite
make it display none by default, then simply change it when hovered
You can try something like
#mouse_over {
  opacity: 0;
}

#mouse_over:hover {
  opacity: 1;
}
@Unbreachable 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.
<div style='border: 1px solid black; width: 120px;'>
<div style='height: 20px; width: 120px;' id='mouse_over'>hello</div>
</div>
user11867329
00:41
That will only make it visible if the ELEMENT is hovered
user11867329
not the container
user11867329
E.g. for it to be visible, I would need to hover the small 30px by 200px the title is taking
user11867329
Which isn't what I need, need it to be visible when another element (the container) is hovered
then just move the id into the container....
user11867329
I already got a container ID
user11867329
00:49
Can I use it and how?
then use a class
it's no different than the example above, move it into the container and if you already have an id use a class attribute
user11867329
Yeah but can I conditionally apply CSS properties to a class (title) based on another class's :hover trigger?
user11867329
If yes, how?

You exemple uses HTML that would probably be hard to match to where the container is
you can, an element can have more than one class value
class = "title subtitle "
just space inbetween
user11867329
How would it look?

.premium-banner-ib > .wpb_column > .wpb_wrapper .premium-banner-ib:hover:before > premium-banner-title-wrap:before
{opacity: 1}
00:59
hmm ?
That will only target the last selector
user11867329
but only if premium-banner-ib is :hover
user11867329
which is what I want
user11867329
to apply property to the last selector BUT ONLY if another selector is hovered
user11867329
.premium-banner-ib:hover .premium-banner-title-wrap {opacity:1}
.premium-banner-title-wrap {opacity:0}

is the working thing (FYI)
yeah of course
user11867329
01:11
I didn't know! I assumed it was, but idk
well , try it out
I am not 100% why not just trial and error?
user11867329
No, it works.
user11867329
Tested, check somewhatmystical.com
Cool @OakDev glad you got it working
lodash is pissing me off
01:12
lodash?
user11867329
@forresthopkinsa Need an enforcer?
user11867329
Imma mess him up
ah i see
const properties = [ [1, 2, 3] ];
const foo = _.intersection(properties);
// returns [ [1, 2, 3] ]
const bar = _.intersection.apply(this, properties);
// returns [1, 2, 3]
why
this is in a function scope
aauughh
there there it's okay
01:17
yesterday, by Kevin B
i can imagine the mistake you made, and if it's the one i think you made it's the same one you made last week
actually, that is not okay
I love this room
yeah! it's not okay!
thanks for the backup
curse lodash
01:29
oh crap I figured it out
forgot that Function.prototype.apply takes an array as the second arg, and spreads the array to the function
I hate the Function.prototype members ugh
Tay
Tay
02:01
Hai.
Could I get an opinion with a graphic I generated via canvas?
hey whats up
Tay
Tay
Im making thumbnails for my satisfactory series with canvas, just curious, does it look alright
I even got a mimicked satisfactory font and everything
Id say it looks pretty cool
Tay
Tay
perhaps i went too dark on the background
the back is just a grayscaled screenshot with low brightness
basically just SVG filters at that point
ehh if you're trying to focus everything then yeah its pretty dark
Tay
Tay
02:06
yeah, kinda thought so
maybe I should try out text shadow too
and less dark background text, more light background blur
Only reason I resorted to CANVAS of all things, was because I was too lazy to update a perfect centering text manually on paint.net, and I wanted to just generate them via an episode number and name
I would show you the preview of how it looks in the channel, but the video is 30 gigabytes, its still processing after 5 hours :3
For some reason GeForce experience records in like 4k, so my videos are wayyy bigger than I want em to be.

Could also be that I record 30min to 1hour episodes
Jeeesus no way man hehe
Tay
Tay
most of my "totally gotten for free movies" arent even 3 gigabytes
:3
then again, american movies are 30fps usually, while I record at 60
02:56
Hi I am trying to do a simple todo application using vue js everything is working fine but in my app I am having a checkbox at the top after the add icon the problem is when I check it the todo items are been striking but when I uncheck it the striking from todo items should go off but it is not been working can anyone help me here to achieve this
The codepen link is https://codepen.io/lakshmi123__/pen/MWwQKJw
03:06
yeah just a sec
03:39
@Unbreachable Okay.
03:53
Okay im back lets see what i can do about this
Yeah Ok @Unbreachable
Hello can anyone help me?
@RaminK 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.
Please?
just ask someone might
03:57
I have a google sheets file. When we hit next month, google should save this google sheets file under the previous month's date.
For example, we're in March right now. When April 1st comes, I want google to save the current file under March 2020 file name.
Also this has to happen automatically.
Also i have the code but its just doesn't work properly.
can someone please take a look to see what I am doing wrong?
@G.Lakshmi okay i don't really know vue but am willing to go throuh this together
ive been studying it and want to ask some questions, hopefully guide you there
Okay @Unbreachable
can someone please help me too?
Okay so i looked at the code and see you have 'allDone' for the checkbox
so thats what checks them all right?
04:09
@Unbreachable do you have time to maybe help me too please?
Okay so where is the func that is suppose to remove the line?
I need help with app script in google sheets.
Ill see if ill be able to
the function that removes the lines, where is it @G.Lakshmi
I didnt wrote that function @Unbreachable because I thought checkbox in default should have the nature
Oh i see
Well you actually need that, cuz I see you have ' .done{
text-decoration:line-through;
}' and once that is checked, it will stay there perm
04:11
Yes because for every individual todo list item there is a checkbox it is working like that but why not working for this checkbox at the top
You need another func that will remove the decoration
but for individual checkbox I didint wrote any func for removing even it is working??@Unbreachable
@RaminK can you share the code?
oh wait
yeah see once
okay so ' .done{
text-decoration:line-through;
}'
is actually for the individuals?
04:14
no for all it is been working
@Unbreachable sure can I go ahead with the file sharing of my google sheets?
emm lets just see what you have
@RaminK 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
1 message moved to Trash can
@Unbreachable Sure here it is:

function myFunction() {
  var oneMonth = 1;
  var DocSaveTriggerDay = new Date();
  if(DocSaveTriggerDay.getMonth()+oneMonth){
    ScriptApp.newTrigger("myFunction")
    .timeBased()
    .onMonthDay(1)
    .create();
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var copyVar = ss.copy("Copy " + ss.getName() + " " + (DocSaveTriggerDay)-(oneMonth));
  }
  /////////////////// Now, find a way to clear the content after the copying is done.
  if(copyVar){
    var first = ss.getSheetByName("Sheet1");
@G.Lakshmi can you actually create another function?
04:21
what for deleting right?
allDone(){
			this.todos.forEach(todo =>{
				todo.done = true;
			});
		},
  This puts the line throught them, so create another that will undue that, yes
but checkbox is not a button right it is a component should toggle how can we write two functions?
allDone() is what makes the line through them right?
@RaminK okay where do you think you're going wrong in this function? any guesses?
@Unbreachable well I think the top part where I am trying to calculate the month.
@Unbreachable here is what I am trying to do: for ie. we're in March. Right? ok. I want the google sheets for this month to save itself automatically under file1-March 2020 as soon as we reach the date of april 1, 2020
@Unbreachable and vice versa as we go on.
@Unbreachable as of right now, I have no way of testing this since I believe this code uses Google Cloud's system time, meaning even if I set my computer's date into the future, it won't use that date. Also the file saves but it says file name of NaN.
Ugh sorry guys its really hard to do this alone
im going to keep trying, but anybody can help each other...
04:32
@Unbreachable is it?
I believe yours is pretty easy @G.Lakshmi im just not experienced in vue
You should have one function that toggles the line decoration
@RaminK wait, you haven't tested the code?
yes esay but not getting the thought
I have but not sure if its using my computer time or not.
I believe since app script is on google's platform, maybe its using their system's clock instead of mine.
machine's
Hi All
im using JEST for unit testing my node api
below is my structure
root
 // controller -- admincontroller.ts
// repository -- baserepository.ts
//tests -- admincontroller.test.js
my admin controller has a function which fetches user information by communicating with the base repository where in my mongoose model is defined. BaseRepository communicates with mongodb
04:48
so if i write a test which hits the adminController to fetch the users i gets the issue of
    expect(received).toEqual(expected) // deep equality

    Expected: {"message": "Successfully fetched"}
    Received: undefined
below is my test case
const adminController = require('../../controller/admin/admincontroller')

// this test case passes where i check is the  country function is present
test('check if countries function present', () => {
    expect(typeof adminController.countries).toBe('function')
})

// this test case fails
test('get countries from admin', () => {
    expect(adminController.countries()).toEqual({ message: 'Successfully fetched' })
})
05:40
Hello
So I have a very general question, I have a project and a part of that requires displaying the contents of a csv file on a webpage in form of a table
But the file is getting constant updates, so the page should adjust according to file data
How is this achieved using javascript
05:58
@G.Lakshmi
nvm
@Unbreachable yes
I "figured" out a way, It seems to "work" but its....buggy so nope
Do you have experience with vue?
no experience I am just learning and doing this app is also the practice in the process of my learning
Are you following any tutorials?
yes vue mastery and traversy media tutorials but this functionality is not available in tutorials I just on my curiosity doing this
06:13
This is pretty tricky
yes
@Unbreachable
okay so lets say we have 3 boxes
you mean checkboxes right?
two are checked and one isn't, so when you click on the main checkbox the two are going to be unchecked and the single one is now going to be checked....
yeah see what i mean
06:17
so there is going to be more logic involved
Are you using the func 'oneDone()' ?
So why is it there?
Your not just copying and pasting without actually knowing what it does, are you?
I forgot to delete it when I tried for it
I didnt get you @Unbreachable
06:21
Are you actually taking your time to understand what every line does?
the most naive way I can think of something is making a separate function
so another checkbox alongside it, but simply making todo.done = false :/
Well im going to head out, just keep trying on your own, you'll get it. cya
ok thankyou
06:44
Hi, I am new to testing. I would like to know, is it possible to test one API end point against possible inputs without writing test case for each and every possible input?
07:31
@Dramorian you usually can't test every possible input
much less every combination of every possible input
generally you wouldn't want to either
you want to test only what is allowable input
this includes everything that you validate (so you verify error responses to bad input as well if you're validating it)
hiya
For a lazyloading datatable (vuetify/vuex), what do you guys think would be better:

1 - fetching the data once, but then showing to the user "on demand"?

2 - fetching the data "on demand", so whenever the user goes to a new pagination, I make a new request to my API (the API does implement limit and offset)
@FelipeOliveira both have their advantages and disadvantages
1 favors performance over memory and 2 favors memory over performance
so ultimately it depends on how many records you expect to have I suppose
just don't make the mistake if you use 1 to turn all data into html all at once
keep it saved in a variable until you need it
yeah, I'd probably let in on the "state" and the slice from there the needed data
but you're totally correct
there is no correct answer
07:44
just a tradeoff really
for me personally, I would never use method 1 if A) there are more than 1000 lines to fetch or B) potentially there may be more than 1000 lines to fetch in the future
you can also go for a third method, which is just a hybrid of the two
fetch 500 lines at a time
your client can make it seem transparent
and seem like you're moving through pages 100 at a time
that is a good idea, if the user tries to access a page that will surpass the 500 records, I just need to make a new request and then append it to what I already have.
it also means you have to make pagination work both clientside and serverside
so I guess the tradeoff here is more development time
but it's the best compromise
for sure!
thanks for the help!!
no problem :)
Thanks @Neil
@Neil do you recommend writing test case for each possible input or we can implement loop for array of inputs
07:56
@Dramorian I recommend you write a test for each logical type of thing you want to verify..
@Neil Okay. Thanks :)
if you wrote a webapp that takes two numbers and adds them together and returns the result, I'd write a test to verify that an error is thrown if one of the two values is missing, I'd write another to verify if one or both aren't numbers
and then I'd write a test to verify that given two numbers, it works for negative numbers
and possibly another to verify what happens when very large numbers are passed
the idea behind test-driven development is also this, that you write the test before you've written the code because it helps you formulate what should work and what shouldn't
you're going to wind up with a lot of tests, but you can group similar tests
yeah, already feeling that pain :P
which library will be good to start testing with?
but just to say, I wouldn't like create a for loop with two numbers of every possible number and add them together to see if it works
I tried Jest+supertest
@Neil (y)
08:00
karma is a decent library for node
are you using node?
yeah, we have node based APIs
you could give that a try
ideally you automate the testing
add it in the build phase such that all tests pass
in that sense, doesn't matter too much if you have a lot of tests
some testing libraries will allow you to label the tests, so you could say, launch only specific tests of a particular aspect or API
yeah, that will be good
08:28
@KarelG yeah, for autocomplete
they finally made that a thing
Hi, I'm having an issue with dynamically loading images in react. the component is loading in fine, 200 status code in the network pannel for the image, but still doesn't display it. If I go to the path of the image, it shows a blank page with the Navbar component, makes me think the router is interfering when the app is loading the image. any ideas of how to solve it?
08:46
is it not odd that you have a navbar component as view?
if you want to get images, you get only that. No other "stuff"
yeah, I've never been a big fan of receiving html from a server unless it's the freakin' web page itself
09:09
@KarelG I don't. that's what is very odd.
are you sure that it's not an error page?
could be that there is an issue to get the image and you got rerouted to it
check logs. debug it
Hey all o/
does anyone know how to debug that?
I tried to remove all unnecessary lines of code to simplify it as much as possible.
// <div data-jsonObj='{someJsonObjectInStringFormate}'> </div>
//<button id="btn"> </button>

function getData(allData){
  console.log("allData = ",allData);
  const newJsonObj = JSON.parse(allData.getAttribute('data-jsonObj'));
  console.log("newJsonObj = ",newJsonObj);
  console.log('newJsonObj.id = ',newJsonObj.id);
  const varA = newJsonObj.id;
  console.log('varA => ',varA);
    document.querySelector("#btn").addEventListener('click',function(){
      console.log('varA ==>---(changes on the second time to the original value)- ', varA);
@KarelG seems to be rendering the component twice.
09:14
basically I have multiple div with data-jsonObj attribute.

for some reason when i call for function getData(allData) where allData is the div and extract the json object from it
NewJsonObj.id is correct the first time only , lets say was equal to 1
but when i try it again
console.log('newJsonObj.id = ',newJsonObj.id); // returns the new value (2 for example)
console.log('varA ==>---(changes on the second time to the original value)- ', varA); // returns ( the previous value "1")
@GunthervonGoetzenSanchez 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
@GunthervonGoetzenSanchez 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
    //so basically

    //first time
    newJsonObj.id = 1
    console.log('varA => ',varA);// returns 1
    console.log('varA ==>---(changes on the second time to the original value)- ', varA); // returns 1
    ----------------------------------
    //second time
    newJsonObj.id = 4
    console.log('varA => ',varA);//returns 4
    console.log('varA ==>---(changes on the second time to the original value)- ', varA); // returns 1
How would you write this more elegant?
if (size === 50) {
  style.width = windowWidth / 2;
} else if (size === 70) {
  style.width = (windowWidth / 3) * 2;
} else if (size === 30) {
  style.width = windowWidth / 3;
}
@GunthervonGoetzenSanchez put it as an object
09:22
const multiWith = {
  30: (1/3),
  50: (1/2),
  70: (3/2),
}

style.width = windowWidth * multiWith[size];
@KarelG 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.
@KarelG unformattted code.. tsk tsk
accidentally pressed enter
😐
also if you think the value passed may not be 30, 50, or 70, you should check first
correct
best to wrap it as function
09:23
if(multiWith[size]) {
    ...
}
or that
ok i did some investigations and turns out that it actually runs multiple times for just just 1 click.
// <div data-jsonObj='{someJsonObjectInStringFormate}'> </div> <--- multiple div
//<button id="btn"> </button>

function getData(allData){
  console.log("allData = ",allData);
  const newJsonObj = JSON.parse(allData.getAttribute('data-jsonObj'));
  console.log("newJsonObj = ",newJsonObj);
  console.log('newJsonObj.id = ',newJsonObj.id);
  const varA = newJsonObj.id;
  console.log('varA => ',varA);
    document.querySelector("#btn").addEventListener('click',function(){
      console.log('varA ==>---(changes on the second time to the original value)- ', varA);
does anyone knows why??
09:39
@GunthervonGoetzenSanchez fyi, scroll up
just to ensure that you don't miss it. Add that if check in Neil's comment
10:06
Morning
 
1 hour later…
Tay
Tay
11:19
hey..
hola
Good Morning. Can I ask cordova issue here?
Tay
Tay
Cordova?
It's a grey area, depending on the context
guys I'm not crazy right ?
this is not a normal behavior for addEventListener , right ?
11:25
@diamond one of the most common mistakes when it comes to addEventListener is that you may add multiple listeners
they'll all be triggered too. Generally you only want something to happen once
I don't know if this is your case, but you should definitely verify
you get unexpected behavior when this happens
Tay
Tay
Diamond what is this....
  console.log('newJsonObj.id = ',newJsonObj.id);
Why are you concat with a replacement string..
and also, if you ARE going to do that, place %s at the end of the string. That tells it where to place the 2nd argument
the button is inside bootstrap modal, That might be the reason why it behavior.

the madal appears with some inputs and 2 buttons, Only one of them has addEventListener while the other is triggered by bootstrap (data-attribute ) so yea It probably have addEventListener.

but the problem is it keeps remembering the old value of varA and execute the old ones before the newer value, Which is so weird.
@Neil @BenFortune
@Tay This is not a string and "console.log' doesn't replace anything.
@diamond Sure it does, if you use the replacements
@BenFortune what ?? that is normal ?
11:32
!!> console.log('%s = %s', 'foo', 'bar')
@BenFortune undefined Logged: "%s = %s", "foo", "bar"
@JBis Fix your output
Hi All,
Tay
Tay
Still, why are you using a string replacement in console.log
just concat it
@BenFortune I meant in my case it doesn't, I'm just logging its value in attempt of debugging.
11:33
i have implementation of Mocha Chai for my unit testing of node api
@Tay lol that's medieval
use template literals
Tay
Tay
Or that, which is better looking
im trying to do something like this
expect(res.text.message).to.equal("Successfully fetched");
Tay
Tay
Ah once again, the mysterious "cant add event listener of null" error where theres nothing different and the linter says the js is fine..

Good god.. https://jsfiddle.net/SirCode/02bvfz9g/
my response is a JSON wherein text has below props
"text": "{\"response\":-1,\"message\":\"Successfully fetched.\"}"
11:35
@Tay Linters don't do typechecks.
Unless you're using typescript obviously
or flow
Tay
Tay
Nah, i typically go vanilla everywhere
Sorta gotten into TS recently, but its uninteresting
@SamSam That's JSON, you need to parse it
Tay
Tay
Id rather use babel
@KarelG @Tay I'll try them later.
but right now I need to focus on stopping the event Listener from remembering the older value and execute it.

not sure why it behaves this way.
You're uninteresting
Tay
Tay
11:36
:- (
@Tay you are trying to find an element which is not in the DOM (yet)
either run the script after load or after the element got added
there are various ways to handle it
Tay
Tay
It is, I think im placing a class function which I never actually wrote
@BenFortune u mean the response object, first i will have to parse and then expect?
nah
Tay
Tay
I have all the elements
Check the dom
11:37
it is not
read it again
Tay
Tay
Found it
query("sprayer").addEventListener("click", () => {
	cvs.style.pointerEvents = "none";
	draw.dragAndSpray(10);
});
> you are trying to find an element which is not in the DOM (yet)
Tay
Tay
draw.dragAndSpray isnt a real function
Ill add it in and try again
Im pretty sure I have all the dom...
@SamSam JSON.parse(res.text)
oh did not see the typo
my excuses
the element is there
Tay
Tay
11:38
oh.. its actually the same function, nevermind... *sigh*

"spayer" in html, "sprayer" in js...
ffs, Im a slow ass toaster
guys could you confirm that the way the addEventListener behavior is not normal in my case or not ?
don't have interests and time to check your case atm :P
@diamond It is, you're using it wrong
maybe I gave it a reason to reference the older value as well as the newer ones.
@KarelG no problem , **** just kidding lol
@BenFortune how is that ?
We aren't your personal debugging service, I'm sick of seeing you vamp in here
11:41
vamps begone
....
Tay
Tay
Well, diamonds pretty far from a vamp. Atleast a bad one, like some that weve seen here
@Tay Sounds like you don't know what a vamp is
Tay
Tay
"need help, give me code"
"Did no research, sorry, it not work, wats wrong??"
@Tay *does a Homer-Simpsons-suspicious-look at you*
Tay
Tay
11:42
LOl
pepelaugh
You're not far off yourself
Tay
Tay
poggers You aint wrong buddy!
@BenFortune thanks but I'm not usual in here, anyway thanks.
@diamond I see you in here every day
Asking the same basic stuff instead of doing your own research
11:45
@BenFortune I'm not , I was only here few times this week, And I only log if I don't know what I need to research or I failed to find what I need but that is ok
thanks
You're welcome
Tay
Tay
Im so smart...

I just spent the last 10 minutes looking at a typerror, because I firstly mispelled the element, and then afterwards, realised that I had no period to delcare I was selecting a class....

Big Brain Time
keh, this one has a re-open vote stackoverflow.com/questions/60615836/…
imma b-slap figuratively that person
aww, can't delete it if it has a re-open request

« first day (3434 days earlier)      last day (1736 days later) »