« first day (1127 days earlier)      last day (3815 days later) » 
00:00 - 20:0020:00 - 00:00

12:05 AM
there are only 1000 questions like that already in stack overflow
 
12:27 AM
hi, why would this result with a infinite loop ?

if($this->uri->segment(3) != "login" || $this->uri->segment(3) != "forgot"
|| $this->uri->segment(3) != "reset" || $this->uri->segment(3) != "logout"){
if($this->user_m->loggedin() == FALSE){
redirect('admin/user/login');
}
}
 
@CastielMartin CodeIgniter?
 
yes it is
 
@CastielMartin Is that like a trick question? redirecting to 'admin/user/login' will always mean that $this->uri->segment(3) != "forgot" is true....
so it will redirect again.
 
@Danack oh damn sorry i think i need to sleep
thank you for remind me to sleep :)
 
@CastielMartin OR GET DRUNKER!!1!
drinking and coding never turns out bad.
 
12:31 AM
@Danack better idea :)
 
 
4 hours later…
4:51 AM
hi
 
 
3 hours later…
7:49 AM
What's the way to pass a class (not just a class instance) as a variable?
 
::class
 
ok thanks
 
8:06 AM
doh, php 5.5
 
8:19 AM
Hello everyone
 
user652649
morning
 
morning
 
hi to all
I installed and {{block type=”featuredproducts/listing”}} this code put in content area but no output in home page
in inchoo extenstion magento
 
8:38 AM
@Hamster sounds like you are using static variables/functions all over your code
 
8:58 AM
good morning
 
9:27 AM
@KamranAhmed This is the PHP room, you're probably looking for the javascript room.
 
2 messages moved to JavaScript
@vascowhite Correct.
lol, now it's twice in JS room ;-D
 
@bwoebi shouldn't move messages to other rooms, just bin it. They get pissed when other rooms move dump questions to them.
it's an unwritten rule to just bin.
 
I don't know them all yet ;-)
 
That's the problem with unwritten rules, you don't know about them until you break them.
Is it just me, or is this not the correct way to use date_default_timezone_set(). I think it should be in php.ini or used once at the most in your entire app. Using it like this all over your code, could have unexpected results couldn't it?
 
@crypticツ write the unwritten rules once please :-)
 
9:36 AM
@bwoebi there was disapproval from some members regarding the chat pact being created, not wanting rules to dictate the room and that things had worked fine beforehand for years and all. So will refrain from such rules unless there is group consensus among owners. I'm going to add a short snippet to the pact stating that they are not really rules but guidelines to make the room less annoying to other members, etc...
 
@crypticツ I thought the chatroom pact wouldn't include moderative actions… (afk)
 
it doesn't, but it would be another set of 'rules' that might garner criticism from other owners.
Anyways a room owner should use best judgment based on their position to do the right thing, even if it is a learning process sometimes. I don't think we need to write anything formal out.
Only reason pact was made because we had to repeat ourselves so many times, and with more and more new people coming to chat it was increasing. So putting a list and linking in room desc, hopefully is a way to preemptively combat that with some new members, and giving a helpful nudge to the list item in pact to tell them what proper room etiquette is as well.
We can't ban them for being bad, but we can point out that hey what you are doing is annoying to other members and disrupts the chat, or it is working against you in receiving any help.
 
10:17 AM
good morning, minions
 
Mooooorningaaaana =]
What a wonderful dayh
 
Morning
 
:p
 
@Fabien Morrrningaa
 
10:41 AM
Morning
Question to everyone: how do you handle database migrations (in the rake sense)? how granular do they have to be? what tools do you use?
 
@JoeWatkins is dbg the new debug
 
11:03 AM
@RonniSkansing it's the new debug :P
 
@webarto hehe
I have setup the 0.0.2dev and will try it out
 
So... it's Saturday. How about them Saturdays aye?
 
> Same as every other day. Woke up, felt like shit. Went to work, felt like shit.
 
:P
 
11:15 AM
I have a web site and it's links are like this format.
mysite.com/index.php?ctype=female

Can i write aa code to htaccess file to change the url are like mysite.com/female

If i modified like this site will working without errors ? I mean some url parameters are getting to some pages to display details.
 
@SumithHarshan So mysite.com/male would be mysite.com/index.php?ctype=male
 
yes
like this.
mysite.com/index.php?ctype=male should be mysite.com/male
 
