« first day (1826 days earlier)      last day (3123 days later) » 

1:03 PM
I'm doing Angular
and I created a new json file with 5 objects containing 5 KV pairs
it's got a controller
 
crl
nice story
 
and loads fine in the template
but when I add data to the json file, it is not reflecting in the view
any idea why?
 
crl
in the json file (like a foo.json file) or in the object?
 
I had one object in the .json file
with 5 KV pairs
 
crl
ok
 
1:05 PM
and added 4 more objects
but it's still showing the first obejct
not the other 4
 
crl
there's no reason they would be added dynamically, if you don't reload the app
 
the first object also contains old data (i edited the data)
i reloaded the app
browser
 
good morning from michigan
 
afternoon
 
why is this undefined?
document.querySelectorAll('p').forEach
undefined
 
crl
1:11 PM
Array.from() it, NodeList are only iterable with the basic for loop..
 
in chrome document.querySelectorAll('p') returns an array
 
It's not an array, it's something which looks like an array
 
[].forEach = func
 
Google for "array like"
 
ah
Array.from() is ie8 safe?
 
1:12 PM
No
 
sheesh
 
Use a shim.
 
Look at all the internet bandwidth and CPU time you saved by not googling that.
Great work
 
!!caniuse array.from
 
1:16 PM
Which events are fired when you change the property textContent of an element?
 
@Tushar and how can I now what default value for this particular radio button is, if I haven't set value or defaultValue attribute, checked attribute or checked it using script?
@Tushar
 
user5020521
can anyone tell me why it just doesn't work
 
@Tushar maybe devtools could tell me this, but where to search for it?
 
@dievardump That would be cool :)
 
user5020521
var foo = JSON.parse(hello, goodbye);
		for (a = 0; a<foo.length; a++) {
			console.log(hello);
		}
 
1:20 PM
@spaffy defaultValue is auto-assigned when you create the element
 
it's alrigth now
 
@Riccardo990 "It doesn't work" isn't an error
 
I ignored some pink areas in my sublime json file ;)
 
user5020521
it it can't work it's worse than an error
 
user5020521
i'm stuck with this for days now and I'm quite desperate
 
1:22 PM
Sometimes I feel bad for all the "It doesn't work" yelling I have done at people (not related to programming) in the past when I wasn't a programmer.
 
Anyone is able to anwser to my question?
 
@AwalGarg Haha, happens to me every time someone tells me that
Happens in college all the time
 
crl
@ErroreFatale Some eventual MutationObservers listening at it
 
user5020521
so @Cereal do you see any error in it
 
what crl?
 
1:24 PM
Morning lames
 
@ErroreFatale none. Mutation events are deprecated.
 
Jesus I'm way too hungover to be working. I should not have drank so hard last night.
I think everybody in my SCRUM meeting could tell lol..
 
IIRC, IE will fire a DOMTextNodeRemoved followed by a DOMTe. added event but that's it.
In any case, don't use them.
 
oh derp. I'm dumb
 
@Riccardo990 Yes. hello is undefined, goodbye is undefined.
 
user5020521
1:28 PM
-I know those are examples only
 
and you've made a a global variable
 
user5020521
I can't give you a wall of code that's not fair
 
user5020521
I've tried to be abastrac
 
You can't give arbitrary code and expect me to be clairvoyent
 
user5020521
I've chosen not to give you a wall of code in order not to anooy you man
 
user5020521
1:30 PM
annoy*
 
@Cereal hey clairvoyant. Please tell me if I will earn a billion dollars this week or not.
 
Hi , can some one help me with this problem ,, i want to load a function once the html rendering is completed !!!
 
@AwalGarg not
 
wrong
 
can I have some?
of your monnies
 
1:31 PM
?
 
Nope. I shall put them all on my bed and sleep.
 
@Neilos

can you help me with this problem ,, i want to load a function once the html rendering is completed !!!
 
user5020521
@Cereal I'll be short and clear
 
!!tell abhi mdn domcontentloaded
 
user5020521
1:32 PM
I need to pass from php to javascript the rowCount function so that I can tell my javascript what row was deleted
 
@CapricaSix no that was for me to do...
;)
 
user5020521
that's why I'm using the parse function
 
okey i shod use check that with addevent listener right ?
 
@AwalGarg the next tiem you say i liek jquery
 
user5020521
and in my code I have two parameters xmlhttp.responseText and another one
 
1:34 PM
:P
 
I will ignore you for eternity.
 
@Abhishrek I have this jQuery wrapper...
 
posted on October 16, 2015 by CommitStrip

Today, we’re welcoming a new sponsor, VidCoin! It’s a great startup based in France who helps developers to monetize their app with in-app video ads. And they’re hiring! So if you are a mobile developer or looking for a new project, just have a look at VidCoin!

 
@Riccardo990 this is not clear what r u trying to do?
 
user5020521
I'm attempting to tell an ajax request what row was deleted in my php delete file
 
user5020521
1:38 PM
in my php I have json encoded the rowCount function
 
