« first day (1012 days earlier)      last day (4162 days later) » 

16:00
@tereško for what ?
Mainly used them for breaking things, or straightening bent things.
8 mins ago, by Alucard
someone found out the solution of base64 images in gmail ?
@Leigh exactly. You can do it, but there are better tools for that
@Alucard this sounds like a request for performing research, which is something that people usually pay for
...
16:01
@ircmaxell what is this?
it's called the Denver tool, or TNT tool
it's an 8 pound sledge hammer, an axe, a pike and a wedge in one tool
when it absolutely positively needs to come down today, and stay down...
^ that should be featured in some murder-mystery
that was my baby when I was on the fire department
@ircmaxell the website claims 5 tools in 1, you're missing one :p
16:03
@Leigh ram?
I held the record for getting through a wall with one of them. 4 seconds. break the sheetrock, and pop through between the studs...
i think he wants it to have wifi connectivity
@leigh crowd control tool
also croquet mallet
@tereško hum, you got a point... I'm doing the research now, I'll take only 20%, up for it ?
16:07
@ircmaxell May I ask if you were EMT as a voluntary or paid?
So you were doing this on top of another job?
well , he's a socialist
I wanted to do this as a firefighter but this country doesn't allow foreigner to be in their team...is it the case for EMT?
16:11
@ircmaxell I like that recent blog post of yours
@cheesemacfly Honestly, I'm not sure...
@Gordon thank you
@ircmaxell well, that's what I though :( But great blog post anyway
thanks
@ircmaxell I RT'ed an HBR blog post a few weeks back that's goes in the same direction. In case you missed it: blogs.hbr.org/cs/2013/04/what_job_candidates_really_wan.html
@Gordon I did miss it, thanks for pointing it out, reading now!
16:14
Does anyone know if composer has issues with branches that have capital letters in their name when also specifying Github as the repository?
e.g. This works:
"repositories": [{
"type": "vcs",
"url": "/documents/projects/github/DanackGuzzle"
}],
"require":{ "guzzle/guzzle": "dev-OauthOptionalVariables as 3.7.1-dev" }

