« first day (1822 days earlier)      last day (3144 days later) » 

user5020521
4:00 PM
practically I have an asynchronous request and a callback function in it this callback must fetch something from a php page which delete a row
 
user5020521
what I need is to fetch the deleted row
 
@JanDvorak yes, it is
 
so its numeric
 
user5020521
I already delete a row and in php I have the rowCount function
 
user5020521
all I need is to fetch that result inside this callback function
 
4:01 PM
parseInt(xmlhttp.responseText, 10) > 0
 
Are you reading the response before it arrives?
 
user5020521
@GottZ may I show you where this condition is in?
 
You may not.
 
user5020521
@JanDvorak in order to reply to your question I might need to show you a bit more can I?
 
I'm on my phone now. its a bit hardcore to answer such a question through a soft keyboard. I guess someone else might be willing to help you then
 
4:03 PM
Nope. Show it in public so that if one drops out, someone may pick in.
 
user5020521
cause I'm not really sure to read the response before it arrives thus it could be useful to me to show you at least the function which wraps up the condition
 
user5020521
ok
 
I'm on my phone too, BTW
 
ye.. cheater..
 
user5020521
it's just a matter of few lines here
 
user5020521
4:04 PM
I think 4 rows
 
Try posting it and see if Caprica boots you.
 
user5020521
function delOutcome(xmlhttp, idRecord) {
	if (xmlhttp.responseText > 0){
		console.log(xmlhttp.responseText);
	}
    //console.log(idRecord.innerHTML = xmlhttp.responseText);
}
 
user5020521
this is before your suggestions
 
So, where do you wait for the response?
 
user5020521
delOutcome is the callback func
 
user5020521
4:05 PM
the response is above these lines of code
 
How are you attaching it?
 
user5020521
function delRecord(idRecord) {
    var url = "php/cancella_tages.php";
	if (window.XMLHttpRequest) {
        //code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    } else { //code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }

    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            delOutcome(xmlhttp, idRecord);
        }
    }
    xmlhttp.open("POST", url, true);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
 
user5020521
this is it
 
user5020521
and there is a confirm box too
 
Would you stop using that w3schools code already?
 
user5020521
4:08 PM
function delTable(indiceArray) {
	var r = confirm("sure to delete " + phpObject[indiceArray].nome + " " + phpObject[indiceArray].cognome);
	if (r==true) {
		delRecord(indiceArray);
	}
	console.log(r);
}
 
user5020521
this is the confirm box
 
user5020521
that's all folks
 
user5020521
w3schools is where I attempt to learn a bit more using pure javascript
 
fail
Don't
 
user5020521
cause I suppose that before going jQuery I had better learn in pure js
 
user5020521
4:09 PM
fail what? @JanDvorak what part of my code is a failure?
 
Do learn vanilla JavaScript, but not from w3schools
The biggest failure is the code that isn't yours.
 
user5020521
I understand that maybe mozilla developer network is a better place where to learn
 
user5020521
but nothing comes from nothing
 
user5020521
so I need a tutorial code to test so that I try to learn from my mistakes
 
user5020521
this is not a live code
 
4:11 PM
That's an understatement. W3schools is a wasteland, MDN is a tropical paradise.
 
user5020521
you're surely right for the near future
 
crl
Jan you're impressively good at typing on a phone
 
user5020521
but now I'm stuck with this code and I matter of fact unable to write what row was deleted
 
You can't learn from your mistakes if w3schools makes all the mistakes for you
 
user5020521
wow i'm happy
 
user5020521
4:13 PM
w3schools had all my trust till 2day
 
user5020521
ignorance never dies my friend
2
 
user5020521
i'm quite a beginner as you can see
 
user5020521
otherwise I'd be able to tell the document to cout the deleted row
 
user5020521
row/rows
 
user5020521
count*
 
4:14 PM
@crl the Android keyboard is impressively good. I just keep guessing when to swipe and when to rely on autocomplete
 
@JanDvorak you can. not going to the you know which place.
 
