« first day (3138 days earlier)      last day (1807 days later) » 

11:01 AM
thanks @NoobDEV-GBL I will try it :D
 
@Sean tell me if that worcks for you
@Sean you are missing a tag image and one "</div>" on your code
change this :
<img class="product_img2" <?php echo $carouselproductImage->toHtml(); ?><i
class="far fa-clone compare"></i>

to this:
<img class="product_img2" <?php echo $carouselproductImage->toHtml(); ?>><i
class="far fa-clone compare"></i>
 
Okay thnx :D
 
before the tag "<a>" place a "</div>" because is missing that 2
 
oh yeah :)
just changed it, ill try it
thanks
 
npmate
np mate
 
11:08 AM
hmm, its still only showing me the category of the first id "3"
<?php
$carouselcategoryId = array("3","5","6","12","7");
foreach($carouselcategoryId as $item){
$test = utf8_encode($item["0"]);
$carouselcategoryProducts = $block->getCategoryProductsById($test);
}

foreach ($carouselcategoryProducts as $carouselproduct) {

/*Get Thumbnail*/
$carouselimageBlock = $block->getLayout()->createBlock('Magento\Catalog\Block\Product\ListProduct');
$carouselproductImage = $carouselimageBlock->getImage($carouselproduct, 'category_page_grid');
?>
<div class="owl-carousel owl-theme">
this is what I have now
 
hmm
 
Ill try the array without quotation marks
 
yaa try that
 
hmm still not working :/
 
i have used a code like that to may table in pdf, and was a pain in tha ass
 
11:13 AM
still shows me the first category only
I had one too many div tags I think
<?php
$carouselcategoryId = array(3,5,6,12,7);
foreach($carouselcategoryId as $item){
$test = utf8_encode($item["0"]);
$carouselcategoryProducts = $block->getCategoryProductsById($test);
}

foreach ($carouselcategoryProducts as $carouselproduct) {

/*Get Thumbnail*/
$carouselimageBlock = $block->getLayout()->createBlock('Magento\Catalog\Block\Product\ListProduct');
$carouselproductImage = $carouselimageBlock->getImage($carouselproduct, 'category_page_grid');
?>
<div class="owl-carousel owl-theme">
 
try to set the array like:
$test= array(
array($pmobs1),
array($pmobs2),
array($pmobs3),
array($pmobs4),
array($pmobs5))
 
okay ill try ;)
 
using $pmobs as 3,5,6,12,7
to shoy that array you shoud use $test[$pmbd]["0"]
show*
 
okay
I really appreciate your help @NoobDEV-GBL
 
np mate
i can try to helpxD
 
ThW
11:22 AM
@Sean Why are you accessing $item as array? It is a single number.
 
@thw well we are trying just that
 
ThW
and why do you try to encode an integer number as an Latin-1 string to and UTF-8 string?
 
because I dont know any better xD
 
that was my mistake
 
yeah still not working :/
 
ThW
11:24 AM
$listOfIds = array(3,5,6,12,7); foreach($listOfIds as $singleId) { ...
 
so like this?
$carouselcategoryId = array("3","5","6","12","7");
foreach($carouselcategoryId as $carouselcategoryIdHolder){
    $carouselcategoryProducts = $block->getCategoryProductsById($carouselcategoryIdHolder);
}
I guess xD
I should real more documentation lol
 
ThW
$carouselcategoryId is the wrong name for that variable - it is not a single id but a list of it, name it correctly for example $categoryIds = array(1,2,3); foreach($categoryIds as $categoryId) { ...
 
ohh ok
thnx
for me this code makes sense when translated to logic but its still not working :/
 
you guys know how i style.display = 'none' the lable?
 
can you give the label an id
 
11:30 AM
holly shit, may bad
xD
 
document.getElementById("labelid").style.display = "none";
:D
 
@Sean in my modest opinion
better you take on ampty file and handmade that code from the begining
 
yeah :/
ill try a couple things and if it dont work ill redo
because now it is printing each category id
just not displaying the carousel
 
hmmmm
did you try to do just one foreach
 
i can try that
 
11:36 AM
and makinh that tags inside
making*
@JBis hello mate
 
Don't random tag people
 
Ill ask on questions if anyone knows why lol
 
@Wes I don't. I used to be interested in full meal replacements of which I think Bertrand is a good choice. I don't drink protein shakes. I usually eat one protein bar after the gym. I buy them at Lidl. It's their own brand of bars.
 
wait wtf @NoobDEV-GBL
its showing everything in the code correctly
but owlcarousel isnt loading xD
I think the code was working all along lol
 
loooooooooooool
 
11:46 AM
look xD
 
@Sean now is other problem xD
 
but its not displaying the carousel lol
i'll figure it out. probably has to do with this:
    $('.owl-carousel').owlCarousel({
        loop:true,
        margin:10,
        nav:true,
        autoPlay: 1000,
        responsive:{
            0:{
                items:1
            },
            600:{
                items:3
            },
            1000:{
                items:5
            }
        }
    })
});
 
maby
 
Anyways, thanks for the help ^^
 
@Sean You're welcome, my friend, we should talk more often, I'm an apprentice too, and I'm doing development alone, two heads think better than one
 
11:55 AM
I agree, whats the best way to contact you?
 
@Sean add my skype mate : the_pololo
 
okay
 
Morning. Where do I report the Build Failures in GCOV? bugs.php.net? Or should I mail someone?

It's been a while since the builds fail in master and PHP-7.4: http://gcov.php.net/
 
12:11 PM
secure.php.net redirection to canonical URL – #78040
 
@Jeeves why you no one box, silly elephant ?
 
12:28 PM
@JoeWatkins shouldn't that read phpilosophpy?
 
and shouldn't it be phparallel?
 
hi
I have a question. What technology can I use: I build for example a PHP app with a front-end thingy to scan QR/BAR-codes. When I scan a code and it's valid:
A 'int/boolean' will be set to true/1 and I should start PRINTING a batch.
Yes a plastic batch for an event.

What kind of printer? could I use?
I found: printnode.com/en so far.
 
12:48 PM
@Gordon pherhaps
 
1:20 PM
@Duikboot Whose printer are you trying to invoke?
Your (the server's/company's) printer? Or the user's?
 
Wes
1:46 PM
@bwoebi need more help pretty pls. is (array)$object_of_internal_class always supported? and with that i mean, does it at least return empty array? thanks
 
it is possible to override the cast behaviour internally, afaik nothing in core does though
 
Does anyone have any suggestions to get my docker containers running faster? If I run it in a vagrant box, it runs alright (still slow but it's because of the code). But, in my docker container - a request can take up to 2 minutes :|
I'm on a mac
I gave it more memory through Docker itself but it didn't seem to help at all
 
@DaveRandom cast for what ?
 
@JoeWatkins see @Wes's message
 
Wes
@DaveRandom hey dave. i think i am asking if it is expected to error
 
2:00 PM
oh it's not always supported, it can be prohibited by an internal objects handlers
 
Wes
but is it really somwhere?
 
^ again, pretty sure nothing in core does though, but PECL/external is unknown
 
nothing core sets cast_object to anything surprising ... but what chris said, I don't know about in the wild ...
 
Wes
i don't care about wild stuff :P that's all i needed to know, thanks
 
There's spam on Packagist: packagist.org/packages/tv-abc/… o_O (someone on Freenode ##php apparently spotted this)
 
2:06 PM
also, if anything in the wild sets the cast handler, you will still get an array, if anything sets the handler null, you will get that empty array
 
Wes
what if the handler throws?
 
then the cast will never return will it
 
Wes
right. did i ask something that was obvious? :B
 
if cast to array returns, it will always return an array in other words ... it'll be empty if the object has set the handler null
 
Wes
got it
 
2:09 PM
@Wes it seemed obvious but I guess not ... internal code and user code share the same exception mechanism, there is no exception mechanism in C (there are only zend exceptions) ...
 
Upgrade PHP version on bugs.php.net – #78041
 
Morgens
@Jeeves Is somebody touching it right now by any chance?
 
2:33 PM
@PeeHaa I vote for a bootstrapish redesign (seriously - the current 'layout' is horrible) / any form of rich formatting option in the comments / comment edit functionality
 
@Sjon Can I send you to a new room for a sec?
 
@PeeHaa I'd like to see you try :P
 
3:06 PM
help pls?
i whant to set value to html input using js
when i set the value in js : document.getElementById("teste").value = '1';
the input remains empty
pls help
 
1. that's not php
2. what does your html look like?
3. where / when do you execute said ?code
 
here is my js code pastebin.com/twMRmbU
this is the selecter <select name="tipo" id="tipo" class="form-control select2" required>
<option></option>
<option value="prev">Intervenção Preventiva</option>
<option value="agenda">Intervenção Planeada</option>
</select>
 
There is not element with id teste
 
and this is the input
<input id="teste" name="teste" type="number" placeholder="Nº De Repetições"
class="form-control input-md">
 
Can you use github gist instead?
 
3:10 PM
@Danack random question: would your example project be a good reference for understanding how I should do namespaces/directories?
using PSR-4
 
pastbin is the only thing that is blocked here which I agree with
 
@Tiffany No, I only use psr-4 for one thing in it apparently - the routes file which I didn't want to be many directories deep.
 
pastbeen delet my post?
 
I still have philosophical differences of opinion about using PSR 4 generally.
 
@Wes internal objects may prohibit it... Might be that none effectively does prohibit it, but I wouldn't rely on that
 
3:12 PM
aka it's still stupid.
 
@PeeHaa pls explain that about github
 
@Danack You are in the psr0 camp? Or just generally write your own autoloader camp?
 
psr0 4life
 
k :-)
 
Wes
put it on a t-shirt @Danack
thanks @bwoebi
 
3:14 PM
maybe I should skip PSR-4... not getting it to work in my project, but I don't think it's my project, or I just have it structured wierdly
 
@Tiffany Write your own autoloader according to the spec
Or start with psr0
 
The choice is between 'knowing what namespace a file is going to be in from just looking at the path' and 'having to look at a config file to figure out what is going on'.
 
Wes
@Tiffany skip what. understanding psr-4 is literally 5 minutes work
you are making it bigger than it is
 
@Danack I respect your choice, but I do not agree :)
 
