« first day (732 days earlier)      last day (4206 days later) » 

12:03 AM
some of you might find this useful:
9
Q: Is this a violation of the Liskov Substitution Principle?

Paul T DaviesSay we have a list of Task entities, and a ProjectTask sub type. Tasks can be closed at any time, except ProjectTasks which cannot be closed once they have a status of Started. The UI should ensure the option to close a started ProjectTask is never available, but some safeguards are present in th...

 
12:36 AM
1
Q: Posting both checked and unchecked checkboxes

jessicaI'm trying to make a series of checkboxes in a web form that will post either "true" or "false" to the next php page, depending on whether they are checked. I decided that for each checkbox (value="true"), I would have a hidden checkbox (value="false") that would always be the opposite (when chec...

 
12:53 AM
hello all
if anyone is reading .. please checkout my question and share your knowledge :) stackoverflow.com/questions/12925442/how-to-use-curl-to-post-form-values-on-form-using-js
 
 
2 hours later…
2:47 AM
are there any other 3rdParty alternatives to: socket functions/fopen/fsockopen and cURL, written in PHP as a libarary?
 
user895378
@Zlatan For HTTP in particular or any sort of socket connection?
 
4:49 AM
@all I have a dropdown in PHP like this 1)textbox 2)Check Box,if an user chooses textbox ,I'm able to display text related box.But I am having a requirement that if user chooses Check Box,I need to display one check and one text box below my dropdown ,after that user selects check box and the text box and enters some text in text box,immediately i want to display again one check box and one text box like that it should continues?any one help me
 
can any one help how to get file path in javaScript
 
hey @ShaquinTrifonoff hows the chat coming along?
 
@ShyamK It's going okay. I still need to sort out some issues with it (timezone, login, fixed positioning, WebSockets)... :-)
 
did you do the http streaming?
 
I've got it working in a simple example, but I haven't integrated it with the chat system yet.
I need it to auto-reconnect/refresh, and have a 'heartbeat' so that the client knows that the server is still there.
 
5:05 AM
I found that a node.js along with socket.io chat would be simpler to implement... since its already event based... It does use this heartbeat thing too...
 
It would be, but I can't control the shared host that I'm using.
I have to use COMET instead.
 
that is there... hosting for node.js is limited it seems
 
 
2 hours later…
6:58 AM
morning
@ircmaxell Thanks from all of us :)
 
hi every one
what should we do if questioner said that answer is working fine and still not accepting the answer?
 
yesterday, by SomeKittens
@Christian Ask it politely?
Or nothing
 
7:14 AM
@PragneshChauhan You can say something like 'If this solves your problem, please mark this as the correct answer'.
 
hi guys .
 
8:13 AM
good morning ladies
 
Morning all
@Gordon I resent your questioning of my apparent gender and respond by calling your sexuality into question, followed by that of your immediate family :-P
 
@DaveRandom :D
 
@Gordon How does TTL work in the backlog? Is it limited to n items of do they live for t time?
 
@DaveRandom neither nor, it's caching the function call as such for n seconds
$backlog = new Cached(
    new Backlog(new Crawler(new Webpage), new Client(new Questions)),
    realpath(__DIR__ . '/../cache')
);
$backlog->defineCachingForMethod('findAll', 3600);
and then
/**
* @param string $method
* @param integer $timeToLive
*/
    public function defineCachingForMethod($method, $timeToLive) {
        $this->methods[$method] = $timeToLive;
    }
but yes, I could add that it's seconds
When something requests the main page, Backlog::findAll will return the same for 3600 seconds.
Cache will serialize the result to disk
 
need help on PHP PDO
 
8:27 AM
Right so it's not actually DB powered, you just cache the most recent set of items? Or did I misunderstand?
Actually don't worry about it, I'll quit being lazy and look at the source
 
@DaveRandom the most recent function call return
the Cached object wraps the Backlog and delegates all invocations through __call
 
