my employer actively encourages work-life balance, and if I have to work more than 40 hours in a week, I get overtime pay, but overtime is rarely approved, so I rarely work over 40 hours. :)
@PHPFan I've heard of like 60-70 hour work weeks... I'm not sure I could do that.
@PHPFan Many places in every city in the United States probably. Corporate Japan. Many Chinese places. Probably easy to find in a lot of cultures. @Tiffany
Depends on the field and the education level at the particular place.
Why in laravel logs I see sometimes this error Access denied for user 'forge'@'localhost' (using password: NO But in ENV file I put correct access for DB
how do I modify the composer.json of a project to use local copies of environment and php-code-coverage ?
also is there a way to tell composer to use git repos for deps rather than releases, because the git repo info is missing in vendor and it makes it difficult to patch stuff ... I've got two copies of everything and had to use diff/patch on their own ...
unfortunately, it is not my DB design, so I can't change anything
what I need is to qry the products table, and get the kenmerk1, kenmerk2 and kenmerk3 (bechrijvingNL) in the product qry, the strange logic, is that they have in roduct table 3 columns named kenmerk 1, 2 and 3 which hold a value, and in kenmerk they have a column saying it's kenmerk 1 / 2 or 3 and then the according value
basicly I'm just mindblown about the bad DBdesign
do I use a select inside a select? or is that a bad idea?
@DaveRandom subqueries are a great tool to tell mysql how to do the order of lookups ... sometimes mysql is so dumb and tries to get frist all entries from a large table and check whether a key from these entries matches a condition in another smaller table - when it would be much, much faster to first compute the set of keys matching the condition from the small table and then look up in the large table ... sigh
SELECT p.id, p.code AS product_code, k.tag, k.code AS kenmerk_code, k.beschrijvingnl
FROM product p
INNER JOIN kenmerk k
ON (k.tag = 'KENMERK1' AND p.kenmerk1 = k.code)
OR (k.tag = 'KENMERK2' AND p.kenmerk2 = k.code)
OR (k.tag = 'KENMERK3' AND p.kenmerk3 = k.code)
@Naruto ^
is that what you are trying to do?
so much stringly typed data :-P
needs a compound index across k.tag/k.code in that case
hi guys, i want ask about import excel to mysql table... how i can upload excel without empty table first , if data in the excel has been insert or updated ?
@DaveRandom no, I'm trying to do something like this:
SELECT p.id, p.code, (select k1.beschrijvingnl FROM kenmerk k1 WHERE k1.code = p.kenmerk1) as kenmerk1, (select k2.beschrijvingnl FROM kenmerk k2 WHERE k2.code = p.kenmerk2) as kenmerk2, (select k3.beschrijvingnl FROM kenmerk k3 WHERE k3.code = p.kenmerk3) as kenmerk3, p.beschikbaar FROM product p
@Naruto right, so k.tag must match the column from product?
I would prefer to write that like:
SELECT
product.id,
product.code,
kenmerk1.beschrijvingnl AS kenmerk1,
kenmerk2.beschrijvingnl AS kenmerk2,
kenmerk3.beschrijvingnl AS kenmerk3,
product.beschikbaar
FROM product
LEFT JOIN kenmerk kenmerk1 ON kenmerk1.code = product.kenmerk1 AND kenmerk1.tag = 'KENMERK1'
LEFT JOIN kenmerk kenmerk2 ON kenmerk2.code = product.kenmerk2 AND kenmerk2.tag = 'KENMERK2'
LEFT JOIN kenmerk kenmerk3 ON kenmerk3.code = product.kenmerk3 AND kenmerk3.tag = 'KENMERK3'
from a readability PoV
I don't like subqueries in the select list
that said, based on what @bwoebi said it may be significantly more efficient to do it the horrid way
Why in laravel logs I see sometimes this error Access denied for user 'forge'@'localhost' (using password: NO But in ENV file I put correct access for DB
i noticed it sometimes doesn't believe that urls get actually removed... it thinks they are just removed temporarily... for example on long established sites
I think really the semantic difference is that 404 is "not here, might be your fault, might be ours" and 410 is "was valid, isn't any more and never will be again"
so it does make sense for google to keep 404s around for longer
I think my brain might be starting to work again \o/
The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.
The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient th…
maybe there will be a huge tech boom in Naples, which I hope happens because I want to hear German people saying it more because they pronounce it as "nipples"
@Naruto yeh it will unfortunately, makes the table space huge. My first answer should be the best option performance-wise I think.
needs a compound index across k.tag/k.code in that case
@Naruto that is extra-true though
if you can add indexed and it doesn't already exist
Oh mysql doesn't do non-key columns in indexes
ideally @Naruto there should be a compound unique constraint across kenmerk.tag/kenmerk.code, if you have the ability to add that. It should be there anyway I think.
@salathe i just modified en/function.include.php can you check if you got the changes? i've modified pages many times before, but never really checked if changes were approved :B
two things, memory errors with opcache [here](https://travis-ci.org/krakjoe/pcov/jobs/480835765) and nonsense line numbers [here](https://travis-ci.org/krakjoe/pcov/jobs/480835762)
@DaveRandom I can't change anything to the DB :( I'm basicly only allowed to query it.. :( ifit was up to me, I would rewrite that whole damn DB structure!
Assuming what you need is a simple byte swap, try something like
Unsigned 16 bit conversion:
swapped = (num>>8) | (num<<8);
Unsigned 32-bit conversion:
swapped = ((num>>24)&0xff) | // move byte 3 to byte 0
((num<<8)&0xff0000) | // move byte 1 to byte 2
((num>>8)&0xff00) | // move byte 2 to byte 1
((num<<24)&0xff000000); // byte 0 to byte 3
This swaps the byte orders from positions 1234 to 4321. If your input was 0xdeadbeef,...
Hey #php ... this can collect coverage information faster than phpdbg, only requires one tiny little extension ... https://github.com/krakjoe/pcov ... enjoy ... for use in phpunit requires a couple of merges, I done the pull requests ...
it was too hot, I was always scratching and I couldn't find anything to fix it ... so I shaved it off one night, doubt I'll grow it again ... my neck is getting more ink ...
Ah- ok. Sometimes these services look very similar from the front page- but the language is so ambiguous and vague that I cannot tell exactly what they do.
Hmm- MABL is more expensive than endtest.io. Endtest also has more features and can test web and mobile apps where MABL can only do web applications. Completely different from Travis CI use now that I look at them a little more.
@Danack somewhat… I didn't actively look at the comments. actually there was only one. it was more like it caught my eye when I was closing the browser tag. so I reopened and then I read it. as for believe: I believe it as much as I believe mabl's claims.
@Gordon Glad you mentioned endtest.io. Another developer friend of mine was doing a trial for MABL for a project he is working remotely on in Seattle. He had not heard of endtest. He has been looking into it since you told me that and may be switching.
@Danack depends on the politics... I don't see bringing in donuts for coworkers as a negative
I guess it depends on if one is broke and is unable to pay for donuts when they make a mistake, but that's why it wouldn't be a strict rule... it's there for fun
> Stockholm syndrome is a condition that causes hostages to develop a psychological alliance with their captors as a survival strategy during captivity.
Bringing in donuts for shipping features, or having some other thing to celebrate is fun. Having a culture where people need to atone for making a mistake is not fun.
@Shafizadeh So that became a meme. People took Morpheus's face when he says that and at the top they caption with "What if I told you..." and at the bottom they put text of something funny or interesting or culturally understood to express an idea through that moment in the movie. Such as this...
It doesn't have the be about the movie- this one is.
@Shafizadeh Hmm... I'm trying to find something relevant for you while searching the internet. Let's try this: I'm reading that it is common to find cucumbers in fruit bowls in Iran.
@Shafizadeh So if I came to your country and I ordered a fruit bowl and it had a cucumber in it- I might create the Morpheus meme like above and send it to you and it would say "What if I told you... that Cucumbers are not a fruit."
@StatikStasis we have this program that's basically "children's college," I tried teaching a course for using Minecraft to teach programming... it didn't turn out well...