« first day (1279 days earlier)      last day (3651 days later) » 

12:03 AM
@ircmaxell Sounds like bullshit, no other way to put it.
 
@TOOTSKI @ircmaxell the comment after that mentions "notepad++", so there's nothing to add
 
Basically, I use it just because it's better than Notepad ^^
 
Hi there
Anyone familar with MyBB???
 
12:20 AM
Just ask the question.
 
That was one of my questions xD
 
No, then :P
 
Xd
 
@Ocramius I ended up stripping php-cs-fixer so much it's actually not anymore :D
Rewrote some filters, some removed.
 
@TOOTSKI lol, man
there's a tool by @DASPRiD that should be much better
 
12:22 AM
Well I am stuck in the mybb mycode system I basicly want to hide a mycode content from guests using mybb syntaxing
 
hmm, no, nvm
it's incomplete: github.com/DASPRiD/Flitch
 
Ah, Roave buddy :D
Nice, thanks.
Also, tokenizer, it's very hard to do anything with regex.
Check it out.
> 5,195 people ahead of you
 
Unl. Storage BULLSHIT its always limited
 
IMHO storing movies is bullshit, if 10 people upload exact same file, why can't there only be one (shared).
Also, it's probably illegal.
 
Idk this is basicly themoviebay instead of thepiratebay
Idc if its legal or not xD
 
12:36 AM
@TOOTSKI put.io
nuff said.
 
Nuff said, indeed.
 
12:48 AM
What the stuff??!!
Somebody decided to go onto my site and post some 'yaoi' (that means homosexual) roleplay :barf:

It's like they don't give a crap about the rules
And the primary user base: little kids
this probably isn't the place to complain about it, actually
 
you might need to introduce a filter :P
 
OCR, maybe?
If in doubt, don't post it.
Anyways though, there's some serious crap out there and I have to wade through it.
 
@AustinBurk C stands for Character. Anyways, there are some software/algorithms to filter it
 
@HamZa yeah, I know what it stands for..? 2. Like what? I tried to install tesseract but yum install <anything> usually returns, no package <anything> found
 
@AustinBurk wait what? I thought you wanted to filter images that contains nudity?
 
1:02 AM
Flipnotes can have two colors (out of red, blue, and black/white, depending on whether the canvas is black or white)

It's usually hand-drawn but there's a camera thing there
A lot of the time, however...stuff like this:
Clearly, a sniper rifle is the only way to find people to ****.
 
Hmm, building an inspector for ZF2/ZF3 - wondering if following would make sense:
# Architecture Overview

This file includes a broad view of the architecture of RoaveDeveloperTools


### Inspection Results

RoaveDeveloperTools is based on the concept of `Roave\DeveloperTools\Inspection\InspectionInterface`,
which is a serializable data-packet that is usually created during any of the various workflows of a
"inspected/monitored" application.

### Inspectors

Inspectors are simple services implementing the `Roave\DeveloperTools\Inspector\InspectorInterface`.
An inspector is a service that may be asked to produce a
very high-level overview...
 
Oh! How can I change the maximum length of a PHP session id token?
 
1:37 AM
u_u

It worked before, now it's decided to up and do something different
 
 
3 hours later…
user895378
4:17 AM
The cli_set_process_title() function included in PHP 5.5 has never once worked for me ... has anyone else experienced this behavior?
 
5:30 AM
Hi
Can anyone please check the code here, and tell me if there is anything that could be improved maybe.
 
well ... step 1 would be to remove CodeIgniter
step 2: get your PHP code out of DOCUMENT_ROOT
also, why the fuck your "controllers" have hardcoded jquery in them, @AbdUlAziz ?
 
@tereško The jQuery is for datatables
it can't be global because each module has its own set of columns
with specific formatting/rendering options
 
so ... why the fuck is it in the "controllers" ?
 
