« first day (2489 days earlier)      last day (2457 days later) » 

11:00 AM
> "seconds": 500,
 
sounds like old... tho, age shouldn't play a role
 
There isn't even a seconds option
 
I only release my nightly builds during the day.
much rebel
 
@BenFortune removed but same issue jsfiddle.net/sagarvd01/uddL3mwj/1
The problem is it generated from a Content Builder
client drag and drop slider, add text, set effect and the angular app should produce code for this
this is generated code
 
Have you actually read the docs? Half of those options don't exist
 
11:03 AM
@Loktar @KendallFrey @FlorianMargaine i.redd.it/abfupijrymez.jpg
 
Wednesday > Thursday
 
@BenFortune only missing autoplayTimeout instead of slidespeed but no update
it's owl 2
 
@SoMeUsEr Remove "animateIn": "flipInX",
 
"items":1
 
@BenFortune thanks it's working fine. but how to add animateIn
 
11:12 AM
use more than 1 items and it works! problem solved. just change the design.
 
30 mins ago, by GNi33
@BenFortune I think that option determines how many items" it shows in one "slide"
 
@rlemon it is the number of items that should be shown in a view
 
God lemon, get with it
 
yea, sure. but it doesn't stop on the second animation anymore
PROBLEM SOLVED
 
removing animateIn solves it but how to add animation on slide change jsfiddle.net/sagarvd01/uddL3mwj/4
 
11:14 AM
@KamilSolecki :)
 
@SoMeUsEr It accepts a class, you haven't defined the "flipInX" class, RTFM
 
i knew it. I freaking knew it.
 
@BenFortune included their animate.css raw.githubusercontent.com/daneden/animate.css/master/… but still it's not working
flipInX is defined in it as keyframe
 
@SoMeUsEr And you've added the animate class too?
 
yep, something something animation class
 
11:22 AM
whoa thanks @Ben
 
still this is weird behaviour that it simply stops after one slide
 
now I have to add all these things in angular which generate this code crap
 
@GNi33 I've seen it, but can't reproduce
 
no one can
It's my time. my bad time
 
It's my *time*
It's now or never
I ain't gonna live forever
I just want to code while I'm alive
 
11:37 AM
is this how promise works
function Promise(fnSentToPromise){
	this.setResultToThen = null;
	fnSentToPromise(resFn, rejFn);
  this.resFn = function(resolveVar){
  	this.setResultToThen = resolveVar;
  }
  this.rejFn = function(rejVar){
  	this.setResultToThen = rejVar;
  }
  this.then = function(fnToExecAfterPromise(response)){
  	var newPromiseFromNewFn = 	fnToExecAfterPromise(this.setResultTothen);
    newPromiseFromNewFn()
  }
  return this;
}
 