$insert_contact = $conn->prepare("INSERT INTO `contact_form` SET `CF_Name` = :name, `CF_Email` = :email, `CF_Subject` = :subject, `CF_Details` = :details, `CF_SentDate` = now()");
$insert_contact->bindParam(':name', $name);
$insert_contact->bindParam(':email', $email);
$insert_contact->bindParam(':subject', $subject);
$insert_contact->bindParam(':details', $details);
$insert_contact->execute();
i write the insert command like this in PHP using PDO. is there any easy or alternate way
 
Inside, it will check whether there is a caching defined for that method and if so, check if it's still valid
if it's valid it will unserialize the result of findAll instead of going to the chat backlog and the SE API
 
@BikasDas Sure, you can pass an array to execute()
 
mornings.
 
8:30 AM
morning
 
$insert_contact->execute(array(
  'name' => $name,
  'email' => $email,
  'subject' => $subject,
  'details' => $details
));
 
session starts now. laters
 
oh can u give some exampple @DaveRandom
 
laters
@BikasDas See above ^^
 
Hello every one
How are you ????
 
8:32 AM
so i dont need to use bindparam @DaveRandom
 
@BikasDas No, you only need to use bimndParam() if you want to bind a reference, and you only need to do that if the value of the variable (e.g. $name) may change between the bindParam() call and the execute() call
 
I have multydimentionsnal array and i want to find the value then can we use the in_array() ?
 
Passing an array is like calling bindValue($key, $value, PDO::PARAM_STR) for each item in the array
 
is it possible to find the value with in_array() ?
OR not
Or Any other
 
There is an argument that if some/many of your parameters are not strings (e.g. they are int/float) it would be better to call bindParam()/bindValue() so you can specify the correct type, but it will work either way and you won't gain much 99.9% of the time.
@NishantPatel Where in the array is that value located (at what level)? What type is the value?
 
8:36 AM
@NishantPatel have you tried looking into the PHP Manual? Have you tried anything at all?
1 message moved to bin
 
this is my array.. and i want to get the of [TaskName] => Task 1, [TaskName] => Task 16 ... and so on
using the in_array() ...
 
morning chumps and chumpettes
 
@Gordon please help me..
 
@NishantPatel Just loop the outer array and check the sub arrays. An array structured like that is essentially a set of database results, the outer array is just a collection of rows. in_array() wouldn't help because it only looks at the values, it doesn't care about the keys.
 
4 mins ago, by Gordon
@NishantPatel have you tried looking into the PHP Manual? Have you tried anything at all?
 
8:42 AM
@Gordon no i have just use the in_array();
is that posible or not ???
 
Heh, I had some of my downvotes reversed for "serial downvoting" - I downvoted each article by a serial shit question poster, at the same time I voted to close
 
...aaaaand it's gone.
 
@NishantPatel php.net/in_array
 
That guy who made 5 duplicates or so of his own question yesterday
 
user50049
@Leigh Do you remember how many you voted on?
 
8:44 AM
@TimPost 5+
 
user50049
@Leigh Hmm.. would seem to make sense that a down vote accompanied by a close vote should carry less weight in the eyes of that script. Very different from just downvoting a series of questions and doing nothing else.
 
@TimPost It was probably due to the speed.
But since he was posting the exact same thing, I did maybe 4 close/dv in a minute
Not really bothered, unless I get a black mark against my name for it ;)
 
@TimPost Agreed but still open to abuse. I don't think it would do the site any favours.
 
user50049
@Leigh No black mark, at least not visible to mods.
 
user50049
The voting droid is top seeeekrit, even to us.
 
user50049
8:53 AM
@DaveRandom I'm inclined to agree too. It's just interesting to get glimpses into how that thing makes decisions.
 
@TimPost These are not the downvotes you are looking for...
 
If you go over X rep and get a privilege, then drop below X rep, do you lose it?
 
@Leigh yes afaik
 
