« first day (1819 days earlier)      last day (3130 days later) » 

user5020521
1:00 AM
I tried to delete a record and this is the feedback
 
@ʞɔᴉN realistically, I will be making all 'plugins' including the 'dark' css itself toggle-able in the options page
just need to figure out a good way how...
 
user5020521
async table that shows record edit and delete on each row you click delete async call to a php file where the delete is made and you delete the row
 
I don't really have any experience with SQL
 
well the error is pretty clear
the schema doesn't have a idRecord column
 
user5020521
they friend in delete.php which is the file loaded by var url
 
user5020521
1:04 AM
I typed delete from table where id = idRecord
 
user5020521
casue I wished to be able to pass that parameter used within the js code
 
user5020521
are you getting at what I mean?
 
well you need to escape it
 
user5020521
cause*
 
user5020521
damn mac keyboard
 
1:05 AM
"DELETE blah FROM tbl WHERE foo = " + id
 
user5020521
I apologize for all the type errors
 
user5020521
" + id?
 
i'm being generic
try to extrapolate
also, I hope you are doing this server side with node
 
user5020521
isn't it idRecord? the parameter I used in the functions
 
and not structuring queries with js client side
 
user5020521
1:06 AM
hum
 
@Riccardo990 i'm being lazy
you can type idRecord
 
user5020521
I'm actually doing this...
 
user5020521
let me tell you
 
user5020521
serverside: php to select insert into update set and delete
 
so why not ask in the PHP room with your actual PHP code?
 
user5020521
1:07 AM
clientside: ajax to call those file and fetch and display
 
user5020521
cause the major of the problem are from client-side
 
but right now you're stuck with a MYSQL issue which is being called from PHP
 
user5020521
just give me an advice
 
user5020521
what is the best server side option? java or php?
 
@Riccardo990 stop asking cryptic questions and start posting the actual code that throws the errors.
 
1:08 AM
yes!
 
user5020521
please gimme this advice man
 
user5020521
you're right
 
user5020521
the actual code that throws the error is in delete.php
 
user5020521
gimme the time to correct it implementing your suggestion
 
if I wasn't already bored and had nothing better to do, I'd claim you just waited my time.
 
user5020521
1:09 AM
what you just wrote above
 
delete.php write.c
 
user5020521
$del = $dbh->prepare('DELETE FROM tagesroma WHERE id= " idRecord');
 
user5020521
this is basically what you wrote did I escape?
 
that is invalid string concatenation
what is idRecord? a php variable?
 
user5020521
amazing I just tried to escape
 
user5020521
1:11 AM
no it is not
 
user5020521
it is the paramete I used in the ajax call in the js file
 
...
so in PHP it is nothing
?
 
user5020521
I'm attempting to fetch it in php
 
@Riccardo990 You got a little bit of a syntax error there buddy.
Wait, no you don't.
 
user5020521
I thought I coulda fetched it by simply tell the where that id is equals to idRecord
 
1:13 AM
A syntax error in the SQL statement, yes.
 
but what is idRecord in PHP?
 
user5020521
that is the point man
 
you need to tell me?!
I don't have or know your code!!
 
user5020521
how can I fetch a parameter used in a js func
 
ugh.
go look on StackOverflow
 
1:13 AM
@rlemon It's part of the string. That's a double quote in the middle there.
 
@Michael I know but he means for it to be a val from js post ajax
 
Ah.
 
user5020521
that's right
 
and he's asking us to solve his problem without posting the complete issue
 
user5020521
he's right
 
user5020521
1:14 AM
nono wait
 
lol
 
he's being cryptic and posting half-not complete code
 
user5020521
I don't ask you to save my life
 
i've been more than patient
 
user5020521
I'm posting half code just not to piss you off
 
1:15 AM
@Riccardo990 did it work?
 
well dude, if you want help fixing your car do you post a picture of your fridge?
 
user5020521
I know you've been more than pation compared to last time
 
user5020521
I post half code not to fucking piss you off
 
user5020521
I just don't want you to waste your time for me
 
user5020521
you were right last time I need to learn
 
1:16 AM
if you want to pass a variable from js to php you can google "how to get a variable from js to php"
 