function doSomething(){
	var retPromiseObj = new Promise(fnSentToPromise(resFn,rejFn));
  function fnSentToPromise(resFn,rejFn){
  	if("a"==="a"){
    	resFn("a");
    }
    return retPromiseObj
}

var promiseObj = doSomething();
promiseObj.then(fnToExecAfterPromise(response){
	console.log(response); //a
  return newFn;
}).then(function(res){

})
 
@Abhi That doesn't make any sense to me
It looks like then calls the callback right away, which is wrong.
 
it wouldn't even being compiled
 
Also you're using the wrong syntax for function passing and it confuses me
 
I suggest to "forget" everything about promises and re-read the information about it on eg MDN
 
11:43 AM
Can anyone open preprod4.tipranks.com in IE11 and tell me why the menu behaves like that when you scroll the page?
Because I have no idea what I'm looking at
 
@Abhi Possibly the cleanest way to implement Promise is to make it use an EventEmitter and have then add event listeners.
 
@KendallFrey sorry about "wrong syntax for function passing". i haven't written enough of my own javascript. but is this how Promise does it internally and yeah i thought about the then being called immediately
or does it not make any sense at all to you
 
@MadaraUchiha what exactly do you mean? looks fine to me
 
Well I can mostly work out what you meant re syntax
 
@MadaraUchiha IE11? heh
stop working on frontend, that'd help
 
11:53 AM
Hi, are working principles of "for" and "array.foreach" the same?
 
@Proxy resize it to smaller and then you can see the 3 bars (like the one in bs nav bar) scrolling page will scroll only the menu
@MadaraUchiha Did you prevented body scroll?
 
@Proxy It behaves like position: sticky instead of position: fixed
 
@jason no. forEach can only be used for array
 
@SoMeUsEr No, I want body scroll, but I want the menu to be fixed
 
then on resize, why only the menu get scrolled?
 
11:54 AM
@SoMeUsEr Thanks. What about, iterating an array? Do both of them work on the arrays in the same way?
 
possibly
 
dunno looks fine to me
the menu gets scrolled when you have it open, when tis closed the page is scrolling
 
var temp = moment(company.windows[0].inTime) where inTIme = 8:00
anthing wrong?
 
Then how can I make a loop iteration to wait for the current one?
 
@Proxy can't check already closed that thing
in previous versions of windows I used that thing only to download chrome
but since win10 have edge, I am using that to download chrome
 
11:58 AM
@SoMeUsEr me too :D
 
@jason show us what you're trying to do
 
but I'm using it to download firefox
 
sounds like you've got an async operation you want to queue up
 
@SoMeUsEr What?
 
@MadaraUchiha nothing it's another one
2 mins ago, by Proxy
the menu gets scrolled when you have it open, when tis closed the page is scrolling
 
11:59 AM
@rlemon yes, that's what I'm trying to do, but my code is like 400 lines of code
 
does the async function take a callback or return a promise?
 
Is tree shaking supported in Webpack 3?
 
permalinks looks bad. better flag for mod to show that message to you :D @MadaraUchiha
 
@SoMeUsEr What are you even talking about?
 
12:00 PM
I highly doubt that they dropped that
 
@MadaraUchiha stroke?
 
@rlemon I'm suspecting so...
 
@rlemon it is more like for() {do a db call}, in each iteration it does a db call and each iteration is dependent on the result of the previous iteration
 
@MadaraUchiha call a Bondulance
@jason yes... but that db call is async.
so it either takes a callback or returns a promise
or neither, which makes it worthless here
 
@SoMeUsEr what's wrong with the permalinks?
 
12:03 PM
so, what should I do? How can I do with callbacks?
 
@KamilSolecki have to do 3 steps to get the permalink. no one click option
 
@jason you need to re-read what I'm asking and answer me properly
 
@SoMeUsEr ehm - no. dropdown arrow -> permalink.
 
@KamilSolecki dropdown arrow -> permalink -> right click and copy address
3 steps
 
@rlemon I'm sorry it's promise.
 
12:06 PM
112
Q: Resolve promises one after another (i.e. in sequence)?

XåpplI'-I0llwlg'I  -Consider the following code that reads an array of files in a serial/sequential manner. readFiles returns a promise, which is resolved only once all files have been read in sequence. var Q = require("q"); var readFile = function(file) { ... // Returns a promise. }; var readFiles = function(f...

0
Q: How to run an array of promises in sequence

Di YeI need to run some promises on an array of items but I don't know the length of the array. How do I run these promises in sequence? This is how I do it asynchronously: const arrayABC = [a, b, c.....x, y, z] // length unknown const promises = arrayABC.map(function(item) { doSomething(item) ...

lots on SO if you search for 'run promises in sequence'
 
@SoMeUsEr duh, come on, its not like its Sisyphean task.
 
Thanks, they look like they can solve my problem.
 
??
 
@GNi33 I get a JS error with HotModuleReplacementPlugin, but other than that, upgrading from 2 to 3 was a yarn add away
 
@SoMeUsEr Sisyphean task = hard pointless work
 
@KamilSolecki found this en.wikipedia.org/wiki/Sisyphus
 
yes, its a phrase with a mythological background.
Out of curiosity, do US/Canada people read mythologies in school?
 
no idea
 
@KendallFrey blows my mind that I'm casually watching some rover roll around on an alien planet on freaking youtube.
 
@KamilSolecki We read the bible
 
12:11 PM
not in school
 
Hello guys, can anyone help me with a jQuery doubt?
 
@KendallFrey I thought thats even one level above fantasy :D
 
we learn about Greek mythology in school and all of the old school shit, and a bit about native gods and religion (the history of them, not current beliefs)
otherwise, they're elected courses.
or you go to catholic school.
 
oh, I see.
 
Can we use insertBefore() and insertAfter() in same function. Currently the first line is getting replaced by second line.
ex: $('div[template-url="templates.pagination"]').insertBefore('.table');
$('div[template-url="templates.pagination"]').insertAfter('.table');
 
12:13 PM
Here, its in the schooling standards to read both roman and greek mythologies
 
my HS has an elective course called 'world religions'
I didn't take it, but I heard it was good.
 
In this case only insertAfter('.table') is working
Any idea how I can make both the functions work ?
 
@KamilSolecki my public school touched on the religions, but we're pretty strict that the school shouldn't be favouring one over another. Greek Mythology aside, because it's just some crazy cool shit
 
I really liked reading them too.
 
@Phoenix generally speaking no, because you're inserting the same items in two places
 
12:15 PM
How do you make a webRTC connection, cross browser
 
Also, many phrases that are in common use in polish originate from mythologies
 
that's like saying "put my apple in the drawer, then put it in the cupboard" where is the apple now?
 
every single example is in the same tab
 
if you want the item in two places, you need to clone it
@KamilSolecki that's basically the same for everywhere I know of.
damn Greeks planted their seed wide and far
 
@rlemon : Okay I understand. But can you suggest any other way I can do this? I need to add pagination to both top and bottom sides of the table
 
12:19 PM
2 mins ago, by rlemon
if you want the item in two places, you need to clone it
 
@rlemon : I am unfamiliar with Clone. I tried it like this:
$('div[template-url="templates.pagination"]').clone().insertBefore('.table');
$('div[template-url="templates.pagination"]').clone().insertAfter('.table');
but it didnt work. Am I doing it wrong?
 
is there an element with class table?
 
@Phoenix jsfiddle.net/fL65wekz no clue bud
unless you make a non-working example.
 
@rlemon : Thanks a lot :)
Changing it in to $('div[template-url="templates.pagination"]').insertBefore('.table').clone().insertAfter('.table'); fixed it
 
:hides:
 
12:30 PM
@rlemon why did you even do the insertBefore call in that example?
 
@GNi33 because he wanted to insert before and after. I can only assume his html is not as simplified as mine
 
ah yeah, of course
 
can i avoid the error "Cannot read property of null" while using "for loop" somehow? To check in between if the property exist? :/
 
@rlemon : Your example helped to fix the issue :) Thanks a lot
 
