« first day (641 days earlier)      last day (4307 days later) » 

6:01 PM
What is your problem with setting the correct timezone? Do you hate the timezones?
 
@PeeHaa No worries, hopefully someone will know :)
 
Going home. brb
 
@PeeHaa i don't have a problem with it, I just know when im kinda doing busy work
 
hi
is there a way to redirect a download link
my website has a limited bandwidth
i have a file hosted say www.mysite.com/file.exe
i want to redirect the download requests to a file hosted at another location
can i do it
please help me
 
6:06 PM
htaccess if your running apache
 
@ert3 it says redirect /~myaccount/oldfile.html indiana.edu/~myaccount/newpage.html
 
you can redirect offsite
 
what does /redirect /~myaccount/ mean
 
redirect accessed-file URL-to-go-to
 
ie:what does myaccount mean
 
6:08 PM
it doesn't mean anything
yes
 
can i use redirect /~myaccount/file.exe dropbox.com/file.exe
 
can you use explode with a regex pattern instead of a string as the delimiter?
 
yes
id assume
 
is this correct?
 
techno there is litterally nothing to explain here
redirect path/to/file htp://url.of.mirror/file
 
6:12 PM
thanks i will try
 
only claim to fame any of us will ever have
 
Hey guys I have a question
I am getting a string from a MySQL database. I want to delete one of the <br /> in it, but it seems like str_replace() won't detect my <br /> tags nor any html tags... any idea on how to proceed?
 
@ert3 i did it but the download is not redirected
 
techno post your code in a qestion and link the question here
 
redirect /~myaccount/setup.exe dl.dropbox.com/setup.exe
the http is removed by so
 
6:16 PM
@Ghillied striptags
 
@ert3 Sorry
 
@techno and that is in your .htaccess file ?
 
I have deleted a lot of questions and im now banned from posting new questions
yes
 
@ert3 The thing is that I only want to delete one tag, not all of them. I only want to delete one br since there's 2 one after the other.
 
i have a reputation of 485 i did not know deleting questions will lead to a ban
 
6:19 PM
4
Q: strip_tags() function blacklist rather than whitelist

ThomasReggiI recently discovered the strip_tags() function which takes a string and a list of accepted html tags as parameters. Lets say I wanted to get rid of images in a string here is an example: $html = '<img src="example.png">'; $html = '<p><strong>This should be bold</strong>...

 
has anyone here ever analyzed the angry frog login script? angry-frog.com/downloads-page
 
yes this code is the only code in htacess
 
@techno ok you keep having this /~myaccount/ you relize it need to be an actual folder path from site root yes?
 
no
but now i realise
 
thar you go
 
6:21 PM
the setup.exe is located in public_html
so i think i will use redirect setup.exe dl.dropbox.com/setup.exe
 
basically yes
not filesystem root but site root
welcome to the glory of webservers, the george lucas of web programing
 
Thanks Thanks Thanks
it works
I had posted download links to many websites
they all started consuming my bandwidth
 
cool and i finished reading my comic ima go ahve a cigarette
 
cigarette smoking is injurious to health,have a beer
 
@ert3 I tried doing this: $valueToDelete= "7.50$<br/>";
$texte = str_replace($valueToDelete,"7.50$",$texte);

Since the text selected is a few thousand characters, I tried selecting the specific <br /> but it didn't work at all...
 
$bodytag = str_replace("%body%", "black", "<body text='%body%'>");
IE you should have $texte = str_replace('<br/>', ' ', $texte)
im not sure what your going for
 
That's what I did with my last example
 
are you sure
 
like, exactly what you just wrote (except I kept the 7.50$)
 
but its just the br you want gone
so why remove anything else
 