user5020521
@JanDvorak do you have any idea?
 
@Riccardo990 retry without the w3schools code and I might be willing to look at the rest.
 
user5020521
I should be going to mdn
 
crl
I have 3 tables/collections(sorry for using Mongo) User, Site (with a parent fied linking to User), Template (with a parent field linking to Site), now I have the User's id in a token, so I'l check that token.id==req.id (so he can only see his full profile) so far so good, but I'd like to do this check for access to /api/sites and /api/templates, for sites I can easily force that token.id==site.parent, but for templates it's 2 or more levels up (templates have templates children), how can I do?
 
4:19 PM
MDN does have code too, you know
 
user5020521
and get that example code and that would mean to rewrite a wall of code
 
user5020521
but i've been trying to get over this for days
 
user5020521
i'm really really exausthed
 
Rewrite that w3wall into five lines of MDN code.
 
@crl get all sites, then get the templates for them (template with template.site in [sites])
 
user5020521
4:21 PM
that could be easy to do for you but not for a beginner like me
 
Hint: ditch ie6 support
 
I can't remember why but at first sight, MDN looked useless and ugly to me compared to w3schools. I wonder what was it. Maybe I was just used to w3schools or something having used it for a week.
 
user5020521
plus I'm exausthed besides you don't have to do the dirty job for me just give me an abstract path
 
Bible without images also looks ugly at first, too
 
crl
@ssube ok, but when a user send a PUT on a /api/template/idThatHeDoesntOwn how can I block it, without having to do N request to get back to the user owning the site?
 
user5020521
4:23 PM
@AwalGarg I was used to w3schools till now
 
@JanDvorak or with images
 
user5020521
that's been the place where I've tried nearly all of the code on live websites
 
crl
hmm I should put a pointer to the site or user in each template
 
user5020521
@JanDvorak why should I get rid of IE6 support?
7
 
@Riccardo990 I'll give you an abstract URL: sites://MDN/xhr-tutorial/
Can someone please star that ridiculous question so that I can pile on?
Thank you
 
4:26 PM
yw
 
user5020521
I'm actually on the url you sent me
 
Why is finite automaton so called?
 
@crl cache
 
@Riccardo990 Does your browser really support this protocol I've just invented?
 
@AwalGarg it stops at some point, I think
 
crl
4:27 PM
@ssube hmm possible, thanks
 
user5020521
the use of prototype is highly reccomended
 
@ssube that's because input stops at some point
 
user5020521
matter of fact prototype is still an unknown lib to me
 
@AwalGarg because it has finitely many states
 
~_~
 
user5020521
4:29 PM
and it leads me nowhere unless I decide to start implementing it and that would mean to get back where I started from
 
Automata that stop at some point are called terminating, not finite
All state machines are terminating
 
All FSMs, I'd say
 
All infinite state machines, too
 
But their termination shall depend on the input
 
why does babel take new Promise(function(resolve,reject){...}) and turn it into new Promise(function(){...},function(){...})?
 
4:33 PM
If the input is infinite, even FSMs won't terminate.
Or almost anything.
 
@Riccardo990 trolling aside, supporting browsers from the paleolithic era is a huge headache and a ton of overhead
 
@JanDvorak technically, they can. say the current state is an accepting state, and the next input character doesn't lead to any other further state.
 
i've never used prototype. just prototypes. especially today you should not consider it a useful lib
 
user5020521
@SterlingArcher supporting browsers aside do you have any suggestion?
 
Sure, dont do it lol
 
4:36 PM
@Loktar Hardware Rivals
free for ps+
 
user5020521
all I need is to fetch the deleted row/rows from php and display them in javascript
 
much fun
 
You have to transition once for each input symbol, even if it's to multiple states or in a loop
 
@JanDvorak but what if there are no further states? Where would you transition to?
 
4:38 PM
@Riccardo990 follow my link and learn something from scratch. its written in some kind of abusive style but that's all you need to understand how xhr works
 
user5020521
I'me reading your lack of rudeness example man
 