@tereško For the remove CI comment, that is in the roadmap ahead, i plan to implement the same solution based on laravel . Basically this is a service to enable user/developers to generate a CMS for themselves .
@tereško Where would you suggest i put that ?
 
in worst acceptable location would be: in views
but I fail to see here why you even need it generated using PHP
 
5:45 AM
for example , you have 2 views , view01 requires view01.js to be loaded in the header, view02 requires view02.js to be loaded in the header .
how would you handle that ??
and you don't wanna load something that isn't being used at that particular time.
 
have you heard about browser's cache ?
 
yes
 
6:17 AM
@tereško there?
 
Hi for the person who said about rugular mysql statements the answer is negative i am using pdo but I want to be 100% sure
 
6:33 AM
lol morning
 
morning
 
Good morning ! Hi @tereško ( For some reason I always I have to think about: etdoncvoila.files.wordpress.com/2012/01/dsc_0105.jpg ) When I read your name.
About yesterday @tereško You said 'what the f*** are you doing there:
Well that is exactly what I Am learning how to autoload correctly, that why I saw this example: https://github.com/silexphp/Silex-Skeleton/blob/master/web/index.php And I made : https://bitbucket.org/ward_kennes/silex-basic-application/src/1acb2594f18ff1d74e11bbdfd29c468498d69c1f/oop2/silex/web/index.php?at=master
 
6:51 AM
// Chat is still Asleep. ZzZ
 
hiii
 
hi
 
@Mitchel i have problem in retriving checkbox value into database
 
@NikiC bugs.php.net/bug.php?id=67011 I assume you wrote the documentation did you ?
 
@pramod well can you extend it further
 
6:59 AM
Hell tired about "how heartbleed works"
Thus.
morning
 
morning
 
i am using this query for getting most catches over all
SELECT catch, SUM(catch) as c FROM vsteambat WHERE matchformat='odi' GROUP BY catch ORDER BY c DESC LIMIT 3
and this is working file .
but now i am facing a issue that i am storing the player id in the (catch) field and this query return me the sum of player id ex: player id is 4 and query return me 8
the solution is . divide 8 (sum) by 4(player id) .
question: how to add division process in this query :
"SELECT catch, SUM(catch) as c FROM vsteambat WHERE matchformat='odi' GROUP BY catch ORDER BY c DESC LIMIT 3 "
 
7:16 AM
hi
 
hi. mohammad
 
@UmarFarooq having to search in strings with SQL is like shooting yourself in the knee
 
7:42 AM
morning
 
Mood gorning.
 
Yo
 
7:59 AM
Up at 7 this morning, even had time for a game of titanfall before heading to work
 
I had time to read manga :p
 
Morning
 
hi, @Leri @Jimbo
 
I didn't have time to do anything, but yesterday I played a nice game of Tabletop Simulator :)
 
try 2048
 
8:07 AM
Does anybody else get ssl error here?
I get one on wiki.php.net in general
Some certificate revocation? ^
 
yes, it is
 
sucks.
 
yes, it is
 
@AlmaDo Are you trolling or what? -.-
 
yes, it is
 
8:18 AM
E_TROLLING
 
E_S_IT_IS
 
@RemiCollet @PierreJoye dude, that's wicked awesome; fedora 21 will be the first os in the world to have a built in PHP debugger ;)
 
oO
 
^ good news. Package?
 
#PHP 5.6 approved as a #fedora 21 system wide change :)
 
8:31 AM
Congrats :D
 
github down ?
 
@JoeWatkins: site does not seem to be down,
 
No, it isn't
 
I can access inner pages but not index
user/repo pages are working fine but github.com is not loading ... nobody else got that ?
 
8:39 AM
 
yeah I can wget it too
just firefox refuses to load it ...
 
Morning
 
oh well, don't need index, I guess ...
 
mromromrongin!
 
moin
 
8:43 AM
Guy I have a 2D array say matrix[6][9] ...how can I find out for example number 13 is in which row of the matrix array?
 