6:31 PM
I'm not removing anything else, I'll repaste the code
$textte = str_replace($"7.50$<br />, "7.50$",$texte);
the 7.50$ is used to locate the br
 
why
 
then I just crop it
but it doesn't work
 
str_replace locates the br for you
 
because as I said, I have thousands of characters in the string and more than one <br />, and I just want to delete ONE of them
 
AH
well
 
6:32 PM
but the code pasted up here is not working.
 
pro tip count
if its just the first one you can use that to get around it
 
I guess I'll start counting right away... I mean, it's like the 500th br in there
thanks for your help though
 
oh if its past 1 then never mind bad idea
it will remove up to 500
heh
but for this much trouble id manually alter the string, because its kinda getting contrived
 
yeah well I don't have direct access to the mySQL db, so I'm trying to modify it using UPDATE at the moment
 
your code should work though, maybe you should escape the $ though, just a thought as you can use that to pass variables
but im guessing
 
6:39 PM
I'll try that out in a second
 
ok smoking now Avengers vs Xmen sucks
 
lol
 
I'm looking for someone who knows a bit about PHP streams. Namely, what are these notifications referred to here?
 
anyone else like blues?
or electric blues?
 
6:54 PM
 
@gorelative depends on the mood of the day
 
lol at the disclaimer
> * Your warranty is now void.
> *
> * I am not responsible for bricked devices, dead SD cards,
> * thermonuclear war, or you getting fired because the alarm app failed. Please
> * do some research if you have any concerns about features included in this ROM
> * before flashing it! YOU are choosing to make these modifications, and if
> * you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.
quote fail
 
lol
 
The sad part is that some people would try to blame them for issues...
 
7:06 PM
pretty much, thats what led to CM not releasing threads on XDA
 
0: 2225 is less than 59801 so it gets 1
1: 51489 is more than 2225 so it gets 2
2: 63693 is more than 51489 so it gets 3
3: 65074 is more than 63693 so it gets 4
4: 30389 is less than 65074 so it gets 1
5: 92493 is more than 30389 so it gets 2
6: 49135 is less than 92493 so it gets 1
7: 83523 is more than 49135 so it gets 2
8: 37766 is less than 83523 so it gets 1
9: 16728 is less than 37766 so it gets 1
10: 74433 is more than 16728 so it gets 2
I'm an idiot :P
 
Yes, yes you are :P
 
pattern seems fine, but result is totally wrong :)
(sum of last digits)
 
@ArtPip: Nice of you to say! My Crystal Ball is out of order today, sorry for not knowing that myself! — Truth 6 secs ago
 
7:23 PM
@Truth i have an extra twist for that regex problem i was asking about
 
@AndyPerlitch Oh?
 
yea, so lets say you've got that list of words you want to find groups of
foo, bar, baz. but what if you dont want to match baz when its by itself
but you DO want it to be included in groups if there are any of the other words next to it
 
Only baz?
 
yea, only one
 
@Truth COOOKIES!
 
7:25 PM
so...
Lorem ipsum dolor sit foo baz amet, consectetur bar foo adipisicing baz elit bar baz, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
should match:
Lorem ipsum dolor sit (foo baz )amet, consectetur (bar foo )adipisicing baz elit (bar baz, )sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
notice how it wont match baz if its by itself (after adipisicing)
 
anyone have a pro dropbox acct?
 
@AndyPerlitch (foo|bar)[,.\s]*((foo|bar|baz)[,.\s]*)+
Not sure about it, try it though
 
supposedly you can invite me for 3 months free to the 100gb pro
and im tired of google drive sucking
 
@gorelative Thats why i got my 25gb on skydrive ^_^
Google Drive isnt half bad
 
7:28 PM
gdrive has sat for 3 1/2 days on my machine saying "syncing web"
 
awesome
 
or "scanning web", and it hasnt synced a singl thing
 
had to change around the captures a bit to match what i want
 
@gorelative odd
2
Q: Should I be casting as a boolean or fake a boolean?

