« first day (1324 days earlier)      last day (3628 days later) » 

12:00 AM
Actually your use case for better legacy code support has changed my mind. I think not hard coding the injector as the second parameter is probably a good idea
 
cool.
 
I also don't mind prepare as a name. I think setInitializer might be a good replacement. I think a getter for that might be good but I honestly can't think of any use case for it
Completely off-topic, what do you guys think about an optional define for share? function share($class, array $define = array())
 
@cspray What's it do?
 
@Danack Instead of doing something like...
$injector->share($class);
$injector->define($class, [...]);
You could just call $injector->share($class, [...])
 
@cspray Not an instant fan. But my PR tomorrow would allow you to do that yourself if you really wanted to...
 
12:16 AM
Well, interested in what your PR will look like
 
12:43 AM
Hello everyone
I am using this theme
http://shapebootstrap.net/wp-content/plugins/shapebootstrap/demo.php?id=116
the slider autoplay get activated only when I click next or prev.
how can I make it auto play directly when the page loads?
 
@rdlowrey I see that writing code in C mostly as premature optimization...
 
 
1 hour later…
2:21 AM
how could I make it so that every 4 items replaced using preg_replace it switches to a different replacement?
 
 
1 hour later…
3:50 AM
hello @coderzz
 
4:03 AM
me vs ajax ^
 
4:31 AM
Anyone know a website with a good example code of ajax sending and then getting response of php json array?
 
 
2 hours later…
6:08 AM
hello? fast question do i have to call $.ajax ?
 
6:22 AM
@user3470815 where?
i use this:
var call = $.ajax({
type: "POST",
url: "path/to/file.php",
data: {var1: "value1", var2: "value2"}
});
call.done(function(msg){
if(msg == 1){
alert("It outputs true");
}else{
alert(msg);
}
});
call.fail(function(jqXHR, textStatus) {
alert("textStatus);
});
 
html Form---> Button calls sendInfo(), this method sendsInfo with the new XMLHttpRequest, etc to php, and after that I want the $.ajax to capture a json_encoded array that the php generated with the sent info anyways ill try that
I was trying:
$.ajax({
type: "GET",
url: "./sacadatosdemysql.php",
async: true,
success: function(data){
var data = jQuery.parseJSON(data);
alert(xhr.status);alert(data);
for (i=0;i<data.length;i++){
alert(data[i].modelo);
}console.log(data);
}
error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(xhr.responseText); }
});
and wasnt getting not one alert, so i thought $.ajax musnt being executed
 
6:43 AM
@JanakaRRajapaksha in time you will understand that simply giving a piece of code has no real value. They will simply respond with "it doesn't work"
@user3470815 did you ry opening browser's developent tools ?
you should be able to see in the "network tab" a request going out, if the XHR request was sent
and the response
if there is no outgoing request, then the JS part is wrong
if there is an error message in the response from server, then JSON parser will create null
... or at last, I think it would be null
 
I see the parameter shows the correct value it must send, but in response it displays the whole code of the origin page thx
 
Mornings
 
welcome @ShankarDamodaran
 
7:01 AM
so ... did you fix it?
 
I am DoS attacked, what do I do now?
 
@tere
@teresko no..
@AwalGarg as a start point, close off all unused services/daemons and install the latest security patches
 
I have no unused services...
 
@tereško he asked good resources, so i gave a start point.
 
actually the "starting point" would be to make sure this it is actually DoS attack and not simply bad code. Like some endless loop or bad SQL queries.
 
7:10 AM
@tereško no, its DoS...
 
@AwalGarg so you dont have any open ports youre not using?
 
its coming from a russian IP
@user3470815 nope, I have 80 and 443 only open
ok, I checked again, its coming from two different russian ips..
But, I guess, maybe, they would be spoofing ips, so I am not sure if it is a Russian attack..
 
@tereško DoS Attack with Awal but i replied to user347
 
you mean, user347 is also having DoS problem?
 
7:13 AM
ah, ok
 
user347 is the one who asked about ajax
 
