« first day (1754 days earlier)      last day (3185 days later) » 

12:04 AM
probably the where condition matches nothing
also: this.inputName.value (assuming that this point to the <form>).. stop using jquery where it makes no sense.
 
any fancy laravel 5 knowledged people around?
 
I try not to, but then I just get lazy
 
trying to figure out how to access the results of this query:
` $results = States::select("
SELECT *, ( 3959 * acos ( cos ( radians(".$state->latitude.") ) * cos( radians( latitude ) )
* cos( radians( longitude ) - radians(".$state->longitude.") )
+ sin ( radians(".$state->latitude.") )
* sin( radians( latitude ) )
)) AS distance
FROM states
HAVING distance < 100
ORDER BY distance");`
 
$results->lists('some_property') throws an error
which is how I'd usually access it
var_dump of $results is a giant object
 
12:10 AM
@Rooster does that object has a class ?
(hmm ... that didn't come out in english)
 
object(Illuminate\Database\Eloquent\Builder)#155 (6) {
^start of var_dump
that sort of makes me think the query isnt even being executed
 
according to documentation, it should be $results = States::select(...)->get();
 
ah sorry, I;m on a train using a mobile hotspot
must have got garbled
 
also, you code looks vulnerable to SQL injections
 
meh, that throws an error
SQLSTATE[42S22]: Column not found: 1054 Unknown column '
' in 'field list' (SQL: select `
` as `` from `states`)
 
12:14 AM
read this section in documentation
 
well anyway, almost at my train stop, will hop back on in 20
 
@tereško How many desks have you already destroyed with your head?
 
its laravel 5, not 4.2 if that makes a difference
 
@Rooster I expect that the query builder has not been changed
but you can look up the same docs section for 5
at least, by the look of the error, it works mostly the same @Rooster
@bwoebi I have a protection there:
it's for elbows and head
 
jgot it working, apparently, its States::raw('the raw query')->get();
thanks for the help! gtg!
 
12:17 AM
@tereško oh okay :-) Then it's all fine!
 
Abe
@tereško for head-desks? :D
@bwoebi lol, i guessed right
nice monitor though
 
@Abe yeah… the uncountable amount of crappy bullshit in PHP …
 
@Abe yeah, got my PC ~3.5 months ago.
though, I think I will have to redo fans (the stock AIO cooler fans are too loud)
 
Abe
i'm not sure if i would prefer a split view over two windows
cabinet looks tiny
 
"cabinet"?
 
Abe
12:24 AM
mine is a full tower, 80cm tall + [offroad] wheels
cabinet. another word for "case" or "chassis" :P
not very used, apparently
 
Regex anyone familiar with it
 
Abe
the good thing about having a full tower is that air is entirely dissipated internally to the cabinet. so you don't need fans
 
@Abe I picked up Define R5
and you still need fans even in a large tower
 
Abe
i have 4 fans but they don't pull air from outside the cabinet
 
do you have exhaust fans?
 
Abe
12:26 AM
because i covered all air grills
even the psu is fanless
 
@tereško I just know, that, when I live in a bigger room, I do not want to be right in front of the wall…
 
Abe
that means, no dust :P
@tereško nope, hot air goes up inside the full tower, where there's a lot of empty space
 
@bwoebi there are windows on both sides
 
I mean, rather in the middle of the room with just one adjacent wall (ideally window) at most, but no wall in front…
 
@Abe I honestly hope taht you are joking
 
Abe
12:29 AM
i'm not joking
temperatures aren't like in alaska, but low enough
 
so, not only you are pulling in dust, but you also cannot play anything demanding
 
Abe
i don't have any fan pulling air from outside the cabinet
air is dissipated within the cabinet
since it's huge
 
hot air raises
it diesnt stop raising just because it reached to top of the case
 
Abe
the actual metal of the cabinet dissipates the hot air
 
that's not how air works
 
Abe
12:33 AM
apparently it is, because my computer is on 356/year it's as reliable as day and night :P
#lastfamouswords
 
are you saying that there is no dust inside your box?
 
Abe
it's not 100% sealed, of course
but very little dust
on the motherboard i have a 23cm fan, which is as big as the motherboard itself
all custom made :P
@tereško ever used two monitors? do you prefer the super wide monitor or two monitors? honest
 
I hate multi-monitor setups
I get lost and confused
 
Abe
lol
 
12:54 AM
@tereško fyi, I will get 2x DELLW3415D delivered tomorrow
should basically be your setup * 2
/me trains neck
 
Abe
#showoff
 
No, it's just because I love multi-monitor :D
 
Abe
:D
 
Also, my GF stole my previous setup -.-
 
@Ocramius I'm not sure a 2 x 3440 is a practical setup
are the screens at least curved?
 
12:56 AM
@tereško we'll see tomorrow, heh, I also bet on it
yes, should be practically like yours
I usually have one screen with BS (like this chatroom: DABUM TSSSS) and one screen with work stuff
 
@Ocramius also, did you mean U3415W ?
 
yar, sry
I'm really just waiting for the delivery tomorrow @_@
 
have you actually used a monitor of that size?
because .. emm .. I think it will be larger than you expected
 
I previously had 2xU3014
 
oh, and you need two display ports (I think hdmi could only run that size at 30hz)
 
1:02 AM
well, they're still here, but they're not "mine" anymore >.<
yes, I'll run on 2xMiniDP
 
1:33 AM
shit .. I should try to sleep soon
 
Sleep is for the weazzzzzzzzzzzzzzzzzz
 
oh, btw, I disagree with your "domain object should never have an invalid state" thing
it's just wrong
.. and now, back to manga
 
Abe
@tereško makes type safety pointless
gl all, going to bed too
 
@Abe have you actually thought this through?
 
Abe
lol, yes
 
1:43 AM
not really
what about when you alter the domain object's values
 
Abe
and what?
 
let's say class Foo should never contain contain instance of Bar only if parameter X in it is set to 4
how would you set parameter X to 3?
 
Abe
setters not necessarily are 1:1 with fields, in that case i would use a setter that changes both fields at same time
 
@tereško you'd simply prevent the state transition if the final state would be wrong
 
@Abe , no, what you are saying is that ALL related values should be changed at once
 
1:47 AM
I usually simply have state transitions (events) as methods, then validate everything in the method before altering state
EventSourcing would be the best solution, but this is "good enough" for most projects
 
Abe
@Ocramius example of that? tomorrow maybe :P interested
@tereško it has drawbacks, as everything
but better than having instances that might be accidentally left in an invalid state
imho
 
@Abe that's exactly the point. Instances should always be in a valid state
breaking that invariant makes the entire codebase unusable
 
Abe
tried both solutions, once you get started with stuff like isValid() method, you are screwed
anyway, gn both :P
 
@Ocramius , here is the sad part: I understand and really like your position in theory
but whenever I have seen it implemented in practice, it is a fucking disaster
especially in cases where you have to handle multiple data sources for a single valid entity
 
Abe
happened to me
 
1:56 AM
.. anyway, time to sleep
 
Abe
i don't remember the details but i had to use random data just to keep the instance valid, while waiting for the other data to be written
 
@Abe you are probably talking about some multi-step order form
 
Abe
nope, but it was just a lazy quick fix
 
MORNIN
 
2:37 AM
@tereško data sources are data sources. Handle it exactly like unserialize($data). That's why I simply gave up on it and decided that the best way to handle it is to go the ReflectionClass#newInstanceWithoutConstructor() + ReflectionProperty#setValue() approach.
Data sources don't have interaction, it's just brutal serialization/unserialization logic that doesn't really need any particular abstraction
It's not even OO stuff, just give up on trying to make tradeoffs in the API of your domain logic
 
 
2 hours later…
4:22 AM
Who's here?
 
good morning
 
@Orangepill morning
@Orangepill do frameworks cms etc making programmers unproductive?
 
no ... just dumber
 
@Orangepill hahahaha right
some WP developers dont know even how to hash passwords
 
most wp developers don't know what hashing a password is... cms's like wp have lowered the barrier to entry to a scary low
 
4:36 AM
aren't these popular cms and framework making the web insecure. since every hacker is trying to find out a way to to hack these platforms. If they find a single vulnerability they will be able to hack millions of sites
 
That's speaks to the quality of the tools used and the inattention or ignorance of the developer maintaining the software.
 
thats true
 
5:02 AM
@ocramius Do you have a reference implementation of a data mapper using an upsert?
@sara morning
 
morning
 
@Sara Hi sara
 
I NEED FOOD
 
I have some cheetos here but I don't think that's going to help you.
i don't think it qualifies as food
 
Use is_food() function
 
5:13 AM
moin
 
morning
 
monstrous doesn't seem fair ...
 
jeez , @JoeWatkins, was it recorded using a tin can ?
 
I got a pretty expensive mic, the raw material was edited down by edd though ... it sounds alright to me ...
it did literally take hours to find a setup that worked, maybe I had something set wrong ... we tried many vms, many os's, nothing would play nice that day ...
 
your audio is ok and edd's audio sounds over-amplified (it actually is causing a stabbing main in my left eye)
 
5:25 AM
oh dear
 
oh, there is one thing that is a problem with your side of audio: echo
it's not distracting, but it's there
 
@JoeWatkins I can't complain about your sound, just the other guys sound wasn't that good and distorted.
 
agreed
 
I noticed the echo, but don't really know what to do about that, I can't imagine it would be any smoother had I muted my mic, it would be another button to press and I would get it wrong most likely
 
depends
do you intend to use that mic regularly? If so, it is possible to by special foam blocks for putting on the walls, that cancel the echo .. but that's if you intend to earn some youtube money
 
5:29 AM
I didn't even notice the echo while listening.
 
"acoustic wedge panels"
they are not too expensive, but they suck as room decoration
 
I bought it for pod/screencasts, the problem is with kitting out the room is that there is 30 feet of windows in this room
it wouldn't look nice from outside ... that would invite complaints from landlord I think ...
I know what I'll do ... earphones ...
 
@tereško egg storage boxes are a good alternative :)
 
I should have thought of that ... we could hear echo setting up and adjusted volumes to try to minimize it, earphones just didn't cross my mind ...
 
@JoeWatkins that echo is from your room
earphones won't change it
 
5:36 AM
@JoeWatkins I wouldn't watch it for entertainment purposes but thus far it appears to be a good resource
 
ooooh crap
 
@JoeWatkins you may simply migrate to your bedroom and sit facing the wall without windows while recording
 
computer is kinda fixed position
maybe a better mic is in order, it's not the best, but not cheap crap either ...
 
no, that's the environment
 
or something around the mic to reduce echo and maybe in my corner I could put up those panel things, have to experiment I guess
 
5:39 AM
you may try putting a box around the mic
 
thanks for feedback chaps, appreciated ...
 
should be from soft material though
 
/me goes to walk dogs
 
I really recommend trying egg panels
been there mysefl :)
 
@SergeyTelshevsky decorating the mic won't really help.
 
5:43 AM
@tereško why? you don't need to remove, but reduce the amount of echo
reducing it by half will already make noticable difference
 
you would reduce ALL of the sound
 
@joewatkins I think the person that posted that comment only only watched the very beginning of the video ..you seem to find your stride
 
@SergeyTelshevsky oh
 
that's pretty much what we did, but we had only 2 walls - the side ones
 
5:47 AM
that actually could help
 
would PDOStatement::fetchObject be a good way to hydrate an object from a data mapper without having to reflect shit into it or publicing all of the things?
 
you can play with that box removing walls or placing them further and what's more important rotating them to a different angle
 
@Orangepill how will you deal with type transformations?
(it's a genuine question)
 
@teresko good question..
seems dirty but since the constructor is called after data is pushed in you could fix it there..... but that seems messy
you know like this
public function __construct () {
    if ($this->purchase_date){
        $this->purchase_date = \DateTimeImmutable($this->purchase_date);
    }
}
 
6:09 AM
yeah, that's kinda terrible
 
You could make an init method that the mapper would call that did similar to the above but I don't think that would be much better.
 
6:29 AM
survey says it's only viable if the entity contains scalars
 
Morning.
 
Morning
 
moin
 
6:46 AM
 
that cube looks interesting idea
not sure about sitting in a closet ...
 
don't :)
 
0
Q: Error in magento admin print page

Deeban BabuI developed on e commerce website in magento When i click print button in magento invoice admin page the error is occur Table offset (1445424) not within expected range Trace: #0 /var/www/ecommerce/lib/Zend/Pdf/Font.php(615): Zend_Pdf_Font::_extractTrueTypeFont(Object(Zend_Pdf_FileParserDa...

please help this issue
 
@tereško #whenPeopleTryToBeTechSavy #butTheyReallyAren't.
 
7:02 AM
posted on August 05, 2015 by kbironneau

/* by pierrocknroll */

 
@tereško :D
 
@DeebanBabu what language is the store in... I think the font it's using may not have all the proper glyphs
@DeebanBabu replace the following files... make sure you binary transfer on your ftp client
/lib/LinLibertineFont/LinLibertineC_Re-2.8.0.ttf
/lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf
/lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf
 
Anyone an idea why I should not take this package? combell.com/en/reseller-hosting/controlpanel
 
Hrm, I wonder, I see quiet a few users getting their variables from POST as such $_POST[VALNAME] instead of: $_POST['VALNAME'], isn't it a error / wrong to ommit the ' / " ? (Yes I'm aware that it might be a stupid question but I couldn't find anything about it in php.net)
 
@Epodax it's a notice, so people with shitty error reporting won't notice
 
7:15 AM
@Epodax The first one, the index is the constant data. Since that is likely undefined, PHP will often just convert it to the string 'data' and log a warning message.
The second two are both identical. The index is the string 'data'.
> Credits to : SO
 
Notice: Use of undefined constant VALNAME - assumed 'VALNAME'
 
Ah, so while it is incorrect, it will still work due to php being smart enough to figure it out.
 
imo php shpould fail... silently fixing it promotes sloppy coding
 
it's not clever, it's ignorant ... $_POST[VALNAME] is valid only if VALNAME is defined, it's a mistake to use an undefined constant ... but ignorant ...
 
Not arguing that, but it won't be the cause for a piece of code not working.
 
7:19 AM
@Epodax s/smart/stupid
 
unless VALNAME is defined as a constant ...
 
@Epodax well as long as error_reporting is off it wont be the cause
 
Morning 11
 
of course.
 
mohaa
 
7:19 AM
hi @PeeHaa
 
I am looking for a suggestion. I have to setup a user registration form ( login, register, lost password) and a backend for an administrator.. User can create an account and later add some data to a form. Then an admin can approve or disapprove that data. When approval = ok it sends an email. That's it.
Suggestions what to use for that? Framework looks a bit overkill.
 
It was just bugging me that people wrote it without the '/" , but seeing as nobody else seemed no mention it, I got curious whether it actually was a viable way.
 
@Duikboot ahem :P
 
@Duikboot That's actually still a bit of work
 
@Patrick Ahem :D haha well I already did all steps but i'm missing some kind of database layer? Or I've missed that
 
7:22 AM
The moment people can create accounts you also have to manage lost passwords, throttling (on multiple levels), remember me etc
 
@Duikboot I did not write that chapter yet. But in your case I would just use PDO. Make a class like FormWriter or something like that to persist the data
 
Isn't lost password just a hash and a email? When the hash matches the one in the DB If true: you can reset your pass else, you are just not allowed.
@Patrick : Ok Not yet used with that, Im used to work with PDO, but not yet in the whole tutorial setup you made. :D
 
@Duikboot Yes, but that means 1) an email 2) validation of token 3) incorrect page page 4) correct token page + reset password 5) reset password successpage
 
Indeed.
 
@Duikboot It's not different. Just initalize it in the dependencies file and then use it as a normal dependency
 
7:29 AM
@Patrick How long would it take to write something like that?
 
@Duikboot No idea. Depends on who is doing it. Break it into subtasks and then estimate those
 
7:56 AM
I made a sketch of it. -- i.imgur.com/XyZnyxe.png
 
@Duikboot Which tool did you use to create that graphic?
 
Illustrator
 
morning
 
@Naruto o/
 
Did the random ping guy leave already? :P
 
8:11 AM
pingeling
 
8:26 AM
@Naruto
 
@Naruto
 
@Naruto
@PeeHaa o/
 
o god, when will I learn?! ^^
 
8:45 AM
moin
 
@Naruto
@DaveRandom good morning 0/
 
@Naruto
 
@kelunik \o
@DaveRandom Mogguh
 
@PeeHaa
Had enough yet?
 
@DaveRandom yes
@DaveRandom
 
Mogguh o/
 
@PeeHaa how's life?
 
Busy
 
9:04 AM
 
o/
 
Good morning
 
hey @AlmaDo
 
9:25 AM
Someone idea how to fix this: I login a root on my VPS I have multiple packages an ddomains running so I would like to access the public_html directory from xyz.com
Is there a way to get there ?
 
Virtual Hosts are your friend
 
Ok, why when I do ssh root@customdomain.com it brings me not to that domain but to the main root directory of my server? Is that also a virtual host setting?
 
Oh, you want to ssh into the right place
 
Yes. :)
 
Wouldn't it be customdomain1@vps.com
With customdomain1 being a user, because a user has a home directory
 
9:28 AM
That works.
 
Alternative would be to write a quick script that is run on login that identified the user and cd's to the right directory
 
@Duikboot ssh root@customdomain.com:/the/path doesn't work?
 
@PeeHaa I think he wants automatic
 
oh
 
The main issue is more easy I want to fetch changes from git. But when I type in my password it says: Permission denied, please try again.
But my password is correct. So I thought maybe it will work when I use root access.
 
9:38 AM
@Duikboot Just add a cd /path/to/webroot to your .bash_profile.
 
That works indeed
Damn git ><
 
@PeeHaa Actually a good idea, I should add a path to my ~/.ssh/config, if it's possible.
 
When I use sudo ( which is not suggested )
xyz is not in the sudoers file. This incident will be reported.
 
These times when I typed username and host everytime... a lot of wasted time.
 
@kelunik Jesus. That is lazy :P
 
9:42 AM
@PeeHaa I just type ssh srv for my server. :P
 
:-)
 
Permission denied, please try again. I'm going to run through a window.
 
@Duikboot Right user?
 
Yes.
wait a second... does it matter if I connect with the IP or the domain?
>> It seems not.
 
@PeeHaa Even lazier: git clone gh:kelunik/template. :P
 
9:45 AM
hehe
 
@Duikboot Not until you change the domain. ;-)
 
Permission denied is loving me today
 
@rdlowrey Yeah, I always get to use and update to latest PHP code if I start working on something again or fresh. php 5.5+ that is.
 
@DaveRandom you might find this fun: ssh whoami.filippo.io
(a public ssh server)
 
// set variable to false
$code_is_save = false;
and a few lines later he is doing something that doesn't seem to make sense but no comment. Thanks to whoever wrote this code :x
 
9:57 AM
// set variable to false
$code_is_save = true;
at least it's not this ^
 
pretty sure I've seen this too... :*(
 
@FlorianMargaine Not recognising my key for some reason
 
@DaveRandom damn
maybe you don't have an rsa key
worked for me and most of my colleagues at the office
$ ssh whoami.filippo.io
The authenticity of host 'whoami.filippo.io (178.32.139.168)' can't be established.
RSA key fingerprint is c8:9a:b0:9d:59:96:24:37:70:4c:ef:eb:31:47:68:40.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'whoami.filippo.io,178.32.139.168' (RSA) to the list of known hosts.

    +---------------------------------------------------------------------+
    |                                                                     |
    |             _o/ Hello Florian Margaine!
 
lol
 
Half way there. Woooooah!!!1
 
10:07 AM
Mornings
 
yo
 
@RonniSkansing Hey slacker :)
 
@FlorianMargaine not on my PC
it probably has to do with my setup
there are no key in my ~/.ssh folder , instead keys are defined in ~/.ssh/config file and located in ~/.ssh/active/
or it might be an OSX thing, be cause keychain IS sending all the keys
 
Anonymous
10:40 AM
Morning o/
 
:24896358 +---------------------------------------------------------------------+
    |                                                                     |
    |             _o/ Hello!                                              |
    |                                                                     |
    |                                                                     |
    |  Did you know that ssh sends all your public keys to any server     |
    |  it tries to authenticate to? You can see yours echoed below.       |
But I do use SSH for Github >:P
(OS X)
 
<?php

$array=array(
	array('1233','354665','64982'),
	array('4713','96865','64782')
);

foreach($array as $key=>$a){
	if(in_array('4713',$a)){

		$key=array_search('4713',$a);
		unset($a[$key]);

	};
};

var_dump($array);
Why i am unable to unset the array
 
unset($array[$key]);
 
@tereško yes
 
-_-
 
10:45 AM
@NeelIon look at the following lines
foreach($array as $key=>$a){
$key=array_search('4713',$a);
unset($a[$key]);
all 3 of them are compounding your problem
are you able to see the problem, @NeelIon?
 
@tereško two variable? $key?
 
that would be one of the problems
 
but when i am printing $a[$key] it is outputting the value what i want to unset
<?php

$array=array(
	array('1233','354665','64982'),
	array('4713','96865','64782')
);

foreach($array as $key=>$a){
	if(in_array('4713',$a)){

		$key1=array_search('4713',$a);

		echo $a[$key1];

		unset($a[$key1]);

	};
};

var_dump($array);
 
12 mins ago, by Neel Ion
Why i am unable to unset the array
@NeelIon few minutes ago you said that you wanted to unset an array, not a value
 
@tereško sorry, my mistake :p
 
10:57 AM
It's a fine balance to know whether to help on a trivial issue or just let them figure it out.
All you need to do is step through your code more carefully.
 

« first day (1754 days earlier)      last day (3185 days later) »