Wes
it's just a map of a namespace to a local path
the namespace prefix = the base path
and this is it
 
3:15 PM
As in I see what you are saying and you are not wrong
 
the problem of having to click through empty directories was solved on github by github...
 
@Wes yeah but... I had trouble understand your explanation yesterday and you were giving me examples that were going three or four directories deep, which is not my situation. And I have files that are the same name as their containing directory
 
It's a matter of convenience and added complexity cc @Tiffany
psr4 that is
 
> It's a matter of convenience and added complexity
 
Wes
namespace MyName\MyLib\Foo\Bar\Baz; class Qux{}
         |____________|   |   |   |      |___|
              |       |   |   |   |        |
           prefix     |___|___|___|       C:\myprojects\src\Foo\Bar\Baz\Qux.php
              |         |   |    |
              |         |   |   C:\myprojects\src\Foo\Bar\Baz
              |         |   |
              |         |  C:\myprojects\src\Foo\Bar
              |         |
              |         C:\myprojects\src\Foo
              |
the namespace prefix is nothing else than a "placeholder" for C:\myprojects\src
maybe this is clear just for me, i dunno
 
3:18 PM
@Danack No. That's where you are wrong
 
@PeeHaa i have this exemple jsfiddle.net/vsbzad2p
 
It's more a valid trade-off imo
You can fall on the other side of the trade-off, but I would not call it an oxymoron
@NoobDEV-GBL You don't load jquery in your examlpe
 