@AwalGarg maybe you could try a ddos protection script:
 
is cloudfare.com reliable? They say pretty promising things
 
ok, it is blocking on based of number of connections. A few of genuine user also have similar number of connections. But, on different pages. Can I whitelist them?
 
7:17 AM
Is anyone got a problem with events not working for dynamically added contents?
 
mornings
 
Maybe you could just move to a different IP or server?
 
ok, I will ask my service provider, thnx so much...
 
@JoeWatkins foreach($users as $user){ echo $user." mornings"; }
 
@JanakaRRajapaksha, Warning: Invalid argument supplied for foreach()...
 
7:23 AM
did you define the list of users?
$users = array("Shankar", "Awal", "Joe");
 
@ShankarDamodaran Assume i define an array $users including all users here ;)
 
lol
@AwalGarg to prevent such minor attack the easiest ways is to have two tiers: a webserver which does the actual work and caching proxy in front of it with a short TTL for the cache (several seconds or so)
though, doing optimization on the webserver itself could also produce some results, depending on code that it is running
 
7:46 AM
@teresko I forgot a ' on the query, now in the response i get the origin page source+ the desired echo json($resultquery) , how can i get out the page source from the response?
get rid
 
what are you using on the back-end of your application ?
 
you mean ide?
xampp
 
no, I mean PHP
 
phpmyadmin?
 
emm .. what ?
phpmyadmin is not made for generating json
 
7:51 AM
I dont understand what you mean with back-end
apache?
 
Which codebase is the sacadatosdemysql.php a part from ?
 
Sorry i dont understand, sacadatosdemysql is the main page, it has html,js,php
the $.ajax calls the page its in, it has different php blocks, but only one does the echo($resultquery) it needs to grab
only one block of all phps makes an echo
 
8:06 AM
 
@Jimbo welcome
@tereško I actually commented the .$ajax and im getting the same output so actually the $.ajax isnt executing
So theorically when does $.ajax execute?
 
hire a developer
 
im thinking about it ..
would you recommend me one?
 
8:27 AM
Mor
 
Ning.
 
8:45 AM
Zzzz
 
9:22 AM
good moaning
 
moan gooding
 
mood goaning
Lol, sat here, boss says "you're code isn't working - fix it, it's not been working for ages"
I go in. Sysadmin (him) hasn't installed s3cmd on the server.
He installs it, bam - code instantly working again
 
Hey, I spy an @Tyrael hiding over there. Quick, everyone badger him about merging some PRs!
 
if you added elements to the dom dynamically, why those element's events are not working
 
Have you asked in the javascript room?
 
9:26 AM
@JanakaRRajapaksha Reproduce code in fiddle please
 
yes, but there is no one sorry to bother
 