@Sean87 Loop through it?
 
If the width of your matrix is 10
y = floor(13 / 10)
x = 13 % 10

Something like that is what you are probably looking for.
 
@Machiel thanks, so that is a general algorithm and works with any NxM I guess?
 
Mornings
 
@Sean87 It should, yes.
 
8:50 AM
Morning there Dave
 
Morning
 
yo !
 
@Machiel So I guess for my need I just need x = num / arrayWidth then
 
@Sean87 Should do the trick
 
9:02 AM
morning
 
Is there a way to create a simple logger without using global state?
 
^ ?
 
one that can be used in doctrine entities etc
not using static calls
 
9
A: PHP - Implement logging mechanism to file in several classes

tereškoWhere are loggers used? In general there are two major use-cases for use of loggers within your code: invasive logging: For the most part people use this approach because it is the easiest to understand. In reality you should only use invasive logging if logging is part of the domain logic ...

 
9:04 AM
thanks
 
np. I assume it answers your question. Can't be sure though :P
 
@Fabien Reading now :)
 
@Fabien RE: Your non-invasive logger, this would only be any good when assuming that individual methods do not wish to log something specific - the only thing that can be logged here would be just the method and args called within __call() right?
Or the response - but as we're not coupling the logger to the object that requires logging, it shouldn't be returning a response just to be logged. Hmmm
@Patrick Dependency Inject your logger using a setter (so it's optional). If the logger exists, log stuff. If it doesn't don't log :-)
 
The problem is with doctrine though, we need to log when a certain method on a domain object is called. Constructor injection seems not possible, so the only reasonable option seems to be requiring the logger dependency on the method where I need the logging.
@Jimbo I thought about that, but then it's easy to forget adding that during coding?
 
9:16 AM
@Patrick Well either someone must use a logger, or it's optional. So if they must, it's a constructor / method arg. If it's optional, it's via a setter. If they don't add logging they don't, but it's easy to add it if they wish when it comes to it
Or even a method dependency that defaults to null, so if you don't pass one in, fine... but it's at least documented as a possibility
Decorating something for logging via __call() as in tereskos choice (I may be wrong so say this tentatively) means you can log three things - The method called, the args, the response. For some things that's fine. But if you want to log the results of business logic before the response is returned and after the method is called... that isn't going to work
 
I think we will go with the method arg in this case, thanks
 
@Jimbo It's @tereško's not mine :P
 
Oh yeah sorry, wrong ping :-)
 
Why not update the answer or add to it @Jimbo?
 
@Fabien He's seen the ping now so I'll wait for a response - I don't want to go randomly changing other people's work as I may be wrong :p
 
9:22 AM
Very diplomatic
 
Makes sense though right
 
Yes
 
I want to discuss some array search related thing. If anyone will have good ideas, that would be great. I need to perform search and answer the question "is an element inside array?". Array contains integers only. For that, I think to use "half-true" algorithm. 1: Create some numeric X, so for it: X & Yi == 0. Yi are in array. 2. Then, if S is tested value and X &S !=0. then S is not in array
the thing is: how effectively find X ?
also, there's not "fully true" algorithm, because if X & S == 0 there's no guarantee that S is in array
 
@AlmaDo Are you trying to figure out an array search that runs in better than O(n) time, when you aren't certain that the needle is in the haystack? Because I'm pretty certain that's impossibru
 
God damnit. We have some really really awesome code in Java that I wish I could convert to PHP, but it just seems.. impossible.
 
9:30 AM
Hi guys
 
good mornings
Happy Friday!!!
 
@Jimbo Nothing is impossible, is it sharable?
 
@DaveRandom I want to return "half-true" result
i.e. question is "is an element in array"? And I want to check fast if it's not there
notice: element is not in array != element is in array checks
 
