« first day (1354 days earlier)      last day (3600 days later) » 

3:00 PM
You wouldn't want to block HTML parsing until JS finished running.
 
Not for me it doesn't :P
@SecondRikudo Not running. parsing
 
@PeeHaa anything is possible in the Matrix
 
@PeeHaa hence the <script>document.write('<' + 'script src="..."></' + 'script>');</script> snippet
 
I thought that was there to prevent filters :|
God I suck
 
@FlorianMargaine me no likey document.write() there, much prefer var s = document.createElement('script'); s.src = '...'; document.head.appendChild(s);
 
3:03 PM
I've been stalling on the next part of this project
 
morning
 
@SecondRikudo Whut? :D
 
@NikiC hi. sorry for direct ping but:
57 mins ago, by DaveRandom
Anyone know if it's possible to get SplDoublyLinkedList::add() behaviour in 5.4 in an O(1) manner?
 
@DaveRandom not the same effect
 
3:04 PM
@NikiC hello
 
@FlorianMargaine orly? difference?
(I also suck)
 
suckfist
 
document.write writes on the spot
appendChild will create a new dom element, append it somewhere, etc
 
@DaveRandom yes, but it will be renamed to attribute_value_id (it points to that table, we are in the middle of a migration). so it points to t_attribute_values not t_attributes
 
@FlorianMargaine yes but in this context, does that matter?
@Patrick That doesn't make much sense. Seems like an order line has attributes, which have values. Hence order_lines -> order_line_attributes (many-to-many relational table) -> attributes -> attribute values
 
3:07 PM
@DaveRandom yes, the loading starts later when using appendChild
 
In other words, seems like you should select the order lines you want, join the attributes using the rel table, and then fetch the values
 
What is love?
 
Baby don't hurt me...
 
Baby dont hurt me
 
No more.. :/
 
3:09 PM
No. MOAR!!!
 
How would I go about writing this: If clicked, -1 in SQL FROM users WHERE limit
If clicked, is going to be a button.
 
@DaveRandom this is what I am trying to do. it used to be mapped to the attribute values, now I have to map it to the attributes (who are new too). I think the other foreign key will be removed at the end. Anyways. Time to go home. Thanks a lot again.
 
Am I right in saying line 13 would never be executed?? pastebin.com/cQnFyUwW
 
@FlorianMargaine Seems to be run immediately in both cases: jsfiddle.net/Wkr6c vs jsfiddle.net/Wkr6c/1
@Patrick Can an attr have more than one value?
 
3:15 PM
@DaveRandom yes. An attribute is for example color (can be customized for each article), the value would be green, red etc
 
@cHao a "bottled problem" is quite often completely pointless. What you usually get is a class Rabbit extends Animal level of "problem"
 
@Billy would ($total_width <= $break_point) never be true?
 
@RonniSkansing That's what I mean - I don't think so?
 
@Billy I am asking why do you assume so?
 
Because he checks that $total_width is > $resolutions[0] - as resolutions has been rsort()ed, this is the highest value in $resolutions; so total width will never be < any values in $resolutions
If someone can confirm my logic is correct I will post an issue to the github repo
 
3:19 PM
@Patrick Ahh right OK, so an attribute consists of two things, type and value. In which case, your schema is slightly wrong. Either you have an order line directly linked to an attribute, and the attributes table contains every possible variant (probably crappy) or you throw away the attributes table completely and order_line_attributes has a link to both the attribute_type and attribute_value
 
