« first day (2025 days earlier)      last day (2916 days later) » 

12:21 AM
How can I use the 500px JS SDK locally when I need to register a domain to use the SDK key?
 
1:10 AM
@SomeKittens Upon first run I'm getting this warning: Could not find file: CircularBuffer
It should probably print all results so I can check the correctness
And when I add a new test it should be highlighted
Also, I'm getting this for every test case: Attempting to assert value without setting reference, using previous value: undefined
There should be some safeguard that I can't use the same name twice, for example docTest("b.isFull()", b.isFull()); docTest("b.push(1234)", b.push(1234)); docTest("b.isFull()", b.isFull());
I just found the cli, it's very cool
 
1:47 AM
It would be very cool if you could patch source file with the results instead of saving it externally
 
2:09 AM
hi guys
 
 
2 hours later…
4:18 AM
Hi guys
How to draw line between 2 div??
 
Have you tried CSS????
 
Is it possible with css?
 
Yes.
 
5:09 AM
Have you tried peanut butter????
 
??????
 
??? ... ???
 
yes, I like peanut butter
 
5:25 AM
just use notepad
 
Notepad.app
 
5:43 AM
Wait, did Windows change the file extension for executable files again?
 
again?
 
.com -> .exe -> .app?
 
Wanted to google if notepad.app is a thing and this came up
 
6:09 AM
double-click-drag to select -> search on web "google"
 
6:29 AM
I have this two div:

<div id="1" class="abc"> </div>
<div id="2" class="abc"> </div>

I want to append both this div to below div:
<div id="large"></div>
 
inside or adjacent?
 
i want output like this:Hello How are you
This Hello for div 1 and How are you for div 2
both this output will be inside large div
 
div, by default, is a block-level element.
 
hi! help plz,

I am integratting swagger Api (Swagger JSON structure )with slate api interface. At present the ui is ready.
Need to get the swagger json applied to individual components in the Slate UI
ME geeting the whole json file integrated with the div having the id="swagger-ui-container"
<div id="swagger-ui-container" class="col-xs-12 col-sm-8 col-md-8"></div>
 
So, you can't achieve what you want without .abc { display: inline; }, which is a terrible idea.
 
6:37 AM
so how to do this?
 
What exactly are you trying to do? And why?
 
@OliverSalzburg Yes, I do.
 
reply anyone?
 
I am trying to do this in which on click on image i want to show my 2 div side by side
@littlepootis
i want to show this 2 div 1 and div 2 in pop up side by side
 
@IonicăBizău why...
 
6:45 AM
@littlepootis Well, check them out and you will see why. :p
 
How do you even come up with ideas for them? :P
 
On one side is the need, on the other side is the fun and creativity.
 
Hi guys, I am going after sailsjs to make my next projects, should I go for it, or express is a better track
 
@mshahbazm Welcome to the JavaScript chat! Please review the room 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.
 
@mshahbazm why are you going with sailjs?
 
6:58 AM
they say its more flexible
 
well everyone says the same
 
like if I want to make a enterprise level app, sails it better
 
@mshahbazm who says that? The developers of sailjs?
 
what you say @Mr_Green
 
I don't know sailsjs but I hope you chose it because it matched your requirements
 
6:59 AM
yes, the people who are using node around me, they said I should start with sails
 
@mshahbazm the right answer here is to try both and pick the one that works best for you
Express has more support, so there's also that to consider
 
what both?
 
I am not a ninja in node , my expertise level is moderate, I made few small webapps in express its seems good, but then the people around me says sails will save you from many "hardships"
 
have you ever encounter this "hardships"?
 
@Mr_Green well yeah, as in try them both out in separate programs
 
7:01 AM
you mean sailsjs and expressjs?
 
@Mr_Green *en
 
@Mr_Green, well as long as I am making small apps, never met any hardship :D
@Neil, you are right, I should try and find it out :)
 
@mshahbazm learning a new library is never easy, not even if the library is easy to use
 
well , could not agree more, but if in future things could be easier we can take that step
 
If you have strong internal support think about going with sailsjs otherwise don't, IMO.
 
7:04 AM
You probably shouldn't jump into a new program with an unfamiliar library if it is a time - sensitive project
 
that is why I came here to ask , should I really go for sails
 
I learned SCSS in about one minute
 
if you know the requirements and project flow and if you are confident enough that you can do it with expressjs, don't opt for other frameworks
 
@Neil , no I have good time frame :) . @Mr_Green, people tells you then when you jump you never find them :D haha
 
SCSS is a compiler. if you don't know scss you can just write css in scss file :P
 
