« first day (1415 days earlier)      last day (3534 days later) » 

4:00 PM
seriously, there's literally no reason to not use vetted and reviewed security code. Inventing your own is at best negligent, and at worst criminal.
 
@DJDavid98 One of those 10 users is an idiot millionaire who uses the same password for everything.
 
@DJDavid98 It is not about how much effect the attack would produce, but about developers following good practices.
 
His passwords were exposed through a break in to your site, and now who do you think he'll sue?
Never assume you yourself are the target.
You have no idea how valuable the data of your users is.
Treat it as such.
 
I'd be more careful if I was writing a system that will be used by people I don't personally know, but I don't think it's worth editing my already working site just for this purpose
 
@DJDavid98 If refactoring this bit is too much of a job, then you probably have other issues as well
 
4:02 PM
You can't teach someone who doesn't want to listen.
3
 
@SecondRikudo The biggest issue is implementing a way for them to update their passwords. I previously had to do that when I moved on from md5 to this slightly more secure sha256 thing, and it didn't go well
 
@DJDavid98 How do you reset someone's password?
Do you have a "Reset my Password" feature?
 
@DJDavid98 uhm, you realise security isn't a nice feature to have, but a basic assumption?
 
@DJDavid98 There is a way big companies do it.
 
User passwords are not yours.
 
4:05 PM
@SecondRikudo Not yet.
 
Don't treat them lightly.
 
They need to be logged in to change their password
 
@Zirak Lol, when I was first told that, I replied - "BUT THOSE USERS ARE MINE. SO EVERYTHING THEY OWN IS MINE. THEIR BANK BALANCE, THEIR FERRARI, THEIR LAPTOP, EVERYTHING".
 
!!should i make the app login only or make temp users
 
@AbhishekHingnikar You should make the app login only
 
4:06 PM
:-/
caprica .... okay then.
 
I don't have an "I forgot my password" thing, instead I'd change their password to something easy, send it over, then they log in and change it themselves
 
@DJDavid98 Very bad.
 
@DJDavid98 I hope I never get to use your service.
 
@DJDavid98 Great
 
@AwalGarg Like I said, this is for a closed group of people I know, so yeah, you probably won't
 
4:09 PM
So do the security update, then change all passwords to something easy and tell them to change it,
Also, adding a "Must change password after next login" flag seems trivial to me.
 
hey
why this doesn't work?
document.body.scrollTop = 1000;
 
I was originally thinking something along the lines of having 2 pw fields in db, one for the old and one for new, then if the new one is empty, let them log in with the old but make them change passwords instantly
 
I've used it in:
$(document).ready(function () {
// In here
});
 
Works for me in console.
Do you have a specific example?
 
"Fiddle or didn't happen"? :)
 
4:12 PM
@MRS1367 You sure you want to scroll the <body> and not an element inside the body?
 
@DJDavid98 -> yes
I can't create a jsfiddle; cuz:
 
@AwalGarg lol
@MRS1367 "cuz" what
 
@BartekBanachewicz cuz ":"
 
@AwalGarg right
@MRS1367 you just don't get the point
@MRS1367 sscce.org
 
@DJDavid98 there is a way to convert the hashes without resetting passwords
 
4:15 PM
4 messages moved to Trash
 
@BartekBanachewicz f-> cuz my codes are very big
and no one will read it
 
@MRS1367 why do you keep putting "->" in your message.
 
oh god your arrows are so annoying
 
54 secs ago, by Bartek Banachewicz
@MRS1367 http://sscce.org/
 
@BartekBanachewicz he is a Terminal.
 
4:16 PM
ummm... sry
 
he might be a bot alright
 
@MRS1367 One of the biggest parts of debugging, is the ability to make a Simple, Self Contained, Concise, Example. Which happens to be SSCCE.
 
Or he's trying to greentext
 
And I do believe I told you that once
If you cannot help yourself, I doubt anyone will help you.
 
inb4 he replies with a "->"
 
4:17 PM
@AwalGarg $: No!
 
@SecondRikudo but I can't
 
@MRS1367 Why not?
 
@MRS1367 then learn how to do that first
 
cuz this part of codes, relates to a lot of codes
 
> many codes
 
4:17 PM
@SecondRikudo ~ I am the super user... xD
 
$('@user')[0].reply = 'Brace yourselves, pointless prefixes are coming!';
 
@AwalGarg #: Nope.
 
@SecondRikudo ~ Command Nope does not exist :P
 
@AwalGarg #: shutdown now
 