@Billy I can not understand that..
Why would $total_width never be less or equal to the highest resolution?
 
  if($total_width > $resolutions[0]){
    // firstly, fit the CSS size into a break point ignoring the multiplier
    foreach ($resolutions as $break_point) { // filter down
      if ($total_width <= $break_point) {
        $resolution = $break_point; //am I right in saying this will never be executed??
      }
    }
it is surrounded by if($total_width > $resolutions[0]){
so if that is true, then $total_width can't be < as well
 
well the second if checks against break_point
oh
 
Yeah.. :P
 
How do I -1 through a query???
 
3:25 PM
@RahulKhosla UPDATE tbl SET col = col - 1 WHERE id = :id ?
 
@Billy if $resolution[0] is the higest, it then iterates a smaller and smaller value
the $total_width could be smaller then the largest revolution
 
@DaveRandom Thanks, is the ? needed or..?
 
@RahulKhosla or.
 
It checks first, "is $total more than the highest in $resolutions", then if not it checks the same variable, $total, against all other $resolutions, which are all smaller than the first one.
 
@RahulKhosla No it was a question mark meaning "is this what you were after...?"
 
3:30 PM
Yeh thanks
 
@SecondRikudo are you running PHP Storm 7.1 on the machine you are currently working with?
(or anyone?)
 
@RahulKhosla Your question was unclear, so his answer is more of like a shot in the dark
 
@DaveRandom I am working with IDEA 13, which is essentially the same for PHP
Whaddup?
 
Need to know if it knows about SplDoublyLinkedList::add() when working in 5.5 mode
Also, I really wish they provided some way to modify the built-in stdlib defs
Occasionally I find one that's slightly wrong, it's such a pita to bug report it and wait for a release when I could just fix it myself locally and bug report it after for everyone else
 
@RonniSkansing like this 3v4l.org/RkCGr
 
3:33 PM
@DaveRandom You can edit the files directly.
 
@SecondRikudo How? They're wrapped up in a signed jar aren't they?
 
@DaveRandom jar == zip
 
(I thought, maybe I'm wrong)
 
They aren't signed, no.
I already made that experiment once
 
So I can just unzip it, edit, and zip it up again?
Hmm, trying it now
 
3:34 PM
@Billy yea that looks about right, but what is in the resolutions var, numbers only?
 
yes
 
then you are right
 
@DaveRandom That really ought to be a requirement for the PECL replacement thingy that's being created.
 
@Danack umm... wat?
You mean a requirement for that thing or some special handling in PHP Storm?
 
3:49 PM
one does not just replace pecl
 
@JoeWatkins Pecl relies on Pear...and people want to remove pear from core php because it doesn't belong in core php, or anywhere....
 
@Danack No I know about that, how does that relate to PHP Storm?
 
@DaveRandom But you still need to name the fields for each article and add the values (can be different for each article too). Lots of legacy stuff that has to keep working and I don't have the last word on DB stuff either. But that's all for tomorrow. Slightly wrong is still pretty good compared to some other things in the system :D
 
@DaveRandom Er, I as replying to:
18 mins ago, by DaveRandom
Occasionally I find one that's slightly wrong, it's such a pita to bug report it and wait for a release when I could just fix it myself locally and bug report it after for everyone else
It'd be nice if you were able to fix it, and release it as a bugfix that people could install.
 
some of the goals don't really make sense for everyone though, users cannot just install extensions the majority of the time ... I like the idea, but replace pecl I think not, compliment composer maybe ...
 
3:51 PM
if they chose to.
Also, why the fark is this a warning - 3v4l.org/XfqUZ
 
How do I echo the user ID in usercake? I've got $loggedInUser->id() but I assume id isn't a function :P
 
@Danack Right, so you mean "if you find an issue with a PECL ext you can fix the ext"
That makes sense, just didn't get the context switch :-P
 
@DaveRandom Yes like that, and distribute your fix that installable via something like "pickle install SPL-Fixed github/com/daverandom/spl-fixed";
 
lol
Found a way to see who flags and stars any message
 
@Danack because it makes no sense. 3v4l.org/81F00
@SecondRikudo orly?
Needz mod stuffz or...?
 
3:57 PM
@DaveRandom Yup
@DaveRandom Nop
 
Me wants
 
Star this message three times, don't tell me who you are, and I'll tell you when it get to 3 stars
No one? :D
Let's see
@DaveRandom
@iroegbu
And @LeonLotus
 
Impressive
 
It works with flags too
 
what was that?
 
4:00 PM
@SecondRikudo :P
 
As you all saw in the last flagging session which almost got me suspended :D
 
can remove stars too?
 
I removed the stars
 
oh ok
 
Hey
 
4:02 PM
@DaveRandom I saw that too
 
Weird @SecondRikudo I wonder why that info is included in the data feed and not considered public
 
@DaveRandom Starring is one thing, Flagging!
You can see who flags shit!
 
I wonder if there's a way to observe a websocket without creating a new one
 
@DaveRandom Close all chat tabs, refresh while looking at the log, reopen all chat tabs
 
probably need a handle to it
@SecondRikudo No I mean programmatically
 
4:03 PM
@DaveRandom observe how?
 
Chat is smart enough to only open one connection even though there're many tabs
 
(thinking extensions)
 
as in wireshark?
 
@DaveRandom Yeah
Override window.WebSocket
with a wrapper
 
@SecondRikudo Hmm, would need some way to guarantee ext code is run first though, not sure you can do that
 
4:04 PM
tbh you should probably just report this as a security issue rather than figure out how to use it.
 
will have a dig around in the chrome.* APIs, there might be something in there
 
@Danack It's already reported.
 
cool.
 
@DaveRandom For some reason I doubt you have access to that level
 
And since it helped us catch Sumer and his sockpuppet red-handed, I consider that a win
 
4:05 PM
@Danack Chat gets little-to-no love from SE, they don't see it as having any real value so they don't spend dev time on it. Unless it's leaking user creds, they're probably not going to do anything about it
@PeeHaa Well you can intercept arbitrary requests, it's not that much different
 
@DaveRandom In the browser?
 
In an extension
Obv you have to request user perms, you can't just do it in a page
 
So also in a browser or do you get more control in ext?
aha
TIL 2
 
@PeeHaa ext can access DOM of all pages it has a permission to
Plus have access to chrome.* API which is extension specific
 
[asus].addEventListener("click", fkingHang, false); #fedUp
 
4:07 PM
@SecondRikudo That I knew ;)
 
I really need to learn how to write chrome extensions
 
@SecondRikudo That's easy
Try FF. I had to let Dave do it for me :P
 
How does one add that big blocky thing for a question on SO?
 
@Rijnhardt One box?
0
Q: Doctrine2 - notIn() clause not working properly - query + code included

Georgi AngelovI am trying to match the following query which works like a charm: Select * FROM phases AS P WHERE NOT EXISTS( SELECT * FROM rating AS R WHERE R.phase_id = P.id AND R.user_id = 53) LIMIT 1 I setup the createQueryBuilder() and it...

^ ?
 
Yeah that one
 
4:10 PM
Just post a link :)
 
0
Q: SELECT_IDENTITY() not working in php

RijnhardtScenario: I have a SQL Query INSERT INTO dbo.Grades (Name, Capacity, SpringPressure) VALUES ('{PHP}',{PHP}, {PHP}) The data types are correct. I need to now get the latest IDENTIY which is GradeID. I have tried the following after consulting MSDN and StackOverflow: SELECT SCOPE_IDENTITY() w...

 
@PeeHaa I don't install extensions because of that
 
oooh
Thanks
 
Extensions are much too easy to write, and much too powerful.
I can write an extension with a backdoor that logs any and all requests, including fields to a remote server
And you'd never know without an HTTP sniffer.
 
@SecondRikudo Hence OSS :)
 
