« first day (1972 days earlier)      last day (2980 days later) » 

11:02 AM
@AboutLeros you forgot to set overflow to make the inner divs scrollable
 
@lost well you can use masonary.js
 
in css*
 
css-grid
or flex row
css grid died so flex rows
 
@Abhishrek tried once flex and i almost crushed my screen due to rage lol
 
honestly though use js
you cant go very far with css
and if you do your cpu usage will be over 9000
 
11:10 AM
@lost didn't change anything. :)
 
Can someone tell me what the point of $document is in Angular?
 
weird? in theory, your main container holding the scrollable elements, should be able to scroll - if you give your main container a fixed size/position + overflow

after that you'd be good to go.. i will work on it tho - made something similar
 
C.B
Hello guys need your help please stackoverflow.com/questions/35911015/…
 
@C.B 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.
 
C.B
11:26 AM
@CapricaSix thanks for the link, any help on my question please
 
0
Q: How to get dimension of uploaded image in jquery validation?

JohnI am uploading image and validating that if uploaded image is greater than 500x500 then generate an error. I am using following code to know the dimension. rules: { profile_pic:{accept: "png|jpe?g",imagedim:true} } $.validator.addMethod('imagedim', function(value, element, param) { ...

 
12:09 PM
@Cerbrus Don't see any real evidence
 
@Abhishrek mediocre
 
@BenjaminGruenbaum Link me better resource :-)
 
I found him kind of annoying but the 14 lecture series made me watch through
 
12:25 PM
@Abhishrek for what?
I watched the series and I love Meijer, I think it'd go over your head - read LYAH
 
functional programming
 
Read LYAH
 
@BenjaminGruenbaum vOv I find him kind of annoying
 
It's tedious but also sort of fun
 
not totally annoying.
Ok on it :-)
 
user3119231
12:26 PM
@MadaraUchiha I like football, this was funny, so +1
 
@Maurice nobody in the red team knows how to shoot
or ... the face shot was intended to hit his face
 
user3119231
"in ya face"
 
user3119231
@Abhishrek I'm working on a "game". actually it's just a slot machine. did you ever tried to create one?
 
slot machine ?
 
Slot machines are fun, randomized slot machine strategies are fun.
with racing
 
user3119231
12:30 PM
my plan: php create a random numeric array with a number for every "slot". If response on clientside the slots gets assigned. easy process, or?
 
const pattern = (Math.random() * 1000000).toString(64).substring(0, 3).map( char => path_to_images/${char}.jpg );
 
In probability theory, the multi-armed bandit problem (sometimes called the K- or N-armed bandit problem) is a problem in which a gambler at a row of slot machines (sometimes known as "one-armed bandits") has to decide which machines to play, how many times to play each machine and in which order to play them. When played, each machine provides a random reward from a probability distribution specific to that machine. The objective of the gambler is to maximize the sum of rewards earned through a sequence of lever pulls. Robbins in 1952, realizing the importance of the problem, constructed convergent...
Read @Abhishrek @Maurice
This is how real companies do A/B testing
 
:Ok
 
user3119231
@BenjaminGruenbaum very interesting, will read it soon. I'm wondering about the algorithms in the regular slot machines which can be found in the "casinos" nearby
 
@Maurice Is mine too honest ?
 
12:34 PM
@BenjaminGruenbaum btw just curious, do you agree with that guy saying "we discover these things, and not invent them"
 
user3119231
@Abhishrek yep. btw. I'm trying to recreate something like this: en.wikipedia.org/wiki/Multi-armed_bandit
 
user3119231
sry for triple ping
 
CCC -- COMBO, KO
 
user3119231
to be honest: I'm creating this because I feel a bit addicted to this machines. And javascript is the best medicine for this.
 
@Maurice you always lose to the house - this is for multivariate testing
The slot machine is just an analogy
@AwalGarg I honestly do.
Well, we discover them in the same way we discover gravity or magnetism - whether or not those are discovery is up for debate. @AwalGarg
 
