« first day (875 days earlier)      last day (4064 days later) » 

12:01 AM
@Hiroto it's special to me :< — XCritics 28 secs ago
ahaha
 
@crl Hey man hows it going? not seen you around for a while
 
user1125394
@DaveRandom have learned a bunch of haskell, it's just great
 
user1125394
will be hard to get on java/php.. after
 
@Hiroto Y U NO ALGORITHM TRUE
 
lol
ewwwwwww
@Hiroto Since the question uses the deprecated extension, an answer using a different extension would be wrong. Express your opinion as a comment to the OP, don't blame the answer. — Barmar 2 mins ago
 
12:04 AM
@Alexander Hahaha :P
 
this guy is saying "use mysql_*" because the OP used it
 
@crl Well, whatever floats your boat... :-P
@crl Not really tbh, never really had a cause to play with it. I may have a mess around with it this weekend if I get a couple of hours, looks interesting
 
user1125394
@DaveRandom i was going to apply for a thesis on sofware defined networking, though i don't know much about, but could try to learn
 
@DaveRandom What brand beer you get?
 
user1125394
i'm documenting before i contact the guy
 
12:08 AM
I think I mistakingly flagged an answer too fast.
 
@Alexander Ive done that :/
 
Whatever, worst thing it will be declined. If not, it is still fine. It should have been better a question anyways.
 
@crl The whole concept of SDN makes me go "ewww" because I have a gut reaction that thinks it's wasting a load of bandwidth on managing a network at the cost of the applications that are using it, but actually that's a load of crap in this day and age. I still have a tendancy to think in terms of much more bandwidth-restricted environments that you actually get in the real world these days, it's a bad habit I need to break
@NickFury Peroni ftw
brb
 
@DaveRandom Italian beer, I've never tried it. I'll keep an eye out though
 
is it possible to do a foreach in a

$History =<<<DATA

DATA;


???
 
user1125394
12:20 AM
@DaveRandom yes, i guess it's for datacenters mainly, and humm have to learn a lot, don't even know what's a virtual network
 
@Connor you can't foreach inside a heredoc
use a template for HTML :3
or rewrite that section
 
define("Beer';?!'ddio..,,_
 
I get the feeling this isnt the greatest of questions, and I swear it's been asked before: stackoverflow.com/questions/15305224
 
do you have to cast 3 votes in the elections?
 
you probably should
 
12:32 AM
i wanted to cast 1+2+3 to Gordon as i haven't crossed paths with anyone else before
 
lol
 
but can't...
 
also from now on, your name is phi
 
nope
that's a sideeffect
 
:3
 
12:33 AM
good to know people recognise ;)
 
I think it's "coffee" but said with a really abrasive american accent
 
user1125394
@DaveRandom, the cons of OF is latency when there is no flow matching, i'm not sure to get what you mean with bandwidth load, i think the idea is to place a controller close to them, and use it when no table match, that might not congestion everything
 
@DaveRandom I thought that too
 
@crl I just have a tendency to regard anything based on anything heavier that simple ARP-style route management as eating unnecessary bandwidth, but I am fully aware that it's absolute crap in these days when everyone is running gigabit LAN (even home users). The SDN model is also a lot more resource hungry than just running everything on firmware, but again it just doesn't matter these days because the hardware is easily powerful enough to handle it.
That's SDN in general I'm talking about though, I don't know enough about OpenFlow to really comment, although I've just put it quite high on my list of things to play with
 
user1125394
k happy to hear opinions
 
1:00 AM
 
1:13 AM
how do you get your non www http redirect to non www https, if you already redirect the www http to non www https?
 
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L,R=302]
@Erfan ^^
 
Does this redirects http www to https www or https mywebsite?
 
It basically just changes http to https and leaves everything else about the URL unchanged.
 
I still can access my website on http. I have modified the .htaccess though.
bitech.se
I guess it was because of RewriteEngine On missing, now I am getting some actions
 
1:29 AM
Did you make sure to add RewriteEngine on as well?
lol
 
it doesn't work still, I get the Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
 
Do you have any other rewrite rules?
 
no
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L,R=302]
Options All -Indexes
DirectoryIndex index.php index.html index.htm
this is all
 
Hmm, that's odd, it seems that the RewriteCond isn't working
 
yeah I don't get it why it behaves like that
 
1:34 AM
Try RewriteCond %{HTTPS} !^on$ [NC]
Or I guess you could do RewriteCond %{HTTPS} !^443$ although that assumes HTTPS will be running on port 443, but I guess that's a fairly safe assumption
I need to go to bed, if none of that works ^^ I suggest you check other questions on the main site and ask you own if you can't get it working
 
