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?
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
I 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()
...
@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
@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
Is 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...
@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.
@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
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.
@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)
@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.
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.
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.
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"
wotddemonym 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.
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
@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
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.
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
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
@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
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..
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?
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.
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
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
@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
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 somethings kindof fucky. That class should have been being parsed by phan already.....and now that error has 'gone away' without a deliberate change.
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
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 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'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
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
does anyone know where I can find the difference between opcache.optimization_level=0x000000F0 and opcache.optimization_level=0x00000000 in the php-src repo ?
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