@MadaraUchiha yep I got it after I tried to think it on the different angle
 
user5020521
but rowCount aside I've already achieved everything stated overthere
 
If your FSM eventually transitions to no state for any infinite input, it recognizes a finite language.
 
user5020521
matter of fact I'm just missing a few lines of code
 
4:40 PM
@JanDvorak right, and it then terminates. But such is not the case with an infinite state machine.
 
But neither it is the case for any FSM recognizing an infinite language.
 
Has anybody figured out a way in react, so that if a component is written inside another component of the same kind it will get a reference to that component ?
 
@Riccardo990 it was done by @Zirak
 
You can only add a prototype to function objects and not just a variable defined as an object, correct?
 
@AmericanSlime nope. you can add to basically all "objects" (i believe)
 
user5020521
4:42 PM
@GottZ that's funny dawg
 
Such as the FSM that recognizes even numbers
 
user5020521
what I'm telling you is that I've already achieved everything that does not mean that I might get to a better result
 
user5020521
but now all I'm missing is just one or two lines of code
 
so you achieved getting the result?
 
@Riccardo990 wat
 
user5020521
4:44 PM
I'm missing to tell the document what row/rows was/were deleted
 
user5020521
but I actually delete the row/rows
 
Can someone kick the koala, please?
 
user5020521
what's wrong with that?
 
user5020521
have I been rude again?
 
Aww, don't kick koalas ;-)
 
4:46 PM
can we spank him pls
 
sure
 
user5020521
do you think that I'm taking the piss out of you?
 
is that a real phrase? ^
 
user5020521
i'm sorry for that
 
Two things you should never do: 1. Slap Pandas. 2. Kick Koalas.
 
4:46 PM
There's everything wrong with the question " have I been rude again? "
 
user5020521
i'm sorry if you're thinking about that
 
Why.. why is piss being taken? Is that a literal-metaphor or am I missing something
 
crl
I think it's quite bad that a downvote is -2 and an upvote is +10, a downvote should be more important than an upvote, for example a polemic answer shouldn't go too high
 
@crl nope
 
> why is piss being taken
lol
 
user5020521
4:47 PM
we're going from javascript to philosophy
 
@SterlingArcher bloody wanker
 
user5020521
we might as well open a meta conversation
 
well my guess is that the lack of understanding our suggestions is making you look <insert word here>
jk
 
user5020521
thank you for your sincerity
 
user5020521
matter of fact I'm applying your suggestions
 
4:49 PM
!!define literal metaphor
 
@JanDvorak It means I aint got time to learn your $5 words.
 
user5020521
else I wouldn't even have opened those pages
 
STOP SPEAKING BRITISH TO ME D:
 
@SterlingArcher would you like a cuppa?
 
Be more like Canada, weird and out of the radar
 
4:50 PM
I prefer a cappa.. oh wait.. no twitch
 
Now @SterlingArcher has shown his true coloUrs
 
user5020521
if I care about what you say I implement your suggestions else I do nothing
 
I can't stand.. colours.. that's just.. wrong.. as well as Fahrenheit
 
If anything, America should hate England the most
WE THE PEOPLE BRAH
 
user5020521
4:52 PM
who are you talking about?
 
none of my business then. germoney ftw
 
Oy o/
 
@Riccardo990 I believe you have just said nothing at all
 
Honestly at this point nobody, I'm screaming nonsense bc strong coffee
 
user5020521
@JanDvorak you're making me laugh it's a funny chat
 
4:53 PM
pours @SterlingArcher some weak coffee
 
silence! look at dem kittens
 
user5020521
i'm not saying you're a clown please don't think I've been disrespectful to you
 
He is a clown.
 
user5020521
he who?
 
it's fun to see someone claiming he is the topic
 
4:55 PM
Then I'm not saying you're a bloody vampire either.
 
BTW.. I like trains
 
user5020521
i like airplanes
 
Traaaains...
 
choo choo
 
> I never went off topic... I am the topic!
 
4:56 PM
Craaaanes
 