@TimPost On an unrelated note going back to yesterday, what do you think the general view would be of scraping the site to collect stats that cannot be obtained from the API? Specifically post history from the revisions page.
 
user50049
@Leigh Yep.
 
8:58 AM
@DaveRandom when I scrape, I always check for an ajax script I can abuse, to see if there's a lightweight datasource.
 
user50049
Especially with rep being 'real time' now. A high voted deleted answer can knock you back a week or so.
 
@TimPost Oh I just want to kick people out of chat sometimes when they have 20 rep or so.
 
Right, we need 15 people to downvote @Leigh right this instant. I'm not having him approving tag wiki edits.
 
user50049
@Leigh Would take an hour or two for it to kick in though. There's heavy caching between rep / privileges between the main and chat sites afaik.
 
@DaveRandom As soon as APC for 5.4+ goes stable I'm going to lose a bunch
 
9:02 AM
@Leigh @hakre's going to give you a bounty (I presume it's destined for you) and I don't think you'll lose that, otherwise that's rep just evaporating, because presumably he wouldn't get it back either.
 
@DaveRandom Heh, even I'd vote to close/delete once it's no longer relevant
 
@Leigh You can close, but we can keep it for historical reference ;)
 
user50049
@DaveRandom I'm not quite sure what happens to bounties on answers that get deleted (say, if the question is deleted). I believe you keep it, but need to fact check that
 
@TimPost rep goes away, at least for negative rep that is the case.
 
user50049
I meant bounty rep, @hakre
 
9:04 AM
oh, that I do not know!
 
I don't want to work today.. someone has requested, an audit of all content on their website....
They want us to produce.. an excel spreadsheet, of all their content
ridiculous
 
user50049
@Leigh My day doesn't seem so bad anymore.
 
@Leigh Scrape it. CSV is your friend.
 
@TimPost The fact that you lose the rep as soon as you create the bounty and not when you allocate it says to me that you would keep it because it is an transaction that is abstracted from the question. Now I write that out though, the logic does sound a bit odd and it is based wholly on speculation and assumptions anyway.
 
9:08 AM
And if it helps you: I'm currently porting a 36 page document into XML.
 
We have the content, in a database, they have the content, in the control panel
 
@Leigh Even better, do a database dump.
 
user50049
@DaveRandom Someone asked about that, search is just failing me on meta at the moment. Now I'm really curious
 
@hakre Not that simple, I have to write custom export scripts for each content type.
@DaveRandom @TimPost But given the fact questions/answers are not HARD deleted (i.e. you can still see them as mods), and the bounty transaction is against an answer, I would suspect it remains in-tact
 
user50049
2
A: What happens if an answer which was awarded a bounty is merged or deleted?

SathyaOne of my answers with a bounty was deleted off late, so here's my understanding: Deletes the answer altogether. (Can they do this?) Yes, Mods can delete answers with bounty already assigned. Does the bounty have to be refunded first? What happens to the rep? Isn't this a possible form ...

 
9:11 AM
@Leigh Good point. Having said that, you can also still see the votes on soft deletes even though the rep exchanges are reversed.
 
user50049
Apparently, the Community user gets the amount of the bounty, and it is deducted from the rep of the person that was awarded the bounty. I need to confirm that, though
 
user50049
This had to have come up more specifically when we closed and deleted a bunch of non constructive questions from 2008 - 2010
 
@TimPost That was probably the fix because of that, moving the bounty to community.
 
user50049
I'm going to ping shog to the ninth and find out for sure.
 
@TimPost That meta post deals with an answer deleted specifically, not the question.
Does a deleted question cascade into answer deletes too?
 
user50049
9:14 AM
@Leigh If a question is deleted, the answers are automatically deleted with it
 
I'd expect its different, because when you re-open the question, the answers are not deleted... if you delete a specific answer then close/reopen a question, that answer remains deleted.
 
