« first day (2303 days earlier)      last day (2868 days later) » 

00:00
@William nope, my "Idol" is the one and only Michio Kaku
dude made a particle accelerator or science project :P
meta.stackoverflow.com/posts/342440/revisions?page=1 funniest close-repoen/rollback battle I've seen in years
2
00:25
yay my fidget cube arrived
I know what you're going to do with it first
i only do that with food
@SterlingArcher au contraire
Apr 26 '16 at 19:11, by Sterling Archer
Well there's officially witchcraft going on at my desk. I dropped my waterbottle cap, saw where it fell, and now it's literally gone.
@SterlingArcher You're not going to poop it out?
i mean... not now
May 3 '16 at 15:20, by Sterling Archer
We wrecked her in darts, I laughed at her, and when we were about to leave, she asked "So how do I pay?" Obviously meaning "How are we gonna split the checks" and my dumbass just blurts "Uh, it's called a fucking tab" and my boy's jaw dropped
forgot about this
Nov 25 '14 at 14:59, by Sterling Archer
I dropped cupcakes on the bus this morning. It was pretty upsetting
and this
00:33
Oh I forgot to tell you
I almost spilled goldfish last weekend
dont you talk to me or my goldfish again
Nov 26 '13 at 16:57, by RUJordan
!!afk dropped about 10000 business cards (literally)
!!afk my life is a mess
00:48
01:13
^ made that in photoshop got it in the mail today
sexy af
(imo)
01:32
I'm trying to convert a very "simple" jpg image into svg
but I don't know how
Use inkscape to trace it
It won't look great
But that's because youre converting a jpg to svg
@Meredith in what section do I have to ask IYO?
idk?
xD
yeah idk
01:39
not even me lol
I want to convert this for example
can't gimp export stuff like that?
export to svg?
No
01:42
yes svg
so I can fill them even in CSS! :)
Yeah you gotta trace them
I have to install also XQuartz?
so you didnt test it
how do you know that is good?
I mean I've used inkscape before to trace bitmaps
It's not good
01:45
like many of them.....
problem is the quality
I mean do you expect it to be easy to turn a bitmap into svg?
It would be fine obtain a vector or something
Honestly if you just want to color the image just use css filters
so scalable and fillable etc
01:47
vectormagic is difficult, I was never able to export an svg
try potrace then
wow looks good
im installing it
thank you!!
so, initial draft kinda: towc.eu/v2
I'd then have some more text, a CV after that, then I'll see...
@towc error for me
try now
damnit, my host doesn't support https anymore it looks like :/
01:50
still no
yes works with out https
as in, try reclicking the link
like it
reminds me of the mathematica logo but the mathematica logo is all red
are we talking about the same thing?
orbiting particles and a concave 3d shape?
01:55
just vaguely similar - ok maybe not at all.
you're weird :)
I might add the dribbble thing alongside the codepen one
same style I guess
I get to showcase more stuff while making it "look" concise
Hi guys, quick question: what do you send from server to client as a cookie after authentication? Since I've read that the server should be stateless I can't send an arbitrary id so what?
@Ferus 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.
how about "towc: the gentle developer"
sounds too sexual?
Might be m8
02:02
People use json web tokens if they want their server to be completely stateless I think
But a little bit of state is ok
So if I generate an id and store those in an array, is that ok?
Probably not
So I gotta encrypt it somehow?
What do you mean generating an id and storing it in an array?
Everytime the user connects to the server it sends the cookie (id) and I compare it to the array
the element in the array*
02:06
And what purpose does that serve?
@towc obligatory rainbow
The user doesn't have to authenticate every time I suppose
1. That's state
@littlepootis was thinking of writing "taste my rainbowls" instead of the friendly thing
2. Don't bother implementing your own sessions
Use a library for that
02:09
What kind of library? I don't use express and didn't find any
What are you using?
So how do you implement it without state?
Just Node.js, nothing else
also, need to get it elinks-friendly for the lolz
off to bed
Ok
You're going to have to implement a lot of stuff if you're not using express
Alright, do you know of any recommended resources?
02:12
No
Ok, thanks anyway.
You're on the right path though
Generate an id, check if it's a valid session, then load the session data corresponding to the id
So where am I really off?
Encryption?
You shouldn't have to encrypt the session keys
SSL will handle that
02:15
Is it just recognizing state from whatever is sent from client to server without storing data on server?
You'd store session data on the server
But that's state isnt it?
this is pun
so I sent a cookie to the client, which is not an id then that is sent back everytime without storing anything on the server except the session data, so how can I map the cookie to the session data? Do I need to some sort of hash-function or?
02:18
The cookie is the key
like { [cookie-key]: userData } ? And then I just get it that way?
No
You have a cookie called sessionkey and its value is the session key
Ye, so: { [sessionkey]: sessionData } ?
Not the session data
so what is it a key for?
02:22
To access the data on the server
new expanse is on point
Isn't that what Im doing?
Don't store the session data in a cookie
That goes in a database
What I meant was I sent session key to server in which I have a cache objective taken from the database like { sessionkey: database.user.data } where the session key is the key and the data it maps to is the user.data
That will work yeah
02:25
Cool, but what is the sessionkey? An id? In the JWT you talked about there seemed to be encryption and stuff
JWT is for statelessness
Sessions are state
They're unrelated
Alright, so in this case it's fine to send id
You want to avoid state if you can
But if you need a little, you'll be fine
Okay, thanks for the help, appreciate it :)
 