user5020521
and believe me it hasn't been easy to show a php select asynchronous in a js table
 
user5020521
now I need to delete and then edit and then add
 
user5020521
I want to build a kinda interface
 
that's easy if you have JS in the same file as your .php file
 
user5020521
an async interface
 
1:17 AM
@hyde 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.
 
user5020521
I don't wanna have the js in the same file
 
user5020521
I wanna separate the structure
 
why would it be in the same wut huh
 
LOL
 
user5020521
1:19 AM
ajax and php
 
@rlemon ugh that's so distracting
 
WAT?!
 
the gif
 
@hyde I find it pleasantly hypnotizing.
 
user5020521
ajax to fetch the data and php to build them
 
1:20 AM
I'm sorry, it was my reaction to your utterly useless suggestion. I don't mean to be rude, but at this point in the evening I don't see a point in sugar coating advice, and your suggestion was just as the gif that proceeded it.
 
@rlemon you suck
 
@ʞɔᴉN <3
@ʞɔᴉN <3
 
That was not a useless suggestion, for small projects I don't see anything wrong with doing that. Obviously I wasn't aware of the context
 
your suggestion was merely that his problem would be easy if the js was in the php file.
how is that useful?
 
user5020521
rlemonn you know what
 
user5020521
1:23 AM
stackoverflow says it is impossible
 
user5020521
unless I have an hidden form method post foo var
 
Yes it would be... are you not familiar with server-side rendering?
 
user5020521
php $_POST[foo]
 
hidden form elements for posting information the client hasn't explicitly sent you is common place
@Riccardo990 I suggestion that course of action
 
user5020521
1:25 AM
 
<input type="hidden" name="id" value="123">
you can use the hidden type
 
@Riccardo990, since you want to have separate JS and PHP files, you could leverage JSONP.
 
it will post the value by name to php, without the client seeing the input
o_O
jsonp is a hack strategy to deal with CORS
it has nothing to do with this issue
 
@rlemon All that booze and you're here? Do you hate yourself or something?
 
needs time to get good
cider need 1 and a half weeks, mead will be ready in 6 days
but the mead only gets better there on in
ages well
 
1:29 AM
It can be solved using JSONP though. Whatever data you wanna access using JS, you can dump it between your <script> tags, and a different JS file could access that JS object.
 
i bet
 
@hyde but in this instance you do not need jsonp
regular communications will work
there is no need to expose your api
 
Of course you don't NEED it. I am only showing him different ways to do it
 
alright, and I'm just pointing out the logical errors in using them in specific cases.
 
How is that a logical error?
 
1:33 AM
because if you expose it via jsonp you've given away your api, and if you protect it it is extra work for no gain.
 
kek
 
user5020521
wait guys are you suggesting me to use jsonp and telling me I might die? ahahah
 
user5020521
that's great that way you'll get rid of me
 
Depends on how sensitive the data is
 
user5020521
i won't ever piss you off again
 
1:34 AM
dude calm down.
 
how I access json array with a parameter?
 
no one is telling you to die
 
@Kevinmtk 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.
 
user5020521
dude I wa just kiddin you
 
If it is sensitive then you could just use AJAX
 
1:34 AM
1 message moved to Trash can
@Kevinmtk Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
how i define a
 
@Riccardo990 he's Canadian he can't help it
 
user5020521
just laugh rlemon it's only tounge-cheeck
 
A lot of the awesome names are already taken on npm, but by packages that are either empty, or are completely dead.
 
1:35 AM
lol
 
user5020521
@ʞɔᴉN you're right
 
1 message moved to Trash can
@Kevinmtk Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
how call to function with a?
 
@Kevinmtk please read her advice
 
user5020521
so jsonp or what?
 
1:36 AM
no
not jsonp
 
json
ops
 
!!youtube can't even
 
1 message moved to Trash can
@Kevinmtk Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
sorry
 
@Nick can old packages ever be taken off npm?
 
by the author, yeah
 
Jeeze, kev, ctrl-k ffs
 
user5020521
I might as well to use json_encode
 
u failing
 
1:37 AM
see this
how i can call to function with a
 
we ballin
 