@DaveRandom I doubt it, maybe bits if it didn't go anywhere. General gist is - it parses the keyframe audio and video data of a .flv file. It then injects these into an swf file in the right places so effectively the swf now has a video playing in it with the right video and audio sync.
It does this frame-by-frame, stretched out to the right time
It's great, but it requires us to run Tomcat for servlets
 
@Jimbo Totally doable, probably a lot more expensive in PHP than Java though. If you really want to sack the Java off I'd probably look more at rewriting it in C/C++ and creating an extension.
 
9:33 AM
@DaveRandom so with described method, I may quickly find that element is not in array
problem is how to get proper X
 
@DaveRandom I found a php C ext in japanese that I've used to replace text, images etc within a swf. That's awesome. Video is just.. FML. Seems totally impossible as that's the only lib I've found
 
@AlmaDo damn simple if you can spare some extra mem... $n[x]=1; vs $n[]=x;
 
@AlmaDo You've lost me a bit tbh :-(
 
get out of the box (array)
 
@DaveRandom huh?
 
9:35 AM
@Jimbo Does the Java use a C lib or is it written in pure Java?
 
I mean: X & S == 1 means: element is not in array. Because all other elements have X & Yi == 0
but X & S == 0 doesn't mean that element is in array
that's why it isn't like in_array()
 
why can't you make use of the hashtable @AlmaDo ?
 
@AlmaDo Yeh I get that, I just don't see how you could calculate X without an O(n) operation
 
@DaveRandom Pure java, it uses flagstone which php obviously just doesn't have
 
@DaveRandom oh, it's not a problem :p I can do it even in O(2^n) time. It's rare operation :p
but of course I want to know as best as possible way to do it
@CSᵠ how would I use it there?
 
9:39 AM
@Jimbo Well there you go, all you need to do is hack that up and rewrite it in PHP, which you can because it's BSD. It's not a small task but it's not impossible.
@AlmaDo Well it seems like the best way would be to keep it with the array and update it as elements are added
 
@DaveRandom how would I "update" it?
 
@DaveRandom Well I re-wrote the class that parses an FLV file in PHP. We don't have things like bytearray in php so that was fun... I think it's too big a job tbh, I don't think PHP is up to the task at all to do the video stuff. Crazy logic going on in there. If I rewrote it, I wouldn't know any of it worked until all the files were converted to php and worked together and then it might have been a waste of time lol
 
btw, I even don't know how to get it (i.e. algorithm). I have now this:
function getCommon(array $data)
{
   $count = count($data);
   $min   = 1;
   $max   = pow(2, ceil(log(max($data), 2)));
   for($i=$min; $i<$max; $i++)
   {
      $cur = 0;
      foreach($data as $test)
      {
         if($test & $i)
         {
            break;
         }
         $cur++;
      }
      if($cur==$count)
      {
         return $i;
      }
   }
}
but this fails for $array = [18, 20, 31]; for example
 
Hello I'm trying to create a system for ordering and create a unique serial number to distinguish the order, it's working well until one time there is an order at same time (the difference is just in seconds, about 10 seconds) and then the unique serial number become same (the serial number is increment from the last serial number in db)
do you guys have any solution for this?
 
@nayoso are you using autoincrement or are you generating the ID in your application logic?
 
9:44 AM
I'm generating the id in my application logc
*logic
for checking I'm using this
$exist = $this->db()->fetchOne("select ot_order_no from order_table where ot_order_no like ?","%".$lastNumber."%");
if($exist) $data['ot_order_no'] = $this->getOrderNo($data['ot_amount']);

$table = new Dao_OrderTable;
$result = $table->insert($data);
 
yes @AlmaDo usually I use uniqid() to generate unique value
but this time there is special requirement from my client
so I have to create it in some format
I'm using InnoDB for the DB engine
 
(facepalm) clients and their requirements ><
 
what is the format?
 
yes I know that HamZa
 