didn't work either, but thanks ;)
 
2:09 AM
Good evening, I dont suppose anyone knows what to put in a webconfig file for an iis server so that it will do rewrite for a rest api written in php? i have got the rewrite statements for the .htaccess on my test machine but the delopyment is an iis web server hosted by the uni
 
2:29 AM
1
Q: How can I get a $_GET variable in a .js.php file?

XCriticsSo on my main page I have <?php require_once('config.inc.php'); require_once($rootdir . $dirsubfolder . 'navbar.php'); ?> <script type="text/javascript" src="http://maps.google.com/maps/api/js?libraries=geometry&sensor=true"></script> <script src="php/findme.php">&l...

 
O_o
 
foo
 
bar
 
2:49 AM
the javascript room being empty for once... anyone here happen to know about mustache.js/handlebars.js?
 
@twiz Yes.
I have used mustache.js on a few occasions.
 
You don't happen to know if there is any way to add a dynamiaclly created element to a template
 
I'm not sure what you mean by that.
Can you explain?
 
as in {{dynamEl}}
 
I still don't know what you mean.
 
2:51 AM
so context.dynamEl=document.createElement("div");
of course, that doesn't work
but do you get what I mean?
 
You mean conditionally have a sub-template?
I just don't understand what you are trying to accomplish.
 
Well I'm dynmically creating a canvas and then I want to add it with the template
I suppose I could just add the canvas before I do any scripting on it...
 
The canvas is not data.
Per se.
The idea behing these templates is that they are completely logicless
And all they care about is data
 
Well, I see your point but at the same time it seems odd
I guess you just cant do scripting before the template renders.
on a canvas that is...
 
3:30 AM
Gordon +1
 
 
4 hours later…
4 hours later…
 
Hello
So I have been stuck on this script I am making for a bit. I am trying to take a generated link of XML and save it to an xml file.
 
@Ryahn hi!
@Connor yeah, quite slow this morning ;)
 
@hakre Yep!
 
Hello
 
7:12 AM
You must have more than 150 reputation to vote in this election
haha
.....20 tu wen ty
 
@WeldanJamili we've all been there ;)
 
best way to keep a div with scoll overflow scrolled to bottom for a chat app?
 
@Connor I'd say that requires javascript.
 
yes, just wanting suggestions
 
sorry uncle gordon. maybe next time. wish u get elected as mod
 
7:14 AM
@Ryahn if you've got a question, just ask.
 
Well I have been trying to get his link that is generated to save as an xml file.
 
@Connor create some "scroll to bottom" functionality and each time you add a new chat message, scroll to bottom. - SO - Scroll to bottom of div?
 
It already generates as XML
 
@hakre yes cool
 
@Ryahn I don't understand what that means.
 
7:17 AM
0
Q: Save Page As XML

RyahnI have made a script that generates an IMDB API link for a movie in XML. Once this link is generated it will save to an XML file with its contents. The only issue is that the contents is not saving. Link generated - http://imdbapi.org/?title=One+Piece&type=xml&plot=simple&mt=none&...

 
@Ryahn maybe instead of file_get_contents you can use CURL. I know that some server restrict file_get_contents()
 
hmm, I never really used CURL. I will have to google around
 
@Ryahn Generally this works, however you might want to increase the error reporting so PHP tells you about notices, warnings and errors.
It works here on my end, so I guess it is something with your server configuration.
So if you enable errors you should get some hints by PHP itself.
 
once I put the error reporting in, its still a blank file
 
@Ryahn first you should find out what the issue is. Curl isn't always the answer.
@Ryahn a blank file? then you've got some fatal error.
or do you mean the XML file being blank?
 
7:23 AM
Actually
Warning: file_get_contents(imdbapi.org/…): failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway
Its something
If I use curl_init, I dont get the error
 
@Ryahn: I've make an answer stackoverflow.com/a/15308344/755319. It's about how to use CURL
 
lol, you're reading $data but you're saving $input (which is empty)
so watch the variable names.
 
There is an HTML file that goes to the script
So the variable is used
 
@Ryahn well but that variable is empty then - as the file is.
file_put_contents will return the number of bytes written. If it writes 0 bytes, it equals false. So you can have both: either no data in $input or some problem writing to disk.
if you don't get any errors and warnings, the data is likely to be empty.
 
hmm
Ok so I tried the answer from goFrendiAs
No errors, but now to make it write an xml file
 