You need to use (if you're using jQuery) $('.non-dynamic-parent-element').on('.dynamic-element', function() { // HERRO });
 
@DaveRandom ok
 
^^ The old method was .live(), right?
 
Yeah and .bind()
 
9:27 AM
@DanLugg exactly
 
Right.
 
Now it's .on()
 
.on() is the "one true way" in modern jQ
 
i used it too. but didn't work i am making a fiddle]
.on() not worked
 
md5() is important too.
 
9:28 AM
so i use .live() and 1.7.1 lib
 
$(md5(md5(md5('.element'))));
^ Security
 
<f17971fc97fff933d6d009675c84de7a>Hello world!</f17971fc97fff933d6d009675c84de7a>
 
wtf
 
no idea I just searched for daverandom
Apparently he likes rockets
 
9:39 AM
There's nothing like cold pizza for breakfast
 
@DaveRandom dunno, I tried "reheated pizza" ... was ok
 
I totally cba waiting for it in the oven and I'm not really down with the microwave for pizza
I don't like a soggy pizza
 
Morning
 
12min oven is just enough
how was the series ?
 
Yeh I'm not confident I won't expire in the next 12 mins
 
9:44 AM
Much prefer making your own pizzas. Couple of cheap smart price pizza breads, a quid. Tomato puree, tuna, pineapple, onion and pepper and low fat cheese. Bam, around a fiver for two pizzas with ingredients left over for another two when you like
And tastes so much nicer than Dominos (about 5x as cheap too)
 
@Jimbo too much work...
 
Da Vinci series @tereško?
 
my home-made food is usually more eastern-inspired
@Fabien yes
 
@user3470815 Why? It's fun, and saves you loads. Make them the night before and put them in the fridge... then you just put them in the oven when you come in after work
 
Only good torrent I found wouldn't get past 'finding peers' :(
 
9:46 AM
@Jimbo I won't make home-made pizzas unless I can be arsed making proper dough, which really requires a minimum of 24 hrs advanced notice, so I don't really do it
 
I've never made proper dough actually
user image
4
 
@tereško My ISP blocks that site.
 
lolwut
 
@tereško Mine too - censorship of torrent sites in the UK
Nothing kproxy can't handle, but still
 
then go and disable your UK censorship
 
9:48 AM
heh
 
Okay, I'll just pop down to the telephone exchange and remove the big 'censorship' block
 
or use rtorrent on your VPS
 
could someone recommend me a ajax -dev?
 
@user3470815 You don't need an 'ajax dev'. You need a 'JavaScript dev'. And just ask your question on StackOverflow if it hasn't been asked already
 
googling rtorrent
 
9:51 AM
@Jimbo well js-php-ajax
 
Can't find any official rtorrent page. What does it do?
 
I have a question about exposing stuff in an object API
 
@Fabien Oh there was a news item about that a few weeks ago. Just use pretty much anything except that version and it'll work fine
 
Oh
 
My object API (public methods) seem to be for two different types of users: 1) for a developer who wants to add and remove stuff from this object and 2) the end user-developer who will just 'get' data from this object. Should I be separating this?
 
9:56 AM
^ decomposition on two classes
 
@Fabien Basically they report incorrect stats to the tracker, it's blocked on tbz as well
> We've tried to report issues to the uTorrent developers in the past but they deny a problem exists and blame it on the tracker. We'll just wait for the next release and see if the problem is fixed. Then they don't have to worry about admitting to a problem, taking any blame or giving any credit.
 
Oh nice. Yup 3.4.2 and working.
 
^ Sounds like someone has been through this a few times
 
lol
 
@Fabien it is a CLI torrent client
you can install it on your server
 
9:57 AM
@tereško Then you download from your VPS to your PC?
 
yes
 
    LinkedHashMap<String, Integer> columns = new LinkedHashMap<String, Integer>(1) {
        {
            put("Version Name", 1);
        }
    };
Java. -_-
 
May give it a wangle too then. For downloading anywhere.
 
@AlmaDo Decomposition?
 
And no, just in case you wanted to ask, it doesn't work with the extra set of brackets.
 
9:59 AM
hello all of you
what topic is in conversation ?
 
class Torrent {
    private $id; private $name;
    public function getId() { } public function getName() { } // Basic getters, end product that devs will use to integrate into their app
}
 
@Jimbo yeah. decomposition via facades or plain inheritance (which I dont like for this)
 
I hope fibre comes sooner rather than later. God I miss higher speeds.
 
class Torrent {
    public function addFile(File $file) { /* Add file to internal array  */ } // Normal devs wont use this, only ones doing more internal modifications
}
 
^ and where have you seen normal devs?
 
10:01 AM
Seems like those methods don't belong together, because the end user will use the top one to get data, where as devs who are integrating / extending this object will use the bottom
 
@AlmaDo this
 
Maybe I'm overthinking, but see my question?
 
overthinking
create two facades for both cases if you so wish
 
@Jimbo I do see the point, but I don't see how it relates to real life. I can't imagine a dev anywhere who's going to read the docs for a read-only API and not wonder how to mutate stuff...
 
Is anybody here familiar with both php and django?
I want some opinions
 
10:09 AM
is django that blasted thing where they changed slave/master terms?
 
:D
You can't say that anymore!
 