So what's the problem?
create the htaccess rule for it and then try it out by going to /male
 
my problem is if i do this using htaccess that page details are displaying / pages are working fine? Because url parameters not going via url
 
I don't understand the question.
how are url parameters not going via url
 
11:37 AM
You know something that's always bothered me...
var_dump($a); // Notice: Undefined variable: a
$a[] = 'stuff'; // No error
 
hi
 
@Leigh or... $a = ''; $a[] = 'stuff';
 
even worse:
$a = '';
$a[] = 'a';
var_dump($a); // [0 => 'a']

$b = 'b';
$b[] = 'b';
var_dump($b); // PHP Fatal error: [] operator not supported for strings
 
Yup, yup, that.
 
But of course gettype($a = '') == 'string' :p
 
11:44 AM
naturally
Oct 29 at 22:14, by webarto
Can someone explain this: http://3v4l.org/iA7E3#v432
 
Looks like a bug in the opcode output, ' ' is shown as '+' too :p
And of course no easy way to contact the author
 
No way to contact the authorr?
 
i'll just use the email from the whois info :)
 
12:14 PM
@Leigh You may have more success with twitter: twitter.com/3v4l_org
 
Anything that requires me to sign up for a new account is negative success
 
If author hid the contact data, that might mean something, so, just don't bother...
But, isn't that bug in VLD (if it's a bug) ?
 
Not sure, if it is, then hope it gets passed upstream
might be intentional for all I know
 
it probably is
it's php :P
 
@Leigh it most certainly is...
VLD does an URL-encode on strings before dumping
 
12:28 PM
@NikiC Output of "\7" is shown as '%07' - looks like an encoding artefact
 
it is urlencoding ..
 
Ok, well I didn't know that :)
 
@Leigh that's the point ... A plain "\7" happens to be rather hard to see by the untrained eye ;)
 
i would have expect it to be left as "\7" in the dumped output
 
hehe ... 4.3 is way way faster than 5.5 ... maybe branch 6 from 4.3 ...
 
12:35 PM
:O
 
@JoeWatkins hey installed phpdbg, gj
 
1:06 PM
@Fabien ping me when you're around if you want another match :P
 
@MadaraUchiha Sure, let's do it.
 
@Fabien Room created
 
Hi there, guys.. Is anyone familiar with nginx? I am wondering - if I create a Virtualhost inside sites-available/ directory, does the default.conf file in the /etc/nginx/conf.d/ directory affect the file in the sites-available directory. I am asking this, because I want to set some default settings for all the sites in the default.conf
 
@MadaraUchiha Are there many jobs with PHP in israel? like in companies, not just freelancing
 
@CvetomirLazarov The only file that gets loaded directly from nginx is nginx.conf. If your default.conf is included from that file, then yes it will be used - if not, then it won't.
 
1:20 PM
@Danack Okay, I will check it. Thank you :)
@Danack So, at the end of the file, there are 2 includes.

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

So, it is included, I guess :)
 
I guess, also.
 
does anyone use this for Nginx? github.com/nbs-system/naxsi a default config is bundled with Nginx, so I assume it must be rather popular.
 
I hate it when the answer is in front of my eyes and I can't see it..
 
@crypticツ Just always use prepared statements, then you're safe from SQL injection from all data sources, not just ones coming through web requests.
 
@Danack I know that, but if say you are using 3rd party packages, you have no control over how they did their security.
 
1:28 PM
I guess, don't have much experience with having to do that.
 
There is soo much code to be seen...
Is there any approx release date of 5.6 ?
 
@RonniSkansing wiki.php.net/rfc/releaseprocess I think they are following this
 
@crypticツ thank you just what i did not manage to find.
hehe
" PHP releases have always been done spontaneously, in a somehow chaotic way. Individual(s) decided when a release will happen and what could or could fit in. Release managers role are unclear and the way to nominate them is not clearly defined either. "
 
1:46 PM
@crypticツ containing 99% of known patterns involved in websites vulnerabilities, reminds me of the saying Never use a blacklist for security purposes
 
^ yay
 
@JoeWatkins 90+% of that is module startup etc, not the time spent in VM
 
@ircmaxell You know how cryptocurrencies use hashing for a proof of work right? Can you think of anything more "useful" than brute forcing a lower value hash that could be used as a proof of work? Something computationally difficult which would ideally be suited to distributed computing, yet easy to verify when a result is found.
 