NealIf I get an integer variable (anywhere from 0+) There are a few things I can do to make sure the number is not 0(zero): Option 1: if($number > 0){ // number is not zero } Option 2: if($number){ // number is not zero } Option 3: if((bool) $number){ // number is not zero } Op...

 
considering im paying $10/mo for 200gb
 
7:31 PM
@Neal $number !== 0 is too simple for you?
 
@Truth yes. I want a short version. I have started using !!$number
 
@Neal Why would you want that?
 
@Truth easier to type
 
@Neal never sacrifice readability in favor of micro optimizations
Be it your code or yourself
Typing 1 less character is no excuse.
 
!! are 2 operations?
!== should be one
 
7:34 PM
!($number == 0)
 
i think no
 
body should write !!$number because
 
welp, back to dropbox i go
/whistle
 
damn you mike
 
7:38 PM
what's topic
 
you broke the train pokit.org/get/img/3c37b1a125554a83af94d3af0fee434e.png @gorelative :P sorry for the damn if it offended you
 
oh poo, really? sorry for the damn? Boy you know better
 
yes I do and I was offended by your ?
 
i know @Truth likes proper conditional statements
 
and @NikiC likes curly braces
 
7:40 PM
If you don't I'll drag you to the gate a take a limb or two.
 
side note, never seen !!
 
jo
 
That happens if you skip the first sections of the PHP manual: stackoverflow.com/questions/11548921/…
 
who cares about noob fails
 
so question
i have a dropbox acct, and i want to sync my home directory to dropbox and then back down to a second machine
should i a). symlink my homedirectory to my dropbox folder on machine A, and then symlink the homedirectory in my dropbox folder to my /users folder on machine B?
or should i move my home dir on both to the dropbox folder entirely.
 
7:47 PM
rsync cron
 
i dont want to use rsync
 
scp cron
:) its a long list
 
im sure it is
 
@webarto that was @PeeHaa actually. But I like them too ;)
 
problem is i'd like to be able to access my files anywhere, and use my galaxy s3 dropbox acct to get to files when needed.
hence the third party
otherwise, id just use rsync when i get home each night.
 
7:49 PM
@NikiC sorry, and Y U NO SET AVATAR?
 
time to ask on superuser
 
@webarto Y SHOULD I SET AVATAR?
 
peer pressure
 
@gorelative but the cron would do that for you
 
@NikiC point taken :)
 
7:56 PM
@webarto What you see IS his avatar.
I see that particular color and shape and I can uniquely identify him.
 
You can now, but not after not seeing it for a while :) Don't know if they are random shapes, either way, they are too similar comparing to "real" avatar... (expect duplicates)
 
sky
 
is blue
 
when weather is sunny
 
8:05 PM
stackoverflow.com/questions/11549215/… Does anyone else believe him? @hakre
 
it's a shame who finishes college nowadays and calls himself an engineer :(
 
It's unfortunate but I think everyone's starting to realize that a college education isn't what it once was
Not to say that colleges suck.. there's just so many and everyone and their mother attends them these days
So it devalues it for everyone
 
college is the new high school
 
@MikeB i was telling the truth... and my project orientator din't complained about this project... ;/
 
@JorgeLuisFerrari Do you think he realized you would be violating TOS?
 
8:09 PM
@JorgeLuisFerrari it can be done, maybe not easily, but it can be...
 
@MikeB i don't think so... just tought it'd be fun 'cause i could use it later to download files for me... ;/ thinking of giving up on this project and find a new one tonight on my class... ;/
 
I could tell my mom that I'm going to get some money from the bank.. and that would sound fine
but I'm actually robbing the bank instead of withdrawing money
 
Actually i've never read the ToS of most sharing sites... using third part softwares to download, like Mipony, jDownloader, is against it?
 
Does anyone know of any stable PHP frameworks, that do not conform to the prototypical web-modified MVC architecture?
 
@MikeB Well I don't know if believing will make a difference, I just bet that if he needs to ask, he is the wrong type of guy for that kind of question :)
Even for academics.
 
8:12 PM
@Bracketworks no .. maybe you could , with ZF
 
@JorgeLuisFerrari I have no idea.. I've never read their TOS.. but it's not a reach to assume that since there are obvious obstacles put in place to prevent automated bots from using their services that it would be against their rules
 
:)
Hi everybody!
 
@hookman hi
 
@tereško Hmm, perhaps; I know (I think) Laravel started without support for "controllers", favoring a route/callback sort of event architecture.
 
8:14 PM
@MikeB my project is not a bot, it would require manual URL inputs, and manual captch solve, so, nothing against the ToS until here :/
 
They've since incorporated controllers, and modified the framework to fit the three tiers, familiar to most other frameworks.
 