12:41 PM
@BenjaminGruenbaum yeah I was just typing that out. I think it is subtle difference in perspective - but I have always seen these abstract concepts/solutions as inventions of the human mind, not something naturally occurring stumbled upon by thought.
 
@AwalGarg yes, in general mathematics is biased to our way of thinking.
 
user3119231
@BenjaminGruenbaum I would say to win this you need a bunch of luck.
 
12:59 PM
Why isn't this working? jsfiddle.net/gmst9de1
 
@maarte
 
@shashankan 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.
 
@MaartenWachters What exactly isnt working?
 
My first and last case
 
@MadaraUchiha something tells me people will eventually have problems with this on social media (like they need a reason right?)
clearly the man in the back is hipster hitler with a full moustache
those monsters
 
1:01 PM
pretty disgusting
 
> Spoon source software
 
what is the use of printing cows in the terminal using nodejs?
 
user3119231
I just don't know what I'm missing. Any clue why the spin only works once? jsfiddle.net/zfzf7svn
 
@shashankan to make them say stuff
 
 _______________
< Mooo means no! >
 ---------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 
1:07 PM
I'm dynamically building up a page by writing to it with document.write and them I'm invoking .print() on the window. The print preview is then blank or only shows elements partially. If I wait a second before calling .print(), I get my desired page. How do I make sure I always get my desired page?
 
what browser?
and what do you mean only shows partially? are you building with async and not waiting for it?
document.write('hello world');
window.print()
works every time for me
 
@rlemon Primary target is Chrome
@rlemon It's slightly more complex than that
 
@OliverSalzburg don't use document.write? Just concat strings and use innerHTML?
 
This is the partial result. In this case, a blank page
 
how do you build up the results? is this via xhr?
fetch?
 
1:11 PM
@BenjaminGruenbaum If that works, I'd be happy to try it
That's my current, naive approach
#meetingOverview is a big fat table
 
document.write is satan
 
hrm. yea idk. maybe .write is being weird? I honestly never use it
try what benji said and use .innerHTML
 
Alright, let me give that a try. Thanks so far
 
I even looked at the underscore source to see if .each was maybe doing stupid shit
nope. :?
 
It's lodash, but I doubt that's the issue
 
1:18 PM
call document.close before .print and print inside a setImmediate.
 
@Loktar @BenjaminGruenbaum @ndugger @anyoneElse github.com/JavaScriptRoom/InterviewJS I think this would be a good idea. We've recently had people passing around fiddles and making a repository for everyone would be something neat.
2
I pinged you three because I know you are in a hiring position
 
@MadaraUchiha ^
 
Ah, it would be useful for me if i'm looking for employers
 
@rlemon that sounds like a great idea
 
but
would it not be indexed by google ?
 
@KarelG that's why I said allowed
(in the repo)
some companies are weird
 
user3119231
HA got it! Spinning 4ever! jsfiddle.net/zfzf7svn/1
 
@FlorianMargaine not sure if you're following road cycling but Paris-Nice is more a Paris-Neige till yesterday :P
 
@BenjaminGruenbaum Is there anything special to look out for? I'm assigning printForm.document.innerHTML = pageContent;, but my resulting page stays blank and the DevTools Elements panel shows the default about:blank content
 
document.documentElement is the html element
document.innerHTML won't do anything afaik
 
1:32 PM
Oh!
 
We're getting somewhere ;)
 
\o/
 
not sure if it's intended
 
user3119231
Yeah just saw that this does not work as expected
 
1:33 PM
@KarelG I'm not
 