I agree, but here is food for thought: whitelisting (only allowing) [a-z0-9] chars in a query is the same as blacklisting (not allowing) [^a-z0-9], no? Not much of a difference. They both do the same thing, just one is a negative match. Maybe I'm not seeing the big picture. But a whitelist can be turned into a blacklist with minor modifications and still achieve the same thing and vice versa. Now of course that all depends on the type of matching being done, my example is a basic one.
 
Factorising the large primes used in pubkey comes to mind, but not really useful in general
 
2:15 PM
@Fabien wow that guy is hard to understand XD
He speak Japanenglish, and super fast
 
lol yes, it can be. You sort of understand more as you go
 
2:29 PM
So @Fabien any luck with that PHP go project? :P
 
Not started or thought about tbh.
got a lot of reading to do first with all the new books
 
What is cheaper - to buy VM workstation (600+ euros) or buy MacBook? :D (The goal is to develop under IOS with Xcode)
 
@AlmaDo hackintosh?
 
@Leigh huh.. sounds bad :p Is that legal? I can, for example, find hacked VM on torrent, but I don't want to do that
 
@AlmaDo No it means build an intel PC and install OSX on it
 
2:34 PM
@Leigh ah.. well, that will mean - to buy new PC
I have not free one to experiment with
 
@Leigh there's tons of examples like that
@Leigh that was the first that came to mind
 
@ircmaxell So why has nobody created a alternate bitcoin-like currency where the proof of work is actually beneficial to humanity, and the computational effort used to generate the proof of work isn't a "waste"
 
@crypticツ no, it's very much not. White-listing enumerates the domain. Which is 100% clear. Black-listing is the inverse of the domain. Which means that unless it truly is infinite, it has holes. [^a-z0-9] is actually a white-list, since it enumerates only the possibly acceptable values, and rejects everything else...
@Leigh I have no idea
ease of gaming the system?
The whole point of the sha-256 proof-of-work that bitcoin uses is based on the premise that no efficient means to calculate a collision in sha-256 exists.
if you, for example, calculated the digits of PI, then someone could invent a more efficient algorithm, and the whole premise of the currency falls appart
 
the protocol self-adjusts "difficulty" required to generate new currency, if someone comes up with a more efficient algorithm, then pretty soon it'll require 10 new digits instead of 5 to complete a block (for example)
that's why you can now only mine bitcoin efficiently with ASICs, because since people started using them, the difficulty has adjusted so that is now the only viable method
the scrypt based currencies are still perfectly doable using GPUs
 
nooo, any algorithm that's more than trivially more efficient would kill the whole system...
the difficulty has adjusted because a lot of people have ASICs
 
2:42 PM
well, the same thing is true if someone finds a way to do chosen prefix attacks on sha256 (which counts as more than a trivial speedup :))
 
initially, when they first came out, a few ASICs dominated the entire pool, and threatened giving power to only a handful of people
@Leigh which is exactly why I said the entire point of bitcoin is premised on the belief that it's impossible to do that with sha256
if it turns out to be possible, the currency will crash and dissappear...
 
morning
 
Taking factoring primes as an example, if someone finds a way to break it, it's more than just the currency that's screwed
 
Well, yes, a lot of things would be screwed
 
3:05 PM
Good Morning
 
morning @PeeHaa
 
Pffft, @Fabien these guys see like 20-30 moves forward
 
having a problem to implement twitter bootstrap carousel, images are not centered
 
lol 20-30 with 20-30 variations
 
Yeah :X
Alright
Let's play some random games :P You can watch if you want
 
3:14 PM
You think "But they're professionals, so it's to be expected" but seriously, the way these guys play feels as far away from me as someone who is 3 ranks above me :p
Coolio
Ill be speccing
 
What are you playing?
 
Go I am tutoring him.
 
but that's an analog game!
and it has terrible graphics
 
@Fabien nerds =oP
now, how do I play? =oD
 
@crypticツ go is beautiful :P. It should be way more popular than chess.
[Here's](playgo.to/iwtg/en/) the best beginner tutorial I know of
 
3:20 PM
Dunno what I was expecting XD
 
@MadaraUchiha "You must lose your first 100 games"
 
Thought that was 1000
 
You did decent, you simply let him take more space at the beginning :P
keep going and you'll win
try and start as black too
 
3:37 PM
omg, this tutorial is so fun! =oD
 
@crypticツ Well @MadaraUchiha and I have been looking for another person to join us teaching wise if you're interested.
offers always there if you want it.
 
@Fabien yes!
 
@Fabien invite me if you want :p as you remember, I wanted to learn playing Go too
 
Awesome :)
 