4:11 PM
@PeeHaa Yup, I don't install extensions which are not OSS
The exception being LastPass
 
See yous later, I need to get home. It is getting late, still at the office. :/
 
@SecondRikudo ...and the fact that you have to request user perms to view all traffic
 
@Rijnhardt later
 
@DaveRandom Depends on the extension, I can have a perfectly fine excuse for that.
 
Seems to be non-trivial to do it programmatically, thankfully
 
4:14 PM
i need to be helped on this : github.com/pigeonhole/testjs
 
There's this two-factor-ish auth procedure for setting up a websocket and you can't directly observe an existing one I don't think
 
pilize
how to get the script in the output.html eecuted?
 
4:38 PM
Jeremy responded to my question, but I'm not sure how to implement that. I understand the set() and isset(), but does anyone have a quick example code? Also, do put that in the header?
And do I put it on every sub page?
The question is how do I make a cookie when a user hits the ACCEPT TERMS button on the index page of my adult website and how do I divert the user to that page if they try to go to a sub page and the cookie is not present?
 
5:24 PM
38
Q: I'm seeing stars! (I can see who starred a message and so can you)

DoorknobSo I was making a chatbot in Ruby for SE chat, and I discovered that I could find out the starrer of a message. I'm pretty sure stars, like votes, are supposed to be anonymous. Although this knowledge would help for cases of star trolls like this. Here's the specific slice of code that do...

Programmatically ^
 
5:43 PM
Somebody can give me a help trying to fixe a prorlbme that Im having including pages using .htaccess file?
 
what prorlbme do you have?
 
I've got 99 prorlbmes but speeling is all of them.
 
6:34 PM
If I create a variable, say $count = 0 in test.php. Then include that file in index.php. Can I call/access that $count variable in index.php?
 
try it out? ...
 
Well, I don't think I can, but according to logic, I should be able to, since PHP gets processed before html and js
 
@tereško I wish it was possible to know which of your statements aren't wrong and which are; and the way you include code-age comments in your answers leads to thinking that maybe everything you wrote will be wrong in another 2 years... :) Just a thought on the 'quest for truth' :) — Andrew 15 mins ago
I don't even know how to answer to this fucktard
 
7:07 PM
Why wont this -1 from limit? pastebin.com/feNgPixq
 
7:17 PM
just a guess. s/limit - 1/(limit - 1)/
 
I can write that in my query?
@rlemon Is S a placeholder for something?
 
