« first day (915 days earlier)      last day (4258 days later) » 

16:04
Oh god, I've gone terribly wrong and I know it.
I know you're not supposed to have models within a service container.
evening @NullPointer
AFAIK putting domain services in a container is ok.
Would you call a userModel a service?
Reason being, injecting the dataStore into the "userModel"
@Jimbo if it represents a single user, then most certainly not.
16:09
@Jimbo what is "service container" ?
Umm.. an anti-pattern? :-)
what i the aim of it ?
@Jimbo there is no pattern by such name
To provide a kinda of lookup table for classes which, yes, creates coupling but only to the container itself, which I'm fine with
Maybe I meant DiC
then figure out what you meant and what the words that you use actually mean
.. i have to deal with enough stupidity at work already
16:13
hehe, sniped the AA from Kolink
@Gordon AA?
i was not aware that he used batteries
@NikiC Accepted Answer
@Gordon bad moderator, no donut
16:17
@ircmaxell "sniped" as in I provided a better answer and the OP switch the AA to mine
Does .htaccess deny have any effect on running a cron curl task?
@Jimbo hiya
@Gordon yeah, nicely done ^^
@ircmaxell Mods cannot change AA's
I know what you did
16:24
@ircmaxell ♫♪ in a magical kingdom ♫♪
I just have it on repeat
659 questions tagged
@ircmaxell I like the intro better than the remaining song though
fair enogh
repcap ftw!!!
16:34
Have a good evening all :)
posted my first Gist =oD Nothing worthy of being forked, but still a life accomplishment for me =oP
@Gordon ncie, I'm still off
@crypticツ YAY!!!
@ircmaxell thanks
@crypticツ link or it didnt happen
@crypticツ we have to improve that
16:44
yay forking!
Can I give someone else write access to a gist?
or is that only for repos?
I don't think you can
maybe orgs have their gists?
and you can't make pull requests for gists either
If so, gists have git http access
so you can push and pull from commandline
yes, in theory you could merge changes
16:46
but it uses your login password on github
but there's no easy way to do so
add remote?
pce
pce
hi!
hi!
new finishing sentence found: "Have I missed the solution in a posting here?"
I will use it in my next question.
17:02
So, yeah. Installed Ubuntu on laptop
So far it works great
(Though I have yet to install anything other than Chromium)
@hakre Just is enough. The extension converts it to automagically :P
And then back to once the question gets closed.
    // @crypticツ how about

    class CdnResolver
    {
        private $httpClient;
        private $cdnUrls;

        public function __construct(HttpClient $httpClient)
        {
            $this->httpClient = $httpClient;
            $this->locations = new SplObjectStorage;
        }

        public function addCdnUrl(Url $url)
        {
            $this->cdnUrls->attach($url);
        }

        public function resolve()
        {
            foreach ($this->cdnUrls as $cdnUrl) {
                $response = $this->httpClient->head($cdnUrl);
(see full text)
Still waiting for all of my extensions to be synced though :|
@MadaraUchiha oh that's a pro tip :) THX
@crypticツ of course that will be much less convenient to use than your version.
@Gordon whoa, that's way over my head =oP
17:08
@crypticツ yeah, dont mind it. It's what happens when you let someone with OO brain damage rewrite a pragmatic working function. Basically, the main thing in your function that needs fixing is that you dont set stream_context_set_default back to use GET, which means all your further calls to the http stream wrapper will use HEAD requests. So that's a bug.
@Gordon is there a quick way to do that without repeating the same thing with HEAD changed to GET or a way to just set the stream context for just that one use.
^ PHP in strict mode complains? True? Not for me, was that with some buggy PHP version once?
@crypticツ you do it like in the example given at php.net/manual/en/function.stream-context-set-default.php
@Gordon I think I can use stream_context_set_option()?
4
A: Can anyone explain this php code?

Aziz$a is a string that holds the value "2". Strings in PHP can be indexed to access their characters using square brackets. For example: $a = "abcde"; echo $a[3]; // This will print 'd' When the index is a string, PHP tries to parse it as an integer. If the string is not a number, parsing will...

17:13
@crypticツ $default = stream_context_set_default($default_opts); and when you are done, you just use $default (which is the old context) and set it back
omg - is this ever of use?
@Gordon what is PHP doing different when I set it to a variable?
@crypticツ nothing. it's just the old default, which you can then revert to
but granted, that example does not show how to do that
let me fetch a better one
:8932525 would this work?

    		$default = stream_context_get_default();
    		stream_context_set_default(array('http' => array('method' => 'HEAD')));
    		$headers = @get_headers($primary, 1);
    		if ($headers && FALSE !== strpos($headers[0], '200'))
    		{
    			$online = TRUE;
    		}
    		stream_context_set_default($default);
17:23
0
Q: Detect UTF-16 support, and replace with images otherwise

KolinkAs part of an HUD I'm designing, I'd like to use this symbol: 🏥 Since my site serves files in Windows-1252, any characters outside the 0-255 range are represented as &#x____;, with appropriate hex digits filling in the blank. In this case: 🏥 However, when testing this out I noticed that...

@crypticツ no, because stream_context_set_default ( array $options ) and $default is a resource
kolnik asks a question (not a specifically good one though).
:8925371 @hakre yup naming problem :) -- no cross channel reply support
Ok so this?

$default = stream_context_get_options(stream_context_get_default([]));
stream_context_set_default(array('http' => array('method' => 'HEAD')));
...
stream_context_set_default($default);
@crypticツ get_headers() already works by HEAD method...
17:27
@crypticツ Y U NO USING FIXED FONT KITTY CAT?
@kaᵠ no, it doesnt
@Gordon wut?
@Gordon because it messes up the ping and the rest of the non-code text. I'm stoopid when it comes to markdown =oP
@crypticツ that should work
On a side note, what is this type of code formatting called if anyone knows?

        $old = stream_context_get_options(
            stream_context_get_default(array())
        );
@crypticツ "normal"?
17:32
@NikiC lol, no I mean putting the 2nd function on seperate line even though they are all of the same statement
@crypticツ assuming you have a char per line limit, you have to do that in any case if the function names are too long. Thus "normal"
I think she means whats the formatting style called.
@Pheagey common sense style?
Hi, Working in PDO with varnish $db->get_pdo()->prepare($insert); is not insert the table. But working with out varnish . Any idea ?
@hakre "my site serves files in Windows-1252" :(
17:34
"common sense" is so uncommon it should be a super power...
@NikiC ah okay, you mean kolniks site. Yeah, why not? He even uses HTML entities.
I can fit it all on one line with my 80 char limit, but would it be better practice to put it on seperate lines like that for readability?
kindly advice
@hakre UTF-8 is the only true encoding!
@NikiC Youngster ;)
17:35
@hakre :(
@hakre oldie
@Ocramius :(
lol
@crypticツ i say yes....
@crypticツ imho if its a low limit like 80 you can well put it on one line
17:38
Any one have an idea on varnish cache server ?
@NikiC: Maybe we should tell kolnik that he must use a compatible encoding...
Evenings
my browser does not support this windows thingy.
@hakre hahaha. no one uses netscape. real men (and women) use lynx!
@Gordon real men use curl
17:41
@Gordon dd if=/dev/modem of=/dev/fb0
@PeeHaa埽 real men use telnet and HTTP
What is a telnet?
@Ocramius why would I copy the modem into the framebuffer?! Oo
I think I will pimp my HTML 2 Wordpress theme and create an image filter that is rasterizing images to 16 colors or 256 colors fixed palette when uploaded.
@Gordon yeah, I suck at unix :P you get the idea
17:44
@PeeHaa埽 man telnet
That should give it really cool old style.
@Gordon what is a man?
real men look into the source instead of using lame man pages
Real men use jQuery.
it actually has UTF-8 encoding!
@webarto I think there is a plugin for jQuery to make jQuery more like jQuery...
17:46
so win for lynx
@hakre yeah, I told you lynx is awesome :)
and its also quite secure
but if you want to get really fancy, try csdb.dk/release/?id=48032&show=notes
that would make you one of the really really really cool kids
0
A: Detect UTF-16 support, and replace with images otherwise

hakreIt is not only enough to properly encode the charset information inside your HTML document, but on the other hand, the browser must be able to use the right encoding (check the settings) and it must be able to display it. In the following example, the browser is properly configured, it is just th...

I spent 2 hours this morning predicting cache miss request rates under load. During actual test, real numbers within 1%. #win
I have to leave, so until later.
Just as this is for Kolnik: Please upvote into oblivion: stackoverflow.com/questions/16089337/…
And leave comments like: If the answer helped you, please accept it and so on.
:)
@hakre Like so? :P
17:55
:) madara
@MadaraUchiha have you decided?
Hi Dear Friends ....
I am stuck in an issue , i have multiple check boxes against each user , I need to update database based on the selection of these check box . i want to know how do i store this info in database . Do i use Switch for each like below
switch ($msg_id)
{
case "1":

SQL Query to update for 1
break;
case "2":
SQL Query to update for 2
break;
case "3":
SQL Query to update for 3
break;

}


What would be DB table structure for this
in above scenario , msg_id is the primary key of message table
@PavanGjakati Each check box option could be a true/false value in the DB cell. Kind of a raw way of doing.
@Pheagey Sir , I need to update 0 or 1 based on the selection . i wish to know the DB table structure
	User Management
#	Id	Name	Lastname	Email	Check Box 1	Check Box 2	Check Box 3
101	 Billly	Blueton	bb5@phpeasystep.com
102	 Jame	Campbell	jame@somewhere.com
103	 Mark	Jackson	mark@phpeasystep.com
104	 Linda	Travor	lin65@phpeasystep.com
105	 Joey	Ford	fordloi@somewhere.com
106	 Sidney	Gibson	gibson@phpeasystep.com
@Pheagey Sir , if you see that , thats my front end with name and other details folloed by 3 check boxs
its a table but not showing properly here
@Pheagey Sir , You there ??/
msg_id int(11), sender_name(varchar 64), email_Addres(varcahr(64), check_box_1 (boolean), check_box_2 (boolean), check_box_3 (boolean);

Something like that what you are looking for?
For MySQL boolean would be data type bool.
I have same table structure as you mentioned Sir , i am stuck on how to update these tables from php
18:09
Ah, ok. Your looking for the SQL statement, yes?
@Pheagey Sir , I want to know how do i store data in those tables from php . I am looking for php code and sql query to update these tables
Ok, 1st question then: what PHP library are you wanting to use; Mysqli or PDO, or a different one?
@Pheagey Sir , Do i need to use switch to store or how do i store . What mysql query would i use . I am very thankful for your help
@PavanGjakati please use Fixed Font
@Pheagey , I am using Mysql
18:11
@PavanGjakati This one: php.net/manual/en/book.mysql.php ?
@Pheagey Sir , below is my code where i am send mail for each check box selected . I want same information to get store in db table

<?php

if(isset($_POST['submit']))
{
//$name=mysql_real_escape_string($_POST['Name']);
//$worked=mysql_real_escape_string($_POST['Worked']);
$hobb= $_POST['Emails'];
if(empty($hobb))
{
echo("<p>You didn't select any Check Box.</p>\n");
}
else
{
$N = count($hobb);
echo("<p>You selected $N Option(s): ");

include ('connect.php'); //connection setting for DB
include ('class.phpmailer.php'); //Php SMTP Mail class
(see full text)
@Pheagey Sir , You are there ?
@PavanGjakati , don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.
18:15
damn, burning up all my votes to dv :(
Item 1: Please don't use the mysql extension for PHP. Its old, its insecure, it is also deprecated. USe mysqli, pdo, or other modern extention.
2 : The SQL command your looking for is 'UPDATE'.
3 : I am here...but Im also at work :)
@Pheagey Sir , Okay thank you .
it isn't real code anyway
@Gordon how did this user close this question with < 1k rep ?!
@kaᵠ flagged as bad
18:21
@PavanGjakati Your welcome. hope that helps
wow, if i only knew before...
@Pheagey Sir , I know Sql queries and stuff . I am stuck with this query where an update is needed based on the msg_id . So sought help .
indeed
UPDATE table_name
SET column1=value, column2=value2,...
WHERE msg_id=the_msg_id

Like that?
@Gordon Sir , is there anyway to add you in my friend list ?
18:25
@PavanGjakati You can add him to your "friend list" by getting him something from here: amazon.de/gp/wishlist/9AKS27X77KGH ;)
does anyone knows how to convert github.com/LeonardoCardoso/Facebook-Link-Preview to asp.net ?
@Zerotoinfinite no nobody does
pce
pce
@Zerotoinfinite /me had to work with COM ActiveX Object API today and i don't like the M$ closed technoligies.
@PavanGjakati please , do not start messages that have no value to others or are meaningless without context
@tereško i seriously don get why would you say that , i had some doubt and wish to clarify with expert help . i accept that i am a newbee to this site but that does not mean i cant use it
18:32
Aaaaaaaaaand it's gone :)
@PavanGjakati there are no experts here, only some people interested in programming mostly
expert is so final
42.
@kaᵠ Okay Sir , thanks for your information . Appreciate it
@kaᵠ 42 is the truth to all things...
@kaᵠ Yeah, I have
Went with Ubuntu
I have plenty of memory to spare, and I do like eye-candy :P
@kaᵠ whats that 42 sir , i dont know
18:41
@MadaraUchiha i feel Unity is counter-productive development wise (you have to move your mouse to the left and wait 1 whole second!!! inacceptable.), maybe useful for entertainment/slaking => therefore went with XFCE
@kaᵠ Sir , Would you be able to help me with my problem ?
@kaᵠ You don't have to auto-hide it.
@MadaraUchiha and steal part of my screen, no thx :P
@PavanGjakati sorry, i don't know mysql_
pce
pce
@MadaraUchiha you could also use awesome WM with unity, after some new Shortcuts you may love it ( keramida.wordpress.com/2012/10/18/awesome-wm-in-ubuntu-12-04 )
Awesome WM?
pce
pce
18:44
yes, it is a tiling WM
Widow Manager apparently
@pce How does it work?
@pce use yakuake/guake ?
pce
pce
@ka no. what is it?
@pce What does it do?
Define areas of the screen for sized windows?
pce
pce
18:47
@MadaraUchiha you can have all the gnome-applets that come with ubunut, but it's fast and fun.
Yes you can think of tiles, differnet layouts for windows, and if you have more than 3-4 windows you can move them to another workspace.
@pce if you use the terminal you'll fall in love with it
@pce I still don't understand the purpose of it.
pce
pce
it's handy, if you have a typical Setup, like the Browser on the left, the terminal on the right...
it's not only the terminal, just type [MOD4(Windoskey)] + [Enter] and run any progam.
It's lightweight like fluxbox, but with gnome/unity you have the best of both worlds.
@pce Can you describe, with a single sentence, what its supposed to do?
Is there a name for declarative languages which can define their own grammar? Like an XSD for the XSD model, or an EBNF for the EBNF grammar.
pce
pce
18:55
@MadaraUchiha If you want to have more than one window open and don't like overlapping windows, a tiling WM assists like a LayoutManager for windows, but also makes it easy to move windows to another workspace and switching workspaces.
@pce I'll give it a shot
pce
pce
@MadaraUchiha on Ubuntu you have only apt-get install awesome, but then it' doesn't look good as unity, you have to Setup a Session for Gnome (described here: keramida.wordpress.com/2012/10/18/awesome-wm-in-ubuntu-12-04 ), after that you have the best of both worlds.
@Bracketworks Metalanguage or Metasyntax?
What's the best practice for a constructor? Use the class name or the magic word?
@user973810 magic word
public function __construct() {
always.
So you don't have the pointless method in extended classes? Or is there another reason?
19:02
@pce Doesn't Ubuntu use Unity and not Gnome?
What exactly does it mean "routed on the public internet" on this table? Does it mean that those IP addresses are not on private networks?
pce
pce
@MadaraUchiha yes, but if you install another WM, they don't use the Gnome Session, by default.
@crypticツ those are ranges reserved for private networks, actually i see there're more, anyway, those IP's can't 'get out' on the internet
Oh I googled around a little and found a question about this topid... stackoverflow.com/questions/217618/…
@MadaraUchiha Unity is something 'over' gnome//smth like that
19:06
Thanks all. My curiosity has been slaked.
so .. it will be pizza for the 2nd meal
what have i missed ? anything entertainging ?
@tereško I installed Ubuntu, finally.
why would you ever expose you that thing ?
@tereško Ummm... What?
if the goal is to learn more about linux , then that is the wrong way
19:09
@tereško it's not wrong, actually quite a good starting point, after that you can goto slak;
@tereško I want a fast, easy to use, GUI enabled development environment.
well , it's one of the slowest , when the update will break something , you will have to reinstall it (because you will have no clue how to fix anything) and on subjective note - i hate unity
@tereško What do you use?
freebsd with kde/fluxbox environment
and with no environment on the servers
We now have a target date of the weekend of 4th/5th May for the release. We have checked with core teams, and this seems to be acceptable for everyone. This means we are able to begin the final preparations for a release of Debian 7.0 - "Wheezy".
19:23
@webarto Yay!
@tereško you have to compile most of the linux stuff on freebsd to use?
pce
pce
the Machkernel which *BSD and OSX uses is a microkernel and the linux kernel is more for performance and not to play games with memory and cache ;)
19:39
@DaveRandom icons/ folder and icons inside are missing in chrome-cv-pls/src/
@DaveRandom and other missing files...
This still blows my mind. Entire TCP/IP stack implemented in ~600 LOC of PHP: http://dunkels.com/adam/phpstack/
MGE
MGE
Hello, somebody knows why it doesnt delete from the database? pastebin.com/2j0u95My
@igorw FAIL. Not on github
MGE
MGE
it doesn't show any error
full tcp/ip stack in 600 lines of php? that is mental, yet linux still cant get it right... should have just stolen from bsd like ms did with ipv4
hmmn, not just a tcpip stack in 600 lines, it also implements a basic httpd on top of the stack too...
19:55
waiiiitttt.....
WTF
the code is horrific, but that's besides the point
when i see stuff like that, sort of makes me feel like i should just stop bothering and pick a different career path.
To reduce the complexity of both the TCP/IP stack and the web server, the web server does not parse incoming requests. Instead, it uses the TCP port number of the incoming connection to distinguish between different pages or pictures.
@ircmaxell it's from 2004 ;-)
@igorw still
using consistent indenting would be nice
  /* Calculate the TCP checksum. */
  private function
    tcpchksum(&$packet, $len)
    {
      $sum = 0;

      $sum += ($packet[IP_HDR_SRCADDR1] << 8) |
	($packet[IP_HDR_SRCADDR2]);
      $sum += ($packet[IP_HDR_SRCADDR3] << 8) |
	($packet[IP_HDR_SRCADDR4]);
      $sum += ($packet[IP_HDR_DESTADDR1] << 8) |
	($packet[IP_HDR_DESTADDR2]);
      $sum += ($packet[IP_HDR_DESTADDR3] << 8) |
	($packet[IP_HDR_DESTADDR4]);

      $sum += IP_PROTO_TCP;

      $sum += $len - 20;

      for($i = 20; $i < $len - 1; $i += 2) {
(see full text)
or just a proper tabstop I guess
19:57
@ircmaxell: your PHPPHP is essentially an implementation of the PHP language, written in PHP rather than C/C++ correct?
isnt having a compiler/interpreter for a language, written in the language, one of the core requirements for declaring a language as stable/standard/mature
MGE
MGE
Somebody knows why it doesnt delete anything? It doesn't show any error: pastebin.com/xivm1d4r
ie. all C compilers are now written in C, where as the first ones were initially written in ASM or some other language
@bizzehdee No. GCC 4.8 is written in C++.

« first day (915 days earlier)      last day (4258 days later) »