« first day (1399 days earlier)      last day (3772 days later) » 

05:00
../../../work/setups/generic/somefile.php?
what if you're 10 folders deep in the home directory and need to access some file 10 folders deep in the generic directory?
that's gonna be a long url
if this is php files, you can assign ROOT_DIR
but if not - yea, it will be long url
you can also symlink it, but don't like that practice
what if it's a .css file 10 folders deep in the home directory and you need to reference an image file (for background-image use) that is 10 folders deep in the work folder?
@DemCodeLines unrealistic
05:04
background-image: url('../../../../../../../../../../work/../../../../../../1.png'); ?
@DemCodeLines /work/../?
then you have a bad structure
9 mins ago, by DemCodeLines
assume that there is another folder after "/" that contains "home" and "work" folders.
oh. Those after /work were ellipses?
"/" + thatFolder + "/work/"
05:07
THAT IS THE PROBLEM!!!
the value for thatFolder will change when we switch servers
problem is in your structure
and as a result, all URL's will break.
what are you trying to achieve?
access the folders that are so far apart that manually writing it out with relative url will look ugly and might be a security problem when someone looks at the html source code and sees the entire directory tree
@DemCodeLines what's the problem with revealing the directory tree?
05:16
Because i don't want people seeing how the entire directory is structured...
Hi Guys, I need a little help!! -- I am trying to add a custom method in a plugin but dont know how to do it... tried adding the following:

showAlert: function (index) {
alert('Index is ', index);
},

but `plugin.showAlert();` doesn't work...
!!> var plugin={showAlert: function(i){console.log(i)}}; plugin.showAlert()
@JanDvorak "undefined" Logged: "undefined"
works just fine
05:21
@JanDvorak but this way plugin variable will be outside the plugin file/function
@DemCodeLines if you can't share details, don't think that we can help
the plugin i am working on starts like this:

;(function ($, window, Math, undefined) {
@ImranBughio as long as it's visible, to the caller, you shouldn't have a problem
@monkeyinsight it's not about sharing the directory names with you, it's about security
@DemCodeLines security guys should solve their problems by themselves than...
05:23
If telling people how your file system is structured is a security issue
You're kind of fucked
@Meredith It is generally undesirable
@JanDvorak TypeError: scrollSectionsController.showAlert is not a function
@ImranBughio perhaps you're not attaching your function to the right place? Fiddle, please
@JanDvorak my bad i called function before declaring it but can i use the variables inside the actual plugin from here?
right now i am just printing a console message
wait i will show you my code in a fiddle
this is the actual plugin
05:29
i am trying to create a method to add previous/next button .. i have created methods before but they dont work inside the plugin file... the way other methods are working
*You hear the sudden crunch of Jeremy's head hitting wall*

http://stackoverflow.com/questions/25321348/how-to-stop-from-data-post-from-browser-console/25321652#25321652
@ImranBughio jsfiddle.net/nL2xadod/2 this is the right way to assign the method
@monkeyinsight Thanks but why is it not working if i add it inside the plugin file... i need to define it inside the plugin to use its local variables. here is the plugin code: jsfiddle.net/Imran_Bughio/nL2xadod/3 now inside this code the showAlert method is my code but it doesn't work.. any idea?
@ImranBughio you need to add it inside Plugin.prototype = {
05:45
@monkeyinsight Ok, i moved the code there but when i call the method it throws this error: TypeError: scrollSectionsController.showAlert is not a function
@ImranBughio gimme fiddle
hmm ok wait
hi
This is off topic, but can anybody suggest me a free MKV to AVI/MP4 convertor?
05:52
@indieblue if someone new comes here within a few minutes and anwers it, I will flag him for spam
sorry dude
@monkeyinsight now inside this fiddle i have taken all the code from plugin example. and only showAlert() method is what i am trying to add.
I am just not able to find one
@JanDvorak Why?
@indieblue ffmpeg
@copy is that open source?
05:54
Maybe
@copy the question smells to me too much like an intentional spam invitation.
@JanDvorak We've never been to strict about the topic of this room
@copy off-topic is fine. Advertising isn't.
I'll have the eggs, spam, spam, spam, eggs, spam and spam.
@indieblue There is actually software recommendation stack exchange site for these types of questions softwarerecs.stackexchange.com
05:56
@JanDvorak Oh, you see a conspiracy?
@copy I'm annoyed by spam
@JanDvorak when ever i open this room i find 2 random peoples fighting over what should be in this room and what shouldn't lol
just saying
Yeah, but has that ever happened? Someone spammed their software in this room?
@ImranBughio well, you are trying to trigger DOMElement event, not plugin... if you want to trigger event like this, you should extend Element.prototype not the plugin
@copy not lately, I admit
05:59
@copy nope
@copy will it work on windows in command prompt?
@monkeyinsight i don't think i am triggering DOM Element event !! i am only trying to a add small method to trigger an alert popup... ! (just to begin with) & element.prototype part is completely over my head
@indieblue You go research that, I don't know
alright
@monkeyinsight & the reason i want to add the method inside plugin is to use its local variables .. i want to create next & previous buttons using those local variables...
06:03
@ImranBughio your plugin has only one public method, you can't call inner methods from outside it
@monkeyinsight why not... ? any place i can learn more about how plugins work etc.. ?
@monkeyinsight Ok, Thanks i will read that meanwhile do you think its a good idea to post this as a question... the thing which i am trying to achieve
@ImranBughio don't think so.. i guess information in this tutorial is more then enough to help you extend your plugin
@monkeyinsight hmm wish me luck on this mission lol -- hope i could add this feature in next 2 hour
06:08
@ImranBughio good luck then :)
Thanks to those who vtc'd that rant question.
831 rep and I get to read closed rant questions :)
Man, we are pretty cool
06:29
why this selector not working in angular ?
      elem.find( "input" ).bind("change", function (changeEvent) {

                var reader = new FileReader();
                reader.onload = function (loadEvent) {
                var preview = $(this).parent().find("img");
***$(this).parent().find("img");***
HTML is
'<div><img alt="" src="http://placehold.it/360x100" style="width: 290px; height: 100px;"><input type="file"/></div>'
Hi
can i inject a div just before another div
and all i know is the id of the div i want it to be before
@CustomizedName yes
you have wrong this in scope of next function
declare self = this before reader.onload
06:32
@JanDvorak can u please tell me how please
!!tell customised jquery prepend
!!tell customised mdn insertbefore
Is it my imagination, or is 90% of JavaScript's learning curve caused by that weird `this`?

Then again, I learned JavaScript before C#, so I find it weird I can use `this` inside of methods without jumping through hoops.
06:33
@JeremyJStarcher this gets its value based on how the function is called
@JanDvorak Oh, I know, I know...
@JanDvorak But you still have to admit, it is weird.
@JeremyJStarcher I'd say 90% of JavaScript's learning curve is caused by people trying to cheat the time
@JanDvorak Touche! You're right.
@JeremyJStarcher that's what you get by mixng OOP with first-class functions
@JanDvorak thanks, but is there anyway I can do same with js as well
06:35
@CustomizedName with what???
@monkeyinsight :(
I want to add a div to another div but with js, as i can't add jquery
        link: function(scope, elem, attrs) {

      elem.find( "input" ).bind("change", function (changeEvent) {

                var reader = new FileReader();
                var preview = $(this).parent().find("img");
ES5 is gunna kill us when it will be harder to tell people.. "Yes, there is a class keyword, but that doesn't really mean its a class..."
@CustomizedName is insertBefore not good enough for you?
@JeremyJStarcher do you mean ES6?
06:37
Bad fingers! Bad! Yes. Tis but a typo, nothing more.
06:47
@JanDvorak thank you
07:03
css problem...
I want to make one of those pages where the content is all in one column...
it has a fixed width, and the margins should make it centered
but I don't know how to do it in pure css
I'm not sure what should I google for this...
@towc margin:auto
@JanDvorak tried that...
.column { width: 500px; margin: 0 auto }
07:05
wait, I'll fiddle the code
width:46vw; O_O 46 volkswagen?
@mikedidthis doesn't work for me
@towc what browser?
remove position: absolute
oh, I had to remove absolute pos...
yeah...
@mikedidthis latest chrome
So you know vh but not about positions :(
@towc same here, works fine.
what is vh anyway?:D
07:08
viewportHeight iirc.
@mikedidthis I thought margins worked with absolute position
@monkeyinsight 1vh = window height/100
@towc they do, but the element is out of the document flow, so auto mucks up.
@mikedidthis oh, good to know, thx
@monkeyinsight Done! custom previous/next buttons added .... that link you gave did helped me in adding methods but i ended up adding functionality hard coded .. will ask for a pull request to add functionality to the actual plugin later on...
07:10
if you want center with position: absolute, you should: left: 50%; margin-left: -width/2
@monkeyinsight ew
@JanDvorak css is a bunch of tricks:D
@monkeyinsight there is actually a better way out there now
@ImranBughio which?
@monkeyinsight transform translate wait i will share a link
07:12
Centering is best done with the right use of <pre> and &nbsp;
IE 9+ is bad
Hey, I learned how to center text back in the 1970's with a manual typewriter. I aint up for learning nuthing new. ;)
@JanDvorak using transform (translate) method we dont need to calculate margin-left negative value :)
hmmm
but who uses IE8 any ways
I in freelance & in company don't support IE8
07:15
12% of China still uses IE6
hmm then it depends if your targeted market is China
@monkeyinsight I don't care about 12% of china
But china market is usually too much isolated
@JanDvorak +1
10% of world use IE8
07:15
they even have there own social networks
10%!!! where did you read that ?
as far as i know less then 4% use IE8
@monkeyinsight let them die in fire
well, we have requirements of IE8 still
In my projects i simple show a message to update browsers to the IE8 Users.
On my "fun" projects, I don't support IE. At all. For work, we are supposed to support IE8 -- but I don't think anyone has tested with below IE10 in quite a while.
Though I think for IE8 I'd rip the style sheet out and just show fugly, but usable, screens.
07:19
For my old commercial project, the rules were "every once in a while check if anything serious breaks in IE8"
all of the pcs in my school only have IE7 installed
also, "if it works in chrome, it probably works in firefox as well"
@towc fail
@JanDvorak my informatics teacher's excuse was 'it works!'
@JanDvorak true but if it works in firefox it might not in Chrome
I used to have a website that I tested both under Lynx and AudioVox though.

The VOX was absolutely amazing to learn just how badly tables could screw up a blind person ;)
07:22
Firefox is the best with the least css bugs.
@ImranBughio css bugs?
@ImranBughio css bugs?
I thought css was bugless
you know the kind we get in IE 8
@ImranBughio those that Chrome never had?
07:23
yea, i was testing on lynx too :D
for example in firefox a div with display table-cell having an image inside with max-width 100%; will end up really small in webkit but render fine in firefox..
fiddle?
this is just something i remember but i usually do development on Firefox and found that some css which works perfect on Firefox dose not on chrome/webkit
hmm ok give me a min
there you go
i recreated the issue -- check it in firefox & Chrome(webkit)
@BenjaminGruenbaum need a angular help
!!welcome samitha
07:29
@samitha Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
@ImranBughio in this case i think chrome is correct
@BenjaminGruenbaum grr :D
i have created a file-upload directive
@monkeyinsight well i use img max-width as a global rule cuz an image should not exceed its container...
@ImranBughio strange; is it reported?
07:30
@JanDvorak reported where?
but in this case i have to show a preview in the top of the file input
@BenjaminGruenbaum
var preview = elem.find("img");
@ImranBughio try overriding max-width
@samitha what about it?
i want to use this selector in here to select the img to set the src .how can i use it ?
var preview = $(this).parent().find("img");
i wast try this
07:33
@samitha you're going to have to be a lot clearer if you expect help, remember it's jqLite and not jQuery
@JanDvorak i don't remember exactly but i think that's how i solved it when i had this issue. & i have experienced other issue which only occurred in chrome not in firefox.
@BenjaminGruenbaum :) so how to use this in that ?
@samitha you start by reading the jqLite tutorial at the angular docs
going for a smoke break
@BenjaminGruenbaum docs.angularjs.org/api/ng/function/angular.element yes already .Can you just help me to solve this out
07:35
@ImranBughio ew
somebody is smoking nowadays?
@monkeyinsight well cigarettes got unpopular here but other kinds of smoking are common
@BenjaminGruenbaum we haven't legalised yet another kinds of smoking :)
@monkeyinsight electronic cigarettes are illegal where you are?
:P
@BenjaminGruenbaum yea, all electronic devices are... i'm sitting in a basement hiding from goverment
I have dynamo machine and a bunch of hamsters
@BenjaminGruenbaum pls
can't figure it out
@samitha what's wrong?
@macsj200 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
angular directive problem
07:42
@samitha not being replaced in the html?
i want to set the src value to the image
i want to use this selector to select image
something like
var preview = $(this).parent().find("img");
I think you might have to implement some server code
@monkeyinsight so when i started smoking .. it got unpopular :(
I've had something like this working, but it uploaded the file and got a json response with a link to the pic on the server
@macsj200 ahh?
:p
07:45
Ya I don't think you can just do that client-side
Do you want some sample node code?
ayyo.No man
Lo all :)
Hola
@samitha alright well good luck :)
@monners angular help needed
07:47
How is everyone? It's friday! \o/
Clearly you haven't read that tutorial
@IanClark awesome! I have a free day because of holiday in my office!
@BenjaminGruenbaum i read .but problem with 'this' selector
Read the "How do I think in Angular" post
@IanClark what's up?
@IanClark Friday is holiday? its Saturday & Sunday in my country...
07:49
@monkeyinsight holiday in your office! Hah, I wouldn't mind one of those :P - @BenjaminGruenbaum nothing much, how about you :)
who was the guy that wrote that 'the egg' story? the one about the universe, life and death?
Learning swift, having fun
@ImranBughio no, unfortunately Friday is not holiday in my country either, but it is the day before the holiday :D
s/holiday/weekend
@BenjaminGruenbaum u mean to use
angular.element(element);
@IanClark opposite of how we feel on Friday is Monday :D
07:52
@samitha please use proper English, also yes.
but as a life of freelancer + job ... ever day is a working day but still weekends are much better.
@BenjaminGruenbaum
var preview = angular.element(document.querySelector("img"));
Please don't ping me, I am here
Does that work for you?
No.
i want to find it with
   elem.find("input").bind("change", function (changeEvent) {
Oh Swift, you think it'll properly take off?
07:54
 template: '<div><img alt="" src="http://placehold.it/360x100" style="width: 290px; height: 100px;"><input type="file"/></div>',
@ImranBughio idd :)
@IanClark cool stuff
@IanClark idd?
you see that elem.find("input"). is clearly working
It'll take off I think, it has a lot of cool stuff.
07:55
I said idd :) - means indeed
@samitha use ng-src and use proper binding, seriously read that "How do I think in Angular" post it'll really help you
I agree with Bengamin
Don't you think there shouldn't really be much elem.select('div') type stuff in angular apps? is that what you mean?
Ben do you ever sleep? :)
@macsj200 it's fine to do selections in Angular inside directives but only if there isn't another option already (in this case there is) in my opinion
07:58
Ok
Could you give an example of when there is no other option?
hi ppl
How to see help file on npm module?

« first day (1399 days earlier)      last day (3772 days later) »