« first day (1298 days earlier)      last day (3875 days later) » 

09:01
@dystroy just no. no !
This is probably a XY problem : you should have a look at why you suppose you need to keep the password and fix that requirement which isn't compatible with good practice. — dystroy 36 secs ago
"good, secure and bonsens practices"
@dystroy, I think we're having a candidate for our Wednesday diner.
Ridiculous ^^ :
Store it after hashing. And let the further process also unhash. — Jay 50 secs ago
^-- noticed it too
@KarelG well, upvote my comment or comment, then
09:05
already did it
I can't even see why he needs the decrypted pin to initialize a download
"is the guy logged in or not: yes download - no don't download"
@Setilă 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.
on the new app I'm working right now (github.com/Ralt/greenshore), I don't handle users at all
the beauty of intranet apps: handle some http auth with your ldap or ssl client certificates, whatever, I don't care
I just hate that kind of routing. Make me frown every time.
@FlorianMargaine You should put more work in your readme.md files. For example creating them.
09:13
@dievardump yeah. I'll extract that into its own file
@dystroy yeah. It's just so not ready that I haven't done it yet.
No no, but the fact to write every freaking rules
@dievardump oh. I love that.
I just hate that.
stinks in here :|
exports.addGet = function(req, res) {
        res.render('release/add', {
            title: 'Create new release',
            projectid: req.query.projectid
        });
    };

    exports.addPost = function(req, res) {
        release.add({
            name: req.body.name,
            projectid: req.body.projectid
        }).then(function(releaseid) {
            res.redirect('/release/' + releaseid);
        });
    };