yea, switch
meaning, switch/this/that
 
So sql understands "s" ?
I didn't know that :o
 
:facepalm:
 
keyword?
 
7:19 PM
no, it means switch your damn code ! :P
 
OH
Wait confused.
@rlemon $downloadLimit = $db->prepare('UPDATE uc_users SET s/limit - 1/(limit - 1)/ - 1 WHERE id = :usersId ');
 
:(
 
Im sorry im stupid, but people help stupid people right?
 
UPDATE table SET limit = (limit - 1) WHERE condition = value;
but again, this is a guess.
 
condition = value?
 
7:21 PM
good luck with your current and future problems.
 
Hahaha thanks
 
`limit`
 
limit is a reserved word, you can't use it as a column name without quoting it. SET `limit` = `limit` - 1
 
^ probably better than my guess.
 
7:22 PM
Thanks
 
Or better, choose a good column name.
 
I don't SQL often
 
@rlemon I was screwing with the condition = val btw.
But no @rlemon your code did not work. Thanks though.
 
@salathe the ` didnt work. Also $downloadLimit = $db->prepare('UPDATE uc_users SET `download_limit = download_limit - 1 WHERE id = :usersId');
 
7:25 PM
@RahulKhosla it won't work if you don't use it correctly.
What is one ` supposed to do?
 
@salathe `limit`
 
run away but never be able to escape
 
Good morning
 
@RahulKhosla Yes, do that.
 
7:27 PM
I tried that
 
Not in the code you showed here.
 
the `'s didn't do anything is what I ment.
$downloadLimit = $db->prepare('UPDATE uc_users SET download_limit = download_limit - 1 WHERE id = :usersId');
Im trying that now ^
 
just give up, @salathe
 
god
 
Still no result.
 
7:27 PM
haha
 
put four spaces before you show code
 
i think you are the last one left
 
like `this` :)
 
Ok thanks.
 
and, you don't need to quote "download_limit"... that isn't a reserved word.
 
7:29 PM
Sorry Typo :P
 
unless it is introduced as a new amazing keyword
 
Ok still didn't work.
 
I was wondering if someone could help be correct this string.
`$fn = echo escape ($mt->from_name);` Keep on getting syntax errors.
FYI I know my user name is echo and I'm aware that I should now how to do this if I'm going to call myself echo. LOL
 
@RahulKhosla What didn't work?
 
@echo No, we are not able to help you with this kind of issue. You may come back after reading an introductory PHP tutorial. Thank you for your understanding.
 
@echo echo doesn't work like that, it doesn't return a value.
 
is there some kind of international vampire pride today ?
 
Why hate on the newbies?
 
@RahulKhosla Awesome, that totally works.
 
or was it "praid"
 
7:31 PM
@salathe gyazo.com/9c521435cda927c8eaccaa200dc8f533 should be 4 not 5 if it works.
 
@salathe Thanks
 
@RahulKhosla Are you sure downloadLimit() is being called? Are you checking for errors coming back from MySQL?
 
@salathe I'm getting no errors.
 
@RahulKhosla not even PHP errors?
 
Nope
 
7:34 PM
You should be!
do you have error reporting turned up, and display errors turned on?
 
This is getting better and better
 
(do you know what they are?)
 
SQL Tool: UPDATE uc_users SET download_limit = download_limit - 1 WHERE id = 1
That works, so its not the query.
 
No it's not, you have a newbie PHP error that I'm hoping to try and get you to fix yourself. :)
 
@RahulKhosla Which is why @salathe is asking whether you have enabled error reporting. Look at your code again. Look at the $db. Where does that come from?
 
7:35 PM
@salathe he has been pestering this chat for days and hasn't bothered to turn errors on despite being told numerous times...
 
@Patrick One day...
 
I have...
ini_set('display_errors', 1); error_reporting(-1);
 
@RahulKhosla And you're certain the downloadLimit() function is being called?
 
7:36 PM
^
 
I assume so:
if (isset($_POST['downloading'])) {downloadLimit();}
 
var_dump(isset($_POST['downloading']));
 
@RonniSkansing
Notice: Undefined index: downloading in /Applications/XAMPP/xamppfiles/htdocs/photo/download.php on line 68
NULL
 
congrats
you found it
 
I have no idea what I found.
How am I supposed to var_dump a query anyways?
 
7:40 PM
what is on line 68?
 
var_dump($_POST['downloading']);
 
so.. you found out it is not set?
and so it does not enter inside the conditional
Makes sense?
 
Not at all.
 
there is nothing at $_POST['downloading']
no value at all
so it is not set
 
