« first day (2534 days earlier)      last day (2414 days later) » 
00:00 - 12:0012:00 - 00:00

12:10 PM
phpnw people: tell me your flight times if you want picking up from the airport
I have tested the encoding in this application to death, this dude has still found a way to break it :-/
it's UTF-8 front to back
 
12:30 PM
Morngins
 
@DaveRandom turns out it's GIGO and not my fault \o/
 
!!urban GIGO
 
[ GIGO ] Garbage In; Garbage Out
 
Okay - this is likely to be me being dumb, but how does this work: github.com/sebastianbergmann/phpunit/blob/…
the phpunit file is in vendor/bin......none of those paths resolve to vendor/autoload.php
 
@PeeHaa In other words, if you supply data that makes no sense then the output also isn't going to make any sense, no matter how hard you validate it
 
12:40 PM
@Danack Doesn't the composer autoloader include that file somehow?
oh I see what you are saying :p
 
isn't the file symlinked to vendor/bin?
but actually it's in it's original position
__DIR__ derefs symlinks
so actually the first one will match
 
Wait is that file actually in vendor/bin?
 
yes but I'm pretty certain it's just a symlink
 
I only have this in my bin dir
 
think I may have screwed stuff up by copying and pasting the whole project.....ls -l should show if it's a symlink right?
 
12:43 PM
#!/usr/bin/env sh

dir=$(d=${0%[/\\]*}; cd "$d"; cd "../phpunit/phpunit" && pwd)