how i define a
 
lol.. I need to get offline
 
here we go
 
user5020521
in delete.php I might convert the deletion array into a json file
 
1:38 AM
help me please
 
user5020521
and pass that file to the ajax via jSON.parse
 
user5020521
what do you think about it @rlemon
 
@Kevinmtk dude finish your sentence what are you even saying
 
@kev help to to define "a"?
var a="a";
 
1:39 AM
I think when I'm laughing uncontrollably at my screen it is time to go get another beer
 
but
when I try
says undefined
 
user5020521
i'm laughing too
 
@rlemon lol, later then
 
alert(obj.a); //says undefined
 
@ʞɔᴉN ohh it has been gotten
 
user5020521
1:40 AM
@ʞɔᴉN are you laughing? do you agree to convert the deletion array into a json file and parse it to js ?
 
@Riccardo990 that wasn't to be insulting, it has just been a funny evening overall.
 
@rlemon wb then
 
@ʞɔᴉN ty
 
user5020521
@rlemon I'm not the one who pisses off unless no one take the piss outta me
 
someone help me :/ notepad.cc/snagoogo43
 
1:42 AM
@Kevinmtk you are calling storage.get
you haven't set it
 
user5020521
this is a fucking nonsense joke to poke stackoverflow repution tough
 
yes
with parameter
 
user5020521
@rlemon this should be a rap string
 
but when i try alert(obj.settings); works
 
does obj.settings.a work?
 
1:43 AM
@Kevinmtk
 
but if i define a = settings not work
 
var a = $("settings");
 
everyone says classes are "syntactic sugar" over prototype inheritence
 
tryed
failed
 
Do you have an element like this? <settings>...</settings> lol
 
1:43 AM
but that's not really true
 
@Mosho why is that?
 
no, the "a" = access the array.a
 
also @Mosho o/ howdy
 
user5020521
what do you think json parse is the way?
 
the type of variable a does not look an array to me...
 
1:44 AM
"a" is the json key
 
oh
 
@Mosho Prove it.
 
i want to access the array with the json key name, and key name = any key defined
 
@rlemon because the prototype properties are non-enumerable by default
 
@Kevinmtk, you are using jQuery to get a DOM element
 
1:46 AM
which makes a lot of shit that worked with classic prototypes not work anymore
 
@Mosho so it is sugar + a few mods?
realistically they are still not classes
 
enumerable with which method?
 
a not is DOM element
a is any json key
 
user5020521
rlemon can I try json parse? may that be useful to me?
 
@rlemon they are prototype "classes", that doesn't change
but to me, the default non-enumerability is a big change
 
1:47 AM
e.g., you won't see them from Object.keys(myClassInstance);
 
which makes it cross to non-sugar
@Luggage yeah, along with a bunch of others
 
@Kevinmtk, it would be helpful if you could show your HTML markup, you lost me at JSON key
 
no spread/rest either
 
@Mosho I mean, we wouldn't put a tomato in a fruit salad, but does that make it a vegetable??
 
no, it makes it something that doesn't go in a fruit salad
 
1:48 AM
That analogy is confusing since the fruit/vegatable status of tomatoes is already questioned.
 
questionable by who?
 
where if it were really "sugar" it would be a viable replacement for bananas
 