7:06 AM
@Mr_Green touche
 
@mshahbazm let's put it this way: do you have a boss that would be angry with you if the project is done late or has serious issues?
 
well I am loving sass now a days :D
 
I mean, I've learned about all of @include, nesting and variables in about a minute or so.
 
yeah scss is 8th wonder :)
 
@Neil, its an app that would be my startup , I have a partner you wont be helping in code but we can say he is more like a boss to me :D
 
7:07 AM
IPv6 will be the ninth :-)
 
and he might be upset if this apps is not done soooon
 
@mshahbazm I would give it a "test run"
 
don't take risk then
take risk in games but not in your professional work
 
haha @JanDvorak lets see what is 10th , may be tomorrow we wake up and say javascript 6 is released and supported down to Ie8
 
Write a simple program using that library. If you don't have major issues and the library seems to do all the things that you need it to, then go for it
 
7:09 AM
@mshahbazm babel
 
@mshahbazm JavaScript 6? I'm still waiting for JavaScript 2.
 
gulp is 11th wonder
 
@Neil, thanks for your advice :D , I will surely be testing sails :) will give it a week, if I see I can digest it I will go along otherwise , we always have our old friends to get back to , in this case it would be expressjs
 
I the meantime, there's already Java 8
 
*In
 
7:11 AM
I mean, JavaScript is complimentary to and integrated with Java, but still..
 
guys I am really loving this chat system by stackoverflow :)
 
Java 1.8 and JavaScript 1.8
 
@littlepootis, lets say its ec6 javascript :D
 
yeah just don't touch it
 
@JanDvorak yeah, just do java += 'script'; and boom: Javascript 8
 
7:13 AM
That would be Java 8script
 
@Mr_Green, @Neil, thanks guys, :) bye
 
@mshahbazm ec6? We don't even have ec3 yet. Bro you from future?
 
@mshahbazm good luck
 
Windows guys ?
0
Q: Why fs.readFile takes too much time on windows

Scripting.FileSystemObjectI just downloaded node 6.o windows 64 binary and was running this simple code. var fs = require('fs'); fs.readFile('./tmp/Test.txt', 'utf8', (err, data) => { if (err) throw err; console.log(data); }); Test.txt contains "hello world" It takes around 20 seconds to give the log. What cou...

 
I don't think that is normal
 
7:15 AM
(also there's an answer to downvote and or delete there)
 
I think there is problem with OP's system but not with nodejs
 
maybe. But a similar test (including the utf8 part) would be a good idea, no ?
It takes no time to test
 
yeah
 
and one of the things that changed is how text encoding is handled in buffers
 
hey congrats on crossing 200k
did you get the unicorn picture?
 
7:26 AM
Env variable problem? Weird..
 
@Mr_Green The one that was sent to jon ? No
 
maybe soon
 
In fact I didn't even receive the goodies I should have received for the meta good story thing
@littlepootis I understood that as windows being slow to resolve "node.exe" but I'm no good at windows things
 
8:03 AM
Any idea why would scrollbars of a visibility:hidden element still be visible?
 
it won't
maybe it is showing up of parent container's
 
the element's visibility is hidden, the container is body and the sole child is much bigger.
 
the child has visibility hidden or the parent i.e body?
oh ok
 
The body has visibility:hidden set, the element with scrollbars has visibility:hidden computed
 
@JanDvorak is this the same problem you've mentioned before?
 
8:10 AM
I don't think I've mentioned it yet before today
 
I think he got a strong dream of happening this
 
hello, everyone
 
No, but you've mentioned it before
Or at least some problem related to z-index
@GNi33 o/
 
8:31 AM
var icon = '';   icon= '/assets/abc.png';
its not working?
 
what not working?
 
it is not storing in icon variable
 
sure is
 
yesterday, by William
user image
 
I saw the same. yeah where can I find more?
 
The question would rather be where don't you see them. There's everywhere on reddit, twitter, miaou, etc
 
oh ok
 
8:56 AM
thanks :D
 
Some are really good
 
I love the subtitle
"Who are you kidding?"
 
This one should hit some homes
 
I didn't get most of them out of scope for me
!!orly
 
it is been 10 years for this meme
 
@Mr_Green Have a look 2 comments up yours — Denys Séguret 42 secs ago
 
@DenysSéguret oh I didn't check that. removed
 
9:20 AM
so... on vim this should work, right? It doesn't and I'm confused
:s/\d+%/<i class="statistic">$&<\/i>/g
it's supposed to convert text 21% to text <i class="statistic">21%</i>
regexr agrees with me: regexr.com/3dbau
 
I think you should capture it first
 
that's what $& does, isn't it?
 
it pastes the captured value, afaik
for capturing you need to use parenthesis
In JavaScript
 
this is vim
not js
 
ok. anyway I meant like this /(\d+%)/g
 
9:27 AM
@towc this works:
:s/\v(\d+)\%/<i class="statistic">$&<\/i>/g
 
never seen \v before 0.o
what? Vertical tab? How does that work?
 
(even without the parens in fact)
 
probably just need to escape the %
 
\v at the start of a regex is for "very magic"
it makes regex escaping a little more like what you know
 
well, it works...
but wtf
thanks :)
 