4:19 PM
Can somebody please make me room owner in sandbox?
 
@PeeHaa On it
 
@SecondRikudo ~ Access Denied. Humans only please, no gods allowed! :P
 
I add some script tags dynamically
 
@AwalGarg That doesn't even make sense.
@MRS1367 All you have to do is recreate the symptoms
 
and then I want to run its codes in somewhere else
 
4:21 PM
The code of the example needs to be similar to the real one, but it doesn't have to be identical.
 
@MRS1367 Like, on the Moon?
 
@SecondRikudo The system is intelligent and detected that you are a god (a fake one) and thus provided a fake error message.
 
my codes are in:
$(document).scroll(function () {});
 
So if you try to scroll, your scrollTop is set to 1000? I don't get this
 
4:22 PM
$(window).on('scroll', fn);

function fn(){
    console.log( 'scroll' );
}
 
and I want to scroll web page up and down automatically to run their codes when I need them too
 
probably thats what u want
 
@AbhishekHingnikar window.scroll = function() {};
 
@SecondRikudo then theres window.addEventListener('scroll', fn );
 
my codes in created <script> tags in:
1 min ago, by MRS1367
$(document).scroll(function () {});
@DJDavid98 -> no, it's an example
 
4:24 PM
@AbhishekHingnikar I never really understood the difference between obj.addEventListener("onclick", fn) and obj.onclick = fn
 
I scroll it up and down by 1 pixel
 
@SecondRikudo try assigning multiple listener
 
@AbhishekHingnikar Gotcha.
 
there is more.
i forgot though
 
So, for simple ones, the more readable obj.onclick is preferable?
 
4:25 PM
no
addEventListener is preffered everywhere
 
20 hours to deadline
 
@AbhishekHingnikar the third and optional parameter with addEL is powerful sometimes specially in polling.
 
addEventListener's 3rd parameter lets u wanna catch the event either bubbling up or down
 
@AbhishekHingnikar hey dupe!
 
that annoying moment when your torrent uploads faster than it downloads
 
4:26 PM
bubbling?
 
@AbhishekHingnikar I can't use it
 
@SecondRikudo don't use torrents ?
@MRS1367 o_O why ?
 
@towc Click on a child and a parent can get the event too
The event bubbles up the DOM chain until it reaches the parent
 
oh!
 
fuck this world. i am going to disappear.
 
4:27 PM
@AbhishekHingnikar nuuuuu
 
(Assuming both child and parent have event handlers)
 
@AbhishekHingnikar cuz every created <script> tag has a specific codes
and I want to run all of them when I need
 
@MRS1367 Have you heard of requireJS?
And also, less libraryish, the Module Pattern
 
@SecondRikudo yes
but I've never used it
 
@MRS1367 "I want to have parts of my code be defined and then used whenever I need them"
 
4:30 PM
@SecondRikudo it can help me to solve my problem?
 
That's requireJS.
 
@SecondRikudo tnx for ur solution :)
 
TBH it sounds to me that your website is a huge magnificent clusterfuck of spaghetti code that needs to be purged with holy napalm, then rewritten.
3
 
I used to use -> in my replies
sry
 
@AwalGarg Please no making fun. He's trying.
 
4:32 PM
@AwalGarg I always use that
 
@MRS1367 who taught you that?
 
@MRS1367 Sorry I thought I can do a bit of joking with you.
 
but cuz guys in this room say that
it's annoying
I'll try to don't use that in my texts
sry
 
> C# is a powerful laser rifle strapped to a donkey, when taken off the donkey the laser doesn’t seem to work as well.
Donkey = MicroSoft ?
 
4:38 PM
@AbhishekHingnikar I'm guessing Windows
 
room topic changed to JavaScript :: the sword without a Hilt: Read this link: rules.javascriptroom.com. Before asking inform yourself on the XY problem goo.gl/taIqf | Angularjs is on topic here. stop asking. Reg room here: chat.stackoverflow.com/rooms/59354/ecmascript [ecmascript] [javascript] [phrasing]
 
@AbhishekHingnikar Please don't abuse the donkey.
 
@SecondRikudo i hope its windows
cause microsoft has some seriously awesome stuff
like they hyperlapse algorithm that regenerates the environment in 3d x_x
 
@FlorianMargaine What do you mean?
 
@DJDavid98 when the user logins with his password, you have the unhashed password, so you can generate the new hashed password and set a flag to use the new hashed password, and delete the old one
this way, you gradually use the new hashing algo
 