@hakre thx for the editing... my keyboard sucks :(
 
@JorgeLuisFerrari It's at bot as far as those sites are concerned
 
@hookman the first anser is only sort-of agreeable, I think he's being a little too liberal with them
 
@JorgeLuisFerrari That may be, but sometime the ToS will include information about scraping, be it manually invoked or automated.
 
8:17 PM
and by "a little" I mean "a lot"
 
Damn, i really could use a script do download anime trough the night :(
 
@JorgeLuisFerrari You want some hints on how to progress with these sites? You need javascript, that's why I linked the other question as a duplicate. Curl is transport only, not javascript interpreter. All those download sites use javascript heavily. Combined with IP based sessions, cookies, those captchas probably and all the colorful stuff.
 
@JorgeLuisFerrari Anime for college right?
 
@Truth its not the cleanest, but here's what i came up with: (((baz )*foo( baz)*|(baz )*bar( baz)*)[,.\s]*)+
 
@MikeB not really, that would be for me ;P
 
8:19 PM
The alternative is to know how these sites work well and do the parsing of the scripts your own and simulate settings cookies etc.
 
> (PS, if youre good at PHP/MySQL, leave an email address if I can email you if I have any other problems) Thanks again
 
@hakre I c...
 
@JorgeLuisFerrari That's the "PHP only" solution.
@MikeB Yeah, how do I "get" this.
 
Got it... but still, i'll read the ToS and talk to my orientator...
 
@orourkek Thanks for the feedback. So you agree that it's ok using Exceptions to inform the user about wrong input?
 
8:21 PM
@hookman noooooooo
 
@hookman I've always heard "Exceptions are for exceptional circumstances" (relativity win) - I wouldn't consider validation errors to be exceptional
 
@JorgeLuisFerrari Well, try what you are technically able to. If you only do some requests, nobody will care I assume and you might learn a lot (as you do sort of reverse engineering). However if you start to run the code at large scale, things will turn out to be different.
 
@hookman exceptions are for exceptional circumstances. User input error shouldn't be exceptional, it's almost expected
 
^ scary
 
@hookman Yes, but not PHP exceptions. More some exceptional visual element that highlights to the user that something went wrong and why.
 
8:23 PM
Thanks for the support guys... gotta work now... i'l bbl
 
@hookman this answer gives some good examples on sensible and realistic exception usage: programmers.stackexchange.com/questions/133335/…
 
user895378
Note to self: don't change code because of a failing test until you're sure the test itself isn't incorrect :)
 
user895378
-or- Don't write broken tests.
 
@rdlowrey Yeah, we all had this moment ;)
 
8:25 PM
yeah :)
 
But never ever start to write tests for tests.
Keep tests short and stupid.
 
user895378
yo dog, I heard you like tests so I wrote some tests so you can test your tests in tests
 
better step through with thee debugga
 
@orourkek In what way would you inform the user about wrong input?
 
8:28 PM
@rdlowrey yo dawg, I herd you like dog so I got a dog for your dawg so you can walk the dog when your dog walks the dawg.
 
hey guys trying to make a login page that sets htaccess user, my idea is a themed PHP login form, that passes post variables to a php function that passes login variables to htaccess. has anyone done this. im trying to hunt down an example as php file interactions isn't my thing yet
 
ah crap I just noticed my icon is off by a few pixels
 
user895378
@Bracketworks oh snap you heard about my dog walking service?
 
@rdlowrey Yes sir, I have.
 
@orourkek what if JS is off?
 
8:30 PM
@hookman that's server-side validation
I haven't even coded the js validation yet
 
basically im going to use this for login instead netdreams.co.uk/wp-content/uploads/2010/02/screen1.jpg
 
Bah, wifey be home; dishes ain't done. Trouble have I.
 
@rdlowrey So, why doesn't Uri have a rawUri-like method?
 
@orourkek how that message rendering to the template is done? May i see the source?
 
@Bracketworks I feel you bro
 
user895378
8:33 PM
@LeviMorrison It seemed like an implementation detail to me -- I don't feel strongly about it. If you think it should be there, feel free to add it. I also wasn't sure how to name it ... would a Url then implement Url::getRawUri?
 