# See if we are running in Cygwin by checking for cygpath program
if command -v 'cygpath' >/dev/null 2>&1; then
	# Cygwin paths start with /cygdrive/ which will break windows PHP,
	# so we need to translate the dir path to windows format. However
	# we could be using cygwin PHP which does not require this, so we
	# test if the path to PHP starts with /cygdrive/ rather than /usr/bin
	if [[ $(which php) == /cygdrive/* ]]; then
cd "../phpunit/phpunit"
 
@Danack yes, but gui copypasta probably won't retain that
 
^^ that looks like what goes to the dir
It just does a cd
 
@DaveRandom thanks, that was it.
non-obvious error, is non-obvious
 
@Danack huh?
 
[daverandom@149-210-224-55 Jeeves]$ ls -l vendor/bin/
total 0
lrwxrwxrwx. 1 root root 24 Aug 18 13:11 aerys -> ../amphp/aerys/bin/aerys
lrwxrwxrwx. 1 root root 26 Sep 23 14:44 phpunit -> ../phpunit/phpunit/phpunit
@PeeHaa ^
that's your server :-P
 
12:46 PM
Doesn't do that for me
unless debian doesn't show me my symlinks
root@gitilicious:/var/www/gitilicious/vendor/bin# ls -la
total 13
drwxrwx--- 1 root vboxsf 4096 Sep 22 14:04 .
drwxrwx--- 1 root vboxsf 4096 Sep 22 14:04 ..
-rwxrwx--- 1 root vboxsf  625 Sep 15 17:20 generate-defuse-key
-rwxrwx--- 1 root vboxsf  139 Sep 15 17:20 generate-defuse-key.bat
-rwxrwx--- 1 root vboxsf  605 Sep 15 17:20 phinx
-rwxrwx--- 1 root vboxsf  119 Sep 15 17:20 phinx.bat
-rwxrwx--- 1 root vboxsf  603 Sep 15 17:21 phpunit
-rwxrwx--- 1 root vboxsf  117 Sep 15 17:21 phpunit.bat
 
At some point I'd copied the whole directory somewhere else to avoid a git fuckup. Copying it destroyed the symlinks.
Did you do composer install on windows though?
> phpunit.bat
 
yeh that looks windows-y
 
oh fuck
yeah sorry
Got confused by directories
 
out of interest, how are you sharing that dir @PeeHaa? samba or virtualbox mount?
 
Is the a 'correct' process for doing releases on github, other than just tagging a version, and then adding that as a release.
> vboxsf
 
12:48 PM
@DaveRandom mount
I also have a samba share
 
I was using samba until the other day, I recently switched to mount, somehow I had never noticed it as a thing you could do
 
Don't ask
 
sooooo much better
 
It is
But my current setup is a bit of a mess
Have been playing with the machine the last week
Samba was specifically annoying to work with
 
SMB/CIFS is so fucking broken it's unbelievable
 
:)
 
it pisses me off a bit that virtualbox is the best option for running VMs on a windows host, because it's really not a good platform
 
@DaveRandom I haven't even ever considered using samba - mount works perfectly well (well… unless you want raw partition access …)
 
all that reliance on COM is really fragile, and totally unnecessary
@bwoebi yeh but your host is presumably osx anyway
so you can just use NFS if you are going to use a network share
 
@DaveRandom was nevertheless using a mount
it's just more practical
 
12:53 PM
/me is out for ~40mins
 
@DaveRandom @Danack do we know anybody who wants a phpnw ticket? I a not able to make it this year
 
@PeeHaa I don't know anyone....do you want me to ask people in my local user group?
 
Unless somebody in here calls dibs
@Danack Doesn't hurt to ask for interest in your ug
 
if only I had a valid passport. :(
 
You still don't have a passport? :P
 
12:56 PM
...
 
I suck at papers
 
This is just laziness at this point :D
 
.. yeah
crawls back
 
Oh wait. Maybe @Wes?
 
Wes
nope
next year. if i'm still alive :B
 
12:58 PM
k
 
why cant css override width="x"
for canvas
 
Because it doesn't truly believe in itself?
 
Somebody wants to go to PHPNW next weekend? I have a ticket.
 
I still want an amphp sticker on my laptop somehow
/me won't be there too. It was too late for the visa stuff and ... priorities
 
1:23 PM
cc @DaveRandom can you get stickers to me in NL?
 
Wes
@PeeHaa tweet it maybe?
 
I will if nobody in here nor @Danack's people want
 
@PeeHaa just tweet it, apparently conference tickets are still for sale.
 
k
@Wes when @DaveRandom gets the stickers to me I am going to need your address
/me is out
 
Wes
1:39 PM
don't waste them on me lol
i'm happier if they go on someone else's computer
anyway, who is bringing them?
 
Anonymous
1:51 PM
morn
 
Anonymous
2:19 PM
@JayIsTooCommon morning
 
Anonymous
@JayIsTooCommon o/
 
evenings o/
 
What sorcery is that?
 
datetime constructor does not throws exception on invalida date – #75249
 
@IROEGBU I think I've gotten it
 
Anonymous
2:25 PM
pfft stop talking to yourself, weirdo.
 
3:51 PM
Why does date("d\d H\h i\m s\s", $timestamp) return the correct date but + 1 day
The timezones aren't configured, but since I'm supplying the $timestamp it shouldn't matter
 
4:18 PM
Hello
 
4:29 PM
mornings
 
4:44 PM
!!dad
 
how do functions break up? they stop calling each other!.
 
@Jeeves when will the artificial intelligence attack mankind?
 
@crypticツ 42.
 
You all heard, we got 42 days left.
 
:p
 
5:04 PM
@Saitama if I'd watched LWA, probably…
 
oh :P
 
5:20 PM
so ... watching the "Ghost in the Shell" movie
 
the recent one?
 
yeah
I see why it bombed so badly
 
I was wondering if it's any worth watching
 
if you have not seen the anime version, then the world-building seem incomplete
 
I've seen the original movie
 
5:23 PM
if you have seen the anime, then the departure from the original will feel jarring
the plot is completely different, while it tries to use the same set-pieces
 
mkay
now I'm in between watching code geass zero requiem or a recent movie
but I think I'll do the former
 
Code geass ftw!
Dat autocorrect tho :p
 
it would have been a better movie, if they went with "in the GitS universe"
 
5:49 PM
@Ekin so the final verdict is: yes, kinda, but lower your expectations
it's like they wanted to make a prequel but could not commit
 
I see
 
it also needs a "director's cut" version :(
 
there seems to be a change.org petition for that :P
came up as the first result
 
Ghost in the Shell (2017): it's kinda, if, when your cat died, someone made it into a stuffed quadcopter for you top remember it
 
I see :P that metaphor
unrelated but, it seems steam has region restrictions for gifts :-(
that only works for my little brother, since I can only gift to him
 
5:59 PM
yes, there are
should have sent a gift on GOG
 
dunno if I have a gog account
I think I had one
 
you should get it
they have a sale now
 
Hello everyone
i am using POST array in one page
and i do var_dump($_POST) in second page
output is : array(2) { ["tema"]=> array(2) { [0]=> string(1) "1" [1]=> string(1) "3" } ["submit"]=> string(4) "Send" }
how to use that in a query?
i try the implode but is not working
 
what query?
sql query? http query?
 
sql query
................WHERE m3.menuId IN (".implode(',',$id)."))))";
 
6:04 PM
are you using prepared statements?
 
yes
i create manually with 1 and 3
 
hmm ... then there is a trick with WHERE ... IN ()
first of all, remove the name attribute from your submit button, while I am looking up the code
also, PDO or MySQLi ?
 
 <form method="POST" id="form" action="graficotema1.php">
  <select name="tema[]" multiple >

  <?php
    $dbuser="root";
    $dbname="teste";
    $dbpass="";
    $dbserver="localhost";
    // Make a MySQL Connection
    $con = mysqli_connect($dbserver, $dbuser, $dbpass) or die(mysql_error());
    mysqli_select_db($con, $dbname) or die(mysql_error());
    // Create a Query
    $sql_query = "SELECT menuId, menuNome from menu where menuIdPai = '0'";
    // Execute query
    $result = mysqli_query($con, $sql_query) or die(mysql_error());
 
ugh, procedural mysqli
 
i want to select the multiple values for that query
 
6:09 PM
wanna switch to PDO?
 
@tereško
 
that API is kinda terrible :(
 
What is the best way?
 
$total = count($parameters);

if ($total === 0) {
    return true;
}

$placeholders = implode(',', array_fill(0, $total, '?'));

$sql = "SELECT .... WHERE ... IN ({$placeholders})";

$statement = $this->connection->prepare($sql);
$statement->execute($parameters);
and in your case the $parameters would be $_POST['tema']
the problem with prepared statements is that there is no way to bind an array directly
and, as for which is better, @ChristopheCosta the important part is - which easier to use
 
i need to prepare that POST array
for the query
 
6:14 PM
is that a question?
what do you mean by "prepare an array"?
 
afirmation
 
12 mins ago, by Christophe Costa
output is : array(2) { ["tema"]=> array(2) { [0]=> string(1) "1" [1]=> string(1) "3" } ["submit"]=> string(4) "Send" }
you seem to have something like <input name="tema[]"> in your html already
that would be treated as an array in PHP side
 
just do var_dump($_POST['tema']) and see
do you understand how prepared statements work?
 
my mistake
i was using all POST
 
6:18 PM
yes
but you still would have a mess with the binding
@ChristopheCosta you probably should watch this: youtube.com/watch?v=nLinqtCfhKY
 
thank you for your kindly help
that helps me a lot
i have a last question
i am getting 1 and 3 for the query
but if i want to use count for 1 and count for 3
that need to be in sql or in php?
 
what is your query?
I mean, right now
 
$query = "SELECT COUNT(DISTINCT id_avaliacao) as TEMA FROM respostas WHERE menuId IN (SELECT m3.menuId from menu m3 WHERE m3.menuIdPai in (SELECT m2.menuId from menu m2 WHERE m2.menuIdPai in (select m3.menuId FROM menu m3 WHERE m3.menuId IN (".implode(',',$id)."))))";
is count all
not in parts
 
ugh
 
use Ctrl + K to format your code
 
6:24 PM
you need to learn how to use SQL JOIN
that subquery thing is a disaster when it comes to performance
 
that is hierarquic for get the root since grandchild
 
@tereško You cannot say it, sometimes subqueries has a better performance.
 
i have two tables
1,3 are root
 
@Shafizadeh those are exceptions and not the rule
 
and i want to count all grandchild by id_avaliacao
 
6:26 PM
oh keeeeey .. @ChristopheCosta do you have time to completely remake this or do you need to "make it work" as soon as possible?
 
that is working for total
soon as possible
 
ah fuck
what is id_avaliacao ?
 
name of one id
 
are those the things that you want to count?
 
6:28 PM
pro tip: you should code in english :P
 
@ChristopheCosta do you get any error?
 
@ChristopheCosta what's the problem?
 
the problem
is count in total
 
well use groub by clause
 
6:29 PM
$query = "SELECT COUNT(*) AS TEMA FROM ...blahblah ... IN( ..moreblah.. ) GROUP BY id_avaliacao";
this should do it
 
like this ^
 
not for 1 = count(x) and 3 = count(y)
 
well, I showed you what to do
that should work
if it does, spend the rest of the time learning about JOIN statements
 
@tereško are you sure "showed" is valid in English?
 
@Shafizadeh it should the the past tense of "show"
or I could have written "have shown"
both would be valid
 
6:32 PM
yes I know (since it has "ed" at the end), but I never seen it by now
@tereško Ah I see.
 
@Shafizadeh well, according to google, it is the correct form for past tense of "show"
... I learned those like 15 years ago and these day I just go by ear
 
Does "it" refer to "showed" ?
@tereško :)
 
@Shafizadeh "it" referred to the "solution" above
then again, my english might be failing, since I am close to .. emm .... finalizing the current bottle of wine
 
ah ok
 
.. for some reason, wine gets me slightly "buzzed" a lot faster than other drinks
 
6:38 PM
@tereško ah ok
@tereško and one question: what will you do if you be banned from drinking wine by a doctor?
 
@Shafizadeh there are three reasons to get banned to drink wine and beer: 1. sickness, that is accompanied by inflation (like cold, broken bones) 2. using antibiotics 3. failure of liver
only way for me to get option 3 would be from specific medication, since I am not an alcoholic
and for the other two: I know enough to impose that ban myself
 
ah .. good for you
 
besides, wine (in moderation) is good for heart and beer (in moderation) is good for skin
the magic word is "moderation"
 
I really like to try it (at least for one time), but sadly trying it has a really harsh consequences in my religion
 
actually in some interpretations of koran, only wine is prohibited
 
6:46 PM
It's called Quran. Also is there any difference between "wine" and "alcohol"?
 
I could say, that you religion need a "reformation" like Martin Luther did for cristianity, buuuut .. .you kinda had the reformation already and it produced Wahhabism :(
 
:) ..! Wahhabism isn't related to our religion at all
 
@Shafizadeh yes, from what I have heard, the original meaning in that prohibition was specifically about "fermented grapes"
 
that's true
 
well ... some people like to take their religious boos extremely literary
then again, those also tend to be the same people who think world is flat, because their books says so
 
6:50 PM
You know, I personally can earn calm (and nice feeling) enough by praying, so no need to wine :-) (however not sure what "praying means in English exactly")
 
so, basically for you it is a form of meditation
 
can be
 
as for the exact word .. emm .. in english "praying" technically could mean "ask something from a divine being"
could it be that what you actually mean is "kowtowing" ?
 
no, not really, I'm not talking about "asking". Praying means "talking with the God" and "trying to be a nice person as he wanted"
 
<insert vague hand motion>
kinda
TBH, the "belief in divine" has always been an extremely foreign concept to me
even as a kid I was not afraid of some "god" .. what scared me were aliens :D
 
6:58 PM
Actually living without "belief in divine" is pretty much foreign to me
 
I know, which is why I am not pushing :P
 
:)
Also, we never afraid of our god ..! he's delightful :)
 
do you believe in hell?
:D
ok, I actually need to stop
 
yes, but not for a good person
@tereško ok :)
 
as a closing shot: "that's not what your books says"
 
7:03 PM
As the last sentence about this topic: forget everything you heard/read about our religion, all you need to know is, you will be one of us if you're trying to be a good person, if you're trying to help people.
 
and now I will go to add some more lectures to my "lecture post"
 
do you have a lecture?
 
no, I have this answer, which I am trying to maintain (you probably should have all of those materials downloaded, since you can't access youtube)
 
ah ok
@tereško Yes. Also, what's unit test? I heard it already in my company
 
hmm
 
7:07 PM
Installation fails with INSTALL_ROOT when httpd.conf file is not present – #75250
 
it is actually explained in that "Unit Testing" lecture
 
hmmm indeed
 
but, well .. lemme see if I can explain
 
thx
 
truth be told... what is a unit test?
 
7:09 PM
he's explaining .. just be quiet and take notes :)
 
a unit test is code, that executes a method on your class instance (in isolation) and verifies, that the response matches with an expectation
 
@Shafizadeh I see you've been joking again
 
the "in isolation" part is what differentiates between "unit test" and "integration test"
at least that's how I understand it
 
@FélixGagnon-Grenier yes :) (being quiet is a term in my language, so really no offence)
@tereško ahh
 
@Tiffany i.stack.imgur.com/Dc0Ji.jpg lowat. such glorious.
 
7:12 PM
@Shafizadeh here would be a sample of unit tests: github.com/teresko/routing/blob/master/tests/unit/Fracture/…
 
@tereško I'm taking a look at it, thx
 
@FélixGagnon-Grenier glorious PC master race
:D
 
I don't.. wat?
 
7:15 PM
also. welcome to reddit.com/r/pcmasterrace
 
@tereško each method of this class is a different unit test?
 
@Shafizadeh no, the tests are separate from the class, that you are testing
but each test should be examining a single scenario
for example "what if I pass invalid email address as a username in the Account class"
download that video, which I mentioned above
 
ah, ok
 
it should clear some of the thing up .. and the save it to USB and pass around in your workplace
 
sure
 
7:22 PM
hey, you can work up to be an lead architect that way ... @Dereleased did
:D
 
7:33 PM
go go go!
 
7:44 PM
@FélixGagnon-Grenier is that char HC?
 
no lawl
it sucks very much
well, dps is ok/good, but sooo squish.
I die a lot
I just might start to play hc chars, I've beat acte one enough to be confident about it
 
Hello again, someone know from a POST array if is possible to create multiquery
array(2) { [0]=> string(1) "1" [1]=> string(1) "3" }
have one query for SELECT test from blabla WHERE ='1' and another query for SELECT test from blabla WHERE ='3'
@tereško
 
hmm ... have you understood how arrays work in php ?
 
the concept
but is different ways to manage
maybe you know how to do that
 
8:00 PM
you really need to play around with arrays
it's one of the most common structures in php
you need to have a solid understanding of how they work
especially the nested arrays
 
8:34 PM
@Andrea in case you watched the previous reactionary video, here is a different video youtube.com/watch?v=DPtiHPaYjqc (this this time the "reactionary" view on the upcoming "Free Speech Week" in Barkley
:P
and, btw, I would appreciate good videos from left and far-left, if you have any, since you probably have a filter bubble that is not overlapping with mine, @Andrea
... that's by best bet in actually being able to see beyond my bubble
 
 
2 hours later…
10:20 PM
Hello, i need your little help. My question is answered on this page stackoverflow.com/questions/46384168/php-get-data-with-api-key but i need a little help for adding order instead of getting balance. Could you help me?
 
@Can1 you already have an accepted answer on that question
 
yes they show me how to get balance but now i need add order. if it is possible could you help me
 
what order
your code is a mess and I have no idea where to even being
 
$api = new Api();
$order = $api->order(array('service' => 61, 'link' => 'https://www.instagram.com/p/BC3XxEDQEhH/', 'quantity' => 20));
$add = $order->add($order);
print_r($add);
I am trying with thse but i get this error "Fatal error: Call to undefined method Api::add()"
 
well, the error message is obvious
there is no add() method
 
10:39 PM
Thank you teresko :))) i see my mistake after you response :)) thanks good night
 
Missing program prefix and suffix for LiteSpeed – #75251
 
Wes
\o
 
o/
there are some nice looking games on sale on gog
going to try some of them
 
Wes
macron is a very inspiring person
 
11:06 PM
.. if you say so
(in eastern europe he's mostly seen as a creepy person)
 
Wes
11:20 PM
lol, creepy?
his speeches are always memorable. the one after trump was elected was also funny
it was like hey americans, want to leave the country? come to france :P
 
11:54 PM
@Wes and has a great theme tune youtube.com/watch?v=9FOz-pD4AI0
 
Wes
LOL
 
00:00 - 12:0012:00 - 00:00

« first day (2534 days earlier)      last day (2414 days later) »