@Jimbo Brilliant advice, I must say.
@AlmaDo Sorry, I don't know; I only use culturally, historically, or racially insensitive technologies.
 
Gives new meaning to the words Blackhat Penetration Testing
 
@Jimbo Which I like to call: "prison rape"
 
LOL
 
10:17 AM
Technically anything with 'robot' should be changed too. As robot comes from Czech robota, "servitude, forced labor,"
 
In order to remain non-offensive, all projects must be named using the XOR'd MD5 of all files contained therein; if the MD5 contains any discernible words, you must change a file as to alter the hash.
 
@DanLugg And if you change the files?
Change the project's name?
 
@SecondRikudo You better have a consistent API (and implementation)
;-)
Also, probably shouldn't store logs in the application root.
Also, I'm a funneh guy.
Also, morning @SecondRikudo
 
@DanLugg o/
 
\o/ ?
 
10:34 AM
UHT milk is so much tastier than normal milk
 
Pronounced "ut milk"
 
@Fabien unacceptable
 
@Fabien I think it's something to do with the lactose changing (and thus, flavour) when exposed to such high temperatures.
 
@DaveRandom Not unacceptable. Delicious. Especially post-cereal.
@DanLugg A lot of foreign milk tastes similar.
 
> [...] Rapid heat treatments like pasteurization, and especially ultra-pasteurization, actually flatten the molecules so the enzymes cannot do their work. If such proteins pass into the bloodstream, the body perceives them as foreign proteins and mounts an immune response. That means a chronically overstressed immune system and much less energy available for growth and repair.
source Not necessarily trusted.
 
10:47 AM
So less healthy
 
Apparently; if credible source.
I dunno, I don't drink milk at all.
 
Milk is not healthy altogether.
 
True enough.
Dairy in general is not necessary
 
Mother of a friend of mine's conducted a research about milk's effects on the body
Let's just say the milk companies in Israel paid her a hefty amount to not publish it.
 
I drink milk-shakes, and Kahlua.
 
10:50 AM
lol
I drink a lot of protein shakes. But I use skimmed milk for it.
Or water
 
Actually... Kahlua on cereal :-O
Why haven't I thought of this before!?
 
I'm trying diy soylent for the next month
Ingredients arriving tomorrow / tuesday
For 28 days all I'll be eating is liquid foods
 
Does that mean you have nothing but Soylent?
 
Yep
 
Sounds a bit grim.
 
10:52 AM
@Jimbo s/foods/people/
 
Nah, it's apparrently quite tasty, has all of your nutrition in, and protein-wise has about 200g per day ;)
 
What's the purpose?
 
Experiment, but also nutrition, how I feel, time saving
 
Eating isn't that much of a waste of time :P
 
Here's the official soylent website, and here's the recipe I'm following.
 
10:53 AM
Yea, but deciding what to eat can be.
 
What about maintaining weight?
 
@Fabien That's what I'm doing, just adding some maltodextrin for carbs
 
You're losing, gaining or maintaining?
 
Maintaining, so same carbs, but the protein will help with muscle gain
From that apparently you're healthier, feel better, sleep better... it's only a month so I'm giving it a try
 
view-source:soylent.me/#
 
10:56 AM
Muscle gain you need to be over-eating for best results.
 
@Fabien I'm in no rush. If you overeat you stand the chance of putting on fat as well as muscle
I watched one of those scooby videos on youtube last night (don't know if you've seen them). In a month you can expect to gain a thimble of muscle. In a year, a litre. All over your body, that's not much. So I'm not focussing on short-term
 
Putting on fat during muscle gain is a good thing.
Means you're eating enough :p
 
I want to stay lean so you can actually see abs :P
 
Then when you're readyt o cut,then you lose the fat :P
Well be weary of the liquid diets. They'll slow your metabolism right down.
 
morning
 
10:58 AM
Morning PeeHaa
 
@Fabien I know it's the daily mail but...
> However, large meals actually slow your metabolism, because of their effect on insulin, a hormone involved in metabolism.

