« first day (2862 days earlier)      last day (2312 days later) » 

00:08
If you're resorting to if/elses, can't you turn it into an object somehow?
There's probably a way to do it maybe with a for loop and list
Or maybe it was a foreach loop
Wes
Wes
i am overthinking it probably
Some variation on it, anyway
Wes
Wes
nope, don't think so
Sorry
Wes
Wes
:B and for what
00:14
Lol, I hope to come home one of these days to see one of my cats playing with the kittens from under the door
Wes
Wes
i don't think i need loops, it's just 4 values
@Wes that I couldn't help
Wes
Wes
lol no prob :B thanks for trying
Lol, I'm thinking about calling the kittens Picard and Riker. Debating on telling my dad that... if I do, he might take an increased liking to them, but on the other hand, he'll find out I've been watching Star Trek and I dunno if I want to admit that to him yet.
Wes
Wes
lol
call them worf and spot
 
1 hour later…
01:25
@Wes I'm assuming the sequence of integers would be in an array. Sort the arrays low to high. Arrays $a and $b. If $a[0] > $b[0] then check if $a[0] is <= $b[last element in array], (overlaps), else if $a[0] - $b[last element] == 1 (adjacent), else if $a[0] - $b[last element] > 1 (no overlap) else do checks if $a[0] < $b[0] ... yeah there is probably a better way but I am on my phone watching a movie. =p
01:40
Could check for intersection, then check if adjacent, else...
Morning room
02:10
o/
\o
 
1 hour later…
03:26
Anyone here?
Hello Statik
I created a form, for placing an order. This goes to a page that displays your order. Then there are other pages that allow you to edit your order, which return you back to that page that displays it.

However, depending on how you enter the page determines if it's creating a cart in the database, or merely displaying an existing cart.
There are many solutions to cover this, but they all feel very inelegant and hacky. Wanted some feedback as to which was the most professional approach
Should there be an invisible page that creates the cart, which redirects to the order summary? Or should the code be in that page, but only active when a form is submitted? Those are my top two ideas, and I'm sure there are pros and cons between them, but I can't really think of any
Right now, I'm thinking "invisible page" approach
04:11
@JonathonPhilipChambers I would have an order page. Upon submission it should process the logic on a separate page and send to a confirmation page. You can provide a checkout button or an edit order button. Edit order would send them back to order page. That page should look for a session name that would have been set so that it doesn't give them a blank order but reloads what they ordered from the session. Hope this helps- lots of ways to do it. =)
Heading to bed- best of luck.
btw, make sure to use prg method during form submission.
 
