« first day (2923 days earlier)      last day (2249 days later) » 

Wes
Wes
00:00
. could be used actually since currently it does nothing on arrays
PHP's separation of addition and concat operators is something of an oddity, but since we have that separation we may as well use it. And I don't think there's any way you can argue that pushing onto an array is not concatenation
not even you :-P
Wes
Wes
dunno... i remember i asked on twitter and there was immediate disagreement on the matter lol
ofc
but this is very much one of those things where creating an implementation would silence a lot of that immediately
@DaveRandom @Wes interested in your opinions as well, btw
Wes
Wes
if ... is to retain keys then it must actually keep the order. ie
$a = ["a" => 123, 555, ...["a" => 666]];
must result in
[555, "a" => 666]
as opposed to the array_merge result
["a" => 666, 555]
!!> var_dump(array_merge(["a" => 123, 555], ["a" => 666]))
00:06
[ 5.6.38 - 7.3.0rc3 ] array(2) { ["a"]=> int(666) [0]=> int(555) }
oh right
yeh I'm not sure I agree with you there @Wes, I expect later value values to overwrite but I expect keys to be in the order they were encountered
tbh though I would expect "undefined order"
Wes
Wes
but if i didn't care about key order i would do $b + $a
which is already supported
I know what you are saying but literally nothing else in PHP works like that, afaik all array combine ops return keys in the order they were first encountered
over time I'm less bothered about the splat thing anyway, + is generally good enough for assoc merges (if counter-intuitive), what I usually wanted when I though of splat is actually concat of two sets
Wes
Wes
imho that is inherently positional and keeping the original position breaks the expectations of the user
wtf are you even doing that relies on key order anyway :-P
I suspect that the vast majority of use cases for any of this shit would disappear if we had something like linq and a std lib that uses iterable properly
Wes
Wes
00:17
i personally never needed that, but ordered maps are a thing in other languages and ordering keys is a primary feature of them, i presume :B
imho ... should get rid of keys, and reindex it
[...["a" => "ax", "b" => "bx"]] should be [0 => "ax", 1 => "bx"]
@Wes fine, in which case we should just error out for assoc keys (i.e. what splat does)
Wes
Wes
no
it should ignore them
oh hell no :-P
Wes
Wes
:B and we are back to where i was some years ago
@DaveRandom anyway @Wes, this is a thing that might actually happen because I have written a lot of it, stop distracting me and tell me about this instead :-P
Wes
Wes
00:22
ftr it's not just me disagreeing
oh yeh I know, I've had this specific debate, like, a lot
Wes
Wes
i think operator overloading is fine
"fuck assoc" has a lot going for it though
- aligns with splat for fcalls
- simplest implementation
- if defined like this, emitting an error for non-contiguous keys identifies bugs
however, it also turns it into a thing that's only really useful for concatenation, thus . would be better
imho
anything with assoc does not have a single obvious behaviour, and is therefore of questionable merit
i.e. don't choose a side, the fact that there even are "sides" is a good indicator that it should just be avoided
@Wes OK. $dt2 = $dt1 + $interval; - what if $dt1 is a DateTime (i.e. is mutable). Should $dt1 be modified and return a ref to it, or should it treat everything as immutable?
Wes
Wes
no question it should return new immutable objects
like you were summing numbers, which are immutable
@Wes OK, here's where that get's complicated: $dt += $interval
Wes
Wes
00:31
error?
no, it's a valid operation, even with immutables - it says reassign this variable with this value, you can still make that work sensibly
Wes
Wes
ok yes, in that case $dt should become immutable, with the value set to $dt->val + $interval->val
yeah i like that
sounds reasonable?
@DaveRandom the order of the operands should not affect the result
the only way to do that is converting to immutable every time. i think it is expected
i said something stupid probably
the order of operands cannot be inverted :B the interval is always on the right
the problem is maybe with $dt1 - $dt2
but nope
00:49
@Wes yes but the order of operands is inherently significant in subtraction, that's fine
@Wes yeh I think you are right
Wes
Wes
$mutabledt + $interval; not requiring to be assigned into a variable feels weird
it seems you could do that without making the immutable operations weird
mutable [...] feels weird
Wes
Wes
since you don't really have swappable operands
are intervals mutable? i don't even know
a nice thing about this (albeit epic micro-optimisation) is that with $dt += $interval, even when $dt is immutable, you can skip creating a new obj and just reassign the inner value when refcount == 1
Wes
Wes
thats nice yes :B
00:54
i.e. $immutable += $interval is way more efficient than $immutable = $immutable->add($interval)
I would like to get to a point where date/time primitives are better supported internally, so anything that accepts an int timestamp will also accept a datetime, and you can do e.g. sleep($interval)
Wes
Wes
@DaveRandom only if refcount is 1?
@Wes yeh, it's immutable, you can only mutate it if there are no other refs
i.e. if it would be dtor'd otherwise
I am so confused
Wes
Wes
01:12
youtube is imploding
"an error occurred" on all videos
Can someone explain how $current_movie_name can be a value not even existent in $movie_list["movies"] or $movie_list
for ($i = 0; $i < count($movie_list["movies"]); $i++) {
                if ($movie_list["type"][$i] == "movies") {
                    $current_movie_name = $movie_list["movies"][$i];
                } else if ($movie_list["type"][$i] == "tv_show") {
                    $current_movie_name = $movie_list["movies"][$i] . '-' . $movie_list["season_num"][$i] . '.' . $movie_list["episode_num"][$i];
                }
                echo $current_movie_name;
                echo "<tr><th>" . + htmlentities($current_movie_name ?? 'NULL', ENT_QUOTES, 'UTF-8') . "</th><th>" . htmlentities($movie_lis
echo $current_movie_name; prints something non existent in var_dump($movie_list);
Scratch that
@JBis that array structure is horrible
first and foremost, how about you cache the length of the $movie_list["movies"] array instead of recalculating it on every loop iteration ?
@DaveRandom I made it awhile ago. Its from a DB (see below). I should prob use an object anyway....
  $stmt->bind_result($type, $movie_name, $year, $season_num, $episode_num, $time);
            while ($stmt->fetch()) {
                $movie_list["type"][] = $type;
                $movie_list["year"][] = $year;
                $movie_list["movies"][] = $movie_name;
                $movie_list["season_num"][] = $season_num;
                $movie_list["episode_num"][] = $episode_num;
                $movie_list["times"][] = $time;
            }
            $stm
Woah. Youtube is down.
01:28
@Allenph Working here
@JBis If both the If statement and the elseif statments are false then $current_movie_name will be empty (and definitely not point to an existent value in the $movie_list["movies"] or $move_list arrays)
@Allenph haha never
@marvinIsSacul Yeah I put this:
$current_movie_name = "NULL";
                if ($movie_list["type"][$i] == "movies") {
@JBis yeah so if both the If statement and the elseif statments are false then $current_movie_name will contain the string "NULL" ...
Wes
Wes
the css syntax spec is so weird
put these tokens in a separate list and parse them like they were a separate document
wtf?
@JBis Go look at the outage maps. May be up now but.
Still down here.
01:34
@marvinIsSacul yes that's good
Wes
Wes
i was watching a super funny conan video
function iterate_movies($movies)
{
    foreach ($movies as $i => $name) {
        $movie = ['name' => $name];
        foreach (['type', 'year', 'season_num', 'episode_num', 'times'] as $property) {
            $movie[$property] = $movies[$property][$i];
        }
        yield $movie;
    }
}

foreach (iterate_movies($movie_list) as $movie) {
    $title = $movie['type'] = 'tv_show'
        ? sprintf('%s-%d.%d', $movie['name'], $movie['season_num'], $movie['episode_num'])
        : $movie['name'];
@JBis ^
@Wes Wouldnt it be way easier to just do a port?
Wes
Wes
of what
Some other SASS preprocessor.
Wes
Wes
01:35
exact ports are slow
I feel like there is probably a wealth of CSS tokenizers in PHP on packagist
I dunno if @ThW has a thing maybe?
Hey Dave, Wes has had enough of me. Wanna teach me internals?
Wes
Wes
there are a few
mine is faster :B
also not sure on whether the others are actually css compliant
@Allenph Boy it must be bad if you are asking me :-P
Wes
Wes
he asked me first
like i know internals
01:38
I mean I'm happy to share the droplet of knowledge I have about the ocean of internals but you will need to ask specific questions
...and the answer to a lot of them will be "idk"
@DaveRandom I get "Array-0.0" Only in the titles column
@JBis can you provide a small sample of data?
You've both worked in internal projects...at least Uve seen you talk about it.
01:41
@DaveRandom Like var dump the array?
yeh but I assume it has a lot of data in it so say just like 5 movies worth
What about JSON? It's easier to read.
@Allenph sure, and I'm happy to tell you what I know, however my level of knowledge is "yeh I can maybe figure out how to do that" rather than being able to give high-level intro. However my general method of learning anything is to find a task and try doing it, and I can give you a task that's not too complex and walk through it with you if you want
I'm sure I can find something
@JBis fine
dump it as JSON and put it here
(hit "prettify" and then you can save it)
are those windows stupid floating point times?
01:49
@DaveRandom Just read up on foreach and yield. Didn't know about it and its really cool!
@DaveRandom sure
@DaveRandom That's more than I would ask for, so sure.
Wes
Wes
function consumeDeclaration(Token $terminator): Declaration{
I promise I'll ask a bunch of dumb questions and be super annoying about the whole thing.
Wes
Wes
hasta la vista
God damn it. YouTube is still down.
Get yo' shit together.
Wes
Wes
01:53
i am on prime... watching high castle
@Wes Are you excited for their 1 billion dollar lord of the Rings show?
Wes
Wes
i am not
i couldn't even finish watching the movies
i just wanted to see the "they're taking the hobbits to isengard" scene
The Hobbit was terrible. The Lord of the Rings was good though.
@Allenph let me find something sane-ish
Wes
Wes
01:56
then i stopped
@DaveRandom Ayyyyyyyyy what do you know it worked!!!
Thanks
are those times just the length of the movie? @JBis
Wes
Wes
i have never watched harry potter, i have never watched LOTR (except first), i have never watched star wars (except the first movie)
@Wes You're missing out on so many nerd references.
@Wes Do you hate yourself?
Wes
Wes
no
01:57
@DaveRandom no. its time left. (So you can resume)
@JBis sorry, what? :-P
oh I see
so is it time in seconds?
or frames or sth
basically, those are weirdly specific numbers
Wes
Wes
prime's player sux
i wish it was more like netflix
seems like storing them as floats is unnecessary
@DaveRandom Yes. Taken from JavaScript.
ah, JS
01:59
@DaveRandom Yes, the precision is completely unnecessary.
Especially, when it only updates every 5 sec.
@DaveRandom Couple questions about your code if you don't mind.
Can you explain how this works? It appears to be a more complicated way of created an indexed for loop?
foreach ($movies['movies'] as $i => $name) {
                    $movie = ['name' => $name];
                    foreach (['type', 'year', 'season_num', 'episode_num', 'times'] as $property) {
                        $movie[$property] = $movies[$property][$i];
                    }
                    yield $movie;
                }
$movies['movies'] as $i => $name
is that a combined indexed and foreach loop? $I is the index but the value is passed into $name?
@JBis $i would be the Key and $name would be the Value
ok thanks
@JBis it's to split the logic up a bit
I think I got it now. Gonna comment the shit out of this though XD
foreach (['type', 'year', 'season_num', 'episode_num', 'times'] as $property) {
                        $movie[$property] = $movies[$property][$i];
                    }
02:12
Thats genius. Never would have thought to do that.
Wes
Wes
that explains it
basically you have an array that's in a shitty format, so rather than mix interpretting it and displaying it in the same logic, first reformat it and then you can write readable presentation logic
@JBis eh, that's just laziness, it's arguably better to write it as a literal
@Allenph let's come at this from the other side, is there anything you want to do in php-src
all the things I have on my list are there because they aren't simple
@DaveRandom Isn't your array in the same format?
or, well, more accurately there's some component of it that is not simple
accept individualized
02:15
@JBis yes, the iterate_movies() function is just a "translator" between that format and an assoc array
ok thanks
it would be better to fix the format but I'm guessing that would touch a lot of code
Wes
Wes
https://drafts.csswg.org/css-syntax-3/#consume-list-of-declarations
Initialize a temporary list initially filled with the current input token. As long as the next input token is anything other than a <semicolon-token> or <EOF-token>, consume a component value and append it to the temporary list. Consume a declaration from the temporary list. If anything was returned, append it to the list of declarations.
a temporary list is used imho because declarations may have multiple terminators
like ; or }
@DaveRandom Like the way its stored in the DB or how its shoved into the array from the SQL query? If the latter, its not much code.
Wes
Wes
does that make sense? any idea @bwoebi ?
02:22
@JBis Basically right now you have json.room11.org/8HN8EnAAqzQdQbOeyv4TpP, whereas json.room11.org/jsn10mGN1Rbp1uUjmppXT3 is much easier to work with in code
it just converts from one to the other
but it's easier to think about if you separate the conversion logic from the code that generates the HTML
ah
it's a trivial example of the principle of "separation of concerns"
OK thanks
@Allenph Jesus down detector new comments for youtube is crazy. +200 in like 30sec
Wes
Wes
nn
02:27
@DaveRandom I want to understand the layer between PHP and the OS if possible, I want to compile PHP grom source, I want to understand its macro architecture, and I want to fix a bug.
@Allenph OK so "compile from source" is step 0, really. Clone the source from github, cd into the repo root dir, run ./buildconf, then run ./configure --help
on a *nix machine of some flavour
you'll need gcc and autotools, both of which should be installable with apt/yum/whatever
buildconf is a script which generates the configure script from all the config.m4 etc m4sh scripts
also... yes, autotools is fucking stupid and incomprehensible, that's just the way it is
Wes
Wes
03:09
 
3 hours later…
05:59
@Wes it does, it keeps the list of tokens to simultaneously operate on quite small
posted on October 17, 2018

Wes
Wes
apparently it's a shortcut they use in the spec. basically that algo can be used alone or within another one. so to avoid repeating the same thing twice, they just say "pretend this is a different document" @bwoebi
i think
it is so cryptic that how code should function is written in english rather than code
anyway, almost finished
need to test now :B
07:01
@tereško that game is so god awful slow paced
I think I played til day 7 now.
kry
kry
07:18
Hallo, I put up a question on SO, but barely anyone looked at it. Could you check it out for me? Basically I manage to set up a mysqli connection without any error messages, but the prepare returns an empty statement. stackoverflow.com/questions/52842680/…
07:46
@kry just read the docs: php.net/manual/en/mysqli.examples-basic.php - everything works fine but you fail to understand not every query will result in a huge result-set-in-an-array, but a resource you can fetch rows from instead
morns
@kry You should only use password_hash() when storing the initial password. When logging users in you need to use php.net/password_verify
The algorithms used by password_hash() include a randomly generated salt, so if you run password_hash() with the same input, the output will be different each time.
kry
kry
@AllenJB Ok, that actually might explain why I don't get any responses.
@Sjon I find it weird that everyone says that, when there is a clear execute and and fetch array from resource, when these are cleary in the initial question.
@AllenJB It actually does not give any responses, even if it's just a simple "SELECT * FROM user", if it's ran through the prepare+execute, but there is if I directly run inside the DB.
@kry you are confusing everyone. Whats the output from var_dump($GLOBALS['mysqli']->query("SELECT * FROM ".$GLOBALS['user_tbl'])->fetch_assoc());
thunderstone any of various stones or fossils formerly thought to be fallen thunderbolts.
kry
kry
08:01
@Sjon object(mysqli_result)#3 (5) { ["current_field"]=> int(0) ["field_count"]=> int(6) ["lengths"]=> NULL ["num_rows"]=> int(1) ["type"]=> int(0) } object(mysqli_stmt)#2 (10) { ["affected_rows"]=> int(0) ["insert_id"]=> int(0) ["num_rows"]=> int(0) ["param_count"]=> int(2) ["field_count"]=> int(1) ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { }
["sqlstate"]=> string(5) "00000" ["id"]=> int(1) } object(mysqli_stmt)#2 (10) { ["affected_rows"]=> int(0) ["insert_id"]=> int(0) ["num_rows"]=> int(0) ["param_count"]=> int(2) ["field_count"]=> int(1) ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["sqlstate"]=> string(5) "00000" ["id"]=> int(1) }
Wait, wrong line.
print '<br />assoc'.var_dump($GLOBALS['mysqli']->query("SELECT * FROM ".$GLOBALS['user_tbl'])->fetch_assoc()).'<br />'; returns : assoc
I just did a var_dump after every command. :(
@kry so - don't do that? The line I gave will not return the object you posted
08:16
Does anyone know if PHP has an ordered map? And I don't mean ordered according to insertion - I want ordering according to the key's value (exactly like C++'s map). If not, I guess I'll just have to use C++...
kry
kry
@Sjon I cleared the password hash, and used the bind_params without that. Now everything works. It seems it somehow doesn't let the parameters to be bound. Now I use password_verify instead, and now it's working.
@AllenJB Thanks, now it works with verify.
08:33
There are a bunch of things in this extension: https://secure.php.net/manual/en/book.ds.php
Not sure if any are what you're after.
ThW
ThW
@tpunt most people just use ksort() or uksort() on an array. But it should be easy to encapsulate that logic into an class that implements IteratorAggregate and ArrayAccess,
@DaveRandom I only implemented a scanner/parser for CSS selectors not full CSS.
09:13
may I know how to find table name based on search result matches
SELECT  `contactperson`, `log_date`, `log`, cname, `status`, contact, 'add_contact' AS comes_from
                FROM sw_add_logs
                RIGHT JOIN sw_add_contact AS ac USING (c_cid)
                WHERE `log` LIKE :search OR `cname` LIKE :search
I want to find from which table the matched result found
ThW
ThW
@AbhiBurk Your question is unclear, you provided the table names and you do not have an UNION
Are you looking for something like SELECT (log LIKE :search) matched_log, ...?
09:36
I wants to know if my result set comes from log or from cname
which are col names
@AbhiBurk SELECT IF(log LIKE :search, "log", "cname") AS which_column_matched
Maybe?
let me try this
hey guys
09:51
@jjok It worked
as far as i found, the image resolution is actually ppi, so i've tried using imageresolution in hope i ll get the ppi, yet what it returns is an array with 2 values both of 98 for an image with the dimension of 236x236 which has a ppi of 72 according to photoshop, so what are the values returned by imageresolution() ?
@AbhiBurk I don't know why, but your avatar when small, looks like a woman in a pantsuit.
@PetruLebada It is not ppi. Image has resolution (i.e. 100px X 100px) wether it is shown on display with dense wether on display with sparse characteristics.
10:08
gcc default include path lacks /usr/include, PHP_ADD_INCLUDE lacks it either – #77026
10:22
hi room, long time no see
@Wes you are still here!?
Wes
Wes
yo \o
@pinepain yeah,... I thought you had quit php
so ... libssh.org site is down
10:41
@tereško no, its not
Should a /pleasecheckactivationemail page be public or session based?
@Darius both
you know I'm going to ask why lol. Mainly, why session?
@Darius It should be without session, but direct access should not be allowed. That's why I said both, so, it should be publicly accessible but restricted
Gotcha. Thanks
11:09
@Tpojka, i think that is dimension and not resolution, the image i was talking about has a 236x236 pxdimension
11:21
Image you are using is rasterized not vectorized so there is no way to know if something on image is low resolution or it is just how image should look like. Check here for example.
what i'm trying to achieve is to retrieve the ppi in a way or another... if i can't use any built in php function, maybe i can calculate it, but i'm confused about the formula, some says this is the correct one: PPI = width(pixels)/ width of image (inches); PPI = height(pixels)/ height of image
@PetruLebada why do you want the PPI?
but how can i get the size of image in inch?
@Danack, i'm working on an app that manage assets, and i have to assign ratings on each uploaded asset based on criteria
one of them is the ppi, it's not something i can change, this is the task i'll have to deal with it in a way or another
@Tpojka , uhm .. i don't get it, what has that to do with ppi?, yeah im talking about rasterized images, cuz it's a different story with vectorial images, i need to find a way of retrieving ppi
@PetruLebada "one of them is the ppi, it's not something i can change" - then you need to ask whoever set that requirement why they think ppi is something they want to use as a rating.
They almost certainly wanted to just use pixel size instead, and didn't know the difference.
Because you can take any image, and change its ppi setting, but that makes no difference to the image.
Until you come to print it on a device that respects the ppi settings of an image.
@Danack, another criteria is based on dimension if x > 1920 etc, so i think they know the difference
isn't that dpi? i think there is a confusion between ppi and dpi
dpi is supposed to be used for printing, since dots aren't the same thing as pixels
11:31
> All that PPI does is affect the print size of the image. There are 2 ways that you can change the print size, by resampling or by not resampling.
they are technically different. But they have the same goal.
uhm, i'm really confused, last week i've done a lot of reasearch about this and everyone seems to have their own opinion about this
yeah......which is why you should push back to the client and ask them why they think it's important, so that you can understand why you're even trying to do it. I'm guessing most devices that aren't photo shop aren't going to give an accurate ppi value anyway.
let me give u an example, if i open a jpg in photoshop, edit>image size it will tell me its dimension and resolution(ppi), which i've seen most of them are 72, if i increase the value it makes no difference, if i decrease it the image gets pixelated so the ppi affects the image in the virtual domain
i think that is the reason they wanna know that, so they can assign the proper rating if an image has a low quality
The value makes sense in photoshop as you might be working on a defined canvas size, but know that it's going to be used to print to advert to be used in a bus-stop. As those poster printing machines are very low res, so you can tell photoshop, "don't worry about rendering everything to very high detail". Conversely if you're working on an image that is going to be the cover of a magazine, then you can tell photohop, "render this with very high detail, I need to check it looks good at that res".
"if an image has a low quality" - you can't trust the image ppi or dpi settings for that. The only thing that is worth checking is the image pixel size.
true, and that is a different story the transposition of a virtual object in the real world, my problem is simply about the web images, and the canvas in this case is exactly the device which has a fixed size, the image either be higher, which it's not that important cuz it will resize to fit the container, or smaller than the display, giving those dimension lets say 800x800, idk what ppi should have at this value since i cant figure out what is the correct formula
but lets say 72 pixels per inch, at this value the image quality is good, if i decrease it, it wont be enough pixels left to cover wahts left so the margin pixels will be stretched and tus the bad quality
11:43
"it wont be enough pixels left to cover wahts left so the margin pixels will be stretched and tus the bad quality" - that has nothing to do with ppi or dpi.
just the raw image size.
in pixels.
@PetruLebada I think that you can't know what PPI is used when bitmap class image was exported from image managing application. Most info you can get with native PHP functions is through exif_read_data() which shouldn't be relied on since not even close every image will have set all supported attributes.
@Danack, how so? the image size is just the total number of pixels, its quality depends on ppi
You have 100x100 image that has been exported with 72ppi resolution.
If you set <img src="/path/to/100x100.png" width="1000" height="1000">
You will basically get quality that is similar to 7.2ppi

If you set minimal requirements of 1920x1080 for uploaded image, I think you can go with ease for assumption about 72ppi, meaning I wouldn't expect someone used lower resolution of type. So @Danack already told you make your basis on uploaded image size.
It is nothing you can say 100% for sure but you can make assumption that very much close to whole amount of uploaded images are made with 72ppi
Wes
Wes
12:03
google just made the ads in the search results even less recognizable
@Wes Picture or didn't happen.
Wes
Wes
12:15
just make a search? :B
Tried first (ofc) but didn't noticed. lol
Should validators validate and also explain why the data is invalid?
@2dsharp Depends on return type of validator.
@Tpojka Well I am working on this project: github.com/2DSharp/phypes which is really at its early stages. The types come with their own validator. So a phone number will have a different validator than an email. Validator is an interface which currently has an isValid($data) : bool. I was thinking of adding another function getErrorMessage() in the validator to allow for different and useful error information to be thrown on failure.
In that case set return type to array and pass two keys/values: status and message.
12:23
does anyone know how many pixels 1 cm has ?
photoshop has a totally different value
@PetruLebada that's joke right? The first doesn't even consider dpi?
$emailValidator = \GreenTea\Phypes\Validator\EmailValidator->isValid($email, []);
$emailIsValid = $emailValidator['status'];

Something like that.
@Sjon i hope is a joke, cuz if it isn't im going mad
@Sjon that means you know the right value/formula? :D
@PetruLebada for screens? Did you never realize there are 15" screens with 4k resolution as well as 60" screens with 1080p ?
@2dsharp You can see how Symfony does it here: symfony.com/doc/current/components/validator.html
12:28
@PetruLebada Consider TV of 43", 55" and 60" that every of those has FHD resolution (for example) 1920x1080.
Now ask yourself how many pixels is in 1cm.

You can apply the same logic to monitors 15", 17", 24", 27", 32"...
@Sjon , for images actually, i'm trying to understand the ppi/dpi and according tho this website: electronics.howstuffworks.com/cameras-photography/digital/… there is a formula for that, trying to see if it's correct, but i gotta find the inches of an image, in my case i started with cm so i tried to find how many pixels does a cm have so i can calculate it
@Tpojka yeah i know , yet someone just told me there is a fixed value for pixels in cm/inches .... i didn't knew what to respond so i started researching
@Sjon gave you an answer just before I did.
Good morning
morning
12:40
1 hour ago, by Danack
"if an image has a low quality" - you can't trust the image ppi or dpi settings for that. The only thing that is worth checking is the image pixel size.
$image = new Imagick('foo.png');
$image->setResolution(512, 512);
That doesn't change the image quality, it just changes what the dpi are set to.
which doesn't even matter anyway, because most people print an image to a set size, regardless of what the DPI is set to.
@PetruLebada from your link:
> Both of these images display at the exact same size even though their resolution varies. This is because the pixel dimensions are what really matter when working with web images. Notice that the pixel dimensions of each image are the same and therefore both images will display at the same size even though they have differing resolutions.
until you get to printing, which you haven't mentioned yet, image size is everything.
13:01
@Danack Sounds like it might be quite an obvious bug, and I wonder how many still wouldn't update it.
13:19
@DaveRandom Okay. I can do that.
Morning.
sigh... slowly losing my mind trying to escape commas for a CSV in powershell... I may convert this to PHP if I can't figure it out
Ugh. Powershell.
tidy::getOptDoc() not available on Windows – #77027
Wes
Wes
13:35
> public function list(){
feels good
@Wes ? overriding the list function?
Wes
Wes
before php7 you could not use list() as method name
it was disallowed. now you can and it's amazing :B
HRTime extension arginfo is wrong in for several functions – #77028
14:06
@Jimbo have you ever met the guy that does the Trivago commercials?
@StatikStasis Nope
@StatikStasis Wut?
@Allenph James used to work for Trivago
14:13
@mega6382 This is what I was looking for.
@mega6382 I thought he still does...?
Didn't know he did not work there any longer. Still shows Lead Tech on his profile.
@Tiffany No, he left a while ago, and is now in Germany(or soon will be), and have found a new job.
Oct 9 at 13:35, by Jimbo
No remote, and Munich, different employer.
14:16
morgen
\o
@Jimbo I think you should update your profile on SO
Oct 8 at 10:01, by Jimbo
I'll announce in due time of course
14:33
I haven’t left yet
I’m still here
Until December
14:57
No Christmas bonus for you!
Christmas bonus? what's a Christmas bonus?
Chocolate Orange in the UK.
I think I've only gotten one Christmas bonus ever.
heh

« first day (2923 days earlier)      last day (2249 days later) »