This doesn't work:
"repositories": [{
"type": "vcs",
"url": "https://github.com/Danack/guzzle"
}],
"require":{ "guzzle/guzzle": "dev-OauthOptionalVariables as 3.7.1-dev"}
The only difference is the local repository vs the github repository.
@Gordon I like that. A lot...
user895378
@ircmaxell I generally agree with you. I'm successfully offloading tens of thousands of asynchronous calls per second to worker processes and I vastly prefer non-blocking event loop concurrency to threads. But there are a few places where I could make good use of threads just because they're not nearly as heavy as new processes.
user895378
I like non-blocking concurrency a lot more than threaded concurrency.
There's nothing wrong with thread-per-core for heavy batch processing
user895378
Not at all.
16:17
Oh, I'm not saying that threads aren't useful... Just they are a hard enough problem that I think the process-separation is easy enough to reason about...
@ircmaxell Incidentally, I wanted to write something similar like you did, too. I didnt because then I found the HBR article and it expressed most of it already nicely so I just made it into a tweet :)
Well, I see both posts as complimentary. Mine was me (partially) figuring out what direction I wanted to go, and the HBR is about companies realizing that's important. I think they compliment each other quite well
@ircmaxell yupp, it's like your post is proof to the HBR post.
On a side note: let me know when you found out a role that best fits what you want to do. Because I want to do it, too and still haven't found out how to do it. or rather where to apply as what.
And the same to you! Because I'm not sure yet... Although I have been getting some interesting emails...
lucky you :) I didn't get anything but Senior Dev jobs.
But I found some interesting roles at Google today. Check google.com/about/jobs/teams. A few of those are really interesting when you want to work with and improve teams.
Like in People Operations and Technical Client-Facing
16:26
My last position (before the current re-org) was a management position. I was technical oversight over a team of 40... I worked on maybe 2 projects a year, but mostly focused on the team...
I'd like that
there was another manager over the team who handled the day-to-day management. Basically a VP of Engineering - CTO relationship (I was CTO role)
It was immensely rewarding.
The problem with being a freelancer is that you dont get into a CTO role easily because they want you to have a track record leading people
It's one of the reasons why I consider changing to employment/permanent position
yup. that's the exact road I took here
came on as a senior dev, did one project, was promoted to an architect and given the project I talk about in that post, did that, was promoted to manager and given co-ownership of the larger team. did that. And now basically do nothing...
that explains why you spent so much time on reddit ;)
16:32
it was nice for the first few months. Being able to sit back...
but now it's just getting unfufilling. And there's a job open for me if I want it (another promotion), but I don't because of who it reported to...
my other choice would be to build up a reputation as an agile coach and do trainings and project consulting. It's one of the reasons why I'll try myself at IPC with an agile topic.
another promotion? what role is above CTO? Uberchief?
No, not actual CTO
the role of.
ah I get it
meaning the dynamics of vision vs management between the two of us...
@ircmaxell that's mostly marketing and PR, isnt it?
16:39
I was thinking... Google is now using PHP for App Engine. Perhaps they need an external evangelist to go out and promote that ;-)
@ircmaxell Evangelists are not in that category. Let me fetch the right one
Ah ok
but yes
I found those to be quite interesting, too
you'd probably get paid less than now though. I googled salaries for these job titles and it seems to average at $95k. But that was just at a glance, so might be off.
yeah, that's not quite what I'm looking for ;-)
16:51
it actually came out? Awesome sauce! I'm buying mine on Tuesday
or maybe today
thanks
Guys I am stuck on problem can not find any solution. :( stackoverflow.com/questions/17823531/…
Thanks for your help but it did not solve my problem. — Someone 14 hours ago
@Someone protip: explain why instead of just stating that
Having some trouble I hope you guys can help with
I am listing some files in several folders
17:04
@Gordon thanks for your quick reply. As you see from the link there are solutions for the problem. But none of them work as intended. I gave the reasons for each solution in the link.
There are thousands of folders & files (this is a media storage device), and I found it faster to use the dos command dir to list the files in the order that I want
So I am using exec to execute some batch scripts that list the files I need, sorted by modification date. I'm then parsing that list and checking on some things related to the files within the folders
Some of the files have accent characters or other such. When I get the return back from exec, these characters are replaced with spaces
foreach (new FilesystemIterator('/path/to/dir') as $fileSystemObject) {
    echo $fileSystemObject, PHP_EOL;
}
@Someone this should do it ^
ok @Gordon . Just let me try.
I definitely tried the filesystem iterator, but it is way slower
I need only the files that have been recently modified. If I use that method, @Gordon, then I have to check within PHP on the modification stamp
Using the dos command, I can simply sort by modification date, and stop parsing the list when the text timestamp exceeds my threshold.
BUT, then I have these character encoding problems.
With the FS iterator, the script would take over 2 minutes to traverse all these folders... with the DOS command, I get the sorted resultset back within 1 second.
@Chris if you want to monitor file alteration, there is better ways to achieve that
17:10
@Gordon Fatal error: Uncaught exception 'UnexpectedValueException' with message 'FilesystemIterator::__construct
Well, fair enough to make my goal clear: I am looking for files that have been added since the start of today's date
Or created
12
Q: Fastest way to compare directory state, or hashing for fun and profit

jhogendornWe have a PHP application, and were thinking it might be advantageous to have the application know if there was a change in its makeup since the last execution. Mainly due to managing caches and such, and knowing that our applications are sometimes accessed by people who don't remember to clear t...

It is a huge music library, so Artist\Album\01 song.mpg is the format, there are ten thousand or more artists, each with at least one album
@Chris I suggested to use FAM but inotify is likely better
Hmm, will check them out-- have heard of neither
I am on a Windows server for this, but I can configure it however I'd like so if it is possible on Windows I am not arbitrarily restricted from adding some module or whatnot
I had even considered writing a monitor in a different language, but I hadn't followed that route up at all yet... I feel like I am SO CLOSE with the approach I am using. Then... they added a Spanish language album and the internet exploded
17:13
@Chris gah, inotify doesnt work on windows iirc
but you could check whether its possible via COM
Skimming... this is going to be tough
The media drive I am checking is a network share
@Babas answer to that question has something for Windows
Which is yet another layer of complication, AND incidentally what pushed me off to this sort of "hillybilly" approach using exec and DOS
Yeah, skimming his stuff now
Thanks for the link, Gordon
(even though it means throwing out what I have and going in a different direction :()
38
Q: Is there anything like inotify on Windows?

johanssonI like the inotify subsystem in Linux. However, I'm mainly a Windows user, so I was wondering if there's anything similar?

hi
17:18
@Chris you can also try wmic if you got that installed. or powershell. you'd still need to exec them but they might work better than what you tried so far.
i have a doubt
any one to help
i have a data like this

Amazon_Marketplace_Reports_ListInventoryReport_Results Object
(
    [outputArray:protected] => Array
        (
            [ReportRequestId] => 7602145812
            [GeneratedReportId] => 11788887823
            [Report] => sku	asin	price	quantity
0010900	B005KDEHB0	5.99	33
0011023	B002C0ANW6	47.33	60
0033720	B003BHWVOM	81.70	3
wearehousestock pp338pt	B00381U05I	150.00	0
wrehouse KZ519	B000BC2GGS	60.00	0

            [ReportProcessingStatus] => _DONE_
        )

    [lowercaseKeyMap:protected] => Array
how can i get only the

sku asin price quantity
0010900 B005KDEHB0 5.99 33
0011023 B002C0ANW6 47.33 60
0033720 B003BHWVOM 81.70 3
wearehousestock pp338pt B00381U05I 150.00 0
wrehouse KZ519 B000BC2GGS 60.00 0
didnt you just ask that yesterday? and didnt we tell you to ctrl-k your code?
i did that but it doesnt return anything
you did what?
that hamza and salathae
asked me to do
user1125394
17:23
guess in what month this date is.. SELECT SUBDATE(NOW(), dayofmonth(NOW()))
it was for getting the asin spearately... but i think we have to extract the Report stuff separetly
before we proceed with that stuff
@Gordon it worked and gave me result like that: Main Directory\Directory1 Main Directory\Directory2

But I want something like that:

Directory: Directory1
File: File1
File: File2

Directory: Directory2
File: File3
File: File4
@gordon
@Manoj do you know what protected means? if not, have a look at php.net/manual/en/language.oop5.visibility.php. Then look at your object dump, specifically at your outputArray property. That will likely explain why you have trouble accessing outputArray['Report']. If so, check if your object has a method to fetch the outputArray.
A blog post of mine has been referenced from Wikipedia: en.wikipedia.org/wiki/Monad_(functional_programming)
17:27
@ircmaxell you put it there yourself, you shameless plugger ;)
Nope
and yes, I am shameless, we established that a while ago
@ircmaxell but you wont pose naked in your YT videos to get more viewers. Hypocrite! ;)
ummm, I want more viewers, not less
point taken
@Someone the $fileSystemObjects are php.net/SplFileObject instances. Check their API. They have methods to achieve that.
17:35
ho
is there a way i can cache echoed data?
so i do not have to send a request to a api?
@EliteGamer yes, you can cache both. with a cache obviously.
both?
ok, well, i am using the twitter api, so i make a connection like this:
$connection = getConnectionWithAccessToken($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);
the request to the API is likely worth caching more since it likely is slower due to the request overhead
yea, that is why i want to cache, it is slow
so, how would i do that?
well, make a file with the data
17:39
grab a cache library and wrap the call
what about adding it to a file?
and see if it exist?
is that slower?
Hello
I'm trying to send data in post method using curl
@EliteGamer A cache basically works by serializing the return of a function call into some sort of backend, be it memory or file or whatever and unserializing it from there on subsequent calls. file i/o is slow in general but its likely faster than doing an HTTP request. However I am not sure you can cache that particular call.
Its an API and I need to send key and id in post method
Can anyone tell me how can I send data with field name in cURL
?
34
Q: How do I send a POST request with PHP?

Fred TanrikutActually I wanna read the contents that comes after the search query done. The problem is that the url require only "post" method, it does not take any action with "get" method... And I have to read all contents with the help of "domdocument" or "file_get_contents()" I want to know anymethod tha...

17:46
If you've asked a question that turns out to be a dupe, and isn't insta-closed, should the appropriate action be to delete it? Or leave it open so the eventual dupe close directs subsequent users to the existing Q/A?
@Gordon here is what and how i echo: echo json_encode($Data);
@gordon okay thank you... let me try that
so, i want to get what ever that returns...the Data, put it in JSON, then store it
@Bracketworks depends. Are there decent answers?
@ircmaxell None yet.
17:47
I'd delete
Alrighty, I figured that would be most appropriate.
I'mma leave it for as long as it takes to pee and smoke. If it's still just dangling, I'll cut er' loose.
@EliteGamer I think you have to expand more on your scenario for me to give a proper suggestion.
(I just re-read that, and the pee reference doesn't sound good with words like dangling and "cut er' loose")
Thanks Gordon
It worked
:)
basically, i want to cache the data echoed, and if the data is more than 1 min old, then, make the connection to the api.
again
to re-cache
17:56
@EliteGamer well you dont cache the echo. you cache the json_decode
http://Reddit.com: What would you change about PHP if you could dictate the next major version?... http://bit.ly/1bhIvDi
That's trollbait on it's own already. I don't even dare to think what it's like on Reddit! Not clicking!!
I would change its name to Python
@Gordon it's actually not bad
@Gordon oh, ok. how would i do that?
@ircmaxell it's on Reddit. so by definition, it's bad ;)
actually, what is the fastest way?
to get the data
file or?
20 mins ago, by Gordon
grab a cache library and wrap the call
18:00
@Gordon what's more disturbing is the complete lack of content in that site .. when your "news" are actually a link to reddit, you should start thinking about shutting the whole thing down
i have never used a library for php..how is that done?
@tereško then produce something worthy of him writing about
@EliteGamer you download the files and include them.
this week i have been only collecting receipts
@tereško you gonna start a cooking business?
18:10
no , spending money on snacks
oh you said receipts not recipes. my fault
/me wants to eat recpits
have you seen specialist about that ?
posted on July 24, 2013 by Anthony Ferrara

