« first day (728 days earlier)      last day (4445 days later) » 
00:00 - 17:0017:00 - 00:00

00:00
@hakre Schoolgirl error? :-P Never had to do it so I have no useful input here. Good luck :-)
@DaveRandom I can only recommend it, discoveres a ton of file types including such as .sh:
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".

exec git update-server-info
@hakre By examining the data itself? I'm assuming the allocation table is unrecoverable?
@DaveRandom yes, it checks for file headers.
works pretty well, only the file-names are lost.
I do not understand why the allocation can not be recovered though
But it's not really a loss here, so I don't bother too much
00:15
@hakre You'd have thought the same principle could be applied to the allocation record, but file systems are not exactly my area so I guess there must be a good reason.
I'm pretty sure there is some reason. I do not know enough I must admit, but that software looks good to go even for quick recovery.
@hakre Just looking at it, if all the blurb is true it's very impressive
blurb? homepage was pretty low level :)
00:31
Yeh blurb is the wrong word (pretty sure it's not even a word), but flicking through the wiki
00:46
blurb is indeed a word
blurb blurb
now booting with drik's boot and nuke. After recovery comes destruction! yay :)
but that takes a long time
01:04
@DaveRandom wikipedia seems to be edited, the source they give does not have that: tools.ietf.org/html/rfc2616#section-10.4.17
@hakre No indeed, it is an edit from April, I was just looking for one of my old edits to the article in the revision history and I stumbled across that. I can't be doing with Wikipedia vandalism, but that did make me chuckle.
-2
Q: php print Issue

Dz.slickI'm trying to get the lines of code below to help me write "<?php include('like.php'); ?>" on a page only when the visitor isn't using a a mobile device but it doesn't seem to be working. I can't tell what I'm doing wrong. <?php if (screen > 699) print('like.php'); ?>

02:04
Hi
02:38
Anyone have an article like this with DI and fewer factories? oreilly.com/pub/a/php/archive/mvc-intro.html
Oh. No ones here really
Any domdocument & xml gurus online?
0
Q: How to generate xml with a node that specifies namespace for itself?

zerkmsThis is the result I'd like to have: <?xml version="1.0" encoding="utf-8"?> <types> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"/> </types> but using the straightforward solution: $document = new DOMDocument('1.0', 'utf-8'); $schema = $document->creat...

03:05
@Stephane Not sure how much people here trust in this article, but I enjoyed the reading anyway fabien.potencier.org/article/50/… Besides it being related with Symfony, it's easy to get the overall concept. Then you can start digging at their code on Github to see more complex examples. Just remember that those frameworks aren't perfect....
03:22
Great! Thanks! I'm also wondering about passing a Registry object. It seems like a lot of tutorials use that and it seems ... not right ... There must be a downside to passing this object through everything, but maybe that's what you're supposed to do (or at least what most people do).
@KeyneON Thanks
@Stephane Registry is the same as global state, you should only pass the dependencies you need, not a single class with everything.
@KeyneON thanks, that's what I was thinking. It's hard to find a tutorial that doesn't violate a lot of this stuff. It's crazy that I can see these issues, but I can't seem to find a tutorial that shows me an alternative. I hope you link is better.
@Stephane The link points to some static methods, which is also a kind of global state. But considering all these low quality articles on the Internet, this one is better. Read it, and keep looking. Don't take it as a final word.
You'll get some great ideas from it if you're starting just now in the framework land.
04:19
@KeyneON in the article I was reading, the Symfony DIC seems a lot like the Registry. Is it all that different? Also, I would love to see an example that includes a more complicated model layer.
@Stephane You're right. Symfony DIC is similar to a registry, it's actually a ServiceLocator: martinfowler.com/articles/…
I still don't understand why the authors chose for the ServiceLocator as the default. But you can use DI without using a ServiceLocator.
Right now, I don't have an article of a more complicated domain layer. =\
I mean you can still have DI with DIC. Simply don't inject the entire DIC.
 
1 hour later…
user895378
05:40
@Stephane Regarding dependency injection containers, the Auryn DIC is now stable and fully functional at v0.2.1. The wiki is fully-fleshed out and much more robust than it was the last time you were inquiring into the topic of DI.
@rdlowrey When did you start writing that? o_O
also...more neverending story stuf..............
user895378
@Lusitanian That was something that's been in the works for several months and I just put it into its own repo and polished it up in the last couple of weeks.
user895378
Used correctly, it's extraordinarily helpful when writing SOLID, fully dependency-injected code.
So basically, I'm going to get it and use it as a service locator.
user895378
05:44
lol. great. please don't.
class Controller { function __construct(Auryn $auryn) { $this->httpClient = $auryn->get('http.client'); }
amidoinitrightyet?
nah, looks nice as per usual
user895378
Looks like you copypasta'd from the Symfony man pages.
your phpdoc blocks don't match up though
lol yeah it does
for buildNewInstanceArgs its wrong, anyway
user895378
nice pull. I'll fix it. I hate docblocks. They're unnecessary when you write good code.
they're useful for typehinting and typehinting alone
and the @throws annotation can be useful at a glance but
when i see four paragraphs describing a method...
user895378
05:49
git commit -m "Fixed lying liar of a docblock"
user895378
git push
lol
woah you look unnaturally tan in your github picture...
moderately scary
hazards of living in south carolina i suppose
user895378
I haven't been that tan in a long time, actually. The last few summers I did a lot of surfing but I spent this summer at the computer all the time ...
user895378
Hazard of getting old.
i haven't been that tan ever...hazard of having red hair
WHY
user895378
05:52
So fathers everywhere can lord it over their families remotely.
user895378
WHO TOUCHED THE THERMOSTAT!?!?!?! MY PHONE JUST SENT ME A PUSH NOTIFICATION
user895378
if only
05:56
the world would be a better place
but yeah that's an easy one to explain. yo we're shutting down this 60 billion dollar company because yknow...i'm stressed out...........
wall street rage > cthulu rage
I guess thats how these news site maintain good alexa ranking lol
06:11
@rdlowrey cool thanks! and congratulations. nice work!
user895378
No problem. It's really helpful when you use it correctly.
Good morning
hello everyone
any one knowing about google map
user895378
good morning.
morning @ircmaxell
06:18
how goes it?
here is my post
0
Q: map is showing only half of itself

sourabh kasliwali have tried using resize function for showing full map but it does not work properly container is showing only half map i have tried many methods including resize, trigger please help me out here is html i ve used <input style="margin-left:67px;" type="text" name="fanzip" id="address" size=...

any help would be appreciated
and here link to jsfiddle
user895378
Well, I made the mistake of passing out on the couch from ~7pm - ~11pm and will probably be awake most of the night writing code :)
Morning.
@rdlowrey why is that a bad thing
@ircmaxell pretty good, how's europe?
06:22
awesome
user895378
@Lusitanian It's not really. The bad thing was having an energy drink and removing all obstacles to my all-night code-athon.
ouch
i'm currently trying to figure out how to get google news to hide election coverage
i don't want to see 8 articles called "why last night's debate both does and doesn't matter" and "did last night's debate matter? yes and no" and "the debate was a tie"
user895378
Don't get me started on the ineptitude of american political everything.
hehe
i have a love/hate relationship with politics, i suppose
but internet/politics don't mix
user895378
It's gross. If I accidentally see some garbage political coverage flipping through the channels it puts me in a foul mood.
06:27
Politics is the only profession i can think of that encourages lying
user895378
I at least feel better when I realize that it's not just modern politics. Politics has been a vehicle for corruption for freaking ever. I was reading the other day about the Crédit Mobilier scandal from back in the 1860s when congresspeople basically just pocketed tens of millions (maybe hundreds of millions) of dollars with no real repercussions.
user895378
$100M in the mid-to-late 19th century was a metric ass-ton of money.
interesting
will read later
and yeah
 
1 hour later…
@shiplu.mokadd.im @sourabhkasliwal Can you help me in Hindi PHP.
I want to know what array_flip do in PHP.
@Dev11 I do not know hindi
@Dev11 what is problem with English? or you are talking about Hindi text processing and layout?
Ok, actaully I am unable to understand from php doc website that is written in tough English.
Dev11 array_flip just flips an array.
isn't the example helpful?
means value will be keys and keys will be value
is this also remove duplicate values ?
$trans = array("a" => 1, "b" => 1, "d" => 3, "c" => 2);
$trans = array_flip($trans);
print_r($trans);
dump is === Array ( [1] => b [3] => d [2] => c )
@shiplu.mokadd.im
07:49
If there are dup values, it will be keys.
and there can not be dup keys.
Ok, thanks for your help.
08:05
anyone worked with twilio?
08:23
I need little guidance with the url rewriting..!! somebody.. please
-1
Q: Custom profile URL for own site, been though various posts..!

Hari OmI've been through a few similar posts, Facebook Like Custom Profile URL PHP Custom URL / Apache URL Rewriting But its still not clear, the actual method/process is not available.. Guys , little more guidance would do a lot.. I would like to put forward the questions here: Users should have...

Someone provided you with a very neat and detailed answer right?
@janenz00 yeah, thats the great answer, but now during implementation, I am facing little confusion..
@HariOm Bringing attention to such a bad question will only get you downvotes from the chat.
I replaced the old bad looking url with the curtom url by redirecting the page to that url but then how do I populate the data on that new url page..??
@Paul .. bad question, am sorry, but there was no detailed either question or answer in the whole forum.. I went through all
@HariOm You went through all of the apache rewrite questions? That must have taken a while.
08:34
well most of them
@HariOm - You need to play around with rewrite rules and urls to get this. Check out some opensource software which employe clean urls, try to find out what they do
currently as per the answer on the quoted question : I am able to create a clean url, redirect the user to that url but that redirecting creates a problem.. the newly redirected page is blank.. how do I populate it
@HariOm Cool, most people wouldn't manage to read over 2500 questions and answers on apache rewrite.
@Paul may be I was bad at getting what I was looking for.. the actual abc which the user @jonlin gave me in the answer .. I still have little questions
@HariOm Well, if you want a specific answer you'll need to ask a specific question.
08:42
I am using " header('Location: http://'.$_SERVER['SERVER_NAME']."/".$tempurl[0]);".. to redirect.. which obviously takes the user away from the current page.. may be this is the problem.. @Paul now, how do I manage to keep him to same page but change the url
@HariOm A different url should be a different page. Do you want to add something to the existing page?
@HariOm - If you do a header redirect, attach some parameter to the url to indicate which page it originated from. Then, in the target page, accept it as GET and process
You should have a database mapping between real url and the fancy url to do this
well.. I am referring to the answer on my question.. Now, I have created the fancy url, redirected to this new page.. so first half is done.. but second half isn't getting started..
there has to be a link between them
Yes i've used the database mapping.. current page was the actual target page.. so am confused
Add a database mapping so that in the fancy url page you can get the "fancy part" from url and query the database to get the actual url and then get its actual contents
@janenz00 I got the fancy url.. the problem is getting the content in new page with fancy url
08:50
What is your database mapping like?
@HariOm If this is for a large project I would suggest avoiding multiple rewrite rules and use a front controller pattern.
I've added the user table , a new column "my_vanity_url", and when the profile page is accessed, I check to see which user profile is accessed, then do a database lookup and then add the resulted my_vanity_url to the hostname along with redirection.. as header('Location: http://'.$_SERVER['SERVER_NAME']."/".$tempurl[0]);"
Then, in the vanity url, use the same database lookip to get the user details where my_vanity_url=theuserurl
and get the user details
but the newly redirected page comes out to be blank.. I mean, after redirection, I loose control.. so how do I proceed
09:07
oh he left the room
@Paul can you refer me to some open source project
@HariOm If you have a blank page, it is probably an uncaught exception in PHP see this which is part of the Reference for Errors (in the star list on the right).
no.. I know why is this page blank.. I've no code for this newly created page.. and I don't know why to provide code for this newly generated page..with custom url
Sorry, I don't know of a good open source project.
@HariOm Either $_GET or $_SERVER['REQUEST_URI'] should hold the information for you to be able to display the correct page.
09:30
well let me try again.. currently the profile page have same url for everyone with just different userid's like /profile.php?user=10727.. now on the same page i.e profile.php I am first checking the userid with $user = $_GET['user']; and then a database lookup to get the vanity_url, then redirect the page to new page with header('location')..
but this new page doesn't exist.. just its new url has been created on the fly.. so where do i put its code.. am sorry.. am working on the basics
morning
@HariOm You will want to process all of those vanity url's from a single place, so you would need a rewrite rule. The whole thing is becoming a mess though, I would suggest a single rewrite rule to a front controller.
morning PeeHaa
@HariOm Go with a front controller a router system as paul suggests
sure .. can you suggest me how that rewrite rule will loko like when I want to change the "hostname/profile.php?user=numebrs" to "hostname/custom_url"
@HariOm Simply route all requests to your front controller
In my projects I route all requests to the index.php file in the document route. This includes my bootstrap file which loads my front controller.
The Front Controller Pattern is a software design pattern listed in several pattern catalogs. The pattern relates to the design of web applications. It "provides a centralized entry point for handling requests." Front controllers are often used in web applications to implement workflows. While not strictly required, it is much easier to control navigation across a set of related pages (for instance, multiple pages might be used in an online purchase) from a front controller than it is to make the individual pages responsible for navigation. The front controller may be implemented as a...
09:47
Hey guys , I was just in c++ chat and I have a question for you . I program in php , that been sad : Does php suck?
@PeeHaa and what after that routing all requests to front controller
@GiovanniDiToro Neh. It's just stupid programmers. It's not the language.
thought so
@HariOm The front controller loads (dispatches) the correct files for the request
@HariOm something like: request -> front controller -> resource
/profile/peehaa -> front controller -> show_profile.php (with user id peehaa)
The way I handle that is by creating a router in which I can define all possible routes
are you assuming that I am using an mvc model.. but am not
09:53
@HariOm I am not assuming that. the front controller is a separate pattern
otherwise it would have been more like:
/profile/peehaa -> front controller -> ProfileController
I got your direction.. and could be manageable in an mvc model..
so for frontcontroller i got a wiki page.. what else refrence can I get to more thing about it
Yup. It can (and often is) also be part of an MVC architecture, but you can use it for other architectures as well. Just like a wheel can be part of a car, but also of a bike
some open source project for url_rewrting??
Hi guys ,
while working with photo upload I am getting this error.
`Fatal error: Out of memory (allocated 27787264) (tried to allocate 15054336 bytes)`
I have also updated php.ini with post_max_size to 64M .still its giving the same error ...Please help.
Dunno. I always create my own. It's not that hard
@HariOm
09:57
@Dev11 i can only provide you link :php.net/manual/en/function.array-flip.php
@Dev11 it switches the array keys and values, but I really suggest reading the official php docs for these kind of questions. It's all in there as @sourabhkasliwal states
@rajesh Seems like you are doing something in a loop (hard to tell without any code).
Either way the error states what the problem is
@rajesh Check your memory_limit in php.ini.
@PeeHaa the bad things is that my code doesn't even have a particular structure.. so as per your direction .. /profile/peehaa -> front controller -> show_profile.php (with user id peehaa) ..

Even in this case.. the url wasn't managed
Sounds like a design issue you may need to fix first in that cased :)
this is what I got in php.ini file
`max_execution_time = 30
max_input_time = 60
memory_limit = 64M`
10:08
@PeeHaa is this last statement for me..??
@HariOm yep
well... whatever be the structure.. the collection works good.. I am just trying to manage the url
You could still use the fron controller pattern
can you please take a look at this answer and give little hints.. stackoverflow.com/questions/12711371/…
Seems like a pretty complete answer already
10:14
yes.. but after first half.. when I come to implementation of second part.. the page again comes blank
which is a newly generated vanity url page..
Check for errors
in the last step in first half.. I redirect the page to new url page.. then I don't know how to populate this new page. . just that..
I don't understand the logic.. so yet its all fine without errors
Just use the username from the url to query the database to get the uszer info
mornings!
i got a question.. I created a MY_Controller in codeigniter, i set a variable in there, so i can check if i can access that variable in the view, how am I going to do that?
10:18
@NikiC Guten Morgen!
@JoeySalacHipolito I doubt you will get a lot of CI love in here
oh i see, thats what i thought.. hahaha...
Please any body help
@JoeySalacHipolito how did you set the variable in your controller?
i set it before the constructor like this private $foo;
@PeeHaa but before that userinfo lookup.. I need to know where to put this code.. as I redirect the user to a new page with new url.. which doesn't exist
10:21
then i set its content like this $this->foo = 'some text in here';
You need to pass it to the view IIRC. Something like: $this->load->view('viewname', array('foo' => $this->foo))
@HariOm That's why you need a front controller
And in the view you should be able to do something like: var_dump($foo);
disclaimer: I have never used CI, so this may be wrong
hahaha.. i'll give it a shot and tell you/
hold on
@rajesh Based on your error message it seems like the memory limit would be 32M. Try var_export(ini_get('memory_limit')); Maybe restart apache or check for another php.ini somewhere?
or use phpinfo() to find out what is loaded from where
10:25
@PeeHaa i'll also try this out.. thanks.. for ur time
Yes, what PeeHaa said.
Hello guys... I'm not particularly familiar with PHP. I have one question: How difficult is it - in a PHP file which represents a dynamic web-page - to retrieve data from a JSON file and then generate a HTML structure from that data? That HTML would then be part of the generated HTML document.
not work... gotta clean up the code... then try it out again..thanks much @PeeHaa
@ŠimeVidas json_decode
And use the info from the json string to build the page
@PeeHaa Would you know how it compares performance-wise to retrieving the data from a mySQL database?
10:29
@ŠimeVidas Well. It all depends where the json string is coming from
@PeeHaa The JSON is stored in a .json file on the same server.
The thing is, I can transform JSON to HTML easily on the client-side (in the browser), but then the Google crawler doesn't see it, so I would like to do it on the server-side instead.
@ŠimeVidas In that case I don't think you would have to worry about performance. The thing I would worry about though is that it isn't (easily) searchable. But I don't know how big a porblem that is
@PeeHaa What do you mean?
The generated HTML is the same regardless of where the data is (JSON file vs mySQL DB)
And by searchable I mean: when it is in SQL you can easily query it. When it is in json files you cannot run a search query
Aha
No, it's a simple structure.. a hash basically.
I think I'm fine then. Thanks :)
10:32
Loading it from a .json file is perfectly fine :) np
@Paul Please see my php.ini configuration tiikoni.com/tis/view/?id=fea2cbe Please help
@rajesh That seems ok to me. I don't know why it would run out around 32M then. Sorry, I have no ideas.
11:20
@rajesh there is also upload_max_filesize and post_max_size
morning
morning @tereško
Hi everyone :)
11:30
:)
haha :)
im doing my FYP and i want user to create quizes (MCQs and fill in the blanks)
i've made a sql table for that and im saving 4 options and a correct answer, can i create fill in the blanks?? with the same table?? i dont know how i would create a question for fill in the blanks..please help
@PeeHaa my uploaded_max_size is 256 MB and post_max_size is 64 MB
11:43
@rajesh That should be upload_max_filesize (do you have a spelling mistake?)
12:14
Sup Y'all
0
A: map is showing only half of itself