(seriously, I've never seen it questioned)
 
US tax law
 
ugh
 
1:49 AM
like, purple bananas
 
which could be internet myth, but i've had stupid bar conversations about it.
 
es6 classes are not purple bananas.
 
user5020521
rlemon just gimme this advice try or not to try?
 
do or do not; there is not try.
 
there wasn't a 100% standard way to make a 'class' pre-es6, so those differences already happened.
 
user5020521
1:50 AM
do or not to do then
 
user5020521
just advice me json parse is the way?
 
with inheritance, especielly
 
yeah, but it's far from a trivial change
they standardized it in a way that is a leap from the most common old way
 
@Mosho I get what you are saying, we can view them as classes, but we must concede they are not.
 
prototypes are not as plain objects as people would expect
 
1:51 AM
mutable properties probably should be inherited from prototypes anyway.
and there are less reasons to enumerate the functions
 
we can call them jClasses
 
I guess I'm saying, that diffrence never really caused a problem for me..
 
it is hip
kids will buy into it
 
also, there are no non-method properties on es6 class "prototypes"
 
well, you can always add them.
or use Object.create with enhanced object literals to make them
 
1:53 AM
@Luggage I know, I'm writing some code that this change makes pretty annoying to write
@Luggage yeah, deviating from the class syntax
I guess we still have getters/setters
 
if you are that dependent on the exact prototype structuer, you may have to
 
almost the same
 
@Abhishrek I am technically a vocalist. But I can read scores - correctly like an instrumentalist - and I have setup an amateur virtual music studio for midi authoring.
 
I don't see a problem with it.. you can wrap up whatever your custom construction is in some form of .extend().
// worse case scenario, you make your own Class-maker.
var MyObject = makeMoshoObject({
    doSomething1() {
    },
    doSomething2() {
    }
});

let instance = new MyObject();
not ideal, of course.
 
@Luggage Good for you. I know many people are confused about constructor and prototype. They don't understand why these constructs don't behave like a traditional class. Esp. when they have a background in another language.
 
1:58 AM
why do you need to enumerate properties on the prototypes? Just curious
 
@Luggage I made this:
const flattenPrototypes = (obj, exclude) => {
	const proto = Object.getPrototypeOf(obj);
	if (!proto) {
		return null;
	}
	const flattened = flattenPrototypes(proto, exclude) || obj;
	let keys = ownKeys(flattened);

	return keys.filter(k => !exclude.includes(k)).reduce((o, k) => {
		const protoDescriptor = Object.getOwnPropertyDescriptor(flattened, k);
		const ownDescriptor = Object.getOwnPropertyDescriptor(o, k);
		if (!ownDescriptor) {
			Object.defineProperty(o, k, {...protoDescriptor, enumerable: true});
which takes an object and goes through the prototype chain and makes all the methods available on a plain object
though it still has __proto__ for now
 
this is where the problem is?
 
it's an example
so without setting enumerable: true I can't use Object.assign, which I want to do
only one example of this kind of thing since I started writing this package
that being said, they didn't take away anything from classic prototypes in es6
but it confused me and I'm sure others will face the same
 
You bet. I was in the camp against the class illusion in ES6.
 
I use'em. the enumerability of prototype properties has not been an issue with me ever.
and I think Reflect (MDN) has some handy helpers to do that, if I need.
 
2:06 AM
I'm not against classes
 
Did you just change opinion just there, Sheepy?
 
just that people saying it's "just syntactic sugar" aren't right
at least not in the sense they mean
 
@Mosho what do you mean?
 
mainly the enumerability
 
2:08 AM
ahh of course
 
@Luggage No. But class keyword is a fact now. We now have to live with it.
Perhaps should have changed it to "have been".
 
the thing that annoyed be was the lack of non-function non-getter properties.
I know why they aren't desirable but they made sense for me at the time
 
2:29 AM
@Sheepy wow
 
2:41 AM
I am trying to use the skills I have from Indian Instruments to learn western instruments.
good & open web font for code?
 
@Abhishrek Inconsolata? Available as a Google Font.
 
@Sheepy o/
thanks !
 
I made a 1080p render of my fractal
user image
3
 
3:14 AM
so beautiful
 
3:54 AM
@monners o/
 
Promotion:A robust Javascript library for capturing keyboard input and key combinations entered. It has no dependencies. hotkeys
3
 
@孤魂楚 nice, it seems there is some delay though
hardly any, probably less than 100ms but still. perhaps this is just because of the virtual keyboard rendering?
 
4:41 AM
TGIF!
 
5:00 AM
@ʞɔᴉN Shields.IO icon to load more slowly.
 
Hi all, anything interesting to share today?
 
5:28 AM
in ejs, why <a href=<%= 'users/' + user.id %>. throws template error?
 
What error?
 
@Dipakchavda 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.
 
ok
nice caprica.
 
this.templateText.replace(some regex).replace(some regex) cannot read property replace of undefined
 
5:33 AM
but I have an issue already asked in another room and put question in stackoverflow still I can't get solution. So Can I asked about question?
 
yeah.. go ahead .. link the question here.
 
0
Q: how to read custom sessionhandler's session data in express socket event?

Dipak chavdaI am working on to develop vk.com type chat application, for that I have require to validate and get session information like username, userid from php. So my purpose is to implement logic in express framework is that get session id, userid, and username from php and use in redis to push chat dat...

 
express + php is akward
 
@Arengtum. : I am creating a chat application which is part of php project.
so I choose express + php + redis + mysql.
I am not getting any idea about some issue which I had already described in my question.
 
do you have two different servers and some kind of proxy ?
 
5:40 AM
right now I don't deploy on server. It's in my local machine. and there is no proxy.
Everything is working find but I don't get idea that how to get session value passed in nodejs by sessionhandler.
 
then how do you connect your node to php?
 
I have already load my script in index file using simple javascript. There is no required direct interation with php and nodejs. Php session is required because we required to authenticate user and get php session data.
like username, id
 
6:07 AM
Hi guys.
!!listcommands
 
@JacquesMarais 666, help, listen, eval, coffee, refresh, forget, info, listcommands, tell, afk, ban, unban, convert, define, doge, google, hang, imdb, jquery, learn, put..it..back...ლ(ಠ益ಠ)ლ, phucket, gtfo, moneycantbuylove, catmode, coffeetime, lifeban, stopmyself, instagram, kendallfrey, excited, manigga, meinneger, dgaf, infiniteriot, okay, feelsgoodman, fabulous, sausage, playerpimp, installjavascript, moarkittens, kendall, kfc, uwot, nsfw, facepalm, somekittens, erase, fry, dudeism
hahastillhere, onebox, morecoffee, steve, whoosh, burn, woosh, roomowner, phony, really, inur, coffeescrip
 
!!kendall
 
How can I store only time ( say 12:30:00 ), not date in mongodb in node.js
 
use string. ?
@AwalGarg huiiiii
 
6:17 AM
happy day-before-saturday
@argentum47 o/
@孤魂楚 Neat! For some reason it detects my Backspace as Delete, but works pretty nice
 
!!urban o_
 
@AwalGarg o_- This face is usually used by those that are bored depicting that one is half asleep with one eye open.
 
@argentum47 lulz. what happen?
 
there is one page called a Create Memento page, the most decorated page in the entire fucking website ... the textarea is like a samsung mobile, as you type the size of text gets shorter .. and anything you change (the reducers) in the app breaks the page..
I am bored wof fixing the page everyday
 
6:27 AM
delhitravelhelp.in this is sooo slow
@argentum47 Protip: never modify my text as I type. Hate gmail for doing that.
 
"immutable belief that all users are capable of doing better." <-- is this a good thing to believe on SO? Aren't you just fooling yourself if you believe that?
Also, mornin' o/
 
well its office work. so who cares, client wan shit, gi'em some shit.. anyways clients consider themselves these days. just that they need other people to write the code.
 
@AwalGarg hotkeys can intercept a lot of keys. :)
 
I have got this blob of text gist.github.com/awalGarg/b1f12db15557a42bc252 that I need to decode. base64 decoding doesn't seem to help. Any ideas what it could be?
 
doesn't look like a base64
 
6:39 AM
hmm, apparently it is something called "VIEWSTATE" which is an ASP.net specific thing
 
@AwalGarg nonono
Don't use that
 
I don't. How could you even imagine me using ASP.net or anything related.
But whatever that thing is, it is causing that travel site to be horribly slow
sigh, @argentum47 can you please get hired at Delhi Transit Services and fix their shitty site?
 
get hired as a freebie .. ok
how do you come by that blob?
 
network inspector
 
o.O I dun see that. plus they have a hell lot of resources loaded
 
6:47 AM
how to change the port for cordova browser platform (cordova platform add browser)
 
hey guys , how do i say in javascript
i want the character from this index to that index in javascript ?
charAt() ??
 
If I understand correctly, you want
!!tell Alex mdn string.slice
 
user3119231
Morning :)
 
user3119231
6:51 AM
It is Friday -> (means Beerday)!
 

« first day (1819 days earlier)      last day (3130 days later) »