For the past several months I have been struggling to figure out what I want the next step in my career to be. I am still trying to figure the details out, but I had an important revelation last night. I want to share that revelation with you. Read more »

is it only dangerous/bad to use the extract() function if you are extracting data from the request into variables but it is ok to do it if you are extracting your own array like data a View retrieved which you defined?
basically
I can't see how it would be dangerous if you defined the variable names
hola people
should mysql_close($db) be called before exit? or does exit do that automatically?
@tereško whats you view on this
18:26
@bushdiver happens automagically
@bushdiver no , you should not have any mysql_* functions in your code
@David well .. i would never do that, but if you use extract(), it should be done in a controlled scope, where it cannot overwrite any variables
also there is an option for the extract() function to regulate that
@tereško so just use exit and dont worry about the database connection closing?
no , use mysqli or pdo
Is mb_convert_encoding($variable, 'HTML-ENTITIES', 'utf-8') the best way of converting text to UTF-8?
How can I check if .mp4 exists in this string or not with preg_match() ?
How can I check if .mp4 exists in this string (Media/Cinema/funny/mp4/anothervideo1.mp4) or not with preg_match() ?
18:31
@Someone why would you do something like that ?
@tereško ah yes I see it. how do you convert the data you need in your template into local variables like $name, $emailAddress etc
without doing it manually
@tereško i dont understand what you mean, I should use: mysqli_close; exit; ?
@David in template i use extract() , but you were talking about getting data from request
@tereško "but it is ok to do it if you are extracting your own array like data a View retrieved which you defined?" I should have added the variables are for the template
because I use extract
@tereško I have a list and from the list I want to get only those which has .mp4 in it. Do you know solution?
18:33
@bushdiver for MySQLi and PDO instances, the disconnect is done in the destructor
@Someone $haystack = "Media/Cinema/funny/mp4/anothervideo1.mp4"; $needle = "mp4"; if(strpos($haystack, $needle) === TRUE) return $haystack;
prbly not the best way but it should work
@Someone strpos()
I win @tereško :)
@tereško I am doing it correctly so. I just got a bit paranoid when I saw some articles with people saying "there is no use for the extract() function"
@Daniel no, you loose , because it will NEVER return true
18:35
ah damn copy/paste, yeah will need to be !== FALSE
there's another str function that will return true, can't remember the name though
Ok thanks to both of you. @tereško and @Daniel
strstr()
@Daniel it's slower
18:36
oh is it? yeah then I'd go w/ strpos if preg isn't an option
single mom: "preg isn't an option" :)
poor attempt ^
user895378
@David extract() is horrible for readability. Variables magically appear. It should be avoided almost uniformly out of principle.
@rdlowrey I think I have done something wrong in the Socket listener (includes/socket/Socket.php) … it comsumes way too much CPU time?!
user895378
@bwoebi taking a look ...
@rdlowrey except for templates
18:37
lol @ poor attempt
user895378
@tereško Right you are, sir.
@rdlowrey if you did not use it for templates though it seems like a lot of manually creating the variables
anyone have an opinion on if mb_convert_encoding($variable, 'HTML-ENTITIES', 'utf-8') is the best way of converting text to UTF-8?
@rdlowrey or are 5% CPU in idle normal?
user895378
@David Think you're CPU will overheat from those variable declarations? I don't, and readability is far more important.
18:39
@David it might be that the article was either aimed-at or made-by noobs ... when you are trying to explain something to a complete noob, it is better to use simple black&white options: goto bad, injection good, extract bad
user895378
@bwoebi No ... that's not what you want. Hold on i'm pulling it up.
later when the noob has acquired some experience he/she will be able to recognize that not all "best practices" in programming are just black and white
user895378
@bwoebi FWIW your inconsistent function name capitalization makes me crazy :)
user895378
public function PollSendTo()
public function sendPolls()
hey boys and girls
18:41
@tereško you forgot eval - awesome.
hey john blythe
@rdlowrey You don't like camelCase?
@rdlowrey public function reFacToRing()
5
user895378
@bwoebi I do, but I don't like StudlyCaps mixed with camelCase :)
working in a codeigniter app. have MY_controller.php in /core/ being used as the base for all controllers. it has routing options based on the user type (we have 2 aside from admins). everything works fine, but if you hit the back button from the page you were routed to then the routing breaks down and it goes to the wrong page.
it only seems to happen with user type 2, vendors.
user895378
@tereško well played!
18:43
so if a vendor logs in they get routed correctly. they hit 'back' and then they land on the landing page for non-vendor users, user type 1.
hi all ! someone know why if user login and when he click some where before page completes loading he will be logged out. any suggest ?
@rdlowrey But I think Poll and WebSocket are the only prefixes which begin with a capital letter?
but I'll change that
this really confusing , some cant wait till page finished loaded .
@Orangepill sometime , actually. But in really specific cases.
@echo_Me don't regenerate session_id on each page load only after login.
@tereško but that is something every noob needs to know
18:45
@Orangepill that's something no noob should get wind of
@Orangepill you looks right , but i have regenerate session_id in function which create session_start and regenerate session id , this function is to use secured_session_start wait i will post my function.
@echo_Me crux of the problem is that the page has to load fully to ensure that the user has the next session_id ... if you regenerate it every time the user's session cook will get out of sync with php's session.
`function sec_session_start()
{
    $session_name = 'sec_session_id'; // Set a custom session name
    $secure = false; // Set to true if using https.
    $httponly = true; // This stops javascript being able to access the session id.

    ini_set('session.use_only_cookies', 1); // Forces sessions to only use cookies.
    $cookieParams = session_get_cookie_params(); // Gets current cookies params.
    session_set_cookie_params($cookieParams["lifetime"], $cookieParams["path"], $cookieParams["domain"],
this my function , do you think its better to remove regenerate_id
Eveningingigng
18:50
jo jo
@Orangepill you think its better to set session_regenerate_id(false); ?
@Orangepill Im useing this function to call sec_session_start instead of session_start
18:56
2
@Orangepill... just remove the call...only call it after you successfully log in
user895378
@bwoebi I don't see any glaring reasons for your high-ish cpu usage, but it's a little difficult for me to tell what's going on because your method of writing non-blocking code is 1,000% different from mine. It's extremely difficult to write coherent event-loop code the way you're doing it. For example compare that to this simplified version of the way I accept clients:
user895378
    public function start() {
        $this->serverSock = stream_socket_server($address, $errNo, $errStr, $flags, $context);
        stream_set_blocking($this->serverSock, FALSE);
        $this->acceptSubscription = $this->reactor->onReadable($this->serverSock, function() {
            $this->accept();
        });
    }

    private function accept() {
        while ($clientSock = @stream_socket_accept($this->serverSock, $timeout = 0)) {
            $this->onNewClient($clientSock);
            if (++$this->cachedClientCount === $this->maxConnections) {
@Orangepill if i remove the call in other pages it means i remove the session_start , you see that session_start is inside the function

« first day (1012 days earlier)      last day (4162 days later) »