@NoobDEV-GBL weren't you here yesterday under a different account...?
 
yes my home accont
account
 
ah
 
3:22 PM
@NoobDEV-GBL With jquery loaded jsfiddle.net/rcLn067y
 
hi Tiffany, i made what GB told me to do
 
But considering you are using select2 you might use their api to watch for changes instead of native dom apis
 
I'm just come to twitter spam the room ... leaving now ... bitches ...
 
ya, but on my code that dont worck...why?
 
@NoobDEV-GBL Read carefully what I just said
 
3:25 PM
yaa, i saw that
so i shoud no use document.getElementById("teste").value = '1'; then?
 
No you should not just see that page, but read it instead :-)
 
but my problem is not the select is set the value to the input field...
 
o/
 
okay, I get this error message, my directory structure, tests.php, SalesTax.php, my composer.json is at the top
I didn't include some of the php files in the directory structure because they were irrelevant, but those folders also have files in them as well
 
SplTempFileObject::isReadable() / SplTempFileObject::isWritable() return values – #78042
 
3:31 PM
Did you generate the autoloader?
 
composer install in the same folder as composer.json?
 
or composer dump-autoload
But I expect there to be a .lock file too yeah
As you would probably have to install dependencies too
 
tylae@test-vm:~/projects/Example$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
tylae@test-vm:~/projects/Example$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
tylae@test-vm:~/projects/Example$ composer dump-autoload
Generating autoload files
 