9:33 AM
you're welcome
 
where did you learn about \v?
 
when my regex in vim starts to be too complex, I always switch to very magic mode
@towc dunno
Oh yes I know
wait a moment
 
1
Q: Add missing spaces after commas

Denys SéguretI try to change rest.get = function(url,onsuccess,onerror) { rest.askServer("GET", url, null,200,onsuccess,onerror); }; into rest.get = function(url, onsuccess, onerror) { rest.askServer("GET", url, null, 200, onsuccess, onerror); }; I thought this command would work: :%s/,(\S)...

I asked and I got an answer
 
I thought the "magic" was a joke XD
:30280878 how dare you say that
 
9:35 AM
no, it wasn't a really good answer in fact
 
9:47 AM
apparently the "bitcoin creator"'s identity has been shown. Not that I care at all, but it's interesting as random facts. Believable?
 
10:22 AM
Hi there, will need some help for my app please
 
@NicolasFrbezar Welcome to the JavaScript chat! Please review the room 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.
 
hi my lovely nerds, who is working with sails? or has worked with it?
 
I have some trigger trouble with my app
 
@NicolasFrbezar just ask, someone else will answer for sure
maybe even I will - who knows
 
11:04 AM
Hello Everyone
 
@HituBansal Welcome to the JavaScript chat! Please review the room 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.
 
1
down vote
favorite


I am trying to convert first page of a PDF file which is sitting on aws into JPG and want to resize it and again upload to AWS. . how we can achive this in nodejs
 
1 down vote favorite?
 
@HituBansal at least make some effort when you copy paste
 
@HituBansal try:

https://www.npmjs.com/package/capture

http://grabz.it/api/nodejs/pdf-capture-options/
 
11:07 AM
@FlorianMargaine @littlepootis : sorry.. i copied from stackoverlink.
 
@HituBansal doesn't matter.
 
@PomeGranate : i am not able to understand above link
 
I see you want to display thumbnails. There's thumbpdf which allows you to do it. Just call it from nodejs.
 
Hi, I´m learning require.js... I need to access a function in module A from Module B. And in Module B in need to access a function in Module A. I added them in the define line, but it doesen´t work. Whereas if I just call from A to B it works! Can someone explain me what I do wrong? Or where I can start to look?
 
11:12 AM
my small effort against Global warming. dreamgreen.github.io
 
@littlepootis : thumbpdf is not available in nodejs
@PomeGranate : thanks let me check this
 
@HituBansal It's not an npm module. It's a package available on most linux distros.
 
ok @littlepootis
 
Hi guys
can anyone please answer this question
0
Q: $Watch is not working until a event is fired