how many players there?
 
3:40 PM
@AlmaDo Complete the tutorial
it's a two player game but when people start at the same time they can learn from each other.
Actually 2v2 does exist but it's not a well accepted form of the game, more for fun :)
 
huh - but that's why we play games :p to gain fun :p
 
lol yes.
@crypticツ and @AlmaDo When you've done the tutorial and you'd like your first lesson just let me know (I'm usually free if I am here). lessons are taught on GoKGS. You can use the web-client or download it. I recommend the download. You sign in as a guest and can click to register inside if you wish to save your name/game history.
 
@Fabien my guess is - cause we're both newbies, we'll try to play :p
 
I can't help but feel the wording on the tutorial was not thought out well. "Help the lonely 2 blacks by killing 2 whites in the middle."
 
@AlmaDo heh. As a bit of background info. Ranks go from 30kyu to 1Kyu then 1dan to 9dan (A bit like Karate). I found I really only began understanding the game around 15kyu. I stopped playing around 2-3kyu and I'm probably now somewhere around 6-7.
@crypticツ lol!
there is a 10dan title but it's not a real rank, it's a title, one of a few :)
 
3:47 PM
@Fabien it;s not like karate. In karate there are 6 -> 1 Kyu and 1, 2, .. dans :p But 4-th dan is almost highest level, since higher dans can be achieved only for efforts in popularisation & development of martial arts and karate in particular :p
 
I just meant there's like 2 levels. :P
coloured belts then black
 
coloured belts.. huh, they exist in karate, but not in japanese martial arts :p
 
karate is Japanese martial arts
 
you can tell japanese words quite easily, because they all break down into a very specific set of sounds, ka-ra-te
 
Which means "Open Hand"
 
4:05 PM
So I just got my first "real" client and he is asking for a quote. I have heard that people use hourly rate for something that would only take 1 to 3 days(small module, bug fixing, small changes) and then a weekly rate(After being told what client wants estimate how long it will take you lets say 3 weeks and charge for 3 weeks upfront) for big projects like a new website a redesign. I was wondering what a reasonable rate would be. ~ik this isnt php related but some of u r web designers
 
You have the client, and he doesn't know the rate? aim high ;)
 
Since Im a student I was thinking $150 a week?
 
easier to think of your hourly rate IMO
 
Never go low, you're going to get taken advantage of. Go high and get talked down by all means, but never go low to start with
 
I am X per hour, I calculate the build will take X amount of hour (+ 1/3). So the estimated cost of the project is blah.
Your value per hour is related to your ability too.
 
4:08 PM
any suggestions? I'm a student and by no means a pro.
 
country of origin matters too sadly.
 
So fake it :)
If you have a customer, they obviously think you're "pro enough"
 
Lol, yea...
I'm just going to make a bs web tool for pricing.
 
I don't know what $ rates are, and I don't know what one-man-band rates are, so I can't give you a suggestion, sorry.
How many weeks do you expect it to take you?
 
Well this dude wants a complete website with 30+ pages so about 3 weeks. Maybe 2 if I decide to just make a wp theme and be lazy
 
4:13 PM
And you'd really be happy with $300 for 2 weeks of your time... I wouldn't get out of bed for that.
But as Fabien said, country of origin plays a factor, in the UK I wouldn't work for that little..
 
Well thats about enough to pay for my new phone... so now that you put it that way. Looks like avrg rate is around $35 and hour and sinse I'm student and all + not most pro I would go with $25 which would mean if I worked on it 6 hours a day(w/ school) It would $150 a day and $750 a week.
 
Using bad maths and ad-hoc exchange rates, based on what I'd pay a junior developer (college graduate) minimum I could get away with because they're desperate for a job.... works out about $20/hr
Not far off, go with your gut instinct of $25 then
 
4:30 PM
I personally value myself around £20 p/h. Though my full-time salary has me at £12p/h
Freelance rates are naturally higher than FT.
 
@Fabien I pegged a junior dev around £18k/yr, which is where I got $20/hr from
 