> Generating autoload files
That's the important bit for now
 
wait, I need ot name my project, don't I?
 
3:34 PM
Only for publishing on packagist afaik
 
or does that have any effect?
 
regardless it's unrelated to autoloading
No matter whether you do psr0/4 whatever
 
so google the error message until I find a relevant SO answer
 
if you make changes to composer's autoloader directive you need to regenerate it again using composer dump-autoload
 
(also, I'm working on the project in Windows, but I have the D:\projects folder mounted into a linux VM, I'm doing composer install and stuff from the linux VM, in case you were wondering why the directories were different)
 
3:37 PM
gist.github.com/tiffany-taylor/… key is the empty string, should be psr-4
 
oh:P nice catch
Weird that doesn't throw
 
schema is non-restrictive and no autoloader is actually required
 
I thought it was pretty strict with random bullshit nowadays
 
@DaveRandom I was trying to use PSR-4, but it doesn't seem to agree with how I have my directory structured
 
it's fine
however the key needs to be "psr-4" not "PSR-4"
 
3:39 PM
I thought I could do an empty string on the autoload definition...or schema...whatever
 
Wes
@Tiffany
Tax.php must be in
namespace Example\Tax;
 
oh yes also that
but you will get a different error for that
 
@Wes so then my other files would be Example\Tax\Tax\SalesTax.php?
er
 
Wes
that or you move it in src/
 
they are in src
 
Wes
3:40 PM
...... no
they are not in src
they are in src/Tax/
 
Did anybody get a mail from SO that their accounts have been exposed in chat.stackoverflow.com/rooms/11/php ?
 
Wes
in src/Tax/ you have two files of two different namespaces
that can't be
i think you are confusing the namespace with the class name
 
I'm so confused
 
Wes
src/Tax/Tax.php
the first Tax is part of the namespace, the second Tax is the class name
new \Example\Tax\Tax();
which instantiates:
 
but if I change namespace Example; in Tax.php, phpstorm prompts me that it can't find the class Tax in SalesTax.php
 
Wes
3:42 PM
namespace Example\Tax;

class Tax{}
change namespace to what?
@Tiffany fyi you made it more confusing because you have Tax appearing as identifier in a namespace and a class
 
Wes
the namespace is Example\Tax, the class is Example\Tax\Tax
 
then how should I have done it?
 
Wes
use Example\Tax; is wrong
should be
use Example\Tax\Tax;
 
On an unrelated note:
public function __construct(float $taxRate)
When I see tax and a float in the same line I get scared :D
 
3:45 PM
yeah >.> ... another reason I ended up rewriting this in Java ...
 
Wes
bcmath works
 
I just want to get the PHP attempt in a "finished" state so I can put it in github as a code sample
 
Wes
did you use Example\Tax\Tax;
 
@Tiffany Use something like bcmath like wes said :)
 
well ...
 
use bcmath if you have too, like you are working on payroll for a hedgefund and have to write new accounting software, but if it's just dealing with normal numbers, use normal int type ...
 
which I was hpoing to avoid
 
@JoeWatkins It's taxes
 
Wes
how does tests.php look like?
 
I'm going to scrap this and start over
 
3:48 PM
the taxes of royalty or rock stars ?
 
Doesn't really matter
 
At least, scrap the directory names and file names
 
Wes
@Tiffany you need to calm down a bit, it's not that you have a million files
it's just 3 files and they are not working... there's not much to scrap
 
I guess not, you're going to end up with bits of numbers I guess ...
 
Wes
how does tests.php look like?
 
3:49 PM
bcmath is fast for bcmath, but just sticking it in because numbers might get big is not a good idea in general ...
 