user50049
@Leigh If answers were not in a deleted state when a question was deleted, they will be restored if the question is undeleted. But while a question is in a deleted state, all answers are also deleted.
 
Aye, my point was, there's different kinds of delete :P
 
@Leigh I'd imagine it works along the lines of $answerDeleted = $question->deleted || $answer->deleted;
 
user50049
@Leigh Same delete, there's just different metadata describing the delete IIRC. I'm going to find out for certain.
 
9:16 AM
@DaveRandom Pretty much, but does the bounty being moved to community depend on $answer->deleted, or $answerDeleted
Another query... if a question with a bountied answer is deleted, then reopened, is the bounty restored? ;)
 
@Leigh I'd imagine it's $answerDeleted that is the pivot.
 
posted on October 17, 2012 by Ilia Alshanetsky

My slides from the "Under the Hood" talk at IPC 2012 are now available online and can be downloaded at: http://ilia.ws/files/ipc2012_under_the_hood.pdf

 
2
Q: How to get value in the multidimensional array using of in_array() in php

Nishant PatelI have an array like this.. Array ( [0] => Array ( [TaskName] => Task 1 [ActivityName] => Activity1 [actual_score] => 10 [score] => 6 [section_name] => jws2 ) [1] => Array ( ...

 
hello to all
@NishantPatel hello
 
@NishantPatel Stop getting your "friends" to upvote your questions /cc @TimPost
You do it every time, <1min posted question with terrible content, with 3 upvotes
 
9:25 AM
hi
@NishantPatel I'm sure I've seen that question before. Or at least a similar one that got closed.
 
hello
 
7
A: Able to see a variable in print_r()'s output, but not sure how to access it in code

hakreWhenever you need to read a value out of a variable, you need to know which expression you need to formulate to access that value. For a simple variable value this is simple, you just take the variable name and access it as a variable by prefixing it with the $ sign: var_dump($variable); This...

 
@Leigh I suspect he's sock-puppeting
 
Need to test something - @GordonM did you get pinged from the edit? (I included you after the original message)
 
9:30 AM
This machine hasn't got any sound on it.
 
well it should still put a number on your avatar in the bottom left
 
But I did get the little unread messages circle.
 
and when you click it, highlight hte line
ok cool, so an edit will ping :)
if you insert a name after the original message was posted
 
Hi, I have a problem in xml docs reading. I request ebay api get orders. the response back is a huge xml child node collection xml. I am converting that data to array, tried all question on stackoverflow, but no luck. any one can guide
 
9:33 AM
@GordonM Now accepting s
 
@abdulwakeel Not without more information, you might want to write a detailed question with example code and example XML and post it on SO. General tip though, you may be better off using xpath to locate the node of interest and extracting it as an array rather than trying to parse the entire data structure as an array
 
If any one did ebay api call, then he would have idea about
 
@abdulwakeel XML is usually sufficiently complex that it cannot be sensibly represented as an array. I highly recommend that you learn how to use DOM and embrace it. It will assist with my sanity if nothing else.
 
@tereško Its still odd
 
in iPhone / iPad, 10 mins ago, by Abdullah Umer
hey geeks! Please at least upvote my question :D
 
Example. He gave 400 bounty on stackoverflow.com/questions/9700391/… - and only one answer with +200 bounty on it there
lots of other places where he gave bounty, but there is no answer with bounty on it
 
Hi
Can I fetch data from FACEBOOK graph api
 
Gave 100 on stackoverflow.com/questions/7474225/… - no answer with bounty
 
9:50 AM
using jQuery
??
 
is that what happens when you offer rep for "more attention" then don't assign the bounty to anyone?
 
If you offer a bounty and don't award it in a set time then the rep just vanishes.
 
Yea ok, that makes more sense
and shame on the 90k rep guy posting the dupe, then answering anyway
 
10:12 AM
@Leigh This guy got 269 upvotes for this?
 
@DaveRandom Thats what happens when you close as dupe correctly :p - You're also missing the fact that he ASKED the question.
 
@Leigh He really should cw it if it's a self ask/answer and it's attracting that much attention - surely he must recognise that it's not even that great of an answer - I mean who doesn't know about pathinfo() if they have taken 30 seconds to look at the manual.
 
Heh, other people can't CW it?
should be auto CW on more than X votes
 
@LeviMorrison You were the one complaining about Stas, right? I'm starting to agree.
And morning @Leigh
And also morning @Dave
 
@NikiC Morning. And I'm really not on board with Rasmus on the strong typing issue, I think coercable types should be hintable and should be simply be cast if you pass the wrong type, which again brings me back to a desire for __toInt(), __toFloat() et al. Just because PHP has traditionally not been strongly typed does not mean that moving in that direction is a bad thing. IMHO.
 
user50049
Just .. word to the wise - frequently asking your friends (or office mates / co workers) to up vote your questions will usually land you, and them in a private chat with a moderator. While not quite as bad as organized puppetry, the evidence is basically the same. Blindly voting for your friends on a frequent basis is like asking a moderator to merge your account into your friend's.
 
@TimPost lol, who's that directed at? I can't believe any of the full-size avatars in the rooms don't know that :-P
 
@TimPost So sometimes when I browse @hakres answers to see what he wrote lately, and most of them deserve an upvote, you're going to merge me into him!
 
user50049
@DaveRandom Specifically not directed specifically, but I was reacting to something I was pinged on earlier and figured I'd drop that for reference or quoting if needed in the future.
 
10:41 AM
That sounds painful.
 
user50049
@Leigh completely different pattern, though merging the two of you would be a lot of fun.
 
user50049
Notice I did say blindly ;)
 