Hum a release has a title when with get but a name when with post ? hum hum Oh no, title must be the title of the page
09:17
can any one help me saving 15 base64 image in array in one second and get them with minimum time
@dievardump isn't the get rendering called for the post anyway ?
@wclear 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.
@dystroy yeah I was in a php mot $_GET/$_POST not crud get/post
@yahyaakhtar wut?
@dievardump title is here
What do people use HEAD http requests for?
09:20
jade frown again
I suppose it would primarily be used by bots?
@Neil to not force the server to write the complete answer, and to not receive that answer
@dievardump express init added that by default, so yeah
it can be used to check a resource is available
09:20
I don't really care about that tbh
@dievardump what ?
Hmm, could it be used to replace the head of a current http page?
@Neil that has nothing to do
Oh, I figured it returned the head section of a web page
09:22
no, it returns the head of the HTTP request
that's not related to the body of the response
So it's kind of useless for doing anything other than verifying if a resource exists
that's why you didn't heard of it before
theoretically it could also be used to know the size or another head parameter of a resource
For 2 second Ubuntu told me My downlink speed is 2PB/s
me was like .. my what a bug !
so you downloaded 4PB?
@FlorianMargaine it was a bug.
i switched from WiFi to another one
09:33
@WildlyInaccurate 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.
@dievar
@dievardump sorry for late reply
i am using setInterval function in jquery
for recording perpous .in every second i am saving 15 images in array
when i stop recording the it takes time to get the array of images
function capture( fps ){
sequence_images.length=0;
timer=setInterval(function(){
copyor = document.getElementById('imageView');
newcontext.clearRect(0, 0, newcanvas.width, newcanvas.height);
var baseurl = $('.'+folder_name).data("currentFrame");
baseurl = baseurl[0].baseURI;
var newImg = new Image();
mage_url =baseurl+'images/'+folder_name+'/image'+pad($('.'+folder_name).data("currentFrame").data("frame"),3)+'.png';
var result_url="";
// When the image object is fully loaded in the memory...
newImg.onload = function() {
!!tell yahyaakhtar format code
@yahyaakhtar Format your code - hit Ctrl+K before sending and see the faq
@yahyaakhtar its not fps, its milliseconds
i aint no time for that soup
09:40
@KarelG im thinking the same, but will save judgement until i know what the issue is
for (var i=0; i<regroup.length; i++) {
     if (JSON.stringify(regroup[i]) === JSON.stringify(strs) ) {
             alert("EQUALS");
      }
}
@Connor thats a nice for loop you have
function capture( fps ){
  		sequence_images.length=0;
  		timer=setInterval(function(){
		copyor = document.getElementById('imageView');
		newcontext.clearRect(0, 0, newcanvas.width, newcanvas.height);
		var baseurl = $('.'+folder_name).data("currentFrame");
		baseurl = baseurl[0].baseURI;
		var newImg = new Image();
		mage_url =baseurl+'images/'+folder_name+'/image'+pad($('.'+folder_name).data("currentFrame").data("frame"),3)+'.png';
		var result_url="";
		// When the image object is fully loaded in the memory...
@Puja 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.
this is my actual code
$('.vd_stop_rec').live('click',function(v){
		if (timer)clearInterval(timer);
		console.log(sequence_images);
	});
this can take time to load array in dom
09:46
@yahyaakhtar is there a question coming at all?
@yahyaakhtar There's probably a much better way of going about this, you realize
Looks like you're checking every so often if image has been loaded..
loaded images doesn't have to be rechecked
ah well... /back 2 work
@KarelG im still waiting on the question.......
@KarelG It looks like he's assigning the image source. I don't think he's dense enough to try to check if an image is loaded that has already been potentially loaded
@Neil every base 64 image is saving in array correctly.when i click on stop button array can take time to load is there any way to reduce that time ?
09:59
@yahyaakhtar This is what is run when you click on the stop button?
This in of itself shouldn't be slow
@yahyaakhtar
personal preference question
do you guys prefer margin's between images in a photo gallery
@Neil when i click on stop button the timer=setInterval is clear and stop making images of canvas and shoe the saved images in base 64 in array
or a seamless collage is more savvy for your eyes
10:01
a little margin, not too much tough
@RahSin 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.
@FlorianMargaine what lib are you using for Promises ?
@dievardump most likely he will say bluebird
He's using bluebird
@dievardump do you know bluebird was made by @Esliaja who is not so common in the room anymore
10:03
Damn, is the chat working well for you ?
Danke Schön.
@dystroy logged me out twice so far
I didn't know, I never used promised until now.
@dievardump what /
I never had to I would say. Well not in my latest projects.
10:04
ubuntu comes with python and ruby but not git
what the what
@dievardump its like an addiction, once you start using it you start loving it and them you start making promises so much that you can never get off the realm of making promises and trying to keep them
Does bluebird work in the browser too?
@AbhishekHingnikar i tend to use margin: 0 1% for images
I hate it when everything in on npm.
@dievardump yes
10:06
Yep I was on the repo :p
@dievardump why do you like installing via bower, nuget, including <script> tags etc ?
I have no bower or nuget. I want it to be easily place in my "public/assets/js/lib/" directory by my own little hands.
@dievardump Most often that's server side that the callback hell kicks the hardest
that file size could be reduced by removing the extra "Copyright (c) 2014 Petka Antonov" things ...
165.515 kb
Maybe a little big for what I want to do :(
10:09
@KarelG No. You should use a minifier instead of trying to remove various parts.
@dievardump and then replace that with cdnjs.org ?
@dievardump are you already using jQuery ?
@AbhishekHingnikar No way.
any other framework ?
a small EventEmitter and a thing called Heike, I think.
Heir*
@dystroy that 20 ish line copyright info appears 20+ times. Which is 400+ lines, above 10% of the current file
10:12
@Profpatsch 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.
@KarelG even if you don't use a minifier (which is bad), the server would gzip most of that 10% away for you
i wouldn't like to waste a bit resource and time to do it :)
I use r.js and have only require and my scripts.min.js loaded.
@Monty 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.
I think a Promise with just a then and an catch would be enough for my use.
10:18
@dievardump write your mini promise lib ?
I think i'm lazy on this one. I feel lazy.
i stay usually happy with ( WinJS / Angular / $ ).Promise
but on server i use BlueBird
in my wordpress site i'm using fancybox for wordpress and prettyphoto media plugin but when i'm using prettyphot gallery then its showing rel="fancybox instead of rel="prettyPhoto" and the gallery is not working its showing only single image
@Monty Your ".", "," and shift keys do not seem to be working either.
neither is the key
10:20
3 hours ago, by Qantas 94 Heavy
Closures considered harmful, ++ considered harmful, function scope considered harmful, this considered harmful, constructor functions considered harmful, bitwise operators considered harmful, is there anything that's not considered harmful?
also this is pure gold
/this/this
@dystroy: plzzzzzzzzzzzzzzzz help me
@dystroy saw that coming
also hi.
@Monty well done ^^
user924016
@Monty did you read the last message i wrote you?
10:21
@AbhishekHingnikar Yeah but the thing is I currently don't use any of them. Mainly because I target canvas compatible browsers and use getById more than any other querySelector
Good morning guys
@dievardump hmm
@BartekBanachewicz: sorry its rel="fancybox" and rel="prettyPhoto"
@BartekBanachewicz what I find painful regarding these problems is that most of the js related blog posts you find on reddit or even HN are about those basic topics. Yes there are tricky parts in JS but once you learnt them you can go on
note : I know nothing about fancy galleries and the likes
@dievardump I think you should still use a complete promise lib. The size problem isn't really relevant (it's minified, gzipped and cached) and you'll be ready to use ES6 (or 7) promises
May I be sure that when reaching the end of a JS file, the file is correctly loaded?

I'm using a pub/sub pattern, and publishing an event at the end of a JS file, however it seems that it is not loading the entire file when publishing the event.
10:25
@yahyaakhtar I'm telling you that that tiny piece of code that cancels the interval shouldn't take much time to execute. If it is taking a lot of time to execute just the same, then it is something else entirely
Yeah I was thinking of that, and on the fact I will probably add more little games in the futur that could use all the fancyness of Promises
user924016
@Monty so, now that you spammed both rooms, what are you going to do now? Considered replying to the last thing i wrote you in the php room OR are you still waiting for someone to tell you which line in which file to change?
@dystroy I dunno, I still try to avoid this in my code.
as much functional purity and referential transparency as possible is the way to go
@RonniSkansing: exactly last line of urs
I know what you mean. But sometimes you should also use this supplementary argument
* because the frameworks/libs use it
* because it can make some API cleaner, especially when you pass functions around
10:30
@RonniSkansing: btw u r doing same as me.....spamming both rooms lol
@dystroy Well this in JS is a dynamically-typed monadic context. Which yeah, tends to be useful in computations that would be monadic in a pure language.
Point being, power of the fact that this can be any context you want is often overused
Hey brain, whatever you are doing, you are doing it wrong ! please stop!
Anyway it's better to use this than globals, I figure.
@BartekBanachewicz A way to use this where you can't use a global : to bind a resource to your execution context). See http://canop.org/blog/?p=516
With that scheme I can pass around already defined functions instead of dynamically creating bound ones . It can even be used when your resource is read-only
2
user924016
@Monty lol.
10:37
May I be sure that when reaching the end of a JS file, the file is correctly loaded?

I'm using a pub/sub pattern, and publishing an event at the end of a JS file, however it seems that it is not loading the entire file when publishing the event.
@IvoPereira Your question wasn't clear and specified enough last time you asked it. Pasting it again doesn't make it clearer.
var ImageLoader = function(source) {
        return new Promise(function(resolve, reject) {
            var img = new Image();
            img.addEventListener('load', function() {
                resolve(img);
            });
            img.addEventListener('error', function(e) {
                reject(e);
            });
            img.src = source;

        });
    };
@dystroy * checks for garlic *
@IvoPereira How do you detect EOF (End of File)?
would that be a correct promise ?
10:39
@dystroy Ah, I see what you mean. That's certainly interesting, altough in principle doesn't diverge very much from the essence; the fact that the context is supplied "behind the scenes". In this code it looks especially clean, because it's functional monadic code. Now we only need pattern matching to make it even nicer.
@dystroy not receiving even bad feedback on what you didn't understand does not help neither.
@dievardump looks good to me
Ok I see the point of the thing.
@dievardump needs more =>
@IvoPereira because you were not detailed in your question, you're expecting us to stab in the dark to give you an answer which would solve your problem.
10:41
aha
@Zirak I'm not doing some EOF detecting. As just calling a publish event on the EOF, I assume it already loaded the previously functions.

Check the following example:
http://pastebin.com/kHUCb91G
@KarelG not exactly. If I do not know what are your doubts on the question, I cannot be a witch and guess what you don't understand.
I guess the question was pretty clear.
@IvoPereira burden of explanation lies on you anyway
@IvoPereira Then I'm confused...the last line fires, but you claim that the file didn't load properly? How do you know the latter?
0
Q: Pass a promise into an Angular-UI state controller

AndrewIs it possible to pass a promise to a UI.Router $state from an outside controller (e.g. the controller that triggered the state)? I know that $state.go() returns a promise; is it possible to override that with your own promise? Also, the documentation says the promise returned by $state.go() c...

@Zirak, I load this file async through another script, that is subscribing these events. When an event is pulled, a function is called. That function requires a function from the library that should already have been imported.
10:44
weird : just received 2 upvotes at one minute interval on a very old answer which wasn't recently updated (neither the question)
Let me guess, you can't access LoginButton? That's because it's scoped to your function, nothing is actually exported (or it is, and you're not showing how)
@Zirak, it is, I am not showing it in my function :) Take it using a window.LoginButton
to export it to window
So your function fires, but there's no LoginButton, even though you put it before your publish
Comment out the publish, see if it still happens
@dystroy : i got a revival badge last week ... it's just SO
@Ronni:its enought buddy please help me on this issue i found the problem when i m using fancybox it adds class="fancybox in every image of wordpresss so prettyphoto is not working"
@RonniSkansing:here it is

http://wordpress.org/support/topic/disable-fancybox-in-specific-page
As supposedly, the application won't run. As the subscribe event only runs the init() base function after.
// away
@dystroy Funny, It seems you're nearly the only one favoriting questions you cv for.
@dystroy I wonder how would you approach context switching inside of such a nicely crafted block. E.g. you could have an outer this the whole thing is running, and I am not sure if Bluebird supplies a way similar to liftIO. For example, you use res.render, which resides in outer scope. Instead of going "global" there, you could lift your context to make this mean res for the sake of rendering.
user924016
@Monty did the solutions mentioned in the link not work?
10:54
That way you clearly see where which context is accessed and you don't have to rely on any globals whatsoever; you're left with a closed block with inputs and outputs.
@RonniSkansing: its working dear
user924016
So problem fixed?
@RonniSkansing:yuppppppppp
oye balle balle
user924016
@Monty which solution did you use?
10:59
@Adrian 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.
@RonniSkansing: solution 2

function disable_fancybox() {
if (is_page('Sample Page')) {
remove_action('wp_print_scripts', 'mfbfw_load');
remove_action('wp_print_styles', 'mfbfw_css');
remove_action('wp_head', 'mfbfw_init');
}
}
add_action('wp_head', 'disable_fancybox', 1);
any help regarding
0
Q: Adding Meta Tag in Head doesnot work

Jatt.neti have a simple javascript code that is responsible for adding meta tag in the head.. it works fine for Iphone,android, however is not working for the window phone. any help <html> <head> <title>Hi there</title> <script type="text/javascript" src="jquery.js"></script> <script> ...

@BartekBanachewicz I'll probably need to think more about this (and I'm sorry but I don't know Haskell well enough). At first sight looks like what you suggest is solved by functions and arguments but I'm sure I miss the essence of your question. Maybe some code to illustrate ?
@Jatt.net can you try this ?
<script>
if ( navigator.userAgent.match(/IEMobile\/10\.0/)) {
	document.write('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />');
}
</script>
Did you check the userAgent really matches ?
}).catch(db.NoRowError, function(err){
    // handle a room not found
    // instead of //  res.render('error.jade', { error: "room not found" });
    this.liftToRes().render(...);
})
@dystroy along the lines of that ^
you keep using this, but extract the parts of the context you need
I am not sure if this would be actually helpful in anything here, but that's how it's done in haskell when it comes to context switching, and I thought you might find a use for that in JS.
If you switch context just for a function call, you may also use bind or call
11:05
point being, you don't use res that resides globally
the mechanic of context switching itself could be probably expressed as you wrote above
11:19
> Chinese psychiatrist Wen Chao said: ‘The idea is simple – you feel as lonely and as simple as a cabbage, so you begin to act like one and befriend one.
> Walking a cabbage is better than walking a dog because they don’t bark
can you argue against that ?
> or start fights with other cabbages
This being said, I'm 95% sure this article is a joke
I dunno, the Chinese are weird.
hence the 5%
I would have said 70% sure if it were japanese
11:23
> During this year's festival, a series of young people too hip for the rest of society were spotted dragging heads of cabbage on leashes. The whole thing was an art project by Chinese artist Han Bing! Han has been walking cabbages across the world for the last 14 years!
UK metro looks like a bag of shit
Well if he's been dragging cabbages for 14 years then that's ok.
@Zirak I've seen people do stupider things for kharma on reddit
TIL: Holding a water bottle over your head is questionable behaviour in China, due to a history of self-immolation.
11:27
@FlorianMargaine How am I suppose to know what bluebird is about?
(If dystroy and Abhishek didn't tell me before)
But thanks, I am using it now =)
because bluebird is known worldwide
It's the new black
it's not friday yet
@FlorianMargaine then let's say I have no culture.
@FlorianMargaine as in "this chat has users from India and US, so it's worldwide"
(just joking, don't take too seriously)
11:31
@VikramAnandBhushan 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.
76 Watch
Star 1,997
Fork 103

Lot's of Indian and US American here
@people can anyone help me out with Mobile JQuery form resting
Here is a fiddle have a look jsfiddle.net/QbFW8/8
@VikramAnandBhushan sorry, jQwhat?
@FlorianMargaine "commerce guys" ?
I am trying to reset the form data when cancelar button is clicked . Have a look on this fiddle jsfiddle.net/QbFW8/10 @dievardump
11:37
my code is only then().then().then(), it's as annoying as cb nightmare xD
Please let me know if anyone can help me out of this I have been trying since morning . :(
@VikramAnandBhushan what's up?
@Connor I am trying to reset the form data when cancelar button is clicked . Have a look on this fiddle jsfiddle.net/QbFW8/10
@VikramAnandBhushan everything is wrong with it
can you guide me please I m new to this thing totally
11:47
first of all you need a form
@dievardump you know, then() is essentially a semicolon
@VikramAnandBhushan Get the <form> set up with html, make sure it's valid, remove the little javascript you currently have, then I'll show you in a minute via collaboration
okay i m on it

« first day (1298 days earlier)      last day (3875 days later) »