9:46 AM
@AlmaDo rewrite your logic to use instead this: $array=[18=>1, 20=>1, 31=>1]; and then just use isset($array[$number_to_be_searched])
 
the format is based on the year now, number of ordered goods by that person, and then the number of order in this month
 
@AlmaDo if you don't rewrite, then you can use a secondary array like ^
 
the duplicate is occuring in the number of order in this month
 
@AlmaDo but that's what i meant, some extra ram
 
@CSᵠ O(N) memory which isn't applicable
while I want to know only "negative" answer
so I can do it with one number only (O(1) memory, O(1) time)
 
9:48 AM
@AlmaDo Isn't it just:
foreach ($arr as $int) {
    $x &= ~$int;
}

return $x;
 
@DaveRandom so no such number?
 
(where x starts at ~0)
 
~0 is -2
 
No it isn't, it's -1
 
oh..
yeah, it's ~1 == -2
 
9:50 AM
@AlmaDo basically you are looking for the number with all the bits that aren't set in any of the array elements, which that will find
(right?)
 
$x = array_reduce($array, function($c, $x)
{
   return $c&=~$x;
}, ~0);
this
yes, that's the point
so your logic is good
with this I can update number which is great
 
Which means you can keep $x with the array and just update it every time and element is added, however if elements are removed then updating it at that stage would be O(n)
I think, can't think of a way to do it without looking at all the remaining elements but I might be missing something
 
@DaveRandom keeping $x is the intention (how else can I check something with it)
 
Btw, the cool thing about this splitting is that I now have the same powers on meta SO
 
9:57 AM
@DaveRandom I'll try without O(n)
 
anyone who have any idea for this I'll upvote and mark the correct answer
0
Q: Preventing and delaying concurent mysql insert