user50049
So we'd end up with a Leighkre .. how many toes does a leighkre have, precisely?
 
20
and 2 penises
 
The stuff of nightmares.
 
user50049
10:43 AM
must ... refrain ... from .. comment .. asking .. if ... you got ... the two .. confused ...
 
@TimPost confused? 2 toes and 20 penises?
 
@Leigh That would be a good album name
I don't want to see the cover though...
 
If you're frequently confused between your toes and your penis, it's probably time to see a doctor.
 
@DaveRandom I always thought a good album name to prevent illegal downloading would be "hard gay porn"
 
10:45 AM
@Xyon Some of us are just really small.
 
@DaveRandom Yes, I have small toes myself.
@Leigh I don't want to consider the google results for that album. And yet I believe people would try.
 
@Xyon Or if your penis has a nail you have to clip..
 
@Leigh That would explain the screaming...
 
Google is unbelievably good as a postcode lookup tool. I can search stuff that looks nothing like an address and most of the time I can get the postcode off the first page.
 
10:51 AM
@DaveRandom Makes stalking a lot easier. Especially peeking through the windows on streetview.
 
@Xyon It not live you know... There's at least a 5 minute delay.
 
@DaveRandom Dammit, that's long enough to close the blinds.
 
God dammit, afternoon full of bloody meetings again
People wonder why their sites don't go live...
 
What would you prefer, a bloody meeting, or a bloody meating?
 
11:00 AM
Mmm, rare steak. Is that even a question?
 
@Xyon Well that wasn't what I meant :x
 
@Leigh I believe I chose to misinterpret you.
 
unless you were being beaten by the steak, then that could be a meating
 
@Leigh That would just spawn a health and safety meeting.
 
morning
 
11:03 AM
Afternoon.
 
11:17 AM
OK I'm pretty sure there's no solution to this other than a dictionary lookup, and even then it would be flaky, but just in case... UK postcodes match the following: /[a-z]{1,2}[0-9][a-z0-9]?\s*[0-9][a-z]{2}/i - but the data I am working with was created by someone for whom 0 and O are interchangeable, so I am using [0a-z]{1,2}[o0-9][a-z0-9]?\s*[o0-9][0a-z]{2} but now it's matching words like e.g. floors, motors - any ideas as to how to stop this?
 