@Wes I'm a tad anxious cause I have an interview in ten minutes, and I was working on this to try and get the intreview off my mind so I wouldn't think about it. But trying to fix the namespace problem is taking longer than I thought it would, and I think just scrapping it, reading up how I should structure my directories/fiiles, and then proceeding will be better for me.
 
Not so much because numbers get big, but more because more easy handling of off by one errors
Which I guess falls under numbers get big in some way
 
Wes
how does tests.php look like?
 
What we actually need is proper decimals in php
s/we need/ i want :P
 
@Wes I'll show in a bit.
 
Wes
3:52 PM
i noticed you tend to make simple problem big
 
@Tiffany ....get away from the computer and go relax.
 
Wes
you are not very rational, you have 3 files, there's not much places that can contain errors
 
my point is that I recognize that I'm doing something wrong, I'm trying to figure out what it is I'm doing wrong, but it's due to a lack of understanding on my part, and the solution to that is reading
 
Wes
that's a simple problem and the solution is equally as simple
 
3:55 PM
it seems like I should rename Tax.php to something different
 
2 mins ago, by Danack
@Tiffany ....get away from the computer and go relax.
 
@Danack I can't relax, interview in five minutes
reading PHP code is helping me stay focused
 
Wes
anyway, the problem is surely in tests.php
assuming your composer.json is correct
also i offered to help with teamviewer, it's hard to explain this stuff by text. i get you don't want to do that kind of stuff on work computers, but maybe you can do it on a personal computer, like a notebook, and then replicate on the actual computer? i dunno...
 
4:09 PM
Morning
 
How can i get firefox trace-level log, I generally start my selenium like java -Dwebdriver.gecko.driver=geckodriver -jar server-standalone-3.141.59.jar -log selenium.log Then run behat
 
Yo @StatikStasis
 
@PeeHaa You didn't respond to my turkey joke... it was great! Actually I was delirious. I had been up doing Calculus homework for several hours straight.
 
:-)
 
Wes
\o
 
@Danack ^
 
does anyone here use phpbrew? can it detect existing versions installed?
also ormings again
 
pls can you see this and explaine me what ir wrong here? pastebin.com/d927P7Y8
 
@Wes I didn't want to do teamviewer yesterday because I had to rename some stuff since the code was originally for a code challenge. I had to remove any indication that the code was part of a code challenge. I've finished that. I've made changes to files in other places, so I'm refactoring tests.php.
And I didn't mean to say "I'm scrapping and starting over" as a flippant remark, I realize that now that it came off that way, but it wasn't my intention. It was a statement in more of my frustration of how I have stuff structured and trying to jump through hoops to get it working, which I don't want to bother with. Either I would rather to rename files/folders so that they follow PSR-4, or start with a clean directory slate so that I won't overlook a mistake by renaming.
I want to have clean/logical namespaces, but they need to follow a clean/logical directory structure, and I need to understand how to do that correctly.
And it seems like by naming files the same as their parent directory is the problem. So I need to figure out what to rename them to...
 
Wes
clean logical namespaces don't exist
you should organize namespaces in pseudo packages how i call them, one directory deep max, i.e. src/Foo/, never src/Foo/Bar/
 
4:33 PM
@Wes this is how it is currently imgur.com/a/VcpNv7K
 
Wes
yes that looks good
i almost never go 2 or more directories deep
@Danack can you paypal api by any chance? do you know if it's possible to implement some sort of pay per minute? like, i can sell subscriptions for 60 minutes watch time, but maybe the user doesn't use all the 60 minutes. similarly, if i sell subscriptions for 5 minutes watch time, the user will be interrupted every 5 minutes to buy more 5 minute subscriptions, in order to continue watching what they are watching
 
4:49 PM
@Wes I don't think paypal supports tracking payments like that, and you almost certainly wouldn't want it to. Every company that has payment schemes like that tracks user credits themselves.
also, for the love of god, use Stripe not paypal.
 
Wes
i don't dislike stripe and i definitely don't hate paypal. but paypal is a known name, most people here won't enter their credit card number on stripe. instead, they likely already have a paypal account
 
@Wes wat
 
Wes
> *definitely don't love paypal
 
only offering payment through paypal is sufficient reason not to use a service for me
 
Wes
sure i can do stripe also, but it's secondary in my case
 