nayosoI'm trying to create a system for ordering and create a unique serial number to distinguish the order, it's working well until one time there is an order at same time (the difference is just in seconds, about 10 seconds) and then the unique serial number become same (the serial number is incremen...

Thanks!
 
yay. they.. share my SO rep. with MSO (wake up, Neo? )
 
Hey @AlmaDo can you come up with any real-world use cases for treating strings as arbitrarily large integers in the context of bitwise shifts?
As in "abc" << 8 == "bc\x00"
It seems like the correct behaviour to me, and I've have use cases in the past, but I can't remember what they were :-(
 
10:12 AM
"abc" is in hex?
 
@Fabien Awesome finds, both.
 
@AlmaDo No as in ascii byte values
Context @AlmaDo
 
@DaveRandom Simplifying crypto, working with "byte arrays" directly, rather than having to cast shit around.
 
> I almost deleted this picture. I took it in the middle of the day on a boat and the sun was so bright it looked like nothing was in the picture. Luckily I left it, and when I got on shore I realized how crazy this picture actually was.
 
@DaveRandom may be in cryptography - but need to find proof
@DaveRandom also - wiki is failing for me
 
10:13 AM
@DaveRandom Results in SSL error since this morning.
 
@Fabien Quote from the photographer I take it.
 
@DanLugg Yeh but why would you need to shift a byte array in the real world, that's what I'm asking. And in crypto you generally don't shift stuff about much (do you?), you generally just | & ^ things, which already works as expected
@Leri Viewable in chrome without CRL checking enabled
 
@Leri it's not since this morning. It near a week for me
 
@Fabien dangerous stuff!
 
@DaveRandom I'm no cryptographer, so as far primitive operations in algorithms, I'm not certain. I'd wager that shifts (rotations at least) are useful.
 
10:16 AM
@DanLugg rot13 ftw! :-P
 
lol
 
Could someone downvote PCRE here stackoverflow.com/tags/regex/synonyms ?
 
@DanLugg @iroegbu yeah
 
^ thanks
 
@HamZa Team 11 is on the case.
 
10:17 AM
I see :D
 
Eleven Team Productions
 
Btw, if you want free closevotes, go to the review queue and filter on
 
we all are waiting when @TOOTSKI will create mega-corporation with this name, then buy google
 
@Fabien Sharks naturally strike some sort of primeval fear in you; it's so bizarre.
You can't rationalize around it, until you've been exposed to them (as say, marine biologists, divers, etc, would)
I mean, it makes sense to be afraid of 900 lbs of teeth; but I wonder how much of an impact "Jaws" really has had on the populace.
 
lol
Oh dear, you're still doing it wrong.

With this approach, we're going to end up with

    Meta Stack Overflow, the meta site for Stack Overflow
    Meta Stack Exchange, the meta site for Stack Overflow
(:
 
10:22 AM
lol
"I got bullied on Meta. I want to bitch about it. Where should I take my bitchery?"
"Propose a new Stack site; perhaps Meta-Meta Stack Overflow"
"BRILLIANT!"
^^ Or, of the existing tools, Reddit.
 
@DanLugg Well I attribute my arachnophobia to the film.
 
I think, if I have children, I won't show them those movies; Arachnophobia, Jaws, etc.
 
@DanLugg I thought reddis is meta-stack-exchange
 
I'm installing a legit copy of windows 7, for the first time in my life. In virtualbox. But still. I have a legit cd key in my hands, and it feels dirty. Might just crack it anyway so I feel better.
 
I got a legit copy on my bookshelf. I know them feels.
 
10:32 AM
@Jimbo Can I have it? Mine keeps nagging.
:-P
 
@DaveRandom I've realized that there's no way to get new X on deletion that isn't O(n) (because of dependence from whole set)
 
@Jimbo Where do you work btw? Unless you're not at liberty to say :)
 
@Fabien It depends if, after telling you, you plan on murdering me for my copy of windows
 
heh. I have my own legit copy thanks to @DaveRandom pointing me to a cheap place for OEMs
 
noice
I work in Preston
 
10:40 AM
I meant where as in company more than location :P
 
I want to add some pictures into internals book :(
 
@AlmaDo kittens ?
+1 for kittens ...
 
@JoeWatkins no.. Pictures for zvals, reference count handling, buckets and hash tables. I understand the concept all good - but so much plain text. It would be great to have some schemas after corresponding paragraph (so to remind past things one look would be enough). I know, that for those, who work with PHP code long time it's redundant - but for them whole internals book is also redundant
 
What do you do there@Jimbo?
 
10:47 AM
+1 for kittens
 
sigh
 
-1 for no kittens
 
@Fabien Well we help automate the creation of digital and print advertisements, so we have php that does a lot of the heavy lifting displaying everything (custom framework), advertisements are rebuilt using java, we flight ads to be served by places like google adsense etc
 
Should I track composer.lock?
 
@bwoebi here are good samples (not kittens)
 
10:49 AM
So publishers like Johnston Press use our services for their own individual advertisers, that make ads using our platform and then push them to adservers
 
Lots of money in advertisers
 
@Fabien Yep, we're growing quickly
 
http://stackoverflow.com/questions/23131141/mercadolivre-test-user-i‌​ssue
 
@AlmaDo vote to close
 
@AlmaDo ping niki or anthony ... I have not much faith in technical diagrams, anything flicked up on a projector during a meeting only really makes sense to the person who wrote it and is only there so nobody has to make eye contact with the speaker ... if I want to understand how code works then I have only one way of doing that which always works ... read it ...
I'd rather see the book assume you know what a hashtable is, or can reserach that extremely generic topic, and cover things that are more relevant to php in particular ...
 
10:58 AM
@JoeWatkins but hashtables diagrams & schemas are very useful..
 
@Jimbo I have no problem wih paying for roughly 1 in 5 Windows installs. It's not that I think they don't deserve any money for it, I just don't think they deserve as much as they ask for
 

« first day (1279 days earlier)      last day (3651 days later) »