user50049
@DaveRandom Oh yuck.
 
@TimPost Yeh I know, It's a one off data import job from a CSV where the address info is condensed into one field though so I'm thinking I'm going to add a $ and manually audit the records that don't have a postcode entry afterwards (some of the records randomly have trailing none-address data as well)
It should also be noted that Microsoft Excel is the worst application ever devised by anyone ever. Just throwing that out there.
 
@DaveRandom Really, can they be XX0X, I thought it was only numerical in the second half of the first block
 
11:33 AM
@Leigh I think they only get allocated when they run out of numerics, but yes they can. For ex the beebs broadcasting house is W1A 1AA. Also see en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Format
 
also what about central london codes?
S1
 
@Leigh S1 is sheffield
 
SW1
your 2nd block is not optional
is my point
Unless I've been mistaken for a long time... I thought that some addresses only have the first part
 
No SW1 is just a postal district, a full postcode is always has the trailing [0-9][a-z]{2}. I am getting intimately acquainted with the system, far more so than I would like to be.
 
Ok, I guess I just saw it where people were lazy.. 10 blah blah street, london, sw1
or didn't know
 
11:37 AM
If you just put the first portion on the envelope it will get to the right sorting office, you're just giving the post office more work to do.
But to be fair I doubt their OCR is good enough to recognise some peoples scrawl anyway, there's probably a lot of manual work to do.
 
Sem
If anyone would like to help: If I want to build an Email as a domain object. Where should I place the email send function?
 
Whats the problem, they give you the regex for valid UK postcodes ... (GIR 0AA)|(((A[BL]|B[ABDFHLNRSTX]?|C[ABFHMORTVW]|D[ADEGHLNTY]|E[HNX]?|F[KY]|G[LUY]?|H[‌​ADGPRSUX]|I[GMPV]|JE|K[ATWY]|L[ADELNSU]?|M[EKL]?|N[EGNPRW]?|O[LX]|P[AEHLOR]|R[GHM‌​]|S[AEGKLMNOPRSTY]?|T[ADFNQRSW]|UB|W[ADFNRSV]|YO|ZE)[1-9]?[0-9]|((E|N|NW|SE|SW|W)1|EC[1-4]|WC[12])[A-HJKMNPR-Y]|(SW|W)([2-9]|[1-9][0-9])|EC[1-9][0-9]) [0-9][ABD-HJLNP-UW-Z]{2})
 
lol. I doubt that will be static forever though, I can't believe they will forever exclude C as a letter in the last portion (I wonder why they currently do?) - but that would still suffer from the same issue if I modify it to account for the interchangeability of 0 and O
 
The UK postcode system was not so much designed as congealed. It does make a degree of sense, but the only reliable way of validating a given postcode is to send a letter to it and wait for a reply.
Which might be a bit on the slow side for a web app :)
 
@GordonM That's not at all reliable. You are assuming the bag of letters won't be abandoned in a ditch on the side of the A40.
 
11:44 AM
Best bet is to just use regex to exclude the obviously wrong ones.
@DaveRandom Or sent to Stockholm
 
You think the UK postcode system is ridiculous, you should try working with BT number management
@Sem Not ignoring you by the way, just don't really have a useful opinion
 
Sem
@DaveRandom No worries man, I know you're the nice type ;)
@DaveRandom And about UK and their addressing system, domain system and driving on the left side of the road (and more of course). The reason is just because international standards are to mainstream.
 
@Sem What's wrong with our domain system? That's one thing that actually makes sense IMO. Although we do generally like to make things confusing for Johnny Foreigner.
 
my cat actually snores
 
@Sem re: the domain system, there's currently a proposal receiving votes to remove the "co."
 
11:51 AM
@tereško So does mine. But then she also like licking a patch of wall near the front door, to the point where the paint is visibly thinner, so I don't question the things she does any more.
 