Sounds reasonable
 
I'd go with $15-$18 USD for myself after further research
 
If I asked someone to build me a site and they came back with what is essentially £10/hr, I'd think they were outsourcing to india, or they had no real idea what they were doing. That kind of rate doesn't instil confidence in the quality of work being produced
or.. there's a catch.. like I'm going to get a cookie cutter site with the colours changed
 
4:41 PM
which is basically what WP devs do, right? :0
 
f* remote work...
it's basically outsourcing...
 
@webarto I'd love to work at home :(
 
Yeah, it's good, I think you work less and do more, but I'm was paid $20/h, no insurance, no nothing.
 
I'm FT but work remotely.
 
4:50 PM
I really do feel I get more work done at home, the environment is far nicer.
 
It has its pros and cons
I prefer homework overall. Mostly because I don't have to use a crappy laptop
 
I think that's absolutely true, but it's hard for someone to keep focus on work and not do what he can, but shouldn't...
 
I have an office I can go in to whenever I choose to.
 
@Fabien Is the company in your homeland?
 
Or am asked to
 
4:51 PM
Yes
 
@webarto yeah. Their offices are a 6 minute walk.
 
But as one of two people with intimate knowledge of a system that requires security clearance to access, and to do so requires using a secure laptop, locked in a tamper proof safe, in a secure building, that can only access gov VPNs from a specific IP address etc...... I have to work on site :(
 
The problem I have is I don't have other devs around to bounce off of. Especially in a senior sense.
 
that was worded wrong, more people know about the system, only 2 are security cleared
 
One huge company pro is that I don't work 9-5. I work sporadically through out. You know when you're in the office and you smash out some x many hours of code and then you brain just goes "Nope." and can no longer find motivation. At home I just stop working for an hour and do that hour later in the day.
Much more productive for myself and the company.
 
4:54 PM
If I could, I'd do 8-6 for 4 days a week and then take a 3 day weekend :p
 
yeah me too.
Problem is you do 8-6 for 4 days then on the fifth you do 9-5.
 
why?
 
Work that crops up on that 5th day
emails come in
guilt
Most "Flexitime" jobs are never really flexitime.
 
abstract protected functions implemented as public. Is this not a problem, or have I missed something?
 
I had proper flexitime when I worked for a local authority, you work > 37.5 hours a week == you get those hours off
@DanLugg I didn't think you could change the visibility of a function declared abstract
 
4:58 PM
@Leigh You can. Only protected => public though, as the inverse would violate LSP.
 
@Leigh Ahh, that'd be nice :) I'd have so many long weekends.
 
@Fabien Go and find a borough council who wants a PHP dev :P (good luck)
 
better than my first dev job which was 6 days a week 10 hours a day but only 40 hours per week were paid :0
 
and look forward to 2 hour lunches down the pub on fridays
 
Either way, it seems that any visibility change would be a problem.
 
5:00 PM
I've never worked anything less than 40 per week contracted too. Amazing some people get 35 :)
 
Need CV help, do you even PDF?
I really can't see the point in PDF.
 
I wouldn't
 
Even careers.se is lame...
Can't add recommendations, etc.
 
Secret... My current job, I found the company on SO
but not through careers 2.0
 
I found that companies lie more than applicants...
Cool story :)
 
5:06 PM
Oh they do
but I guess it's only fair, both sides are lying
 
Yeah, sort of...
 
I think I'm tired of coding all day. I don't really know what to do at the moment. I still enjoy the problem solving, I still like designing how an application should work. I just get bored when it comes to implementing.
 
Yup, hire a code monkey.
 
wondering if I should look for an architect role
I just hit 30 years old, I feel like I should be telling people what to do now
 
You qualify by age at least :P
YEAH
 
5:09 PM
Starring a message first in chat is "creating" a star; what would you call starring a previous starred message? "Agreeing"?
 
I'd be awesome for my team, but probably not for the company.... You want to use new technology X you say? But there's a risk you say? Sounds... fun....
 
DO IT
 
@Leigh It's the usual progression isn't it. Dev all day, then manager and slowly reduce dev time to do more managerial stuff till you do nothing but manage.
 
@DanLugg Most of the time I'd call the first star either 1) an accident, or 2) inappropriate use of the star system
 
lol, serious though; I'm updating my meta post
 