No CSS is loaded now though :(
 
it's strange to see snow in the south-east regions of France now
Last year, there was only good weather. Not warm but still acceptable
and rain
lots of rain
 
Hi. I have a problem with data!
 
@Markus 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.
 
According to the manual it should be possible to add data with $('#myElem').data('myProp', 3) and then retrieve it with $('#myElem').data('myProp'). Now I don't have the $('#myElem') instead I have a elemCollection.each(function(index, obj){test = obj.data('myProp');...}
 
1:36 PM
@OliverSalzburg document.body.innerHTML
 
but I get a obj.data is not a function
 
your object isn't a jQuery object
 
the obj you mean?
ok
 
	function print() {
		var styleElements   = angular.element( "style" );
		var linkElements    = angular.element( "link" );
		var overviewElement = document.getElementById( "meetingOverview" );
		var printForm       = window.open( "", "print:meetingOverview", "width=800, height=600" );

		var docBody = printForm.document.body;
		var docHead = printForm.document.head;
		var htmlHead = "";

		htmlHead +=  "<base href=\"/\">";
		_.forEach( styleElements, function addStyleToWindow( styleElement ) {
			htmlHead += styleElement.outerHTML;
@OliverSalzburg
 
is the elemCollection[i] a jQuery object?
 
1:39 PM
.each passes the index and the raw html element
the docs outline this
 
I finally got a response on my reddit thread; someone says it's the classic friendzone story, lol. I wish I had more responses on it, though.
 
Anyone here have experience working with LeafletJS?
 
You went to reddit for relationship advice?
 
Only after I already decided to move on
 
@rlemon Same no-CSS result
 
1:41 PM
I'm not asking for what to do, only trying to figure out what happened
 
@OliverSalzburg anything in the network log?
 
@rlemon Empty
 
@BenFortune It's quite a read, if you're interested in laughing at me reddit.com/r/relationship_advice/comments/49r3f2/…
 
just use .close. it will block until rendering is completed
 
@OliverSalzburg so nothing in the network log at all?
 
1:43 PM
Hey anyone know how to jump to element on scroll without clicking on a button? or have a good example?
 
because you should see the css file load
if not the tag isn't being parsed correctly?
 
@rlemon There is nothing in the log. But I can only open the DevTools after the window has opened, so I can't see if any requests were made
 
ndugger got friendzoned ?
amazing ? :D
 
@OliverSalzburg turn on persistent log
 
But I would assume 404s being logged to the console as well, which I would see
 
1:43 PM
er "preserve log"
@OliverSalzburg I'm wondering if it is even making the request
 
@rlemon I doubt it
 
try to do the print function without the timeout hook
 
Honestly, I'm alright with friends staying friends. She just won't talk to me anymore, so I've just lost her as a friend. I doubt it will be the same between us once she starts talking to me again.
 
The same references worked fine when I used document.write
 
It's just sad in that regard
 
1:45 PM
ah, i know that it's not fun. i've experienced that too before
but eventually time goes on and it heals the wound
 
@OliverSalzburg revert to adding it with the API methods
 
I have a date with a different girl in a week and a half, so I'm prepared to fully move on. I'm just sad to have had my friendship fall apart over something so stupid.
 
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'css.css';
docHead.appendChild(link);
 
yes found the $(this), thanks!
 
@rlemon Will try. Thanks
 
1:47 PM
grasping at straws
lol
 
@Markus good
 
@ton.yeung Not the only thing he's riding
 
escalators
 
@ton.yeung what's the new episode in the Trump's saga ?
 
Islam
The religion
 
1:55 PM
wewt
he forgets that there are islamistic countries that supports/aids USA in the Middle East ...
 
@rlemon Works a lot better
Still some weirdness going on. But I'll fiddle with it for a while
 
0
A: How do I not show_source on an included file?

Rohit Savaj <?php function test($param) { //do something } if ($_GET['show_source'] == "true") { show_source(__FILE__); }

This guy answered my 4 year old question with a literal copy of my solution
What do?
@MadaraUchiha
Also good morning
 

« first day (1972 days earlier)      last day (2980 days later) »