« first day (2365 days earlier)      last day (2583 days later) » 

12:02 AM
 
damn it, my thing doth not working :-(
 
12:14 AM
blame as a service?
 
12:28 AM
Is there a way to trace when and by what process a variable was declared?
I have a SUPER weird bug that I have been searching for for like 4 hours.
 
@Allenph you mean like a stack trace?
 
Don't know what that is but sounds right.
 
@JoeWatkins nope, still looking :/
@Danack looks reasonable, but I haven't worked with oauth in a while
 
12:46 AM
Ta. tbh, I think that using the password grant might just be a 'bad idea' in general....but doing so in a way that exposes client secrets seems to be defintely bad.
 
needs some serious caching though, it needs 3 requests, it's pretty slow
 
@DaveRandom what's with the #.jpg?
 
Also the width is calculated on number of chars * 10, which is a rubbish way to do it but I don't really know how else to do it in PHP
@PaulCrovella to get chat to render it as an image
 
oh right yeh, duh
ty
cba now though
@PaulCrovella github.com/DaveRandom/BadgeOfShame if you wanna fiddle
it's one monolithic script right now because I was mostly just dicking about
 
@DaveRandom taking the width after htmlspecialchars instead of before isn't helping
 
Oh, true
although in most cases it's not going to make a difference, but you are absolutely right
I may fiddle with it again tomorrow
 
 
2 hours later…
Wes
3:29 AM
morning
 
Wes
you are still wearing your canadian halloween avatar
did you watch south park eventually
:D
 
@Wes nah..
tbh, I have no clue what to change it for..
s/what/why/
 
Wes
3:53 AM
a kitten?
a moose?
a beaver?
 
Wes
lol
animals are cute
 
the next one should be exactly the same, except replace his face with a bottle of maple syrup
 
Wes
just look at my waving panda
lol
 
@PaulCrovella that would work
 
3:56 AM
and with poutine on the hat
 
if poutine is involved, I rather have the maple syrup on it
 
Wes
is recurse (as in recursive) an actual verb?
 
a few contrasting images went through my mind
 
@Wes yes
 
Wes
"the function recurses to itself"
 
3:58 AM
I'd go for through
 
Wes
yes that sounds better
 
Hi I'm currently working in date comparison using javascript
when I tested it on my sample php page. it works
but when I added it on a working php page, the result became wrong
this is my sample code:
var datenow = new Date();
	var cutoff = new Date("2017/04/01");
	var hrsnow;
	//alert(datenow+"="+cutoff);
		if (datenow<cutoff){
			hrsnow = 9.25;
			alert("9.25");
		}else{
			hrsnow = 9.5;
			alert("9.5");
		}
	if(schedule=='compress'){
		var defaulthours = hrsnow;
		}else if(schedule=='shift'){
	 	var defaulthours = 8;
		}else if(schedule=='monthly shift'){
	 	var defaulthours = 9.6;
	}
I wanted to check if the datenow is before april, and if it is befor april the result will be 9.25 else 9.5
 
@EarvinNillCastillo javascript room is that way ---> chat.stackoverflow.com/rooms/17/javascript
 
Wes
4:13 AM
don't forget the traps on the way. there are spikes, rolling boulders etc
 
4:39 AM
morning
 
4:57 AM
Gpmatka.net – #74390
 
@Jeeves :)
 
@Linus You just call my name I'll be coming trough.
 
5:19 AM
posted on April 07, 2017

New Cyanide and Happiness Comic

 
5:31 AM
@Wes, thanks!
 
Wes
:P
 
It's dangerous to go alone... take this --I===>
 
morning
 
Why exactly are Environment variables preferred over having a config.ini file outside the document root?
 
6:27 AM
Is there anyone here who understands php and html parsing using DOMDocument?
0
Q: DOMDocument saveHTML is not returning correct HTML Standards for "IMG", "INPUT"

KillrawrI'm a big fan of the PHP library phpQuery content parser (because its quite like jQuery, while using the PHP DOMDocument to extract Markup) but I've noticed a bug with specific elements with the quick closing event <img /> instead of <div></div> I've noticed this bug also occurs in DOMDocument a...

 
@Killrawr that's not a bug, just a difference between html and xml
 
But I'm using saveHTML and loadHTML, so is there no work around?
Maybe using Regex or something after the content is returned?
 
@Killrawr well, I never recommend using simplexml (because it's a shit api), but if you're going to there's no need to serialize and reparse to go between the dom and it, just use php.net/simplexml_import_dom
if you want your resulting string out of the dom to be valid xml then use saveXML() instead of saveHTML()
 
The only reason I'm using it this way, is to extract data from user input then provide that data out again in a different way. E.g. extract images from content (background images) then provide them back as individual image elements. (is one example)
It provides a way where the UI is being setup by the server, without having to wait for Javascript to re-order loaded resources such as images, in order to get the same result.
Thanks man :)
what is the string &#13;
 
6:43 AM
@Killrawr it's a character reference
 
morning
 
o/
 
moin
 
mornin Joe
 
'nin
 
6:57 AM
\o
 
o/
 
\p
 
Morngins
!!\o/
 
7:13 AM
morns r11
 
morning
 
mornin
 
7:32 AM
http://stackoverfiow.com/questions/52353/in-java-what-is-the-best-wa‌​y-to-determine-the-size-of-an-object
6
 