1 hour later…
03:56
Hi Hi, i've got this method inside of a class
_render() {
        this.gameObjects.forEach(function(gameObject){
            console.log(this);
            gameObject.sprite.draw(this.context2D, gameObject.sprite.position);
        });
    }
it seems that when I use this.context2D to access a property from the class, the foreach loops looses reference to the class properties?
Thanks for the quick response :)
 
1 hour later…
05:06
<script>
    $(document).ready(function() {
        $("#form").load(function () {
            $("#branchUserId").val('');
            $("#employeeName").val('hello');
        });
    })
</script>
no error thrown in the console but no desired output?
I think your using load in the wrong context here
simplest thing u want javascript to do for u and yet it fails
i tried it as:
normally you use load() when your querying the server for context using a function and identifer
Maybe you are trying to use on?
also your using jQuery :p
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery-2.1.4.js")"></script>
Actually I'm not quite sure whats going on here
05:09
No one is
Don't worry.
No like
I'm not sure why your doing that at all
the whole function doesn't make sense
Can you try and explain what your trying to do?
cause when the form loads - branchUserId has digit 0 in its input field since its defined as int. I want to empty it if thats possible on earth
ignore the hello line - that was for just testing
Why don't you just define a defualt value or nothing within the html?
What kind of control are you using?
@Html.EditorFor()
Is that C#?
05:12
yep
MVC
When you create the control use new { default_value = "5" }
or in your case nothing
54
Q: Html.EditorFor Set Default Value

NateRookie question. I have a parameter being passed to a create view. I need to set a field name with a default value. @Html.EditorFor(model => model.Id) I need to set this input field with name Id with a default value that is being passed to the view via an actionlink. So, how can this input fiel...

That's one of doing it. Why I almost always fail when I try to do anything with Jquery.
It worked?
jQuery is pretty clunky for doing this stuff
It would probably be easier and faster execution wise to just go vanilla
The reason your jQuery function doesn't work is because your trying to attack the form with a load() which is used to query the system for a specific file.
If you'd simply used $("#branchUserId").val(''); inside the ready function providing the ID is correct in this context it would work
so? am I stopping it from quering the system for a specific file? :)
It's because it's within the local scope of the load () function
Because nothing is found to be queryied i.e. load("index.html", function (){ do stuff})
05:19
Yes I have got it worked by attacking it through the control. Thanks for the work around way.
would look for index.html and if true would change the val
But because you simply aren't looking for a file here it just skips your executable path
I'm not even sure why your going to the form first as your using an explicit identifer
No problem :-), good luck with your thing
<script>
    $(document).ready(function() {
            $("#branchUserId").val('');
    })
</script>
it worked.
Best practice for MVC would be to do it via the control init fyi
Because at least you can reason about the control from where it's created
yeah.
makes more sense you do it when you are creating the control
Thanks mate. You been great help.
No worries :D
 
1 hour later…
06:42
angular2?
06:57
can we post html here
i need a bit of help
what is it RAchel
@RachelDockter
im trying to make a popup on my website, this is the code i got for it
   <a class="login" href="#login-screen">login</a>

    <div id="login-screen" class="overlay">

	</div>