4:48 PM
@FlorianMargaine My god, that's clever! And now that I think about it, it actually makes much more sense to do this instead of asking them for a new pw
If I implement this password_hash though, I might as well rewrite the whole log-in and session handling, since currently sessions are not verified by IP or anything, so if you have someone's session cookie you're in their account. I need to also set up some sort of current sessions item in the account settings or something like that
 
no
you need to use https to protect your users from such issues
verifying by IP is pointless
 
I ain't got no money for a https certificate...
nor do I have a credit card
 
@PeeHaa That looks promising. I'll see if my host allows me to use SSL though, I haven't checked yet
 
5:05 PM
someone can give me a help?
I have this code below in top of my scripts.js file, to hide a delete link if I just have one image in my images list:
$(function(){
if ($('.bannerli li').length <= 1 ){
$('.j_bannerdelete').hide();
}
});

But when I have my last two images and I delete one, my script above it isnt working. I need to do refresh page to my last image "Delete" link hides.
Do you know how can solve this?
 
@OzzC Your code is running on page load, it won't magically detect when you remove something afterwards
Add this check to the function that deletes the images as well
 
Yes, but I also have this code in my delete jquery ajax function
but dont works!
 
Maybe this is worthy of an actual question posted to the site with relevant html + js
 
yes, I will do that!
 
Think with me
I've got a number, for instance 5629499534213120
That's an id. I want to make it nicer, because it gets passed in a url
 
5:19 PM
358435465453132
 
So I'm doing something like this:
!!> btoa(5629499534213120..toString(16)).replace(/=+$/, '')
 
@Zirak "NTYyOTQ5OTUzNDIxMzEyMA"
 
That's still butt ugly, but is it acceptable?
 
@Zirak "MTQwMDAwMDAwMDAwMDA"
 
!!> 5629499534213120 .toString(36)
 
5:21 PM
@DJDavid98 "1jfhodtasjk"
 
dayum, that's better than I thought it'd be
Thanks. I'm an idiot.
 
@Zirak Why are you passing such a big number in a URL anyway, and more importantly, why do you care how it looks?
 
@DJDavid98 It's an ID, really just the integer key that's inserted in the db. And I want it to be nice because...well...nice things are nice.
 
@Zirak How would you convert it back to a number with your first approach?
 
@Zirak why not just incremental numbers?
 
5:25 PM
!!> parseInt(atob("MTQwMDAwMDAwMDAwMDA"), 16)
 
@Zirak 5629499534213120
 
@AwalGarg db decides on the id, I don't have a say
 
Well, that's 1 extra function you'd have to call
 
@DJDavid98 Your way is superior, definitely
 
I also use this integer conversion on a project of mine to generate unicode codes for 2 char IDs to use with an icon font, so I'm quite used to converting between 10 and 36
 
5:29 PM
For some reason I didn't think of that. Blame the pope.
 
I probably wouldn't have though of it either had I not used it often.
It essentially allows you to convert a sentence into integers, which could bring up an interesting concept. Not sure if someone has made it yet though
!!> (function(str){ var arr = str.split(' '), r = []; for (var i=0,l=arr.length; i<l; i++) r.push(parseInt(arr[i],36)); return r.join(' ') })('this is a sentence')
 
@DJDavid98 "1375732 676 10 2226111661742"
 
!!> (function(str){ var arr = str.split(' '), r = []; for (var i=0,l=arr.length; i<l; i++) r.push(parseInt(arr[i]).toString(36)); return r.join(' ') })("1375732 676 10 2226111661742")
 
@DJDavid98 "this is a sentence"
 
I think I'll hang on to this idea for a future one page encode/decode app unless somebody has done it already
 
5:49 PM
@DJDavid98 That;s basically how url shorterners work
 
@PeeHaa I thought those services generate a string of random chars instead of converting a string to a number or vice versa
 
I doubt that it would be based on just suplying a random string
Because URL shorteners want their urls short and generating a random thing is not very efficient
Unless they have generated the entire pool beforehand
 
aw, I had such a nice recursive solution...but it crashes python
def int_to_base (n, base, chars=None):
    if chars is None:
        import string
        chars = string.digits + string.lowercase

    if base > len(chars):
        err = 'Base (%d) larger than amount of chars (%d)' % (base, len(chars))
        raise ValueError(err)

    mod = n % base
    return int_to_base(n / base, base, chars) + chars[mod]
sigh loop it is...
Wait no I'm a moron
Why am I so stupid
Ignore everything I ever say
 
6:05 PM
@ircmaxell meh.
 