TrottWithout the corresponding relevant HTML elements, it may be impossible to say what is going on here, but the obvious things to look at would be: setting the zoom level on the map so you can see everything you are trying to see checking to see that the HTML element that you are using to contain ...

Any Drupalers in here who can help, please? drupal.stackexchange.com/questions/46536/…
 
1 hour later…
14:01
hi all
user1125394
14:33
anyone played with xmpp here?
hi
I get this message

Parse error: syntax error, unexpected T_STRING in /home/a6047146/public_html/test.php on line 24
for this line

$sqlqry = "SELECT * FROM $tbl_name LIMIT $start, $limit";
any idea of the problem?
user1125394
"$s" is not interpreted I think
@Sidath `the problem is probably on the previous line
I typed the whole thing over
now its gone
but there's a new one
$pagination .= "<div class=\"pagination\">";
Parse error: syntax error, unexpected T_CLASS in /home/a6047146/public_html/test.php on line 36
14:52
1. Is that line 36?
2. Do you use editor with syntax highlighting?
15:20
@Sidath By any chance did you copy/paste this code off the internet? I've seen slightly odd syntax errors like this when there are a load of ISO-8859-1 non-breaking spaces from this operation. (&nbsp; => 0xA0)
ya
wait
okay
finally i got it
stupid spaces
15:45
hello :)
user1125394
How to redefine an existing function in php?
@Jocelyn Hola
@cyril function overloading is not possible in PHP
What do you need it for. Perhaps there is a better / other way
(You could hack the C source, but no.)
user1125394
I have a general 'tabs' function in common-utils.php, then I have several applications, by default they use it, but I would like for some to customize it
user1125394
hmm need some OOP then
15:52
@cyril For starters a file called common-utils.php sounds like a huge design error. Not we got that out of our way:
You can always create a wrapper function which you call in your project
user1125394
@PeeHaa I did not choose the name nor made it
You could call someFunction in your project which uses yourCommonFunction (or not)
user1125394
but with a different name?
Yep. Only way to do it when they are both in the same namespace (I assumed both will be in the global namespace)
user1125394
yep, but another clean way would be to extend common-utils?
15:55
@cyril Is common-utils a class?
user1125394
damn no
user1125394
lol sorry
user1125394
I did not made that shit
Holy Wall of Code Batman!
15:57
@cyril Only thing I can think of is using some proxy function like I said before :(
@NullPointer wow
Help vampires are my problem. Quality assurance is my problem. Duplicate accounts are my problem. Guess who is the problem? — PeeHaa 51 secs ago
user1125394
@PeeHaa yep thx, caling it tabs_default in common_utils and using in the apps: if(!function_exists('tabs')) {tabs = tabs_default; } ;
@PeeHaa peeha how to do this ? i havent got any link
to do thi s
user1125394
if(!function_exists('tabs')) {
    tabs = tabs_default;
}
@NullPointer Do what?
user1125394
16:05
E_PARSE: syntax error, unexpected '='
@PeeHaa and
it
user1125394
forgot $ sry
if(!function_exists('tabs')) {
   tabs_default =  tabs ;
}
@cyril What are you trying to achieve?
@cyril I was more thinkins something like: pastie.org/5052920
@NullPointer [tag:cv-pls] http://stackoverflow.com/questions/12524505/running-c-program-without-the-use-of-terminal
?
16:08
The website is offline
Aaaah redundancy failure
lol
Aaaaaand it's back
We will be testing our redundant datacenter at 16:00 UTC - hopefully you won't notice (except for this message)
Eeeeek lost my session
@PeeHaa and @Jocelyn isnt it very unusual that a site like so down for maintenance
It's still showing as offline to me
16:09
> Login is currently unavailable
@NullPointer Yes, it is understandable
@NullPointer Not when it is planned maintenance. There are some things that need services to be restarted
ha. Now I get an ASP error
PeeHaa! stop breaking the website! :-p
00:00 - 17:0017:00 - 00:00

« first day (728 days earlier)      last day (4445 days later) »