This publicity for the sponsor as the "comic description" is pretty bad :(
 
user5020521
all I have to do is to pass it to javascript using the parse function
 
@Riccardo990 What's the error?
 
user5020521
I simply fail to do that
 
@AwalGarg what are mutation events? Is onChange event an example of a mutation event?
 
user5020521
1:41 PM
might I fiddle you ?
 
@ErroreFatale no, google "mutation events" followed by "mutation observers".
 
So you've tried nothing?
 
user5020521
i've tried almost everything
 
And you've gotten no errors in the process?
Fascinating
 
user5020521
1:42 PM
i've rewritten my parse function a billion of times
 
You must be related to php_purist
 
code penis better
 
user5020521
I've found that the debug just don't see what I've written
 
You're passing an encoded function back through JSON. Is that normal?
 
Wrong word
 
1:43 PM
@AwalGarg ok. I see that onChange event is not fired when textContent is changed... so, what is the right event to intercept a change of textContent?
 
user5020521
@Neilos I need to tell the ajax what row was deleted
 
@Riccardo990 What json are you giving JSON.parse?
 
user5020521
so that I'm attempting to use the parse function after json encoding the rowCount function in php
 
user5020521
the rowCount converted into json by json_encode function in php
 
omg. omg I've found it. My life is complete!
 
1:44 PM
you json encode just the count not and object ?
 
I mean, I wouldn't pass functions around embedded in JSON
 
user5020521
@dievardump don't you remember this morning? I'm still stuck with this
 
@ErroreFatale You can't intercept the change of textContent. You can do something similar by passing a Proxy object (ES6 only, and transpilation won't help, very poor browser support) to the function which sets the textContent instead of the DOM object itself. Or you can add a MutationObserver (pretty good support) to the element and override the textContent change after the change has already occurred and informed to you by the observer.
 
@Riccardo990 What json do you pass to JSON.parse?
 
1:45 PM
I remember a lot of php and me telling you that what you were trying to do was one of the simplest things you can find on tutorials
 
So I'm on lesson 9 of the AngularJS tutorial
and..
when I adjust data in the json file
 
user5020521
I told you @Cereal the rowCount function using json_encode
 
the data is not reflecting in the view
did anyone else make this exercise ??
 
Please pin this:
 
@Riccardo990 I think he wants you to post the JSON string, cutting out superfluous bits maybe?
 
1:47 PM
@Riccardo990 I'm going to fucking slap you. What is the actual fucking JSON being passed. The string. What do you get when you console.log() the json?
 
@AwalGarg were you not saying that MutationObserver is deprecated?
 
user5020521
@Cereal nothing
 
...
 
user5020521
just nothing and don't know why
 
user5020521
seemingly the console.log just don't see that
 
1:48 PM
@ErroreFatale Mutation Events are deprecated. MutationObservers are the replacement for them.
 
I don't think you understand
 
@Riccardo990 use pastebin and past your php code in, Then give us the link.
 
php
Well I think I found the problem
 
lol
 
user5020521
1:48 PM
@dievardump it's this morning's code
 
link pls
 
Give us the freaking code in a pstebin or just stop talking about your problem without giving us code.
 
user5020521
after that user suggestion here I go btw
 
user5020521
 
user5020521
this is php
 
user5020521
1:49 PM
do you need js too?
 
echo json_encode($count);
 
@Nick good god what in all holy fuck was that
 
you json_encode an int. Really?
 
oh my
 
@SterlingArcher You likey, eh?
 
1:50 PM
@Riccardo990 You're vulnerable to sqli
 
crl
!!> JSON.stringify(1)
 
@crl "1"
 
@AwalGarg is MutationObserver a cross-browser feature?
 
See bobby-tables.com and use prepared statements
 
@Zirak The same thing's been said every day, because he's been on the same problem for like 2 weeks
 
crl
1:50 PM
!!tell Err mdn MutationObserver
 
depends on what cross-browser means for you. See this:
!!caniuse mutationobserver
 
Bind those params son
 
@Cereal Oh my
 
@Nick that was horrifying
But it earned a star
 
1:51 PM
@Zirak You have no idea how many times I've linked people to that in the past week
 
i.imgur.com/nsANEmb.webm now watch a jaguar go fishing for crocodiles
 
Our class has a database project as an assignment
 
WHO UNSTARRED IT
 
Vulnerabilities everywhere!
 
@Nick Me
 
1:52 PM
@dievardump its better than encoding a js function which is what he was saying he was doing
 
@SomeGuy Bundles of fun
 
You're no fun
 
crl
it's lame tbh, or maybe there's a deeper reference I'm not getting
 
@SomeGuy hahaha same (with my seniors though, I guess you are one too now :P). I just put a little ' in one of their input boxes and their "website" went to hell :D
 
It's most fun when they have code execution, you can teach them the lesson in the hardest way
 
1:53 PM
@Riccardo990 ... I really hope you have ONLY MAXIMUM ONE FREAKING ROW that as the id you give.
 
user5020521
@dievardump mattef of fact I'm on my wrong way
 
user5020521
I have as many rows as they are in the table
 
with the same id ?
 
@Riccardo990 you just return the count of the number of affected rows, if this is less than the total how do you know which were affected?
 
user5020521
every row every delete id is always different
 
1:55 PM
Then your delete call should delete ONE and only ONE row, no ?
 
user5020521
matter of fact yes
 
user5020521
if you have at least one row you can delete at least one row
 
I think we need a rosetta stone in here
 
user5020521
@Cereal i'm desperate man
 
When you open the request in a tab (console -> right click on the xmlhttp request -> open in a new tab) what is the result.
 
user5020521
1:57 PM
the result is this
 
user5020521
you see the deleted row
 
user5020521
but you can't see what it is
 
its gonna be "1" or "0"
surely
 
@Riccardo990 the deleted row? like 0 or 1, right?
 
user5020521
0 or 1 right but I can not print that damn result
 
1:58 PM
post your javascript
 
Re-read your code, what are you echoing?
 
user5020521
lemme translate it to you guys
 
no
I think we're done here
 
@Riccardo990 its ok go ahead
 

« first day (1826 days earlier)      last day (3123 days later) »