vaaaains
 
myChart.assignColor("opacity" , 0); where did i go wrong ?
 
... And now it raaaains.
 
My laptop is now downloading windows 10 and will probably install it in the next hour. Not sure of what I should do.
 
since when can color be opaque?
 
4:57 PM
@dievardump Get a coffee.
 
This coming from Mr Sandwich
 
@hmmmbob are you sure you should be giving it two parameters?
 
@ssube I spend the last two days unlocking, secure erase and creating a brand new windows 8 installation because my ssd crash and couldn't do anything.
 
Wait, are you still using the same SSD?
 
dimple.chart.assignColor(tag, fill, stroke, opacity)
 
4:59 PM
Installing windows 10 when everything is running shouldn't be so long... should it?
 
myChart.assign color.to string() might unveil what you seek for
 
Windows 10 install will need to restart your PC, won't it?
So, how are you doing it when everything is running?
 
Wut? It is now downloading. For the install I will have to restart, I guesss yeah.
 
yes, you will, several times
 
@rlemon haven't heard of it I'll have to check it out
 
5:00 PM
Once it's downloaded it doesn't take too long'
but the download drags
 
@SterlingArcher yes haha I was playing it over the weekend as well
 
"when everything is running" was to contrast the last two days when I couldn't do anything on the ssd
 
@Loktar please tell me you teabagged Luke Skywalker
 
hahah
 
5:01 PM
Download is finished, need to follow the instruction. bye o/
 
postpones getting win10 even further
 
@SterlingArcher horribly off topic but quite hilarious
 
no but I saw him and Darth Vader fight eachother and Darth Vader win
 
@dievardump again, are you still using the previously-crashed SSD?
 
@JanDvorak well it tooks 20 minutes to download the 2.5 Go
 
5:02 PM
Sounds about right lol
 
I'd shell out for a replacement if it already crashed once
 
Yes @ShotgunNinja
 
How does that work? Does Luke and Vader just get randomly assigned?
 
Yeah... might want to go out to Best Buy/Fry's/etc and pick out a new SSD
 
5:02 PM
@SterlingArcher They either randomly spawn occasionally or its a power-up, like TIE fighters are
 
Somebody forgot to account for braking distance
 
Now, restart.
 
if it's crashed once it'll probably crash again
 
We'll see.
 
5:03 PM
shudder that backquote
 
I'll come back when it's done. (sorry, new keyboard layout since the reinstall)
 
sounds good.
 
@KendallFrey I feel bad now... there's a sad backstory to that gif
> The story behind this is actually pretty sad.
The player, Tyler Hirsch, was an insanely gifted player for the University of Minnesota. He was also extremely mentally unstable. Growing up in an extremely religious household, coupled with mental illnesses, led to him having a couple breakdowns while at Minnesota. For example, he wanted to exorcise the arena on multiple occasions, and has declared Barack Obama the Anti-Christ on social media.
This gif is from 5 minutes after a loss in the conference semifinal. He was told by coach Don Lucia that he wasn't crashing the net hard enough so he w
 
wondering if sterling and ssube are talking about a video game or a weird sexual roleplay
 
little column A, little column B
 
5:05 PM
> he wasn't crashing the net hard enough
um
not that way bud
 
shitty coach
 
@SterlingArcher fool*
 
user2620028
Uhh guys am i derping hard? I know it has been almost a year since i have touched js... but what am i doing wrong here.... element.style.position.left = "100px";
 
I'm not sure you need position
 
@HatterisMad .style.left
 
5:14 PM
element.style.left = "100px";
 
user2620028
yeah just fixed it was trying to figure out the best way to word it lol
 
user2620028
or in other words... derping hard
 
God I hope this really happened. I want to believe
 
user2620028
i dont believe that for a second lol
 
5:16 PM
cue x-files theme
 
user2620028
that sounds like it is taken directly from archer lol
 