hi - i'm looking for a grunt/gulp plugin which can combine multiple html files into one (creating a one page application) - but till now I only found plugins which would inline css or js files - any hints?
 
@exaptis why would you want/need to combine multiple html files into one??
 
as i'm creating a single page website I want to split the different parts (menu items like home / about us / contact us) into single files which makes it easier to maintain.
 
Look into html imports (quite new, not well supported), remember that it exists once it becomes viable in a year, and in the mean time look at templating
 
@Zirak thanks, i'll give it a try!
 
6:16 PM
finally, I solved my problem :)
 
6:39 PM
I've been looking for an alternative to Np++ that also doesn't try to guess what character(s) I'm trying to write, but haven't found many so far. I hate when online editors autocomplete brackets or single quotes for me, and seems like windows code editing software also retain this feature
 
@DJDavid98 Why? What's the problem with that? So long as when you hit enter, you immediately begin typing within the bracket, I don't see the problem with that
 
@Neil I got used to doing it myself, and I can't erase it from my muscle memory, so it's just faster for me to type it out rather than press enter, then make myself type the already prefilled thing in, only to realize it has been done automatically, then delete it and carry on.
 
@DJDavid98 I guess I can see that. I was used to that too, but you get used to it in the end
 
@DJDavid98 That's usually a feature you can turn on and off. As always, I recommend you give emacs and vim a shot.
 
@Zirak Are those Linux and Mac apps?
 
6:46 PM
Google
Reach enlightenment and freedom
 
Vim is my favorite mac app
 
Emacs seems like a rich text editor
 
Emacs is whatever you want it to be
 
Which one am I supposed to download from this list of stuff? gnu.prunk.si/emacs
Duh, nvm, there's a windows dir on the bottom
 
Download, once you're in, hit Ctrl-h t
Have fun
 
6:57 PM
I feel like that combination might be malicious
 
Ctrl-h is the Help prefix, t stands for tutorial
It's the emacs intro
Might also appear in the splash screen, just haven't seen that in ages
 
emacs is essentially an operating system ;;
 
According to this I have to set an environment variable for it to work? What?
 
uh, no
Deflate, start bin/runemacs.exe
 
... windows?
oh dear
 
7:00 PM
brb gonna look up deflate
 
"Deflate" as in "extract"
 
Oh
That makes more sense
Is this thing sensitive for spaces in the runemacs.exe file path? Like, C:\Program Files\emacs\...
 
It's not that complex. Extract, go to the bin directory, hit runemacs
I'm sure you've extracted programs before
 
Yes I have, but I just wanted to confirm that it does not collapse when the file path has a space in it, since some programs do. And it does not.
However, it makes annoying system error noises when I scroll to the top
 
yeah that's really annoying, I have a config somewhere that disabled that. Ping me when you start learning how to configure emacs.
 
7:06 PM
Also, pressing ctrl+c and then scrolling down also results in said noise
I don't think I'll bother to fix this thing up so it's less annoying, I can only assume it takes ages to configure to my taste
 
Killing the bell is one line.
If you really want to know: (if (fboundp 'set-message-beep) (set-message-beep 'silent))
 
I also find it weird that native windows things like ctrl+c & v do something completely different according to this "Emacs tutorial"
 
Correct, they're different. Read on.
 
Man, the amount of times I've hit ctrl + s in vim
Gaah
 
How much slower is SSD access than RAM access?
 
user2620028
7:13 PM
Depends on the size of the ssd and ram and bus's between them and the cpu
 
I love how some shortcuts in the tutorial move you to a completely different part of the document so you completely lose where you were
 
@AaronSiciliano On average?
 
user2620028
@SecondRikudo I do not have measurements. There are tricks you can do to make SSD's have very fast read writes for small amounts of files.
 
user2620028
Basically mimicking ram
 
@Zirak There's no settings GUI at all I presume
 
user2620028
7:18 PM
@SecondRikudo What are you trying to accomplish with that information anyways lol
 
@DJDavid98 There is. Don't use it.
 
@AaronSiciliano Discussing with a friend.
 
@Zirak It must be cleverly hidden then, since I can't find it.
 
Doesn't matter, don't use it
 
So how am I supposed to edit the settings then?
 
user2620028
7:20 PM
mm... yeah i wouldn't really try to compare SSD to RAM in actual use case scenario.... At best case scenario for the SSD to be able to stack up to the ram in performance it has to have very biased testing done and While it is capable to use some of that setup in a real scenario it is too restricting for serious use.
 