got another problem. when the client making multiple slideshows with multiple configuration, one settings applied to all. can't use $('.owl-carousel') need something unique
 
12:33 PM
@CrissCrossCrass to check if the item exists.
item[index].foo() // cannot read foo of undefined
means items[index] is undefined, not foo
 
if that happens in a for loop, then something is borky
 
@SoMeUsEr So use an ID
 
in a classic for(;;) it's not that unheard of
 
@CrissCrossCrass here
 
don't use for..in on arrays.
or even objects really.
don't use for.. in basically.
 
12:36 PM
if (index in item) item[index].property;

for (index in item) item[index].property;
That's your preference mate
 
no it isn't
 
i showed two examples to fix problem
 
is there a remote to forward 1:30 hours
 
youre fixating on the thing you dont like
as if I gave incorrect solution
 
office time will be off then
 
12:37 PM
you did
 
Also he wasnt even speaking about arrays
 
for..in loops over all enumerable properties.
Probably not something you want
 
we don't know the problem, your solutions are probably not the best solution, and are in their current form wrong.
 
slow down
he said hes trying to use a for loop...
 
thanks... so many answers :o
its not about arrays..i short i try to read a html table by the amount of cells.item.length.. thats why i need to check in between...because this table is absolute felxible..sometimes is an empty cell..sometimes an emtpy row...etc.
 
