« first day (2481 days earlier)      last day (2692 days later) » 

09:00
Almost got me there for a second
@MadaraUchiha lol
almost got me too :P
anyway
it's way past my bedtime
gn
I have an angular 4 application with 6 components. when building using
ng build --target=production --environment=prod --base-href=C:\Users\acer\Desktop\WORK\BlogApp%20-%20Copy\CV\dist\
It includes only app component
it excluding components I refer via routing
@towc nodejs provides tons of APIs to do stuff like starting a server?
uh when I click 'prevent this page from opening any additional dialogs' it freezes jsfiddle
I feel like im not enjoying my stay in this company.
in terms of work
09:10
Be glad that we don't send you to the mines!
I should use break; more I guess
@lemon Usually, one is enough
Coffee time!
  h1
    a
      transform translateY(-34%)!important
      -ms-transform translateY(-34%)!important
Seriously, what the hell am I looking at here?
why do people bring babies in a library >:/
09:15
@lemon Because they want to go to the library
@MadaraUchiha This reminds me of all the bytes wasted by including CSS rules that will never ever be used by any version of any browser
And prefixes that don't exist
That's not an example. But things like @-ms-keyframes { ... -ms-transform: translateX(...) ... }
ms-keyframes?
how can I add 9 array elements but using array = [] not new Array ()
new Array (9) makes 9 elements
@lemon if you wanna define what goes in, you can: array = [ 'foo', 'bar'] etc
doing var arr = [9] does not make 9 elements
ah but im dynamically defining the data with Number(prompt())
09:27
Wait , can you show what youre doing
ok 2 secs
> How do I create an array of N elements without using the most obvious way to create an array of N elements?
because using new Array is bad apparently
If there is array(x) why not use it? @lemon
09:29
@lemon It's not. People are just stupid
ohh
Arrays don't work like they do in say Java or C++
And new Array is "bad" because stupid people think new Array(9) would give them the result of [9]
For small arrays, it's treated like a map
And also because you can just redefine Array. Again, stupid people :P
09:30
Also, in most cases in JS you wouldn't really need to def. array size, right?
Since it's dynamic
It can have its uses
!!> var arr = []; arr[6] = "Hi"; arr
@Neil ["undefined","undefined","undefined","undefined","undefined","undefined","Hi"]
hello chat~
A question about git: Why I have to 'git fetch' before 'git checkout' remote branch?
@OliverSalzburg it can, but I was stating that it's more often not neeeded. (Please correct me if I'm wrong)
09:33
@N1ng Because you might not have it locally otherwise
@KamilSolecki I agree
So by default when I 'git clone' some repository, I'd only get master branch?
@N1ng No, by default you get all branches of the remote you clone from. However, the branch you want could be from a different remote or it is not fetched completely
As in, the remote could have more commits on that branch. By fetching, you update your local copy of that branch
It's not required to always do it. Guides properly mention it for completeness and safety
Thank you:)
You're welcome :)
@OliverSalzburg No, he's @N1ng
I'll let myself out
09:38
can I define data within the new Array like new Array (a = prompt())
o/
@OliverSalzburg that construct is a special case. It creates an array with length 9 if the value is numeric. If it's non-numeric (eg new Array('9') then you get an array with length 1...
@Neil Luckily I was AFK to miss that
I recall that I whispered "what the hell" to the screen
09:41
yeah, it's one of the very weird parts
if more then 1 arguments, then len = # of args
._.
My coffee breaks are the best. @rlemon
apple cake + cream + ... another cream ? + coca = diabeeetuuuuuus
@KamilSolecki looks like a coke break
lemon you should meet rlemon
09:47
I dunno if I want to :)
yeah, he's mean
@KarelG + capuccino with double sugar
But it's "Canadian mean", so you probably won't even realize it
how come this acts weird jsfiddle.net/ozjwzq88/1
If I were a superhero I'd be diabetes man
09:49
in the alert() output, its meant to alert numbers inbetween the commas
@OliverSalzburg exactly, it's kind of fascinating
not like you blunt Germans
@KamilSolecki arch nemesis is insulin man
lol, I found there is a 'Fetch origin' button on my GitHub Desktop...
Wouldn't it be neat if unpushed commits and uncommited git changes were kept in a separate cloud-based storage?
So that I could pull my last changes from yesterday night to my work desktop now :'(
09:52
I stopped using github desktop right after I found out about console git
@KamilSolecki you mean... git
@OliverSalzburg ouch :(
I mean git commands yeah :D
the for loop should add a new number from prompt() to the array. array should have 9 thingys
@KamilSolecki I still sometimes use the built-in git prompts of PHPStorm
basically because I'm too lazy to alt+tab into the terminal
@lemon thingys or thingamajigs?
09:54
and if I don't need to do git add -p it's even the faster alternative
Or whatchamacallits?
indexes
@OliverSalzburg I propose a solution to this. why not use SVN?
@GNi33 as for windows, my absolute fav terminal emulator is cmder
Has all that it needs + looks hella good
I use babun
09:55
@lemon so go ahead, I won't stop ya
loved it at first, now I'm getting more and more sick of it
If you need a hint, just ask
@GNi33 How would that help with uncommitted changes?
@lemon why not array.push
im new lol
09:56
@KamilSolecki let him try on his own
@OliverSalzburg that's easy. have your project in a dropbox shared folder at the same time
I mean, that's basically how everyone does it, right?
just trying to make something not too complicated out of what I currently know
@Neil right, my bad. I'm too hasty
@GNi33 Well, I have 30 projects and those make up 100,000s of files with incredibly long paths. Two things that have caused massive issues in the past for tools like that
It can also fuck up your machine pretty hard when you npm i in a project that is backed by Dropbox :P
@lemon as a simple excercise on how to approach problems: try to make a list here of all steps that would logically happen if you want to get input from user and put it into array. Simple 1 2 3... steps, no code.
09:58
@OliverSalzburg hehe
@lemon if you know how to call prompt and you know how to loop, you know everything you need to know in order to do this
Might be a Windows issue or Dropbox developers that don't know how to Windows
...next time just branch it and commit/push ;P
I'm already on a WIP branch :P
ill try that
09:59
@Neil I believe he is making a common beginner mistake, which is just making it happen all at once
@OliverSalzburg a little temp WIP WIP branch never killed nobody
Without breaking it down to little steps
@KamilSolecki if we prevent him from making that mistake, we aren't doing him any favors
It's important that he messes up and understands why
@Neil that's why I gave him an exercise :)
@KamilSolecki nod ;)
10:01
@MadaraUchiha followig your Steps sempai
ah I fixed it
@KamilSolecki I got sick from yesterday's mac and cheese
thanks for being there for me
:P
I thought you can only add an existing variable to an array but then have to index it using index numbers in say an alert()
Should we help people that try to do shady things in JavaScript, like stopping an user from closing the tab
yes, but don't forget to troll them in the process
10:09
no! I hate web pages that do that
its really html5's fault
make them suffer
that this is now possible
@towc Oh shit forgot sorreeey
well, what he wants is worse than a "are you sure you want to leave" message
@Nick I assume not
10:10
@Nick ask money
he just wants to stop the user from closing the tab, without a popup
then donate it to the room 17 committee
let me guess, you are the head of the room 17 committee and in control of all its money?
Which is me & towc anti hackery PS fund!
@Nick changes are he's a dumb kid. Let him feel good, he won't get a chance for that later in life
10:11
PS totally doesn't stand for Personal use
!!afk lunch
@Nick well there is a way to prevent that but that happens rarely. Ya know, SO also stops the closing of tabs if you have text in a comment or answer ;)
its mostly spam websites that do this
it's just to ensure that you really want to leave without placing that comment / answer
it asks you to confirm if you have text in the answer (not comment iirc)
10:16
but I guess it could be used for good purposes too like to prevent the user losing a document in something like google docs
ah yes, only answer. my bad
@lemon Then you should just live cache it in local storage and retrieve when the user comes back
That is convenient and pleasant
yeah but autosave can save unwanted changes when you didnt want it to though
@lemon It's not saved. It's just cached until you save it
hmm
10:18
Google Docs does that AFAIK
In fact, they don't have a "Save" operation AFAIK :P
true
Well, they probably do, because people like to press that button
@OliverSalzburg my guess is that they added that button because users didn't like not having one
@Neil Sounds reasonable
Which implies it isn't even necessary strictly speaking
10:21
eh, nothing would happen if you click that button ?
didn't used it myself but that's funny for me
I sort of prefer still having a manual save button/keyboard shortcut since I save often
its like a psychological thing
No "Save" here
That's a nice resume template
I think it saves when you click. But if you think about it, if the document were saved upon each change, you wouldn't need to ever have to manually save it
I don't think it saves quite that often in this case, but still, saving once every 30 seconds is almost a guarantee
I always habitually press '<command+s>'. Even though it's not required, lol.
And if it saved on exit, again, no point having an actual button
10:23
Btw, I like google docs.
I like google drive.
I hate google docs
hahaha. 12 prisoners could escape in Alabama by using ... pinda cheese. Their plan is actually clever, but relies on a stupidity of a guard
"Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response."
I am getting this error and all search results mention that the problem is on backend
lookup for CORS :)
but the thing is all changes are there
on the backend for cors
10:26
you can either solve that or add CORS header
as mentioned in those thread
At my old job, they were trying to pass around a spreadsheet via email for revisions and the like, and though it wasn't my responsibility, I felt like I had to mention Google docs
those node.js settings to allow all header types and different types of requests are there in the server file
same stuff that numerous SO threads mention
@GandalftheWhite can I get the backend URL? to try it out?
Okay
you want me to paste it here?
or PM ?
indeed, looks good
ah, I think I know
@GandalftheWhite I think it's complaining that the value exists in the response's header
i.e. what if the backend responds with Access-Control-Allow-Headers: Origin, X-Requested-With, Accept?
you lost me there
10:33
@KamilSolecki following in my steps
But on what subject?
@MadaraUchiha Making exercises for people :D
@FlorianMargaine if a cors thingy is somehow don't pass through existing nginx config settings will I get an error on nginx's end
and the response thingy you mentioned? At least I should have been able to log in the request on that server right?
@lemon there you go!
@KamilSolecki You want more?
10:44
bbl
10:55
@MadaraUchiha sure, but I first need to finish setting up my boilerplate :)
@FlorianMargaine Last thing man I tried using this
and it works with this
this app generally adds allow-content header to the response
I googled and realized that it is generally replicated somehow with those allowthingy on the backend
but obviously it isn't working
just throw some light on this
very frustrated
@GandalftheWhite That is retarded
11:12
> 291,128 users
ok I guess
@GandalftheWhite And dangerous
I am dying here
@All hi.
Come on now
show the ligt
light*
I need some help in my existing code which has the logic to scroll down and load the content, but i want the reverse of that. I want to implement the scroll Up logic.
11:17
@KarelG You should read the reviews and check which sites people are using who run that addon
@GandalftheWhite Use the network tab to discover what's the offending headers exactly
And fix those
It's usually not nginx's fault, if you're using node, there's usually some middleware you need to configure.
It's usually not nginx's fault, if you're using node, there's usually some middleware you need to configure. - I did whatever those numerous SO threads suggested
if ($(this.bodyObject).scrollTop() + $(this.bodyObject).innerHeight() >= ($(this.bodyObject)[0].scrollHeight - 100)) {
this is the logic to fire and api call on scrolldown, but i want the reverse of this.
I checked but i dont found any method of scrollbottom to get the value of bottom.
@SamSam What's the effect you're after?
access-control-allow-credentials:true
access-control-allow-headers:Authorization,path,source,token,token_timestamp
access-control-allow-methods:*
access-control-allow-origin:*
content-length:0
content-type:text/plain
date:Tue, 01 Aug 2017 11:18:57 GMT
server:nginx/1.10.3 (Ubuntu)
status:20
@MadaraUchiha Response headers
that thing is already there in the response
access-control-allow-origin:*
11:22
access-control-allow-headers:Authorization,path,source,token,token_timestamp
@MadaraUchiha i will load some content on the scroll up event.
You sent a content-length which was not allowed
That's the error
@SamSam <= 100
That will match if you scroll to 100px from the top
Rather than 100px from the bottom
Which is what I assume you want
@MadaraUchiha content-length:0 same thing is there even if I switch on that plugin and then things work fine
@MadaraUchiha the code that i forwarded works for top to bottom logic , i.e mouse scroll down logic. When i scrolldown the mouse a certain action happens.
now i want some other action on mouse scroll up.
@GandalftheWhite access-control-allow-headers specifies which headers you are allowed to send
content-length isn't there
So you can't use it, unless you add it to the list
@SamSam That's not what this line says
11:25
Okay will try that
but please listen to this
when I switch on that plugin the response remains the same
in terms of content length
just one thing changes btw
the request origin is changed to origin:evil.com when I switch on that plugin everything else is same
That plugin is dangerous
And I would not recommend using it under any circumstance.
What also probably changes is that access-control-allow-headers: becomes * or something like that
@MadaraUchiha
"_onScroll": Library.debounce(function (e) {
            if ($(this.bodyObject).scrollTop() + $(this.bodyObject).innerHeight() >= ($(this.bodyObject)[0].scrollHeight - 100)) {
              this.triggerEvent({
                        event: "load",
                        sender: this,
                        trigger: {
                            self: false,
                            childs: true
                        },
                        data: {Dataobject: this.callObject}
this is my entire code
the value 100 will be coming from settings
What does the value 100 mean here?
💯
that is the amount of mouse scrolled
11:40
Magic numbers are magic
hello
Is anybody here?
👋
@MuhammadNouman assalamualaikumwarahmatullah
ya say how may i help you?
@kumbhaniBhavesh Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
11:46
when a non-coworker stars my github project https://t.co/VjiuSUbVCi
I'd need to have a github project for this... sobs
@GNi33 Make awesome-tweets - A curated list of awesome tweets
awesome-17 --- A curated list of the most off-topic memes posted to the bestest chatroom on the internet
tbf I got a ton of repos on bitbucket
just nothing that I feel like making public (just yet for some projects)
I really need to try graphql
github doesn't have free private repo's, feelsbad

« first day (2481 days earlier)      last day (2692 days later) »