5:14 PM
@DanLugg thinking... I'm not sure "agree" is the word I'd use. Sometimes people click the star because they want it to remain stuck to the side, maybe because something is funny, terrible, offensive
and they just want other people to see it
it's a measure of popularity (/perceived importance) more than agreement
 
5:25 PM
@Leigh Yea, I suppose merely "increment" is fine
 
Yea, it's more analogous to an upvote, people don't always upvote for agreement
 
why this question is given negative rating.i am having similar problem.
-1
Q: Amazon AWS Pagination on bucket files

Khawer ZeshanI am storing images in Amazon S3 bucket. Assume the bucket has 3,000 images. When i call the list_objects it returns me all the 3,000 images in an array. So my question is can we do pagination on the bucket? for example return me 100 images and when user will click on 2nd page the list_objects sh...

 
Stupid one-boxing.
19
Q: Chat room stars, personal vs. room

Dan LuggAlternative While I believe functionality in this proposal would be optimal, it is perfectly understandable that such an implementation may be too large for reasonable expectations. Alternatively, as has been discussed elsewhere and in the comments (and additional notes) below, a reputation min...

 
5:46 PM
I think I'm going crazy
 
Why so nuts, putz?
 
oh, just code doing impossible things
the usual
 
Ah. I share your feelings, but mine are composer/git related.
 
@NikiC It's OK, you're allowed to go crazy. You've expended far too much brainpower too early in your life
 
is it possible to to have page offset functionality in amazon s3 iterators , basically i want a pagination functionality.If i want to retrieve object from 40(offset) to 90 then can i do that with iterators.
 
5:52 PM
Hello everyone!
I don't know if I could post here an issue I am having with my Mod_rewrite in WordPress
 
@Leigh ...
 
It's funny how many genius types go nuts at a very young age
 
Hi, any magento dev here?
 
I don't know what I'm doing.
Local git repo, project has a composer.json. Another project is trying to target it as a dependency, but it won't resolve. Can't be found in any version; I added the repositories element in the dependent, with type as vcs and url as a local file:/// URL to the repo location.
Anyone done this before?
Disclaimer: I'm actually new to both git and composer.
 
6:09 PM
@DanLugg you'll develop a love/hate relationship with composer, and you will just hate git. =o(
 
@crypticツ Actually, I already love git. Hate probably comes later, right?
 
Composer is fine, when you accept that you should just allow it control everything
 
user895378
<3 git ... no substitute for command line wizardry
 
I'm cool with that, I just want it to pull my local repo for packages.
 
@DanLugg it's like a marriage, once the honeymoon is over, it's all downhill.
@DanLugg github.com/trufa/git-cheatsheet you should bookmark that.
 
6:11 PM
I went through a stage of being fucked off with composer, because I wanted to pull known sane components of a product (with their own repos) into src instead of vendor
 
@Leigh Yea, I'm was already a bit perturbed by the vendor dealy; I use the src convention myself, but IDGAF at the moment .
@crypticツ Done and done :-)
@crypticツ I'll keep things interesting with my mistress xcopy + semantic folder version naming.
 