2 hours later…
06:03
That's exactly what a binary search tree is for; while looping through it you take the lower branch if the desired one does not exist, with an one-time backtracking, e.g. an implementation in C: http://git.php.net/?p=php-src.git;a=blob;f=sapi/phpdbg/phpdbg_btree.c;h=4f5b1e7526dde8f5872c39dec824aab6631468a7;hb=HEAD#l69
This only makes sense in PHP when your average range size is larger than 10 * log2(maxindex) or such, otherwise the overhead is too large, compared to naive iteration
Wes
Wes
07:07
buondì
.@PHPeeHaa Isn't that the PHP motto? "It just works. Don't ask"
corpocracy a society in which corporations have much economic and political power.
Wes
Wes
08:10
@bwoebi sure, but "store the ranges of contiguous values" rather than the values themselves... how is that called?
@StatikStasis this brings back memories youtube.com/watch?v=qmsbP13xu6k
@Wes you store a range by inserting a value with an associated range at the lower bound
Wes
Wes
08:26
yes, i am asking if that kind of structure does have a name, apart the fact that is built over a bst
@Wes the structure is a bst. The range information is just metadata, not a particular structure with a special name
@Jeeves RFC 1925 2. The Fundamental Thruths: (1) It Has To Work.
I mean, you can talk about code architecture until you drop, but at the end of the day... it just has to work.
Wes
Wes
@bwoebi okay... i have seen it somewhere but can't remember the name... will continue searching and let you know :B
@Wes hm, there's also something called a range tree,, which is what you might sreach
@Code4R7 mind the date
Wes
Wes
08:32
it was like rangeset<comparable&enumerable>
@Wes yeah, look for range tree
Wes
Wes
language was 100% java. maybe it's in apache commons or something
@Gordon I'll stand correct if you would point me to an RFC that supersedes this one ;)
Anyone follow the net neutrality hearing?
What about net neutrality ?
08:36
Ajit had a senator's hearing to answer for why he falsified an attack on their servers to prevent people from adding comments supporting NN
From what I heard it was like 5% 1 or 2 senators actually trying to drill into him and get him to stop avoiding direct answers and 95% paid off senators just pretending to give a shit
To my experience, politicians in general don't care about any facts and contents at all, thus also not about NN. Their job is to keep as much as people just about happy enough so that they do not rise against them. They will only decide something when something really bad is happening, or when too much people show their concerns.
So, how many people actually are concerned about NN ?
My guess is that most people don't even know what it is...
To my view NN has the same priority as privacy. Nobody cares. Until it is too late.
Much like the way politicians handle nuclear power plants, or european roads...
At the same time, you can not get an insurance for a nuclear power plant. I wonder why.
But aren't nuclear power plants like super safe
no
heard of Fukushima ?
according to scientists, an accident could only happen once in a few million years
Yeah, I also heard that there was a lot of manual overrides which led to that happening
time does go by very quickly...
there's even an extensive list of accidents here : en.wikipedia.org/wiki/…
also, the report about the amount of lives destroyed it a tad wrong. How many people got cancer, or had malformed babies?
And then, how many politicians care about that?
I can count to ten ;)
But the upside of this all is: we as mere programmers do not have to care about politics!
reminds me that you can not ever agree about three things in life: politics, religion and sports.
or PHP frameworks for that matter :)
Although there is some guy that has an opinion about PHP frameworks: they all suck*. (* not my opinion)
09:08
@Code4R7 again, you are wrong en.wikipedia.org/wiki/…
@Code4R7 also that "some guy" invented php
I'm not that wrong.. according to that URL, I'm right: when the problem is big enough, politicians start to react.
And where is that nucleair power plant insurance?
You're right about "some guy" :)
@Code4R7 so apparently politicians do care in the wake of accidents. not sure why you think your claim they are not is right then
@Code4R7 it's an april' fools RFC. It doesn't need to be superseded.
@Gordon you're fast :)
The bullshit asimmetry: the amount of energy needed to refute bullshit is an order of magnitude bigger than to produce it.
¯\_(ツ)_/¯
hi , i have used primary key and after some insertion . i deleted some rows , is there any way to optimise , and fix all missing ids
i deleted 300 rows
now , my first row starts with id 301
09:18
@Gordon I think you mistake 'care' for 'react'. But I must say, I'm talking from my own experience. I've never seen a politician that puts 'caring about individual people and their problems' before getting, maintaining and expanding their powerbase.
@Srinivas08 you can reset the AUTO_INCREMENT counter
@Code4R7 will i lose the existing data ?
you might lose data yes
ok , i will backup data and do the reset process
if you have rows that start from ID 301 and have foreign key relations to them
Actually I never tried that on a database, because it doesn't make much sense...
usually the db guards the relationships for me
@Srinivas08 so what? let them start with 301…
09:23
php sucks
@Unknown won't find anyone in here not agreeing with that
I happen to love PHP
I can not imagine the amount of effort it would take to write my app in C++
I once spent two weeks debugging a single C++ routine (that 'worked'), only to find an off-by-one error
problem was that no debugger showed an error, it appeared 'randomly' in the sound waves it generated
@Unknown well, obviously, duh doy!
this worked : ALTER TABLE tablename AUTO_INCREMENT = 1
09:26
I never had big problems with PHP. The only thing is that i'm a self learner, therefore I have to make all mistakes myself before I even knew I had made a mistake.
@Srinivas08 that's how it is supposed to work
@Srinivas08 you also updated any FK's?
what you are doing now actually has a chance of breaking data integrity
don't worry @tereško he made a backup :)
also, you should be using SERIAL instead of INT for primary keys
09:29
does MySQL support SERIAL ?
> SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.
that must be why I never used it... it's an alias.
much like the support for BOOL I reckon..
Jesus man, laravel mix is just awful.
> Laravel Mix provides a fluent API for defining Webpack build steps for your Laravel application using several common CSS and JavaScript pre-processors. Through simple method chaining, you can fluently define your asset pipeline.
it's basically what Yii was doing ages ago
I have the perfect mp4 for this....
also, I think that quote misspelled s/fuent/flatulent and s/asset/ass
09:44
are you always in such a 'positive' mood @tereško ?
perhaps you should talk about it with someone..
@Danack cool
!!friday
Morgens
09:51
LOL @Jeeves
goeiesmorgens
good moanings, roomies
Wes
Wes
is it friday already? wtf
Wes
Wes
09:57
NO.
LOL
what, you don't like modern pop either?
@salathe Can you help with this?
anyone actually uses the statement public for vars and function?
Everybody sane does
It shows intent. It makes searching easier if needed
Wes
Wes
@PeeHaa ahem
10:09
:P
Wes
Wes
thank you
:D
i need to fix that... i don't care, it's just that i am used to not write it
...used to not to write it? english confuses me
but public is implied anyway... it makes the source code size smaller and faster to read...
@Wes "not used to writing it"
Either: used to not writing it or: not used to writing it
@Code4R7 It doesn't
@Code4R7 How is that?
10:11
It's implied yes, but when I write code I like to get rid of all assumptions
tell me, how is it easier for searching?
preg for all public functions in a directory
It can still be done mind you
I use eclipse for that...
10:13
You don't always have access to an ide
Thanks for the insight. For my own code I just stopped typing public all the time, since it does not matter anyway. But you do have a point or two.
Wes
Wes
@Code4R7 peehaa's argument is invalid. we add public because it's aligned with private and protected
but most importantly we add public because everybody does it
consistency is important
it's not that makes the code more clear or something
I was thinking if you grep for "public function" you miss the public functions that are just declared using "function"
Wes
Wes
it's like metric vs imperial
@Wes Why would it be invalid
Consistency is also a thing
Wes
Wes
10:20
both are good and bad for different reasons, but since 99% of the world use metric, then everybody should use metric. again it's just consistency
Nooooooo
Wes
Wes
@PeeHaa i am referring to "get rid of all assumptions"
Everybody should use metric because it's the better choice
@Wes Which it does
lol we should all learn English as the only language and drive on the proper (left) way of the road
@Wes No, metric is better in every way. Also, metric system is scientific because it is based on natural constants etc
Wes
Wes
10:22
it's bs
imperial works too
@Wes No, not on very small scales, and neither on very large scales. It is more prone to failure, compared to metric system
@mega6382 be wary for natural constants, we already have big problems with a simple thing like time..
@Wes have you ever tried to solve a physics problem using it?
you probably should try, before you make such claims
> Official definition of a meter is the distance light travels in a vacuum in the interval of 1/299,792,458 of a second
10:25
> is implied anyway...
> it makes the source code.. faster to read...
Wes
Wes
failures happens when you convert from one to the other. by themselves thy are not fallacious
Those two pieces are directly opposite to each other.
Wes
Wes
the imperial units are defined using SI units
means it's just different scales
for me it does... and more importantly: leaving public out makes the code faster to write.
Wes
Wes
like the mile is literally defined in meters
10:27
Which mile is that?
:)
Wes
Wes
the non naval mile or whatever
@Wes so, you have a cube with water (1 feet each side) at 100 degrees Fahrenheit , how many ounces of water at 130 degrees do you need to ad for the combined water to be at 122 degrees Fahrenheit ?
@Wes no, it is defined in yards or feet or chains or inches or furlongs etc
No, not Fahrenheit! Use degrees Kelvin
There are too many individual units of measurements in imperial system, which is also bad.
10:29
ounces..
why do English use the german Fahrenheit anyway :)
Wes
Wes
@tereško i am saying that the math can be just as precise
we dropped ounces ages ago in favor of grams
Wes
Wes
and that what really counts is conformance to others
@Wes then you are not understanding the problem
that usually happens when @tereško tries to eplain a problem :)
10:30
the precision of a unit actually depends only on the tool ... that has nothing to do with solving a problem
like floats
Wes
Wes
what's wrong with fractions of the units?
vs doubles
let me predict: after a few lines of vague explanation the outcome is that we are just too plain stupid to understand
@Code4R7 That is probably why units for time are the same in both systems.
Wes
Wes
> The pound or pound-mass is a unit of mass used in the imperial, United States customary and other systems of measurement. Various definitions have been used; the most common today is the international avoirdupois pound, which is legally defined as exactly 0.45359237 kilograms
afaik every unit in imperial is now based on the definition of the unit in SI
10:34
we can agree on one thing: alignment to others is important
hi , i am using datepicker on my php site ... it has edit multiple date option , only the first one is showing date box
remaining doesnt working
@Wes But in metric system there are units like, millimeter, micrometer, nanometer. But there are no smaller units of length than thou(thousandth of an inch) in imperial system.
Wes
Wes
so? you can say 0.00001 thou
or a "thousandth of a thou" or something
@Wes here is an example: 1 newton is the force, that is necessary to accelerate 1kg of matter by 1m/s^2 and if you do that for the length of 1 meter, that 1kg chunk will have 1 joule of kinetic energy .... now, do that in the imperial system
Wes
Wes
it is stupid af obviously, but it does work
10:42
can't we measure things in pints instead?
@Code4R7 English or murican? :P
whichever is the largest :)
.. if only knowledge could make me die more happily ...
Wes
Wes
@tereško i am stoopid i don't get that. why can't you just convert?
10:44
@Wes Also ,the largest unit of length there is no unit larger than league(3 miles) in imperial system, whereas in metric there are units like parsec(3.26 light-years), and MegaParsec etc. All I am saying is that imperial system is redundant in the face of metric system, and yes it is stupid af.
you go girl!
How can I search element quickly in large set of array consider array contains 10k number of elements?
array_search()
Search the source instead
@Wes to do the calculations, you will be using the SI units. So what is the point of converting?
10:46
@Wes Scientifically, the imperial system will cause alot of limitations and road blocks, espicially because of how the conversion within its own units works, like 12 inches makes a foot. Whereas in metric system everything is in the multiples of 10 etc
I mean I want to check if given element is present in big array?
@Exception Where is the array coming from?
what's wrong with array_search()
static array it is..
Wes
Wes
give it a key $a["key39783"] = $val; such that you can easily get the $key from $val
10:49
Just put it in the database or use array_search as @Code4R7said
@Exception that sounds like database operation
No. I don't know why previous developer put all the ids in an array and this is not a time to store them in db . So I am trying to find optimal solution to check if any key exists or not
> and this is not a time to store them in db
Yes it is
there is array_intersect() ... but that would just make the bad code worse
Or rather it should probably already been done
Since it's not been done do it now instead of thinkingof workaround and keep kicking the can down the road
10:54
@PeeHaa is right. Looking for a workaround takes far more time than using a general purpose solution that any database is much better suited for.
what was the name of that filesystem based sql database again ?
if you can not use a real database, you can always use that
If it's a simple collection of ids you can do what @Wes said to make it less sucky
But that gets hairy fast once it contains more data
@PeeHaa just like my scrotum
3
boy, that was awkward. hahahaha.
It was :P
We talked about this
Don't do this in pub(l)ic
but it's true. it's hairy and contains data :(
that's just one level before positing goatsee in the chat ... or was it with one "e"
10:59
Valid data though?
eventually
@tereško goatse
I hope you had to google it to get the correct spelling
:D
Sorry I was raised by the web :P
@tereško traumatized for life
I remember the spelling from 15 years ago
@Gordon I have a tiny purring kitten for that :3
I regained his tiny trust after giving him a bath
Wes
Wes
i am not clicking shit
i hate you guys
especially gordon
:B
Wes
Wes
no. never gonna happen
spelling changes all the time. who carez.
11:06
@Wes but it's a game where you literally click shit
@Gordon better than cookie clicker?
@Tiffany IDK. I didnt click it.
I downloaded an autoclicker after awhile
if you are into clicker games, you might wanna try clickerheroes2.com. It's all the rage with my colleagues. They fully automated it though.
I used to play that a few years ago
11:10
never heard of clicker heroes.. looks like it is for teenagers...
Like 3-4 years ago or something. I'm not much into clickers anymore, would rather play an idle game without focus on clicking/tapping
I don't like games in general
last one I played was Skyrim, but it's like having a boss that says 'do this, do that'
Wes
Wes
@Gordon do you use spotify? how good it is at suggesting you new music?
like, without you doing anything
@Code4R7 I thought you hated video games
sorry, you're right. that's what I meant
games are fun, because of meta gaming
11:18
@Wes Yeah know that one. That's awesome
The daft punk one is also cool
@Tiffany @PeeHaa: bash.org/?434593
4
@Wes I have a playlist called Discovered Weekly where I put stuff I discovered via Spotify's Discover Weekly playlist (the one they generate for you every Monday). it currently has 260 songs in it collected over the last two to three years. Plus a metal playlist where I collect metal songs from that list. Add to that many artists and albums related to these. So for me it works.
@tereško lol
@Wes most of the time the list is just okay though. Nothing to get excited about. But also nothing to skip in terror.
morning
Wes
Wes
11:27
need to try it. what genre do you listen to?
@Wes blues, bloodgrass and black/death/extreme metal :)
Wes
Wes
you are so german
anyway, check music.youtube.com radio feature - that is, enter a genre and click "radio"
Spotify has that, too. But I dont use it.
@Wes is that audio?
Wes
Wes
after it played the most popular songs it started playing good stuff i never heard
Wes
Wes
is this a trap?
you'll never know… unless… you click it!
Wes
Wes
at least it's not timothy
@mega6382 yes, it's their new music service that's going to replace Google Music eventually
Wes
Wes
i have seen worse things done by google
11:36
@tereško good to see you after long time :)
where has he been?
@Gordon he was suspended for a month or so
28 days, I think, not sure though
what? lol. why?
what did you do @tereško?
Wes
Wes
i'm more interested into knowing what he did to pass the time
he surely played half steam games
@Gordon after spending an hour, while trying to explain, why "function mysqli_query() not found" was working on OP's production system and not on his development system, I started the sentence with "since you seem to be mentally retarded, I will explain php extension to you like for a 5 year old ..."
that earned me 30 days suspension
11:40
@tereško "30 month"????
@tereško seems like a valid response :P
@tereško haha
@Gordon and twice too, probably
@mega6382 well, it was followed by by OP saying: "tnx, I got it"
Wes
Wes
11:43
you are the reason SO has a CoC. how does that make you feel? :B
@tereško I just remembered avenger movie's sentence "captain he is using bad language"..
@Wes No, JS room is the reason SO has CoC
@mega6382 they can't be worse than the lounge
no, the CoC is the result of StackOverflow needing to show "growth" to the investors ... and since they seem to be located in New York - their solution for the drop-off was "the site is not politically correct enough"
That's how I perceive it too
11:47
@tereško lol yeah that's what I was thinking of
it could be worse - they might have offices in San Francisco
@tereško F**k PC
is there anything in phpunit which would allow me to compare two arrays with matchers for values? like $expected = [ 'id' => '\d+' ] or something
@Wes @fabor just linked that one to me yesterday too. Great memories for sure!
Wes
Wes
there is a lot of negativity on SO. i am happy about the CoC
11:54
@Wes F**k you too, <3 :P
Wes
Wes
eat a bowl of flowers, motherlover
@Unknown php room = room 11 = masochist room. Welcome...
@PeeHaa Give the world and inch they'll take a mile...
does someone know if its possible to change user id of www-data from the official php docker images ?
12:02
@PeeHaa He's one of yours! Netherlands.
nvm- just read what that was referencing. =/
And... Good morning all.
@Wes I have never been happy with people "fixing" the symptoms instead of the causes
why php documention will not be redirected to https protocol?
@tereško The US loves to do this. The career politician is elected based on this.
12:34
@Shafizadeh secure.php.net
going to secure.php.net will redirect to HTTPS
Ah I see ..
@Ekin ping
@Tiffany there's also superdupersecure.php.net
@PeeHaa pong
@salathe no rebecca, for shame
12:39
\o/
@PeeHaa are you still in Turkey?
@salathe so secure that it doesn't even load
@Tiffany maybe later... maybe taking a break this week... :)
ohai @tereško welcome back
12:39
@Tiffany Yep I am
@PeeHaa you guys are in the same room, aren't you...?
yes, he's nerding on the other side of the table
@Tiffany :P
I can't say much, I've done it before too...
:-)
12:43
Watching this series with Gordon Ramsey discussing cocaine. Did not realize how much of cocaine traffic came out of Albania into UK. I know little about Albania. dailymotion.com/video/x69k9s2
@salathe first thing you did today was !!friday :P
@mega6382 that was @Jeeves posting the video, not me!
@Tiffany does it work?
12:47
the problem is that the comments are/documentation is missing. Now you don't know if it works, due to lack of a reference.
Wes
Wes
$current_path = array_diff($path, $root_path);
this is wrong
what does WS_ROOT contain exactly ?
Wes
Wes
it fails if the root path appears multiple times
@Tiffany xdebug news?
@mega6382 on 7.2, no
going to refactor it today
might use url parse, not sure... but I'll have to mess with it to see if it will work the same way

« first day (2862 days earlier)      last day (2312 days later) »