.login {
  font-family: "Tahoma";
  font-size: 10pt;
  padding: 8px;
  color: #000000;
  border: 2px solid black;
  border-radius: 50px/50px;
  font-style:bold;
  background: #FFFFFF;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.1s ease-out;
  position:absolute;
  top:0px;
  left:0px;
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
lets see
when i click the button, the url changes to login-screen, but theres no pop up
what kind of pop up?
07:03
just a div where the user has to login
ok so is just a div with the login form
before you click the button
you have the div to display none?
erm, thats all the code i got for it
yeah is hidden
07:06
hmm hold on
do you know about dom elements?
DOM
ive no idea
like this
ohhh wait i fixed it
i needed to add this
<a class="login" href="#login-screen" onclick="myFunction() >login</a>
07:10
.overlay:target {
  visibility: visible;
  opacity: 1;
}
i know that yh
but its working now thought
it works now?
yeh i just needed to add .overlay:target
and set the visibility to visible
good job
 
2 hours later…
09:14
I just tested the tool that @William suggested me last night (potrace)
this is what I got! cooool
:D
bob
bob
Hi, ajax keeps refreshing the page, tried return false, with no effect. jsfiddle.net/t16qjfs6
@bob hi
bob
bob
@neoDev Hi
I guess you are using a <form>
right?
bob
bob
yeah, i've used this code before and didn't have this problem
09:20
the code you posted has nothing to do with the page refresh
you should preventDefault() on form submit
do you know how to do it?
bob
bob
@neoDev tried that, didn't work
mmm, you didn't do it properly
show me how you did
bob
bob
@neoDev well i thought the issue was on the submitHandler so i used e.preventDefault() on the submitHandler.
show me the code
bob
bob
full code?
09:23
yes, expecially the part regarding the form and the preventDefault
this is not the full code
where is your form? where is the part where you add the listener to the form?
there isn't in that fiddle
so you want to stick with this .validate() thing uh?
bob
bob
@neoDev unless there is an more effective way of doing it
09:29
what it does?
I think you don't need it
bob
bob
it validates the form
you already have html5 validation
no need it
maybe it polyfills the validation for those browsers who do not have html5 validation?
what I suggest is:
do not use <form> at all
use html5 attributes for validation
use jQuery ajax
bob
bob
good point
your form:
<div id="myForm">
    <div>
        <input id="username" type="text">
    </div>
    <div>
        <input id="password" type="text">
    </div>
    <div>
        <button id="submit">Submit</button>
    </div>
</div>
on click listener and ajax post
function doAjax(){
	$.ajax({
    	url: "XXX",
    	method: "POST",
        data: {
        	username: $('#username').val(),
            password: $('#password').val()
        },
        success: function(data){
        	//...
        }
    });
}

$('#submit').on('click', function(){
	doAjax();
});
use html5 validation on inputs if you want developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/…
@bob do you like this way?
bob
bob
I'll try it, thanks
09:43
it's simple
your important validation is the server-side one
are you doing it?
bob
bob
yes
cool
best of luck
@bob if you want to try this hacky thing in your code you can see if works
bob
bob
I tried that code, it won't trigger that ajax call for some reason
I eman try add this:
sec
bob
bob
Checked in the network console
09:48
$('#call_back_form').on('submit', function(e){
	e.preventDefault();
});
add it to your code
bob
bob
it's not refreshing the page
and tell me if stops the page reload
bob
bob
it's just not make the ajax call
omg
man add it tp your code
it doesn't do ajax calls
just add to your code and teel me ok?
bob
bob
ok, checking now
09:52
:)
bob
bob
@neoDev nope, still doesn't trigger the ajax
you had itr working before you said
so is this breaking your code?
bob
bob
would seem so
mmm ok
sorry
bob
bob
haha noooo
that's for trying to help!
thanks*
09:57
you're welcome
try to investigate how your validate plugin handles the form submission event
you have to implement this plugin properly, reading the docs
I guess you are using it improperly
this is why you are experiencing page reloads
what no csrf check?
bob
bob
Yeah, probably
10:25
@KarelG wait, do you mean this? guihacker.com That was by Loktar. I don't remember having done something with green text on black background...
@towc what it does? there are continuous percentages displaying on the screen...
it's just there to look hacky
it has no real purpose
ihih cool
it's so cool that potrace! :D
I am having really a lot of fun
11:08
hey pootis
:D
why indeed
11:20
Hello
(yes, yes, yes, I can finally write in this chat!)
11:32
Is there anyone that's able to male a .js script work under Tampermonkey? I'd like to have a very basic introduction to making it work properly, I think the problem lies mainly in the wrapper. Maybe this is an OK question for the main site?
Hello ladies and gents ^.^
Hello! (Gent here, don't be fooled by the avatar!)
yup sure
@Zachiel Is your question not answered in the docs: tampermonkey.net/faq.php?ext=dhdg
I don't have experience with Tampermonkey unfortunately
11:44
@Brandin well, not really, I guess? I know how to write a scrit, where to write it, it even marks as active when I open the intended page, it just does nothing.
I think I miss some crucial piece like, I don't know, <script> tags?
...sorry I need to afk, I'll be back later
@Zachiel If you're new to a tool, make sure you can get a basic script working first. That is what "Hello, world" is for.

« first day (2303 days earlier)      last day (2868 days later) »