12:38 PM
and can't access a property on null. meaning he's accessing a item in the iterable that doesn't exist.
 
thats why you check if the key is in item before trying to further access property.
if (index in item) item[index].property;
or even:
index[item] && index[item].property
 
typeof
 
in C# you can do:
 
@Tobiq ahh yes, that makes sense! thank you.. i will try to figure out the code :D
 
@Tobiq That will fail if index[item] can be falsey (false, 0, etc) and not just undefined
So you should only use that with objects/arrays/functions
 
12:41 PM
littering property checks in might not be the solution. can you make an example?
 
Which are always truthy.
 
thats why i said you can use index in item.
 
looking up elements shouldn't be complicated, and shouldn't require additional checks.
 
@Tobiq Yup, that would work.
 
im just giving solutions and ppl are fixating on minor edge cases
 
12:41 PM
because we still don't have a full picture of the problem.
 
@rlemon I want a null coalesce operator
 
"?." i miss C#
 
foo ?: bar;
 
@MadaraUchiha yes, that would be handy in certain situations. isn't it under consideration?
or was I dreaming.
 
@BenFortune That, and also foo?.bar?.baz
@rlemon Stage 1 methinks
 
12:42 PM
I didn't know you can't use that in JS, but I've used in PHP
 
so it'll land in 2020 with ::
 
@Tobiq with "for loop" we usually mean for(let i = 0; i < ..; ++i) (or variations on that). Other for loops are "for in" for( ... in ...) or "for of" for( ... of ... )
 
nice
 
its only syntactic sugar, though
 
It's called the Elvis operator. :?
 
12:43 PM
@Tobiq it's really not tho.
 
@KarelG what r u geting at?
 
@MadaraUchiha ?: , yes
 
@MadaraUchiha doesn't look like an old dude on the can to me
 
looks like a guy with a tumour
 
12:44 PM
@BenFortune it's nat a tumaa
 
!!s/tum/hum
 
@KarelG That didn't make much sense. Use the !!/help command to learn more.
 
pleb
 
;_;
 
@MadaraUchiha TS has that, right?
 
12:45 PM
I can feel the disappoints
 
TS can eat my ass
 
And you can eat mine
 
mmmmmmm
 
if you're going to go to all that effort, use a real programming language
 
they are
JavaScript
 
12:46 PM
real
 
dat crowd disappointment
 
I'll never not star that
How's your wrist btw @rlemon?
 
as good as it'll ever get
so, 80% ish
 
how about the head thing? Got better?
 
12:47 PM
seems to be getting better
 
thats great
 
doctors appt in a week and a half to follow up
 
:38577564 I WANTED TO STAR :/
@rlemon can you drive already? Or you still choose not to?
 
@Tobiq wrong
 
@KamilSolecki doctors said don't. I'm not legally barred
 
12:54 PM
@phenomnomnominal Fact, source: common sense
 
@KamilSolecki Nope
 
I'd love you to back that up
 
@Tobiq "a real programming language"
You know? Pretty much every language ever got that. "C? C is slow and useless, use Assembler, that's a real programming language"
 
nvm me, thought its to a different message.
 
might as well use Scratch, then.
 
12:57 PM
@Tobiq here, use this:
 
That looks efficient AF
 
if it gets the job done, i'll use anything.
 
that reminds me of a small TM I've created once
 
I prefer to manually move electrons in the CPU with my finger nails
 

« first day (2489 days earlier)      last day (2457 days later) »