« first day (2701 days earlier)      last day (2473 days later) » 

00:00
any given type doesn't change often, but togehter things will change. Also, types only get added, never deleted or modified
and you can have you frontend make a call for "get list of latest cached types"
for hisotrical reasons
Do they have some kind of deleted flag that changes the business logic though?
I guess a better question would be are these "types" simply an array of values, or an array of objects? Does each type have additional attributes than just one string?
00:23
@NikiC wouldn't a true big decimal have to be string based? Where memory is the only limitation?
00:34
I have a data in the database
string: 0300101

i will insert a value: 300101 (doesn't record initial zero for some reason)

how can I able t o check if the inserted value has really an initial zero in database?
using php.
this will become a problem due to the system is actually selecting 0300101, therefore it cannot read the value of 300101 when selecting cus it's diff value
as a string
@user1884155 I would go for neither
let the type be a label, and use an ID in the application. So the UI maps ID to label, but the backend and systems all deal in ids
sP_
sP_
00:59
Is form.submit() the same as hitting submit button?
@sP_ I think so yes
sP_
sP_
Hmm.. I've an existing form with values filled, but when I used form.submit() I'm not able to use the values. It works if I hit submit button though.
I'm using isset($_POST["submit-btn"] to work on it. Does it not get set if we do form.submit()?
Wes
Wes
@sP_ it's probably a poorly made form then
sP_
sP_
I found the solution, I don't know if it's a tweak or that's how it works. It's working when I'm using !empty($_POST) instead of isset(...)
Wes
Wes
but what you could do is form.querySelector("button").click()
sP_
sP_
01:05
@Wes I'm trying to achieve this without using jquery
Wes
Wes
that's not jquery
sP_
sP_
Oh, sorry. My bad. Didn't read properly.
 
1 hour later…
02:29
Good day all, need your advice regarding this question:
0
Q: jQuery set checkbox value to URL & get the value in PHP to be an array & query it using NOT IN

HiDayurie DaveI have this multiple checbox below And you can see PDF image there, I set it to be link <a class="openPO" id="<?php echo $dData['po_no']; ?>"><img src="../assets/img/pdf.png"/></a> And now I'm using jQuery to get uncheck checbox and set it to URL value. $('.openPO').on('click', function() ...

02:46
@kelunik hello again, I am wondering why I am getting "Expected one of the following types: Amp\\Promise, React\\Promise\\PromiseInterface; array given" when attempting to implement this: gist.github.com/kelunik/b860f847c11bf758d63a124c07de24f1
03:26
@systematical You're passing an array to Amp\Promise\wait(). It requires a promise, so wrap $promises with Amp\Promise\all().
He probably forgot that wait() doesn't accept an array. Perhaps it should.
@Trowski well that solves that, there is another issue but nothing related to Amp. Thanks for responding. I appreciate that.
@Trowski if something within a method I am calling throws an exception, will that get tracked at all? I thought I read not to throw exceptions when calling parallel
04:00
@systematical The thrown exception will cause a TaskException with information about the original exception to be thrown in the parent context.
Anyone here familiar with DNS protocol
Hello
0
Q: Php Connection as Global

Munkhdelger TumenbayarIs there anyway to set us my connection parameter as global. I got lot php pages each of them using include('DBConnect.php') to get $conn $conn = sqlsrv_connect( $serverName, $connectionInfo);// inside my dbconnect.php And in my other php files i am using include('DBConnect.php') some query s...

its possible but dont know how i do it
@Trowski hmm. I'm seeing a bunch of PHP processes running even after the parent is complete. The exceptions I am seeing are non-standard. I believe because when I call in parallel my framework is not loaded?
@Trowski by non-standard I mean not normal. As I would never seeing these when running in a traditional synchronous manner.
@systematical What are the exceptions?
@Trowski Well this is a lot of code, but essential when I call $Object->run() it calls Cake\Core\Configure::read() to grab some configs, it then sets those in $Object during the constructor. Latter on I check to verify those were member variables were set. If not, I throw a userland custom exception. I am getting that exception. This would never occur in a synchronous fashion
04:13
@systematical The parent context is not copied to the child. If there's an environment that needs to be set up, you need to set it up again.
@Trowski yes I am seeing PHPs share nothing architecture first hand aren't I? How would I copy all that to the child?
Look at amphp/parallel where you can implement your own instance of Amp\Parallel\Worker\Task where you can set up an environment, then reuse it over and over for tasks.
@systematical Sort of, but this usually isn't what is being referred to. In this case it's because an entirely separate process.
@systematical The docs are a bit lacking on amphp/parallel at the moment, so if you have questions I'll be happy to answer them.
@Trowski I can see that. I spun my wheels before asking. So am I to understand I have to pass the whole of the Cake3 framework as an environment?
@systematical Not exactly sure what you mean there. As long as your code is autoloadable, it can be used in the worker. You may need to re-initialize any environment that's necessary for a task the first time the task is run.
@systematical I often use this as an example of a task using a database connection for how to initialize a worker environment:
public function run(Environment $environment) {
    if (null === $db = $environment->get('db')) {
        $db = createDbConnection();
        $environment->set('db', $db);
    }

    // Task using $db.
}
That's very simple, but of course what you do to initialize the environment is limitless. You don't necessarily have to use $environment either, it could be just calling Cake\Core\Configure::read(), or whatever else might be necessary.
The instance of Environment is just a convenient place to store data to be shared between tasks.
Here's a real-world example of a simple Task class I used in an async program to use a blocking smtp mailer:
class MailTask implements Task {
    /** @var \Swift_Message */
    private $message;

    public function __construct(Message $message) {
        $this->message = $message;
    }

    public function run(Environment $environment): int {
        if (null === $mailer = $environment->get(self::class)) {
            $transport = (new SmtpTransport)
                ->setHost(SMTP_HOST)
                ->setPort(SMTP_PORT)
                ->setEncryption('tls')
                ->setUsername(SMTP_USERNAME)
04:37
@Trowski has this sort of thing been implemented with full frameworks like CakePHP. I am not sure how I would set things like this github.com/cakephp/cakephp/blob/master/src/Core/Configure.php for instance as an Environment
@systematical How is that being initialized?
That is, how do you normally include the code that sets the configuration?
@Trowski in the cake bootstrap.php
@systematical Autoloaded?
@Trowski which is loaded via the root index.php file
@systematical Then just include that in Task::run() and set a key in the Environment instance to indicate it's been loaded.
So it's only included once per worker.
Or write your own instance of Environment that does this when it's constructed. That's a little more complicated but wouldn't require as much code as you might think.
04:51
@Trowski this is beginning to click, but I don't think I am writing elegant code or using this how you envisioned
05:15
Today I learned about the HTML elements colgroup and col and was mildly excited but then realized the only two properties of value it can actually set are border colors and background.
Wes
Wes
what else did you need @LeviMorrison ?
i might have a solution
05:35
Align would have been nice, but can just use CSS selectors.
Wes
Wes
well, in that case which one would have the precedence? td/th or col?
it's actually meant to support more than that. firefox is much better than chrome at that
with box-shadow, outline, you can create intricate borders for highlight
plus i think it should support :hover but it doesn't
and another thing that is not supported is visibility:collapse
so yeah, you are right :B it sucks
06:22
moin
I found niko, a bird that had been with me less than a month, dead in his cage this morning :(
@JoeWatkins that's bad :( , any health issue ?
none that was obvious, he was behaving normal yesterday ..
Wes
Wes
:(
:(
morning
06:48
yeah ...
Wes
Wes
07:11
they are both probably crazy, they will get along well :B
bff
07:40
function.openssl-encrypt php 5.6 code example it poor from a security standpoin – #76071
07:52
i want to create dynamic reports in mysql with php. Please suggest me a good, open-source libraries
I doubt that there is an all-in-one library to make arbitrary dynamic reports. You will easily find graphing libs etc, but all the sql will be your own thing to build. If you can: avoid this all together and leave it to a userfriendly BI application that connects to your database.
@BilalAhmed koolreport.com
This was the fifth search result when googling for "i want to create dynamic reports in mysql with php. Please suggest me a good, open-source libraries"
@Gordon thanks.
That ain't no library!
@Gordon can i easily development in koolreport?
07:59
Auch. Scratch that. You can download only the lbirary ... hides in corner in shame
demonym the name used for the people who live in a particular country, state, or other locality: Two demonyms for the residents of Michigan are Michigander and Michiganian.
@BilalAhmed yes, very easy and intuitive. And kool.
Very flexible too
@Gordon again thanks. your answer is always very helpful for me
you are very welcome
08:24
gut moaning
ThW
ThW
08:59
Morning
moin
Gooooooood mornin' vietnaaaaaam
@Sean so you are dealing with ORM today?
Wrong ping? :o
Wes
Wes
09:07
maybe the joke was orm = war
09:20
what @AllenJB said…
Thanks for the article though!
:-p
support __getStatic, __setStatic, and all – #76072
Wes
Wes
didn't know about vietnam lol
It makes sense now you explained it.
Wes
Wes
09:33
@Jeeves i don't disagree. if code hygiene is the main concern... well that stopped being a thing in php 1.0 i suppose :B
09:59
@rtheunissen I don't follow, why would it?
Hm. Looking at privately hosting a git repo, but also want it on github for the easy CI integration. Should it be set up as two remotes or scripted so github is the remote which then pushes to the private, this kinda feels like overkill
what's the point of the private?
What we use for project tracking & tickets
oh, so you have like gitlab on it or sth?
Aye, it's on codebase atm
10:03
@NikiC I don't suppose you looked at the vm gen thing yet did you ?
@JoeWatkins nope
@Sean well anyway, if you have a valid reason for it, then you should designate the private copy to be the "master", have it sync up to github with hooks (post receive I guess), and make github read-only
i.e. developers should only push to one place
@NikiC I wasn't making any sense, doesn't have to be string based at all. It's just x*10^y right?
@rtheunissen yes
Wouldn't really need gmp or bc
10:10
@rtheunissen depends on how large your numbers are
Ours aren't that big, more about accuracy (finance). No big number science.
Maybe... gmp*10^int ?
@DaveRandom Yeah, thanks, that does make more sense than to have two remotes for each user
Thinking a bc based implementation should come first and a native one later. No point spending months on a native implementation if the reception isn't positive.
@Sean is the no way you can hook your CI up to the local git? which CI service(s) are you using?
@DaveRandom I think it'll be circleci
Which asks for a bitbucket or git repo :<
apparently jenkins is "too primative" & would rather do it as a service
10:21
@rtheunissen what are you targeting here anyway?
This would just start out as an extension, right?
¯\_(ツ)_/¯ Just pondering what would work and what wouldn't.
Yeah just an extension.
@Sean this is how a lot of big foss projects work, btw, e.g. php, apache, nginx...
I'd like a object oriented or data type approach to big decimal for PHP
@Sean E_NOT_ENTERPRISEY_ENOUGH
@Sean hmm. I'm just looking at setting all this stuff up. I was considering either Circle CI or a local Jenkins instance.
10:26
Check an example of packet loss here
5
an example of packet loss
Hello, What exactly is the difference between zend_hash_str_update_mem and zend_hash_str_add_mem
In both cases the pointer is allocated and then one is called with add and one with update. But both are newly allocated pointers, so in the end it will be added
add functions return negatively when the element exists already
mornin
Reminds me of the function for memcache, where it's better to call update than add
10:43
Why doesn't imap work on localhost?

imap_open("{imap.googlemail.com/pop3/novalidate-cert}INBOX", $user, $pass)
imap_open(): Couldn't open stream {imap.googlemail.com/pop3/novalidate-cert}INBOX
firewall rules?
@Tschallacka ah lemme turn that off for a moment..
@JoeWatkins Got it. Sorry I was too eager to post the question before doing due diligence.
Hello, how can i see a list with all questions i have asked?
I want to delete some questions.
@Tschallacka Doesn't seems to have firewall issue as it's now off
Warning: imap_open(): Couldn't open stream {imap.googlemail.com/pop3/novalidate-cert}INBOX in \email-box\emails.php on line 9

Notice: Unknown: Can't connect to googlemail-imap.l.google.com,110: Timed out (errflg=2) in Unknown on line 0
10:50
you can only delete questions, that have no answers
Thanks!
for the rest, you will have to flag mods
Does any one know on how to download emails based on specific query via native format such as mbox for gmail?
@BasheerAhmedKharoti have you walked through this? support.google.com/mail/answer/…
11:06
@Tschallacka Yes, I did...
and imap.gmail.com?
It was "imap.gmail.com" at first and then I googled for a solution which instead suggested to use "imap.googlemail.com". But still no luck with either..
are you on mac, linux or windows 10?
windows 8.1..
-gxhrk-
11:10
Morngins
@Tschallacka ??
if you had windows 10 I could have advised you to install the ubuntu subsystem and use some fun commands
do you have git for windows installed? gitforwindows.org
next best thing heh
if you have it, open the git bash and try this command
@Tschallacka I've git installed globaly in my system..
openssl s_client -connect imap.gmail.com:993 -crlf
yea, but git for windows has an excellent bash
with a lot of essential linux commands
makes testing some stuffs so much easier
11:13
OK Gimap ready for requests from ....
so you can connect
so it's not a network issue
@Tschallacka lemme go through...
ini_set('default_socket_timeout', 6);

Notice: Unknown: Can't connect to googlemail-imap.l.google.com,110: Timed out (errflg=2) in Unknown on line 0
@BasheerAhmedKharoti they have an api btw developers.google.com/gmail/api
I got a regex check in javascript with \u00C0-\u02AB to validate a input field. But PCRE do not support \u and i need the php regex check to return true/false equal to the javascript regex on the same data. Is \p{L} basically the same?
11:29
@Rajohan [À-ʫ]
@Rajohan Wouldn't the equivalent be just "\X an extended Unicode sequence" ? Or you you just escape the character in PHP, probably.
Also.........why are you doing that regex?
/^[a-z\u00C0-\u02AB\'´-]+?\.?\s?([a-z\u00C0-\u02AB\'´-]+\.?\s?)+$/i' <-- it is a name validation
you could just check for string length.....probably.
And preg_match('//u') maybe to ensure it's valid Unicode / UTF-8.
@Danack But we need to have an archive of the mail box that they do not offer via api..
11:35
Oki thanks ill try that.
"to have an archive of the mail box" - what does that mean?
We need to have emails based on the query search parameters and have a native format to download such as mbox for gmail...
The client requirements are as:

The goal is to search for certain terms and phrases and return MBOX or PST archives that include only email messages that include the search terms and/or phrases.
11:57
You are doing your testing on your windows 8.1 machine right @BasheerAhmedKharoti
@Tschallacka yup
Can you try to make the connection string something like:
'{imap.gmail.com:993/imap/ssl}INBOX'
> PhanUndeclaredTypeParameter If you have a parameter on a function or method of a type that is not defined, you'll see this issue.
function add_console_commands(Application $console)
{
}
include the application
Anyone know what that error is meant to mean?
11:59
use Somewhere\Whatever\Application;
under your namespace declaration
some like
have already tried that but still no luck...

Warning: imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in C:\xampp\htdocs\email-box\emails.php on line 9

Notice: Unknown: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure) (errflg=1) in Unknown on line 0

Notice: Unknown: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure) (errflg=1) in Unknown on line 0
<?php namespace Danak\Console;

use Danak\Applications\Application;

function add_console_command(Application $console) {}
Can you try with a test account imap?
so make a sparkling fresh gmail account set all the setting scorrect and then try to connect to that one
@Danack it can't find the Application class/alias?
> a type that is not defined
suggests "cannot find the definition for this type"
even if it's an alias he still needs to "use" it, or prepend it with the root namespace, \Application
Since it's @Danack I'm going to guess that this is an issue with phan configuration, as I doubt he would make such an elementary mistake with the code itself :-P
12:05
everyone has brain farts :P
my brain is made of farts
Must have an eloquent musk in there then :-P
Is that Elon Musk's brother?
@Tschallacka Ah what was that? Just started working with new account...
@BasheerAhmedKharoti ftr this seems like a weird thing to do
It feels like the sort of thing an accountant would ask for
someone who fears web interfaces and/or does not trust search engines to produce the same results twice, and would rather fill their machines with disorganised garbage
the sort of person who still thinks that fax machines are hi-tech
12:08
@DaveRandom I ain't native english speaker so bear with me and just be clear what you say..!
so it's a fresh gmail account? Can you go over each and every setting to make sure you set up gmail correctly? Because now you got an allert to use your browser to log in. This means you could connect, but were deemed to connect wrongly by google
@DaveRandom when you put it like that it doesn't seem so unreasonable
@Tschallacka The status POP/IMAP was enabled for both accounts but really it was an issue with gmail not allowing with the old account
@PaulCrovella if you don't think about it too hard, sure.
the assumption is that, in the case where it doesn't produce the same results twice, the first result set is the "correct" one
and that's where it starts to fall apart
@DaveRandom somethings kindof fucky. That class should have been being parsed by phan already.....and now that error has 'gone away' without a deliberate change.
12:14
You mean one of these hipster-ass static analysis tools doesn't work properly? I am shocked. Shocked, I tell you.
yeah....rasmus is such a hipster.
So guys. Is there any way for a non-C guy to contribute to PHP? (And is there any need for one?)
I'm quite sure I can reserve some hours here and there to contribute, if there is any contributing to be done.
write useful docs, write useful tests
@DamienOvereem docs, bugs triage,
12:25
IntlCalendar seems to use LC_MESSAGES instead of LC_TIME (start of week) – #76073
Where would one start with either?
@DamienOvereem For bugs bugs.php.net check open bugs.
You can also filter for docs bugs
And you can start out with edit.php.net for docs
Ah yes. There seems to be a bit of a list there
If you are going to make a lot of changes and / or big ones you can check out the source
12:28
i know php and basics of php laravel, now i have to edit and update code from a past colleague who was verry advanced at PHP laravel, any suggestions on how i can better understand his code (he sadly didn't write any comments or documentation), spreadsheets or something beceause atm i just use ctrl + shift + F to browse and find links which is suboptimal
get eclipse or php storm
then set up project to support psr4
eclipse use f3 to browse
i use seblime text atm
might give php storm a try
in php storm ctrl + b
I think you should not call the guy very advanced if you need to use find to make sense of where the code is.
@sansactions yes use an actual ide
12:30
well i am not a web dev and i only know php from my uni days and quick guides in laracasts
But i totally agree with @Tschallacka.. grab PHPStorm. It will improve your life.
ok i'll try php storm
ty!
I find eclipse also working pretty well. but then again, I also develop a lot in java with it :P
I think you could even use visual studio for php development :P if you're suicidal
i mostly develop in visual studio
but basically what you need is an editor that allows you to "go into source"
12:32
don't give me ideas
Also added benefits //TODO comments, you get a list of your todo lists ;-)
i asked him to write me some documentation before he left but he probably hated me
nah, nobody got time for documentation
12:34
true
did he write his code with meaningful names?
yes, for me the structure is just a bit confusing
eg not $i = $b->v(); but $intelligince = $trum->gotnone()
then the code is the documentation
12:35
@Danack you can tell by the name
try to read is as sentences
anyway gtg, thnx @t
Writing (and especially maintaining) documentation is a pain in the arse. If the guy was a good programmer (and your code is php 7+) most "documentation" can be done by doing proper type hinting etc.
@DamienOvereem write the documentation on php.net for stuff that isn't documented.
where would one do that?
12:36
Clicking around docs.php.net atm, trying to get a feel of the place and trying to figure out how editing processes should work there.
or do you mean the comments under the pages?
This still a thing?: doc.php.net/tutorial/joining.php .. I dispise mailinglists.
Holy moly, subversion? never mind
@DamienOvereem a fast-track, largely mailing list-free way is to work up some patches in the editor, ping people in here who have docs karma (me, pieter, many others) to merge them, then when you've done than request karma on the ml
I hate subversion, that stuff has cost me so much time
12:38
@Tschallacka for the most part you don't need to touch it, you can just use the online editor
I've been working with SVN for years. Actually in the process of moving my codebases to GIT the last few weeks. IMHO it's all a matter of knowledge. I'm currently struggling to get stuff done in Git, while i could do the same stuff in seconds in SVN.
@Danack Is there an easy way to filter for undocumented stuff?
yea, I had to use svn for a magento site I co edited with a professional firm and they used svn
at some point I knew more about svn than they did, because they simply didn't communicate in any way if htey changed files I had too, so many rollbacks, edits and time wasted
it was an "unusual" situation for them to have an "external" dev to work on their code
Yeah. Communication is a thing with svn.
in basis svn is okay, but you need a tracker to keep people up to date to changes
that's what I like about git, it's easier to switch stuff around, merge, revert, etc..
As long as people work on a branch in svn and merge trunk often there usually isnt much of a problem. It just gets hard when there are multiple branches with long lifetimes.
Basically comes down to a race. Just be sure to be the first one to merge to trunk. Then the other guy gets to deal with the merge conflicts ;p
12:46
this ^
uhu
memories come back to life heh
especially since I tend to write codes ranging into the 10.000 lines changed :S
this seems a bit off
is used as an Apache module it inherits Apache's user permissions (typically those of the "nobody" user)
I would rather think it's the www-data user under linux and the LocalSystem on windows
is there somewhere a "talk" page where changes are suggested or talked about like at wikipedia?
or what that be the mailing list?
does anyone know where I can find the difference between opcache.optimization_level=0x000000F0 and opcache.optimization_level=0x00000000 in the php-src repo ?
240 and 0 in human integers
The release-early-release-often concept comes to mind. We experience less issues with SVN because we try to use that concept. A commit of 10.000 lines of code should be split in multiple smaller changes if at all possible.
yea, 10.000 boils down to a lot of classes that can be re-used in other places again etc... I always try to compartemtize my code so i can reuse parts elsewhere, and a lot of it is also typehingting documentation :P
12:56
@DaveRandom edit.php.net seems to be dying on me while logging in. Gets stuck on "Loading data..." step 1 of 14... Any idea?
@Tschallacka well it's a bitmask so that doesn't help. Anyway, it's defined in github.com/zendtech/ZendOptimizerPlus/blob/master/Optimizer/…
@kelunik cheers. I'm hunting a very interesting and short bug
12:58
sorry for multiping
@DamienOvereem what are you using for log in? google or something else?
stack seems decent
Tried to use the stackoverflow login
tbh I have a php.net account so i don't really know how the other providers work
moment let me try them out
Can't even seem to stop it from trying even when i reload the page. Ill flush cookies.

« first day (2701 days earlier)      last day (2473 days later) »