> the raccoon became unconscious from being squeezed
If this is real, I will send that man a medal
Like, I don't think even macguiver would hand pump a raccoon to bypass a breathalizer
> Invitation: SEAR Scrum @ Weekly from 9am to 9:30am on Monday, Wednesday, Friday from Mon Oct 12 to Fri Jan 29, 2016
 
morning
 
Son of a bitch... I literally get in at 9am
Hi Kitten
 
@Ṣhmiddty you playing ps4 right now
 
crl
5:28 PM
@ssube sorry had to commute, so an answer with 40 downvotes and 10 upvotes is at +20, you think it's good?
 
@rlemon nope, why?
 
lemon has a ps4?
 
ps4 has a lemon
 
Back
 
crl
Front
 
5:35 PM
@ssube not sure if you saw the answer to my question, but it was all from a missing return
 
@rlemon I finally got all the gifts
some were expiring in 1 day lol
I identified them, didn't look at them all yet stats wise
 
so 30 minutes for the install, not bad. Now is time to go drink.
 
@Ṣhmiddty saw someone named schmiddty in game
@Loktar check out hardware rivals
free for ps+
 
the c is blasphemy
 
is there a way to prove by induction that n^7 - n is divisible by 7 (for any natural n)? I tried a few things, but can't really figure out a solution
so, I did the first thing that I would do when proving my induction: n^k - n % k = 0, ok?
and I prove that it works for k = 1, just by substituting
so I try doing it for k+1
n^(k+1) - n % k+1 = 0
but I don't really understand what should I do next...
 
5:45 PM
join mathematics.so
 
I love you guys more
is there any other way to write ab % c?
 
a % c * b % c
 
oh...
 
@KendallFrey that can't be right
 
you sure?
 
5:48 PM
no, but a % c * b % c can probably produce a value > c, which isn't how % works
 
oh right
forgot the extra % c
 
so ( a%c * b%c) %c?
that doesn't help much then :P
 
that transform can help you avoid overflow/rounding errors in many cases
 
I'm trying to get that % k+1 to become simply % k
 
crl
@towc by induction, it's the n that you have to increase, not the k
 
5:50 PM
I don't think you can
by the rules of modular arithmetic
 
@crl oh... that may actually be a thing...
 
crl
k=7 is fixed, it doesn't change
 
so, I'd need to prove that k^7 - k % 7 = 0
works for k = 1
(k+1)^7 - ( k + 1 ) % 7 = 0...
 
note that a^b % c = (a%c)^b % c
 
(k+1)( (k+1)^6 - 1 ) % 7 = 0...
do I really have to calculate that? 0.o
oh wait... pascal's triangle...
 
5:53 PM
towc how does one make a buttiful light rain animation
 
You shouldn't be changing the 7
 
@KendallFrey yeah, I just realized it just makes it worse
 
I think this property has something to do with the primality of 7
 
ok, pascal's triangle...
 
I believe it will happen for all primes
 
crl
5:54 PM
@KendallFrey Fermat theorem?
yep
 
I don't think it's related
it might be tangentially though
!!afk bubble soccer
 
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1 <--- 7th level, right?
 
crl
@towc look up Fermat theorem (maybe the solution)
 
which one? :P
a^p % p = 0 or something?
only one I can think of using %
 
Hey guys -- git question. if I have two repos ("repo 1" and "repo 2"), and I want a branch in repo 1 (branch_1a) to track a branch from repo 2 (branch_2a), how would I do that?
 
5:58 PM
so, k^7 + 7k^6 + 21k^5 + 35k^4 + 35k^3 + 21k^2 + 7k + 1 - k - 1 % 7 = 0...
ok, not sure what was I thinking...
 
can I just set the upstream origin of branch_1a to repo2:branch_2a?
 
http://www.commitstrip.com/en/2015/10/12/that-damned-checkbox/
CommitStrip - Blog relating the daily life of web agencies developers
That damned checkbox
CommitStrip
1444672502
 
what can I do with a + b % c tho?
is this just ( a % c + b % c ) % c?
it would help this time
 

« first day (1822 days earlier)      last day (3144 days later) »