if (isset($_POST['downloading'])) {
downloadLimit();
}
<form name='downloading'
 
7:43 PM
@RahulKhosla the form's name is not sent as part of the form data
 
I even tried <button name='downloading'
 
so you do not know how a form works?
That is okay
But you can search this easily
 
@RahulKhosla That would be sent.
 
<form action='".$row['link']."' method='post'><button name='downloading' class='btn btn-auth'>Download</button></form>
 
7:45 PM
^ this code did not work.
 
@RahulKhosla spend 15 reading about PHP and forms
if you have not figured it out I will spell it out
 
@RahulKhosla There was probably some other problem.
 
Please do spell it.
 
@RahulKhosla please
I want to help you
you must learn to research
 
@RonniSkansing I am, but one is saying its another problem, and you are saying its the form?
 
7:47 PM
it is a big part of programming
 
What one is it?
 
@RahulKhosla you had both problems
first the sql
secondly the function wasnt called
and now the form is not correct
So spend 15 min checking up on php, forms and $_POST
and I am sure you will be able to solve it
Secondly, debug you code until there is no more to debug. Make sure to try out lots of var_dump($someVariable); die; and take a look if what you expect is actully inside the variable.
Alright? =]
 
@RahulKhosla here's a basic example, see if it makes sense to you... codepad.viper-7.com/QGth7J
 
How to add counter in session? Like when i press button first time it add 1 and second time it do 1+1 = 2.
 
How do I math?
 
7:57 PM
@Arto Do you know how to add anything at all to the session?
 
Yes I know how to use session, and now I figured that my problem was in javascript.
 
@salathe @RonniSkansing thanks I have just created awesomeness. pastebin.com/pAYi2z4g
 
@RahulKhosla That's certainly closer to awesomeness. :)
 
Thanks again :)
Btw, is it possible to "auto set" a value in a database for when my users register?
 
@RahulKhosla gj
 
8:06 PM
@RonniSkansing Thanks
 
That's enough being helpful. Back to posting kitten images. :)
 
@salathe /bin/mv helps.
@salathe /bin/rm is even better.
 
What do you think this is, a shell?
 
This chat.
+1
 
You're such a grump. :P
 
8:13 PM
Is there a way to add a precondition to a view without actually modifying it? Sorry for non PHP question.
 
@sebastian Without knowing the context of the question, I'm just going to say, "yes."
 
Does auto-increment only go one way? up?
 
@RahulKhosla Yes, "increment" means to increase, go up.
Going down would be "decrement", and there's no auto-decrement in MySQL :)
 
Ok thanks.
Im trying to make download_limit = 5 when user registers.
Would I write a query for this, or does mysql have some sort of automatic value when row is created.
 
@salathe I have a table that holds user payments, and a view that shows the sum for each user, I would like to know if it's possible to add a condition so the view only calculates the sum of 10 entries for a user. This without altering the view
 
8:20 PM
@RahulKhosla You can provide a default value, using the DEFAULT keyword when creating the table.
 
Thanks
@salathe Ever used userCake btw?
 
@RahulKhosla is it something to do with CakePHP?
 
Nope I don't think so
 
@RahulKhosla Then, nope.
 
Ok :P
 
8:22 PM
(For the room regulars, that doesn't mean I have used CakePHP…)
 
8:36 PM
Go USA!!!
 
Good afternoon.
 
Afternoon
 
@salathe E_COVERUP
 
@LeviMorrison E_TOTALLY_A_COVERUP :)
 
:D
@ircmaxell So with anonymous classes... can they 'close' over variables?
Otherwise constructors are kinda... awkward.
 
pce
8:44 PM
morning @hakre pd: 24415517
 
@Jack is the solution here hacky?
 
morning @pce
 
9:05 PM
I wonder, what will become of my educational experiment subject (it likes to call itself "AlmaDo")
 
-1
Q: Newbie - got API from a price comparison website - but how to implement in my word press website?

cymbal_cymbalFirst I want to thanks to all members of this forum . You have helped me tremendously. ( I always visit from google search and read your suggestion ) now I am stuck in a problem. I have not much experience in API and JavaScript. But good knowledge in WordPress settings and other html websites. ...

hehe
 
 
1 hour later…
10:09 PM
@LeviMorrison I dunno, ask @joe
but IMHO, no they should not close over variables. They should support constructors like any other class...
 
 
1 hour later…
11:26 PM
$("🇺🇸", ⚽️🏆).remove();
^ I like these icons ^^
 
11:54 PM
@Levi Please, move the navigation again to the left, please :-(
 

« first day (1354 days earlier)      last day (3600 days later) »