7:34 AM
Hi, @Ryahn, using file_put_contents is just right. Or maybe as @hakre point out, maybe you've make a typo. Your xml is saved in $data (or in my answer $response). But you use $input in file_put_contents
 
@Ryahn check your variables with var_dump. It sounds to me you just need to do some trouble-shooting, so double-check if your expectations are matched at each point of your script. Just start at the top.
 
Ok so I looked into curl some more
I have it writing to a text file
But it wont save to an xml
Well it does save to an xml but its not the contents
That will save the xml
but if I try to save it to an xml file, it will put in the contents of an html page
 
@Ryahn: What do you get when you do var_dump($response); and var_dump($input) ?
 
7:49 AM
I have updated the post
This works but only with a text file
If I change it to an xml file, I get some down page html content
 
@Ryahn Yes, we know that already. But if you don't answer the questions that are asked back to you I don't think you'll go much further in repeating that "it yet does still not work".
 
@Ryahn: I've try your code, it works perfectly. What do you mean by "some down page html content" Is it 404 not found or what?
 
cloudflare down page
 
what is the URL you fetch that gives you that cloudflare down page?
 
@Ryahn no, that page works.
 
I've try your code and open your link. Everything is work as expected. Could it be that your server proxy block it? <-- this is the only reasonable reason I can think of
 
hmm
 
Try to do that once again, locally with your own laptop/computer
 
Its just weird
 
7:58 AM
Yes it is
 
It was working fine with a txt file but now its doing the same thing
hmm
 
I can only underline what @goFrendiAsgard writes. I have no problems to open that link either and get XML not the cloudflare error message.
you might have run let's say too many requests on that API website so it blocked you.
 
Yes, what @hakre said is also reasonable.
 
Yep I think your right
It may have blocked me
 
hmm just fixed it some how
 
Good then. And I see that someone downvote my answer :p
 
lol
 
morning
 
morning
 
8:06 AM
@Ryahn: And how do you fix it?
 
@Ryahn you could try to retrieve it from cache by sending the cf_use_ob=http cookie with the request.
 
I did a refresh on my web server. And with the second IP I gave it, it worked
 
@Ryahn: Nice, and very simple step, glad you've solve it :)
I once has ever experience such a similar thing with chrome browser cache.
 
I never ran into an issue where a site blocks me
Its usually either typos or general user error
 
well how many request are you running?
 
8:09 AM
It was probably from every time I refreshed, so maybe about 10
After some small edits I made
I use Sublime Text 2 with SFTP plugin
 
user1105787
Help me guys, my gold "Vote for Gordon as moderator" badge isn't showing up on my profile. Even though I voted for him as 1st choice and everything.
 
@DavidEugenePeterson :)
 
user1105787
@Gordon seriously though, good job on making it to the third phase. Best of luck.
 
@DavidEugenePeterson thanks. although I didnt do much for it. i mean, you guys voted me there :) so I have to thank you :) thanks.
 
Suggestions Please :

Good Features for a chat application, not necessarily for coders.
 
8:19 AM
@Connor oneboxing
 
@Gordon whats that?
 
morning
 
@NikiC Morning!
 
@Connor what it does in this chat, too. you paste urls and the chat will figure out how to display them, e.g. if its a picture it will show the picture, if its a gist it will show the code, if its a tweet it will show the tweet, etc.
 
@Gordon Cool, that's a good one if you have any good resources or things i should look into to make that, would be great!
 
8:22 AM
@Connor i didnt bother to figure out how SO does it exactly. cant be too difficult though. maybe try on Meta.
 
@Gordon Thanks very much!
 
now if I could only remember which tabs ff took with it I could try to find them again in Chrome
 
i got 111337 reputation now. thats lll337 :)
 
hmpf. the IEEE site does not work properly through the university vpn
the javascripts wont load, so authorsearch wont work.
and the morale of the story: progressive enhancement and graceful degradation are the shiznit!
 
oi
So how would I grab a child that lies under a parent with an attribute?
<track type="General">
<UniqueID_String>
242652904449958064145306342749155800074 (0xB68D3FDDBE0F9B3E865F70325496B40A)
</UniqueID_String>
 
8:47 AM
@Ryahn omg the phrasing is so wrong. although it's an honorable undertaking
 
ikr
Its how this mediainfo program exports
If I could change it, I would
 
right now it says: how to rescue a kid from pedobear
 
LMAO
Like I have tried to do $xml->track;, $xml->track['type'];, $xml->track['General'];
 
what are you using? simplexml or dom?
 
None work
simple
 
8:51 AM
is this the only track?
and what is $xml?
 