There's a configuration file.
To be honest...I don't remember how I learned beyond the tutorial. Probably pure googling around
 
The only notable file I could find that started with con was condom.1, guess I'll have to rely on google then, but having to google how to configure a text editor feels like an overkill to me.
 
@DJDavid98 if you have the gui, there are options
 
@DJDavid98 Learning emacs requires dedication, and you are awarded at the end. If your intention is to grumble, don't use emacs.
 
7:24 PM
@AaronSiciliano How long does it take to grab a byte of info from RAM, and how long does it take for SSD/HDD?
 
@Zirak According to tutorials there should be an .emacs file somewhere, but there isn't.
 
You need to create it
I think in Windows it goes in %appdata%
 
@Zirak Unless that location can be changed, I'm done with emacs, I don't want to have to pull my hair when I loose a config I didn't back up on a windows reinstall
 
9 mins ago, by Zirak
@DJDavid98 Learning emacs requires dedication, and you are awarded at the end. If your intention is to grumble, don't use emacs.
 
And of course you can change it
It's by default ~/.emacs . Windows doesn't have a notion of a home path, but you can set %HOME% if you wish.
But stop threatening. You're one minute in, haven't opened a file yet, and you're complaining about config?
Config is still miles ahead
Write a file first
 
7:35 PM
@Zirak I have opened a file already
 
Move around, learn about the kill ring, search for stuff, run a few commands.
 
The thing I want to get rid of the most is that bottom part of the window which - after trying a few menu elements out - now says Compile command:
 
Remember the tutorial? One of the first points there was C-g, used to kill a half-completed command
(And if all else fails, ESC three times)
 
I don't think I'll be using too many commands when writing js files though
 
7:39 PM
@DJDavid98 You'll be surprised
@FlorianMargaine ...no way
 
yes way
totally trying it
 
Something else I noticed, the app freezes for a fraction of a second when I scroll through a line-wrapped base64 string
 
STOP. COMPLAINING.
LEARN. EMACS.
The fact that you're scrolling means you haven't done #2
 
@Zirak Using the mouse scrollwheel for its intended purpose is an anti-pattern? Srsly
 
using the mouse is an anti-pattern.
 
7:42 PM
fml
 
One of the first things in the tutorial was C-v and M-v
 
I've turned on the CUA keys thing so Ctrl+V does what I expect it to do
 
Why would you do that?
 
go back to eclipse..
 
If you don't intend to learn the editor, don't use it
 
7:47 PM
It just goes against so many popular patterns that I can't possibly learn what shortcuts do different things in emacs than every other mainstream application. It's like releasing a game that has IJKL instead of WASD for controls. You eventually get used to it, then struggle getting used to the old controls again in a different game.
 
Worth it
 
I think I'll stick to Np++ for the time being, and once I have Inf amount of free time I might consider looking into emacs
 
Your loss
 
5 years ago I was surprised you can make websites without using Dreamviewer, so this change can happen next year for all I know. Currently, I don't have the sufficient level of common sense to understand that program.
 
7:56 PM
@SecondRikudo I hope that thing stays in Japan
 
@DJDavid98 I hope so too
 
@FlorianMargaine A "friend" of mine asked me what's the point of emacs-webkit. I sent him this: cdn.meme.li/instances/17765719.jpg
3
 
@Zirak LOL
I'm literally laughing out loud
 
@FlorianMargaine I might try out the distro he linked to, Deepin
 
8:12 PM
@Zirak oh, I only saw deepinemacs
sounds nice
 
Based off of Ubuntu it seems. ...maybe I won't try it.
 
looks like a chinese fork of ubuntu with gnome shell, not caring a single bit about licenses
ugh
emacs-webkit is a PITA to install
 
Too many distractions!!!
 
requires qt5, gcc-4.9
gcc-4.9... I don't want to compile it
hopefully they provide snapshots
eff it
 
8:45 PM
2
 
14 hours to deadline
I better go to sleep now
 
@BenjaminGruenbaum 2.9999999999
 
0
Q: Waiting for multiple responses in a Play Framework Promise

Aditya PawadeMy Play Framework Application has the following task : accept a linux command from the user and using Akka, execute it on remote machines and bring back the results and show it to the user. Till now, this is how I did it : Create a Promise in the controller, message an Actor the command, which ex...

 
how does stack overflow implement username ping feature?
I'm trying to do the same to no avail
 
8:59 PM
@Moderateur Like this
 
maybe there's some google article about that that I missed?
 

« first day (1415 days earlier)      last day (3534 days later) »