@hookman basically, login() returns 1 on success, and negative on error. The error code is parsed by the controller, bundled into the page data and sent along to the view
 
@rdlowrey Meh, dunno.
 
@orourkek sources work better for me :(
 
@hookman actually in this case it just returns true/false
Since saying something like "bad password" is a little too specific (for security-ish reasons)
 
Haha! Success.
 
8:39 PM
@orourkek , it should be "you password has 3 wrong characters"
 
@orourkek if (isValid()) { $this->load->view($file, $data['error'])}; Something like that?
 
@tereško lol "Capitalize the "a" and you're good"
 
:D
 
user895378
@LeviMorrison On the streams vs. cURL topic I'm definitely a big fan of depending on as few extensions as possible. I remember it being a PITA to get libcurl working on a windows php install back in the day. Not sure why I haven't gone down the stream wrapper route before.
 
8:41 PM
@rdlowrey Because it potentially uses the curl extension internally partially?
:)
 
0
Q: Sync two home directories between macbook dropbox and hackintosh

MikeI have a 100gb pro account with Dropbox and i want to sync all or select files in my home directory between two mac's. The way i've thought of this I only have two options.. My question is: is there a better way to do this, if not which of the two presented options in this diagram. Option 1 ...

 
user895378
@hakre I believe the php curl extension is packaged with the default distribution of php, but while *nix machines will generally have the underlying libcurl installed (or very easy to get), windows can make it tougher to get the underlying libraries needed for that kind of thing.
 
user895378
It's one less thing to think about if you aren't reliant on libcurl
 
fuck this shits complicated
i swear
like my purdy drawing?
 
user895378
@gorelative geez you really went all out for that diagram.
 
8:46 PM
nice huh
 
user895378
It takes me like 45 minutes to cobble together stick figures, so nice work on that
 
visio
 
@orourkek And you have something like showValidationErrors() in the view, right?
 
@hookman in this case the "view" that gets the error_state is just the login form template, and it displays the generic error for logins
 
@orourkek got the idea, thanks a lot
 
8:49 PM
in other scenarios I pass an error_code to the view, which is basically just a flag for a certain error message
 
@rdlowrey return $this->queryParameters->get($parameter); You defined queryParameters to be an array.
I'm confused . . .
 
@webarto Problem solved; made bed for distraction. Threw out plates I don't like.
 
user895378
@LeviMorrison that looks like an error. lemme check.
 
StdRequest.
 
If anyone's having major issues with coda2, one of their devs just sent me a nightly build for 2.0.2 - and it's a major improvement in nearly every regard
 
user895378
8:51 PM
@LeviMorrison oh sorry, yeah there's probably lots of stuff like that in the repo.
 
user895378
@LeviMorrison I've already fixed that on my local machine.
 
user895378
@LeviMorrison I have a super-duper massive push coming down the pipe
 
@rdlowrey Good. By the way, can you prioritize pushing it if you already haven't?
 
user895378
@LeviMorrison 5 min. I was going to do it a couple of days ago but I wanted to get everything tested.
 
8:52 PM
Also, I'm going to be modifying StdRequest.
 
user895378
That and my operating system blew up so it screwed some things up.
 
user895378
is there a git command to stage all the deleted files in a directory?
 
@rdlowrey Basically, I'm going to move the mediator stuff out of StdRequest into MediatedRequest which extends StdRequest.
 
Concentrate on the power of tan.
 
user895378
@LeviMorrison I'm glad you haven't done it yet because I already have :) All that is cleaned up
 
8:57 PM
@rdlowrey Jolly good.
 
user895378
You'll have a much better picture of things in a few minutes
 
Also, I think I can create an Http\Client class that translates a Request into a stream context.
 
user895378
sweet.
 
I've practically done it already.
But I'm going to wait for your super-duper massive push.
 
user895378
working on it
 
9:04 PM
@rdlowrey I found a problem.
Your link to Artax is the one that is not read-only.
 
If pass wrong info to mysqli_connect, it returns a warning, and part of it is just like ���� ���� ����������. How do I fix that?
According to headers, response comes in utf-8
 