Why does PHP throw a class not found while I am putting in namespaces?
It works for two classes but not for the others
project_main/
├── app
│   ├── handler
│   │   ├── login.php
│   ├── lib
│   │   ├── dbhandler.class.php
│   │   ├── personvalidator.class.php
│   │   ├── platform.class.php
│   │   └── validator.class.php
│   ├── model
│   │   ├── user.class.php
│   │
│   └── tracker
├── composer.json
├── composer.lock
├── dependencies
│   └── mother.inc.php
├── public_html
│   ├── index.php
└── vendor
    ├── autoload.php
    "autoload": {
	"psr-4": {
	    "Pandora\\": "app/"

	}
    }
 
Think you should remove .class and .inc its very oldschool
 
^ composer,json
okay, but what is causing the problem?
 
@CoderDudeTwodee which class do you tend to load?
 
try renaming the files
 
7:41 AM
namespace Pandora\app\lib;

require (__DIR__ . '/../../vendor/autoload.php');

class DBhandler {
 
@CoderDudeTwodee if you use *.class.php suffix, then it will not get picked up by an autoloader
 
@brzuchal I am trying to load user class from person validator.
 
Also you should have a proper bootstrap file instead of still manually including the autoloader in every file
 
@tereško But personvalidator does pick up validator.
 
7:43 AM
Laravel: Making development complicated and infuriating
 
https://img.devrant.io/devrant/rant/r_68764_Qoqb6.gif (lol)
 
@CoderDudeTwodee co your class name is \Pandora\app\lib\DBHandler so you have to rename lib\dbhandler.class.php to lib\DBHandler.php and replace `Pandora\\app\` in your composer.json
 
How can I get all files using glob with this convention Chapter_2_border.jpg (the number has a range from 1 - 20) like this?

glob($path."Chapter_*_border.png");
 
@PeeHaa I am new to this, is there a link that would help?
@brzuchal What do I write in place of that in composer.json?
 
7:44 AM
@CoderDudeTwodee Not that I know right now
 
@brzuchal s/app\/
 
In computer programming, in particular in a Unix-like environment, glob patterns specify sets of filenames with wildcard characters. For example, the Unix command mv *.txt textfiles/ moves (mv) all files with names ending in .txt from the current directory to the directory textfiles. Here, * is a wildcard standing for "any string of characters" and *.txt is a glob pattern. The other common wildcard is the question mark (?), which stands for one character. == Origin == The command interpreters of the early versions of Unix (1st through 6th Editions, 1969–75) relied on a separate program to expand...
 
@CoderDudeTwodee "Pandora\\": "."
 
@PeeHaa Can you tell me the terms I should google?
 
Maybe somebody should write an article about how to bootstrap and wire together an application if nothing sane exists yet
 
7:45 AM
@PeeHaa ... it's friday
 
@brzuchal wong
 
@CoderDudeTwodee Lemme look if there is some sample app somewhere
 
@brzuchal I tried that once, didn't work, maybe because of the .class.
 
@JoeWatkins Yes \o/
:P
 
@PeeHaa I'd be grateful!
@tereško What should I do?
 
7:46 AM
@CoderDudeTwodee I told you to rename files chat.stackoverflow.com/transcript/message/36520252#36520252
 
@brzuchal About the composer.json
 
Also why you cannot use as everybody src/ dir?
 
I am renaming them.
uhh, alright.
I will update after fixing them.
 
!!lxr phar
 
@PeeHaa Nothing went wrong but I couldn't find a suitable definition
 
7:48 AM
sigh
 
@Jeeves a link to what you tried might be handy
 
@PaulCrovella Well, I don't know, this episode i watch for the first time so i'll see, but generally doctor who never ceases to surprise me.
 
Yes that is part of it (the wiring)
 
What should I have in my composer.json again?
@tereško @brzuchal
 
7:50 AM
@JoeWatkins how do I search for class constructors on lxr?
 
Anonymous
morrow
 
o/
 
morninis o/
 
!!lxr "phar, __construct"
 
@JoeWatkins Nothing went wrong but I couldn't find a suitable definition
 
7:51 AM
useless thing ...
 
yeah that sucks :(
tnx
 
Anonymous
@Jeeves ignore Joe
 
@JayIsTooCommon So you don't feel bad?
 
Anonymous
yes.
 
@Gordon I am not sure if the wildcard can holds 2 values glob($path."Chapter_*_border.png");
* could be 1-20
 
7:52 AM
anyone?
 
I thought it used to fallback to full search, but...
 
Anonymous
!!wotd
 
seriously, it must be 9 times out of 10 that it fails to do useful things ...
 
inveterate: settled or confirmed in a habit, practice, feeling, or the like.
 
@CoderDudeTwodee If you want class names like \Pandora\app\lib\DBHandler - then you need in composer.json "psr-4": { "Pandora\\app\\": "app/" } and file named app/lib/DBHandler.php NOT dbhandler.class.php
 
Anonymous
7:53 AM
@JoeWatkins no, that's not true. It's like anything, we only notice it when it fails :P
 
I have renamed to src.
 
dad jokes, word of the day and star signs are not useful things
I only ever ask it to do useful things and it fails the majority of the time
 
Anonymous
here you go
 
Anonymous
!!friday
 
Anonymous
7:54 AM
@JoeWatkins i'm gonna work on some more tests soon
 
ok I dislike phar
 
@brzuchal What if I need some class in another directory like pandora/mother? Do I just add another like "Pandora\\mother\\": "mother/"
 

« first day (2365 days earlier)      last day (2583 days later) »