simbaI am using $watch for pagination of the data in my page.But It is not showing data till i click on any of the buttons Here is the code. .controller('AppCtrl', function ($scope, $modal, Faq) { $scope.filteredFaqData = []; $scope.currentPage = 1; $scope.numPerPage = 5; $scope.max...

 
And if you're developing for ͏W̨i͢n͞ḑows҉, Iͥͤ̎̌̓͊ͩ s̍uͤ͆̋ͩg͂̾̍̊ͯgͧ̂̿ͬ̚̚ẽͣ̒st̋ͬͦ̊͐ ̾̃̈́̍̌͗́y͊̍̔ͩ̓̅o͗̃͗͐u̔͑̓͑̎̑ͭ ͭ͛͋ͭ͗ͫ̚sͯ̒̾ͫ̿tôp̋̂ ͨ͗d͌͆̾̉̈́̋̚o̒ͭͣ̄̇ͫiͨ̇̊ͪ̒̑͂nͪ̿͑g̾͗ͨ̐̎ a̸̡̽̈̉̉̈̾̈́͑ņ̸ͫͧ̓̓̋̑̀ͩ͞d̶͛̅͂̄̑̽ͬ̿̍ͣ̊̿ͫ͏͞ ̎̂ͭ͌̃ͬͨ͑ͥ̉̌͒̌̽̂ͧ̆̚͢͝s̛ͪ́ͨͥ̿̾͡҉̨͜ą͂̈́ͭ͛̾̆̽̃̚҉v̨̌̓̔̅̂̔̋ͤ͐ͤ͊̐͐̓͒̓̕͝e̢̓ͭ̎̈͗͑̒ͭ̆͑ͤ̈́͘͠‌​̶̢ ͧ͊̂͘͘t̢̡̽̒ͦ̈́ͤ̀ͩ̓̂͑̕ḩ̷̵͋͛ͤ͆̐ͭ͌̇̉̈ͭͣ͂ͪ͌ͫ̽̚͠͠e̷͊ͦ̈ͨ͊ͥ̉ͦ̆̀͏
 
11:18 AM
.
.
ẅ̶̢̢̮͍̥͇͍̜̗́̇̍̅̂̾͜h̶̨͉̗̟̞̤̐̈͑͌́̄̎̕á̶̛̦͙̜̞͎̞̲̺̋̅̑̈́͊͜͠ţ̵̡̙͚̱̾̆̔͋͒́'̩̩̝̮͆̌͊̀̅̀͢͜ș̵̫̪̘́̈̐͑͘͢ h̸̢̧̙͓̬͇̫̽̏̿̃͠á̰͉̣̦͎͉̜̬̳̾̅̃̋̚͡͡p̢̩̠͖̪͎͓̹̾̓̅̓̊̅̄̉̄͟͠p̶̨͇̣̼̳͚͙͈̿͊̈́̉̉̈͡ͅe̛͙͓̦̰̭̬͑͂̀̊͋̚͢͢͜ņ̷̞̪̥͖̖͈̓̐̇̏̄̿̇̀̕̕͢í̴̧̛͔͍͔̺͙̫̻̞́͐̍̊̆͘͟͡n̶̗̰̻̹̤̔͋̾̌͆͟ğ̶̬̞̮̭̬̲͕̞̓͛́̄̓̈́?͓̜̤̂͐̂̉́͟ͅͅ
 
@littlepootis : i m wokring on window
@PomeGranate : didnt work for me :(
 
what is the best practice for "how do I make a google map instance for several other modules available ". Can someone help me here. I´m using REQUIREJS
should I write a function that returns the map instance?
But then Module B & C would depend on Module A, which I should avoid according to the requirejs doc
 
@IntercoolerTurbo wat
Why should you avoid having a dependency tree? That's the entire point of require JS
Link to the docs entry that says that?
 
@IntercoolerTurbo A should not depend on B if B has a dependency on A
There's nothing wrong with 2 modules depending on the same module
 
What is the technical term of this? I forgot..
function doOnce(callback) {
  clearTimeout(this.delayTimeout);
  this.delayTimeout=setTimeout(callback, 400);
}
 
11:50 AM
But imagine A instantiate google maps and a click event on the map, that calls a function in Module B for painting on the map. So I would need map instance from A in B and In A to call the function in B. Or is my design just shit? ^^
 
I guess there is a native implementation of this in ES6
 
@ChristophBühler Debounce
 
@MadaraUchiha Thank you :P
 
12:06 PM
@IntercoolerTurbo Making the map module into its own AMD module and requiring it in other modules is just fine.
 
Yeah i made it to its own AMD module and it works fine so far. But the map instance how should I make it accessible to other modules. Currently I have written a function that returns the map instances from where I init the map. is that ok?
define(['gmaps'], function (gmaps) {

    var map;

    function init(){

        var startLatLng = {"lat": 51.0532376, "lng": 7.263446899999963};

           var mapCanvas =  document.getElementById('map');
           var mapOptions =  {
                center: startLatLng,
                zoom: 14,
                zoomControl: true,
                panControl: false,
                scaleControl: false,
                mapTypeId: gmaps.MapTypeId.ROADMAP
            };


        map = new gmaps.Map(mapCanvas, mapOptions);
and then in my other module
define(['app/module3', 'gmaps'], function (module3, gmaps) {


    function add(){
        gmaps.event.addListener(module3.getMap(), "click", function (event) {
            console.log(event.latLng);
        });
    }

    return {
        add: add
    }

});
 
ok i retry
 
is this ok? I started today using requirejs so if i do sth absolutily wrong it would be nice if you can help me now :)
 
i have to make a calendar in javascript. My code is correctly working, will generate calendar for the month wanted etc... But when i want to add click listener on the calendar, it will make strange output, like it will pass 2 or 3 month on a click... Here is a ask : stackoverflow.com/questions/36979462/…
 
@IntercoolerTurbo You will need to call gmaps.getMap() to get a map instance
 
12:17 PM
hm, but this results in: Uncaught TypeError: gmaps.getMap is not a function
 
wrong room
 
@IntercoolerTurbo Wait, that first module is what, app/module3?
 
1 message moved to Trash can
@HituBansal Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
@IntercoolerTurbo Ah, my bad
Looks good, although you probably need to call init() somewhere
 
12:20 PM
yeah in my main.js
 
Probably right before the return in module3
 
require(["app/module1", "app/module2", "app/module3"], function(module1, module2, module3) {

   // module3.add();
   module3.init();
   module2.add();

});
 
@IntercoolerTurbo I'd put the call to init() in module3
It doesn't make sense to have an uninitialized map
So it may as well be initialized properly when you require the module.
 
I m getting this error Caught exception: TypeError: object is not a function

anybody help me please . here is my code : http://paste.ubuntu.com/16188248/
 
This means that init() can become private (you don't return it)
 
12:23 PM
ah ok. And while i require it in my main.js it is automatically called?
 
@IntercoolerTurbo If you call it in the module body, then yes.
 
1 message moved to Trash can
@NicolasFrbezar Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
Yes, the enter input who send it, i retry
 
@HituBansal can you run convert on a remote source?
anyways, you're adding in a )
    exec("convert "+input+" image.jpg") ,function(err, out, code) {
    	console.log(err);
    	console.dir(out);
    	console.dir(code);

    }
you close exec
    exec("convert "+input+" image.jpg" ,function(err, out, code) {
    	console.log(err);
    	console.dir(out);
    	console.dir(code);

    })
see the difference?
 
12:27 PM
@rlemon : yes,
thanks
 
np
 
Yes wil do it
raah
 
just use a paste service
 
https://gist.github.com/Nicotyrox/b6cf608b8e7f018db2f766fb37a2b354

What does this code means ? If there will be one click on an .notInTheMonth classed element, every .notInTheMonh classed element will execute the code or only the clicked element ?
 
@rlemon : still getting the same error. i am trying to convert first page of pdf into jpg.
and pdf is located to external src
 
12:29 PM
@MadaraUchiha ok one "last" question for now. Where would i place my $.ready() function. just in that main.js or ?
 
@HituBansal how do you require exec?
 
@IntercoolerTurbo Yes, generally
You normally want to do it as close as possible to the first DOM interaction
If initiating the map includes DOM interaction (I honestly don't remember), then even the call to require() should be wrapped with $(() => {...})
 
ok, i will try that. Thank you very much!
 
@rlemon : i didn't find any way to do so i used exec for gm
 
exec in the js code
 
12:31 PM
if you can help me, it would be great
 
what does it reference?
const exec = require('child_process').exec;
??
 
yes
var exec = require('child_process').exec;
 
okay, what line is throwing that error then
 
Caught exception: TypeError: object is not a function
 
on what line
 
12:32 PM
this error on server
 
@HituBansal You know there's a gm npm module, right?
 
there is no line number
 
..
 
but the require gives me the $. How can i wrap the require within a $ if the $ isn´t defined at that point. Or did i miss understood u?
 
well then save it to a file and run it there
get the error and tell me on which line it hits
I highly doubt there is no line number tho -- just not reading the stack trace right
 
12:34 PM
@MadaraUchiha : yes i know gm, but it doesn't have any method to convert pdf file to jpg
 
@HituBansal It supports custom commands
@IntercoolerTurbo Hmm
 
@rlemon : i am trying to convert first of pdf into thumbnail. it is not showing any line number to me
 
@IntercoolerTurbo In that case, just around the entry points that use DOM
Inside the init() method, maybe?
@HituBansal Can you copy everything you get back from node?
Including the node filename.js command?
Including the stack trace
 
@MadaraUchiha :
server running at 8024
file
{ [Error: Command failed: Invalid Parameter - //www.au.af.mil
] killed: false, code: 4, signal: null }
now got this
 
12:41 PM
> Command failed: Invalid Parameter
is GM failing
 
16 mins ago, by rlemon
@HituBansal can you run convert on a remote source?
I doubt you can
probably need to download the image/pdf locally first
 
i dnt have any idea
 
maybe check the docs on that one
 
let me try with local file may be
 
12:43 PM
vegan food or tapas?
:S
help me cap
!!vegan or tapas
 
@Neoares tapas
 
x.x
thanks
 
you couldn't decide but when caprica decided it for you, you're not happy? :/
 

« first day (2025 days earlier)      last day (2916 days later) »