I dealt with it using another layer of abstraction, instead of having the "big component" pull in smaller components and be annoyed they were in vendor, I split that big component out, and had a "project" where I pulled all of my stuff into vendor, so it ended up in the same directory anyway (which is all I wanted)
@rdlowrey You don't like me anymore? I didn't get as much as a "screw your micro-optimisations you code-gypsy" for my pull request :(
 
user895378
@Leigh Sorry I've been busy. I looked at the diffs and everything looks in order. I just haven't had a chance to pull/merge them yet. The changes are certainly appreciated and they'll be incorporated sometime before the end of the weekend :)
 
@rdlowrey I'm just messing :)
I have another change that requires more opinion though... the use of min(<array>) in the main loop. It doesn't have much impact with a small number of alarms, but obviously uses precious nanoseconds when there's a lot. Locally I have an asort() of the alarm order array every time it is changed, and do a reset(<array>) in the tick() method to retrieve the first element.
so my change is optimal for many repeating alarms, and yours (should) work out better when the alarm order array is changed frequently
 
user895378
6:34 PM
@Leigh I remember vacillating back and forth over that very question ... performance is very important and that bit of code is hit hard in my use cases. It's important to get it right.
 
Whats would be the best way to go about a simple multi-page form in terms of the php code. I am doing a project that has a 2 page form(1 section for the first page of the form and the second section for the 2nd page of the form) and then a final page for when the user clicks/tapes done on the 2nd page of the form it takes the form fields information and displays it on that final page
 
user895378
For example ... I have 10,000 clients connected to my HTTP server at one time and they all have keep-alive timeouts. At that level performance becomes critical.
 
@rdlowrey Yep, its potentially looped with no delay if there is a constant stream of data from sockets for example, which is why personally I prefer the reset() always returning the first element of the alarmOrder array, rather than min() having to sort it every time
 
user895378
... offline to open up this box and see if I have memory slots left for more upgrade ...
 
You know, it just occurred to me, its probably even better calculating the next alarm timestamp onChange, rather than each iteration of tick()
 
6:46 PM
What would be the best way to go about a simple multi-page form in terms of the php code.
 
0
Q: Get ratings related to a product

Mr_GreenI have a configurable product from which I am trying to get reviews $myThemeName/catalog/product/view.phtml /** * Product view template * * @see Mage_Catalog_Block_Product_View * @see Mage_Review_Block_Product_View */ $_product = $this->getProduct(); I need ratings in a group count of 5...

 
@benlevywebdesign we saw it the first time
 
^ guys need help
 
@Leigh ok sorry I thought it was too long and no one read it
 
@benlevywebdesign You haven't been very specific about the problem you're encountering. I'm guessing you're having a problem persisting form answers between pages to retrieve them all on the last page?
 
6:52 PM
Hi how I can parse SET values from SQL query. example: i have this query: "INSERT INTO settings SET user = 'aksu', level = '391', agent= 'fire fox';" I need to have it like this: Array
(
[0] => aksu /* user */
[1] => 391 /* level */
[2] => fire fox /* agent */
)
How can i do that? :)
 
@aksu To parse SQL you should probably write a proper stateful parser, if you want a quick and dirty way, you can preg_match it. Something like ~'([^']+)'\s*=\s*'([^']+)'~
 
Thanks i try that one
 
@Leigh Well kinda, I want to know what's the correct way to go about coding the php script like how to take the form info from the first page and the second page and output it/retrieve it on the last page (in the link to my project the last page is just an image for now but I want the final page to eventually look something like what I designed but first I just want to focus on the php code part)
 
@benlevywebdesign Where exactly are you stuck right now. Don't say "the PHP code". I assume you have a <form>, and it's posting to a script, and you can access elements from $_POST, process, and store them somewhere
 
e'ning all
 
7:03 PM
got my first gold badge, rofl
for a ridiculous answer too <3 gotta love gamification
 
@Leigh it's not working.. it prints 0.

$q = "INSERT INTO settings SET user = 'aksu', level = '391', agent= 'fire fox';";

$string = preg_match("~'([^']+)'\s*=\s*'([^']+)'~", $q);

print_r($string);
 
@igorw congrats
that is a good badge you got there
I got four gold badges, they worth nothing compare to this
 
@aksu I didn't test it, which is why I said "try something like" ... here you go $string = preg_match_all("~'([^']+)'~", $sql, $matches); var_dump($matches);
@igorw I don't have a gold yet :( - I have an answer with +43 that basically quotes the documentation
 
7:18 PM
I have only 15 gold
:P
 
@NikiC People upvote when they see your name, they don't even read the answer
You're the Jon Skeet of
You should do an experiment, try writing some completely moronic answers and see how many upvotes they get :)
 
throw in some smart sounding words
that usually works for me
 
Just make sure the answers are long, reference lxr, and contain code blocks
9 mins ago, by NikiC
I have only 15 gold
I'm so taking this out of context - Niki is a WoW addict
 
Thank you very much @Leigh it worked :)
 
@aksu Bare in mind, you are probably doing it wrong.
 
7:32 PM
@Leigh That would likely work ... mainly because most things you can say about PHP are moronic, so it's hard to distinguish between the true and the false parts ;)
 
You want to try an actual experiement?
 
no :P
 
:(
I wish you were more experimental, outside of code
I want to see the Nikita who does drugs, drives a hired sports car, picks up drunk girls outside of clubs, and posts lies on the internet
come to PHPNW next year? :)
 
7:50 PM
@Leigh I am working on it right now
 
@benlevywebdesign "OK"
 
00:00 - 20:0020:00 - 00:00

« first day (1127 days earlier)      last day (3815 days later) »