$xml is the file
That is the whole xml file on pastie
By default it will export like this. It makes for sense to change were track is with each attribute to what its. Like General, Video and Audio
 
@Ryahn $mediaInfo->xpath('/MediaInfo/File/Track[@type="General"]/UniqueID_String');
$mediaInfo is your $xml. It's good practise to name it after the root node.
 
@Ryahn: eval.in/12268 - this should just work.
 
@hakre Yes it does but if I want to grab further down in the xml it wont
 
@Ryahn Okay, multiple files? Multiple Tracks? Both Multiple?
 
8:57 AM
@hakre as long as the desired track element is the first one
 
Hi guys
 
It has multiple tracks. Like track="General", track="Audio", track="Video"
 
@hakre why *?
 
9:01 AM
@Gordon short for the root element - each XML document has a root element.
you're normally not interested in it's name.
 
@hakre * is wildcard
 
Hello Everyone
Can anyone solve my question pls
 
1 message moved to bin
 
why was my question deleted pls
 
@user1767671 dont copy the content of the question. paste the link to the question please.
 
9:04 AM
Oh ok sorry, din know that
Here is the link :
0
Q: Need help in creating dynamic menu

VishalI am developing a website using PHP and this is the 1st time I am trying a dynamic menu. What I am doing is I have created a table for pages. The table structure is as follows: ____________________________________________________________________________ |page_id|title|url|content|menu_title|sh...

 
@user1767671 yeah, no problem
 
@Gordon What about image links like this? gravatar.com/avatar/…
 
@hakre it works
 
@Gordon * are all child elements of the context node, hence /* is the document node.
 
@hakre yeah, i understand what effect it does have but I've never seen anyone use wildcard to substitute the root node
 
9:05 AM
Anyone to give me a answer please. I need that urgently
 
42
 
Gordon, could you please give me a solution
?/
 
@Gordon Oh I thought it's common. I at least find it useful.
 
@user1767671 protip: saying you need it urgently will usually earn you snyde remarks like "hire a developer then" or "how much do you pay".
 
hmmmmm , never mind, let it take its own time
:(
 
9:08 AM
@hakre i am not saying its bad. just that i never seen it before. im just interested if that is a common practice.
 
It works the wildcard
but if I change it to the root xpath('/MediaInfo/File/track[@type="General"]')
 
@Gordon I've actually not invented it and have taken it from others. But don't remember whom.
 
nothing
 
@Connor it does not end in an image extension, that's why it wont get resolved. remove the &s=200 and it should
@hakre i wonder if it makes a difference to the xpath engine performance wise
@Ryahn element names are case sensitive. you root node is Mediainfo
 
@Gordon no im just wondering how would it be done
 
9:10 AM
@Gordon let's metric this crap ;) gimme a min.
 
@Connor i assume you check if it the url ends in an image extension and if so wrap the url into an img tag. you could also send a head request and detect the mimetype if you dont want to parse the extension but that would require an http request then. slower.
 
@Gordon yes, i have done that
 
@Connor then what is the question?
 
@Gordon thanks
 
@user1767671 why do you have two user accounts?
 
9:13 AM
@Gordon the question was what would i do about non extension urls, becuase there seems to be more and more nowadays
 
@Gordon The named one takes longer: eval.in/private/3a6fb48741286b
 
@Connor ah ok. yeah, like I said: you could do a HEAD request and check the returned mimetype. if it contains image/foo wrap in an img tag.
 
@Gordon its ok, its tough :D
 
5
Q: How does oneboxing work?

Octavian DamieanI'm wondering how oneboxing on chat works. Do you fetch the data from an API of a site for which oneboxing is implemented or do you scrape the content of that page and extract the desired data?

 
@Gordon Thanks!
 
9:21 AM
Okay these microbenchmarks are really so misleading. if you break it down to the single iteration it's so ignoreable: 0.0000003232.
 
@hakre cant find anything on google suggesting either or, so i guess its not harmful
stackoverflow.com/questions/15308803/… because OP is only missing the delimiters
 
9:44 AM
@Gordon even a self-duplicator
 
0
Q: PHP converting from milliseconds to minutes

tcorderoAlright one more question! So I am trying to make a table that gathers data from a mysql db and posts it. I have everything working only problem is I am trying to collect a total time spent on a server. (its for a minecraft server) Only problem is the plugin i am using to track the time posts the...

 
Hi i have doubt in CI any expert?
 
@Dhamu that's okay. almost all of us in here doubt CodeIgniter
 
was it always in PHP that if a function has a parameter and you don't pass it that when inside the function body the variable of that parameter is used you get an undefined variable notice?
 
i have user data stored in table
in model i have the coding like this
$query = $this->db->get_where('user', array('user_id' => 17));

return $query->result();
in controller
$data['users']=$this->home_model->get_user();
$this->session->set_userdata($data);
how can i get individual table data?
print_r result like this
Array ( [users] => Array ( [0] => stdClass Object ( [user_id] => 17 [email_id] => dhamu.m@gmail.com [password] => 5f4dcc3b5aa765d61d8327deb882cf99 [name] => dhamu [city] => Tirupur [state] => Tamilnadu [country] => India [sex] => 1 [dob] => 1990 [mobile_number] => 9944432822 ) ) )
i need to echo user name from session
?
?
 
10:03 AM
hello php masters...
pls help me regarding this
0
Q: MySQL Select query not working

Sumit BijvaniI have 2 tables and I want to fetch users data from it. Table 1 : frei_session username session_id Prince 51 Dilip 49 Sumit 50 Table 2 : friendrequest requestTo requestFrom status 49 50 C 50 51 C 49 ...

 
Google Munich: goo.gl/maps/5pogt pixelated :D
 
@Gordon but somehow not as well: goo.gl/maps/MRrTr
 
@hakre yeah, its actually only pixelated because google is not alone in that building and its suffices if one party requests pixelation
 
@Gordon so google pixaleted their own building? omg now I see °!
 
10:15 AM
@hakre yep
 
what I found funny as well is that they pixelated the name on the streetsign here: goo.gl/maps/es8YA
I mean as if that would be a secret.
 
@hakre if you move a bit it gets visible. might just be their car plate algorithm detecting a false positive
 
anyone worked with transposh plugin for wordpress?
 
Hey all!
 
@Gordon yes something like that. just making fun out of it. computers, you can't make them any more stupid.
 
10:24 AM
@Gordon Have listened to that song. It's rocking.
 
1 message moved to bin
@Appu its not Friday, so you may not post that :)
but yeah. its awesome
 
@Appu do you like Taylor swift too :P
 
@Gordon Yeah. It's late :P
@NullPointer I neither like nor dislike her :P
 
anyone know how to connect android 4.1 to ubuntu ?
@Gordon can you see how many votes have you got ?
 
What do you mean connecting?
 
10:31 AM
@Appu trying to connect tab to pc
but unable to transfer file
 
I have some question.
I have some scraper classes build on top of DOMDocument and friends.
Now I would like to write some routines for HMTL 5 data attributes.
I thought that I create a class that deals with that which takes a DOMElement in it's constructor like so:
class DomElementHtml5Data implements ArrayAccess
{
    /**
     * @var DomElement
     */
    private $element;

    public function __construct(DOMElement $element) {
        $this->element = $element;
    }
    ...
 