Sem
@tereško I know you want stars on your message, but would you like to help me a bit with my Email domain object problem?
 
ROFL
 
my SO Inbox claims someone of you asked whether I am in Mayence but the chat transcript wont show who. The answer is yes though.
 
I have mail, the subject is "PLEASE OPEN THIS ATTACHMENT FILE AND REPLY IMMEDIATELY FOR DIRECT JOB OFFER‏" ... what should I do ;)
 
@Leigh That's be dumb, what about .org.uk and .gov.uk etc?
 
11:53 AM
@GordonM They'll still exist
 
@Leigh forward it
 
.co.uk will still exist
They'll just allow registrations without .co
 
Sem
@Leigh It's 'bout time man. @DaveRandom got brainwashed so it's to late to save him from britttttttttttttisch domain despair.
 
brittisch :D
 
Sem
I dare you to speak that out loud without letting people think you are trying to beatbox.
 
11:55 AM
No because without a mandatory second level domain suffix you get wall of domains, and you drastically reduce the entropy. I like to know that .gov.uk is a government site, and .org.uk is a registered charity - it makes it easier to know that the site you are dealing with is legit.
 
How long before French Connection register fc.uk
 
@DaveRandom I agree, only trouble is apart from .gov SLD it's not very regulated. You can go to a UK registrar and register a .org or a .co or whatever
Also, strictly speaking, the UK should have gotten .gb to be consistent. There's some historical reason why it ended up being .uk instead.
 
Sem
@DaveRandom Well I guess it does make sense, but still. Those sorts of domains are already applied internationally. (and abused)
 
12:02 PM
@GordonM OK .org.uk was a bad example - but .ltd.uk tells you you must be dealing with a companies house registered company, and .ac.uk and .nhs.uk... etc etc.
Info is here if anyone is really interested.
@Sem Agreed - but the solution is to tighten the rules, not loosen them. IMHO.
 
What bugs me mostly is the inconsistency between where UK is Ukraine and where UK is really GB
 
Yeah, I like the system in the UK as it is, really.
 
Like linux keymaps, for instance
 
there is a .gb TLD but it isn't really used
 
12:03 PM
@GordonM Yeah, I saw the article on it. And I agree with @DaveRandom - .gb was the way to go
.co.uk is just nasty. And yet I own two of them. >.>
 
@GordonM Just like there's a .us even though the bleedin' yanks treat the gTLDs as if they own them
 
@DaveRandom .com loosely translates to "American"
In fairness I suppose it does hold true for "common"
 
@Xyon Heh, I had to opt for .eu for some of mine, just to get the word I wanted :p
since .eu is about as used as .gb
 
@Leigh I transferred the two I own over from .com's for .co.uk's. Half the price, double the lease time.
 
| actualuse=Fallen into disuse in favour of .uk| restrictions=No registrations presently being taken| structure=Government sites formerly found under hmg.gb| document=| disputepolicy=None| website=None|}} .gb is a reserved Internet country code top-level domain (ccTLD) for the United Kingdom. Introduced at the same time as the UK's other top-level domain (.uk), it was never widely used. It is no longer possible to register under this domain. The rule in the Domain Name System is that a top-level domain for a country is derived from the corresponding two-letter code in the ISO 3166-1 list....
 
12:07 PM
So what TLD do the Ukraine use?
 
ua
 
Oh. .ua . logical.
 
I must confess I like .net, all bar 1 of mine are .net
Yay for childishness tw.at
Also sh.it
 
fu.ck of course
et al.
 
@Xyon Nope, has to end with .co.ck :)
 
12:11 PM
> I appreciate any help, I don't understand anything about php. Thank you
 
@Xyon I thought you couldn't do that? I wanted to register throbbing.co.ck but apparently they don't allow things like that.
 
@DaveRandom I think first of all you must found the "Throbbing" organisation in the cook islands
Consider a genital or STI pain relief pharmaceutical company would be my plan
Then they can't co.ck block you!
 