Read more: http://www.dailymail.co.uk/health/article-1350202/Forget-dieting-Speeding-metabolism-key-slimness.html#ixzz33NsS8yav
Bastards, they hijacked my clipboard
 
@Jimbo also, it is scientifically proven, that reading DailyMail killes aproximetly 45000 neurons per day
 
Eat more carbs is listed as an increase for metabolism
 
lol
 
11:03 AM
I have to sign-in for that
 
Weird, I don't.
Slow load but real study
I need to up my calorie intake as I dropped it significantly down a few months ago. As a result my metabolic rate seems to have slowed to a crawl.
 
emm .. wouldn't that be actually a positive thing ?
 
> high-protein, very-low-calorie diet o
I'm just high protein, and slightly less calories. I'll make it 2200 calories
Bearing in mind I'm sedentary and do no exercise
My Potassium Gluconate has arrived. Dubious looking white powder
 
array_map(): An error occurred while invoking the map callback
I hate that warning
*Noted to change it for PHP 6 and let the exception propagate through array_map*
 
11:22 AM
@PeeHaa Not all over, just a bit.
 
How can I, calculate a ratio, as a float
Say I have 100 bytes uploaded, and 50 downloaded. And the total size is 600 bytes. What is the upload ratio?
Or more accurately, the formula to calculate that?
Is it just uploaded / downloaded?
That gives a ratio of 2.0....
 
hi all do u know why when any one get -1 (reputation
)
 
@M.chaudhry Go on your profile and have a look in the reputation tab
 
$return = true;
parent::getDB()->getPDOInstance()->beginTransaction();
foreach ($data as $id) {
    if (parent::getDB()->countRows($this->tables['rewards'], array('item_id' => $id)) == 0) {
        $return = false;
    }
}
parent::getDB()->getPDOInstance()->commit();
return $return;
Is that a good practice?
 
@bwoebi I hate that also, can you post the repo case here for posterity.
 
11:36 AM
parent::getDB() I stopped reading here
 
HTML5 video + CSS filters + Chrome + VM = No.
@Jimbo's goal:
What'll actually happen:
 
lol
 
in [iOS][Android][ChaosOverFlow], 37 secs ago, by Second Rikudo
STOP FLAGGING STUFF WHICH ARE NOT CRAP, IT'S SO FREAKING ANNOYING
Bunch of annoying idiots.
 
same at lounge c++
 
But the lounge actually gets flagged with crap/abusive.
They just flag absolutely randomly, in language no one understands
 
11:44 AM
@SecondRikudo lol, flags != stars. Probably should tell them that.
 
@DanLugg You can go and tell them if you want.
I'm not stepping in that room more than the minimal 5 seconds necessary to yell at them.
 
and they will flag it..
 
Let them
I dare you, I double dare you motherf***er
Not to mention it'll get invalidated in a second, I don't know a 10k which is not annoying by false flags.
 
@SecondRikudo But... but... he has a small doubt bro! Aren't you going to help out a bro!?
 
@DanLugg He can CTRL+SHIFT+W for all I care.
 
11:47 AM
I put the Meh in Animeh
2
 
lol
 
@DanLugg for them?? - this
 
@AlmaDo I actually lol'd for realsies.
 
:-D
 
11:49 AM
Jack for-the-win Nicholson.
 
@Gordon Please, PLEASE do the entire 10k+mod community a huge favor and burn the hindi room?
 
@DanLugg :D
 
@BenBeri No.
Singletons? You can do better.
 
Presumably it's a singleton; could be parent:: to an overridden instance method.
 
even without singletons. Need DB? pass it as a dependence. Don't do tight coupling
 
11:53 AM
I know, I was just corner-casing it.
 
@Gordon How's that t-shirt proclaiming my love for so coming along ;)
 
@Jimbo slowly
 
@Gordon I will not stop bugging you - even though Ulf was very drunk when said to talk to you about it ;)
He was pretty smashed, hilarious guy
 

« first day (1324 days earlier)      last day (3628 days later) »