@NullPointer This could be of help I guess.
 
@NullPointer nope
 
I wonder if that is some pattern because this is not a true decorator.
But it will "add" new functions to a DOMElement.
I can imagine doing it this way can have pros and cons and if there is some existing pattern / paradigm about it there might be some stuff to read.
 
@Appu thankyou its working
 
10:43 AM
Glad it's working.
 
hi guys, can anyone help me about looping through dates?
 
Say I do all my text field verification on client side with JS and none server side, could somebody that wants to be a dink just copy paste my form and create a million blank things?
 
@XCritics just disabling Javascript would do the trick. Server side validation is necessary too.
 
> If you make an optimization and don’t measure to confirm the performance increase, all you know for certain is that you’ve made your code harder to read. - Martin Fowler in dx.doi.org/10.1109/MS.2002.1003448
@NikiC how about adding a Money Type to PHP?
 
Quick question
Let's say a project's requirement will never change (utopia!)
Should I still take the time to make it fully OO and extensible?
 
10:56 AM
@Gordon @NikiC Perhaps a more genric use like BigDecimal (java) would be of more use than a Money data type
 
@MadaraUchiha that's an odd question. I can see where you are coming from there but I think the premise that you do OOP only when you have changing requirements is a bit off. Agile is for ever changing requirements.
@pderaaij not to me
 
@Gordon I view OOP as a way to easily extend/refactor parts in the future
Sure it has other benefits, but is it worth the extra time/work for something that's 100% will never change?
You just "get it to work" and that's it.
 
@Gordon, what would you expect of a Money data type?
 
Hi guys, I have this code in my .htaccess to redirect http to https but it causes too many redirects error
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
 
@MadaraUchiha well, you already said it's a utopia, so why bother?
 
10:59 AM
@Gordon That's what I'm asking :P
 

« first day (875 days earlier)      last day (4064 days later) »