An RTFM is always worth an upvote...
 
12:16 PM
 
herp.es?
Oh no, sorry, that's congenit.al
 
OK, any second now @TimPost going to give us a "Back to topic guys" so I think we should leave this now...
look@my.co.ck
last one I promise.
 
Shame you can't register an SLD of your own on the Cook Islands. You could create a website on dependency injection and call it how.to.handle.your.di.ck (yes, extremely immature, I know)
 
Don't talk about injections and di.ck at the same time. I still have flashbacks...
 
12:23 PM
... Please, by all means, don't elaborate!
 
Let's just say my .co.ck was vulnerable to XSS...
 
@Xyon They're called STI's these days
 
@Leigh I think mine was long enough ago that I got it through STDIN
stackoverflow.com/questions/12934217/… - I love that this guy hid the IP of his local mysql server in the code, but not the error output...
 
Sem
@DaveRandom , When using an InvalidArgumentException. do you mostly use filter_var() for validating the argument? Or just plain regex.
 
@Xyon Mine's a STDOUT, nothing gets in
 
12:27 PM
@DaveRandom So you're just a carrier?
 
@Sem What's the definition of an InvalidArgument in this case? If it's not a string then no sanitisation necessary. What's the specific use case?
 
I'm new. Well, new to being a registered actual person at least. What's cv-pls for?
 
12:30 PM
@NikiC Rehashing old opinions ;D
 
@NikiC Super::$static to the rescue. Triple OMG.
 
@DaveRandom ta
 
Sem
public function setFrom($from) {
        if (filter_var($from, FILTER_VALIDATE_EMAIL)) {
            $this->from = $from;
        } else {
            throw new InvalidArgumentException('Invalid E-mail address.');
        }
    }
 
@NikiC The only right reaction is to demand AST in PHP.
 
Sem
12:31 PM
@DaveRandom There you go.
 
@hakre Exactly. I agree that annotations suck, but how he then suggests to use a static mapping property instead... uh
 
@Sem Where I go?
Oh right
Sorry, not paying attention
 
Sem
@DaveRandom No problem at all :) It might look basic but I haven't really learned to perfectly apply validation and errorhandling in domain objects/active records.
 
Did I miss something, is someone trying to implement annotations again?
 
@Sem Since the input is not included in the exception, I don't see that it makes a difference. I always filter_var() to validate an email address, I'm sure you've seen some of the horrible regexes floating around as alternatives. Having said that, a) I'm sure filter_var() uses a similar regex underneath anyway and b) you may wish to impose a more restricted set of rules on what is valid - for example you may not want to allow an IP address as the domain.
 
Sem
12:39 PM
@DaveRandom Heh I was just trying to keep this basic. And and email isn't an IP address so why do you want an extra validation on that? Also, this is getting pretty redundant code once I have a couple of email values in the Email domain object (From, to, return-path, replyTo), any ideas on how to make that clean?
 
@Leigh no
 
And, weren't we discussing something like this a couple of months ago? bountify.co - instead of rep its money
 
@Sem setAddress($headerName, $address)? Email addresses are technically allowed to be @[ip address], also other weirdness (see this), while they are technically valid you may wish to disallow them since no-one ever uses them. It depends what you're doing with the data - if you're storing contact details that you would like to be valid then you might reject them, for example.
 
Sem
@DaveRandom if (filter_var($from, FILTER_VALIDATE_EMAIL) && !filter_var($from, FILTER_VALIDATE_IP)) should do the trick. Thanks man. Not sure about the setAddress though. Basically you're making a function for a Stringtype. Which would lead to setIPaddress, setEmailAddress, setStreetAddress which would require this function everywhere if you want to keep it predictable.
Which would lead to placing the functions in an abstract domain class. which would require to make your own string type objects or something to validate?
 

« first day (732 days earlier)      last day (4206 days later) »