user895378
> Showing 119 changed files with 3,764 additions and 2,292 deletions.
 
git@github.com:rdlowrey/Artax.git should be git://github.com/rdlowrey/Artax.git
 
If I manually switch browser to cp1251 the message is ok
PS. It's in Russian
 
@rdlowrey You may want to take this moment to remove Artax as a submodule if you so choose.
Or maybe move Atreyu into Artax.
 
9:08 PM
@Bracketworks I haven't vacuumed, $points-- :P
 
What is the simplest way to add css and html templates to multiple pages using php?
 
@webarto lol, I vacuumed a 3x3 area, and left it plugged in on the other side of the room. $points += rand(-1, 1);
 
@Bracketworks you are testing your luck :D
 
@webarto Nah, I've got the pattern sorted out ;) I reseed every time
 
user895378
@LeviMorrison The submodule is dead. Long live the submodule.
 
9:10 PM
@rdlowrey RIP
 
user895378
@LeviMorrison Do you have a preference for which repo gets collapsed into which?
 
@rdlowrey I like the name Artax more than Atreyu.
 
user895378
@LeviMorrison sold.
 
That's about it.
 
@LeviMorrison Merge in and rename it Falkor.
 
9:12 PM
just found a singleton buried in the code at work :[
 
@orourkek Lucky you.
 
and there's a dirty hack within the singleton, geez this day just got interesting
 
@orourkek I'd have picked a different word than interesting. Depressing, perhaps.
 
@LeviMorrison Whenever I find things like this I like to leave paragraphs of comments, sometimes quite explicit. It really lets me release some anger :]
/* top 10 reasons why whoever authored this should have their legs broken: */
 
With some of the code I wade through on a daily basis I would actually be quite happy with a singleton
 
9:16 PM
@CharlesSprayberry lol
 
Moving 32GB and counting..
 
user895378
@LeviMorrison I have to walk out the door right now but later this evening I'll be able to get the two repos merged and playing nice.
 
@LeviMorrison scratch that, it now is depressing - this isn't a even true singleton, just terrible, terrible code
 
@rdlowrey In roughly how many more hours?
 
user895378
@LeviMorrison by 9pm eastern 7pm mountain for sure.
 
9:19 PM
@rdlowrey Thanks. Enjoy doing whatever it is you are going to do.
 
9:29 PM
guys
in particular @LeviMorrison
if someone want's to do something constructive
 
design awesome APIs for primitive objects
The current discussion is derailing because they're concentrating on the object syntax, rather than on the new APIs
 
@NikiC: Do you come to PHP Unconference Hamburg this year?
Or to Froscon?
 
don't think so ^^
 
why not?
 
9:33 PM
@NikiC Can you explain what you mean a bit more?
 
@LeviMorrison Did you see the discussion?
 
The 6.0 and moving forward stuff?
 
@hakre Well, I don't go to conf in general, so I assume that I don't go to those either :D
@LeviMorrison nah, there is a separate thread on object primitives
 
@NikiC I'll go review it.
 
i.e. making primitives pseudo-objects
 
9:35 PM
@NikiC see. but no rule without an exception :)
 
@NikiC I know when I read it last things were pretty crazy.
 
Can someone please share a link, this sounds at least interesting ;)
 
Does anyone else think that this is incredibly stupid:
$ /c/php-5.4.1/php -r 'var_dump((int) 4000000000);'
int(-294967296)
I'm programming in PHP dammit. Integer overflows are for C
@hakre mail-archive.com/internals@lists.php.net/msg59378.html => But that's incomplete. There should be around 40 mails
ah, just looks like it is cutting off a bit
 
49409 < 87101
7509 > 49409
beat this...
 
@webarto seems legit
 
9:48 PM
3341 < 62481 = 1
42069 > 3341 = 2
15166 < 42069 = 1
**3623 > 15166 = 2**
47147 > 3623 = 3
52199 > 47147 = 4
75105 > 52199 = 5
25007 < 75105 = 1
74570 > 25007 = 2
 
@tereško That already received my sigh
 
why do i even visit /r/PHP .. ehh ..
 

« first day (641 days earlier)      last day (4307 days later) »