5:03 PM
don't be able to set value to the input box can be because of ther verson of my squery ?
jquery
 
Wes
no
also jquery? in 2019? are you learning jquery in 2019?
 
so why i have 2 files that one workcs and other not?
 
Wes
i would advice not doing that, unless you need it for work or something
 
thats not the poit if is 2019 or 202548 right?
is at work
and i'm stuck on this
 
posted on May 20, 2019 by CommitStrip

 
5:15 PM
noane is able to help?
 
> but paypal is a known name, most people here won't enter their credit card number on stripe
People might try to use paypal but then get bored half-way through their shitty checkout and then realise that trying to use their terrible ui is a waste of their mortal existence and abandon the checkout process.
 
@Danack most people in particular just want the path of least resistance … and many do already have paypal setup
 
@bwoebi true, but the paypal UI still takes more time to fill out for them, than the stripe one does.
 
I can't even do paypal :-P so I guess target also matters
 
And particularly for recurring payments (or topups) the stripe checkout experience is much much easier.
 
5:18 PM
@Wes I hope Stripe takes over. Love Stripe.
@bwoebi We have about 60% of our checkouts through PayPal and 40% on Stripe on one site we run. I think it's for that very reason- they already have an account and have their info on PayPal. Hopefully that continues to change.
 
Additionally "but paypal is a known name" - yeah, there's no way in hell I'm ever going to let paypal have my card details again after hearing about some of things they have done. Including held $2000 of my own money for almost a year.
 
UTF-8 BOM is carried from an included file into a Header Content – #78043
 
@Jeeves To the not a bug mobile! \o/
 
5:36 PM
I don't understand unicode and PHP should be idiocy-aware
who knows stuff about electronics?
 
5:55 PM
when is it going to get warm
stupid climate
(I imagine in three weeks, I'm going to say the opposite)
 
Wow- this ransomware attack in Baltimore is crazy! The impact that is.
@Danack Held $2000 of your money? For what reason?
 
6:26 PM
merge two array not working here.. please suggest - 3v4l.org/QqJfO
Got it
 
7:08 PM
@Ocramius Congratulations on your Palme d'Or ;-)
 
7:31 PM
> People started to abuse it by importing ALL functions. Such overzealous approach completely prevents useful things like function mocking.
Oh dear. I do not think I would like working on a project with Gabriel O.
And wow, @Ocramius, master of weird language feature abuse, even says it shouldn't be done.
 
7:45 PM
@StatikStasis You make that sound like PayPal needs a reason
 
by the way, how do you actually properly test C code? I've ended up creating a bunch of tests for every single translation unit mocking the other translation units (i.e. linking code + mocked functions together) and then bundling these individually linked binaries together and executing it as a single test suite
 
@bwoebi By hoping that someone else has already set up a test framework and build system ... at least that's how I do it :P
 
@NikiC No, I was the one to put it in place
 
But yes, that sounds right to me
 
had some fun with cmake to properly put that together
(and incidentally hit a cmake bug <.<)
but on that topic I don't think function mocking is that bad...
you just have to do it right … I mean, either you do it properly or you end up with a gigantic mess
 
7:50 PM
@bwoebi It definitely is bad. At least using that way.
 
Yeah I agree on the latter part
 
@bwoebi pretty bad imho, unless they are specifically designed as extension points -- in which case you won't be using functions anymore
I'd rather be safe in the knowledge that my basic functions are behaving predictably and strlen() doesn't start doing random stuff. There is only a limited amount of functions (say datetime/fs) that can benefit from mocking, and in that case you're better served with an explicit wrapper
 
@NikiC yeah not talking about primitives
but tbh, I find these extra wrappers quite annoying
 
Of course, legacy codebases may require certain sacrifices :)
 
there is a fine line where something can just be global
sure you can wrap anything, but at that point you are also making it (often) harder for people not familiar with your code base
for sure I can wrap filesystem calls…
but dunno feels stupid, it's an extra API layer to remember
 
7:57 PM
@NikiC Good point.
 
And that's the point. Wrapping strlen is stupid, and so is mocking it. Wrapping fopen is reasonable. I think some just do it wrong by mocking it instead.
 
yeah
never suggested wrapping primitives
 

« first day (3138 days earlier)      last day (1807 days later) »