« first day (690 days earlier)      last day (4265 days later) » 

12:01 AM
@PeeHaa I dont think so. He's asking how he can link to the image without saving it in a separate file.
 
@Nile Nopez he is asking how he can output the text, because where he has it now produces the "headers alreasy sent" notice
As I read it
 
@PeeHaa hm, okay... i just thought that since he said "but I don't want to save this image in file." he was looking at a data uri scheme situation
 
Hey if you disagree feel free to ignore. I'm not pointing a gun ;-)
 
I don't have permissions yet, so... :p
 
:)
 
12:10 AM
Let it be known that the Iterator interface is stupid
Specifically the valid() method
 
@DaveRandom Iterators in PHP are unnecessarily complex in PHP.
However.
I am glad we have them.
Besides, I always try to reduce all my iterators down to IteratorAggregates.
 
I know but I did not define the class signature and it must be Iterator. It would be fine if PHP had an equivalent function but (so far as I can see) it doesn't. You can't rely on current() in case the array element is false, and the underlying array is associative so while I can still just run a counter, it adds unnecessary bloat to my code and a random private property with no purpose other than to be a counter. Grrr...
 
@DaveRandom So move it to an aggregate.
And if you can't, you may have a bad design. Can't say for certain, but sometimes the fact that you cannot create an IteratorAggregate is an indicator of poorly written code.
 
But the class signature (which I did not define and cannot easily change) implements Iterator. I suppose I could just create an ArrayIterator and wrap that but it still requires a property basically for the sake of itself.
 
12:25 AM
Hello guys, I have this annoying problem, I am running a WP plugin called "Theme Checker", and it gives me the error: REQUIRED: Could not find comment_form. I am using comment_template() to generate the comment form, if I include comment_form(), it makes me a new comment form instance, any clue how to fix this? This is the comment.php: github.com/milohuang/reverie/blob/master/comments.php
 
This code is very, very, very poorly designed. I am currently trying to get something done and trying to tidy up on the way, but I might as well be pissing on a bonfire to honest.
What it needs is a complete rewrite. Thankfully, it won't be my problem for much longer.
Something somewhere up the 24 level deep (!!!) inheritance tree implemented Iterator (but, naturally, provided no implementation) and I have to conform.
 
Overuse of inheritance in a PHP project?
Wow.
Usually I'm thankful to see ANY classes.
 
Anyone please? ^^
 
This is a daemon project with one-class-per-file, and there are just under 2000 files.
Sod it, I'm putting it in an ArrayIterator. Someone else can clean it up.
...and I'm doing it in the morning. Bed time. Night night.
 
@DaveRandom nite
 
12:39 AM
@Mihai Have you searched for it on Google?
 
For hours as of now
And it's 3:39AM
That's why I camed here... my last hope.
 
Well, I found this, but it isn't loading.
 
@ShaquinTrifonoff thank you, sadly it isn't loading for me either.
0
Q: Wordpress comment_form() issue

MihaiI'm trying to 'validate' a WP Theme using the Theme Checker plugin, the problem is that I get the following error: REQUIRED: Could not find comment_form. See: comment_form <?php comment_form(); ?> I am using <?php comments_template(); ?> to generate the form, so if I include the <...

 
@Mihai It is attempting to load a script located on the site, but the site is down, so it gets stuck. The content is there in the source, though.
Got it! Disable JavaScript, then you can see the page.
 
12:45 AM
@ShaquinTrifonoff well, it seems that he got the same problem as I do, but with more errors, and no one gaved him a reply.
 
@Mihai Yeah, I just finished reading it.
@Mihai Try searching for 'wordpress theme checker could not find comment form'.
 
@ShaquinTrifonoff Thank you mate, I've fixed my problem by copying the comment function from the twentyeleven theme, which is not the best workaround, and also found the exact problem that I have here: themeforest.net/forums/thread/…
 
1
Q: Strange git error

epic_syntaxWhat I'm trying to do is, to get local clone of dropbox project, make changes then push to this project. My PC Specs are: Os Win 8 X64, Git-1.7.11 I did following steps: Copied original project files into Dropbox folder Initialized git repo in project directory which located in local file sy...

 
 
3 hours later…
3:56 AM
hello room
hello @Sam
 
Sam
hey Shyam
 
so whats new?
 
Sam
how are you doing tonight?
not much
over there?
 
its actually day(9:29am) here... so I've got the whole day ahead of me:D
my day has just begun
 
Sam
nice.....have you been assigned duties yet?
 
4:01 AM
nope.. my pm is in the US.. on vacation :(
 
Sam
good for him
and for you too
 
better pick an assignment for myself... rather than die of redditting and chatting :D
 
Sam
lol.....good idea
 
how're your assignments turning out?
 
Sam
it's going good.......school's just starting
still getting books and trying to settle down
 
4:09 AM
books? you actually buy the books? not pdfs?
 
Sam
lol......textbooks
and they are very expensive
 
hi, which is the algorithm for encrypting/dec very important data (e.g credit cards user and passwords) in mysql database
 
ya... I had to buy second hand ones from my seniors... mainly cos I never actually read through any of them...
 
Sam
lol.....one of the class requires 2 books
I had to rent some books online
hope i won't end up buying them
 
ya... similar thing here. Some classes need more than one book. But the teachers don't say which ones are good. They just give a list of books that possibly cover the topics. So a couple of us usually end up owning a lot of books.
 
Sam
4:19 AM
lol.....yup; the annoying thing is that sometimes, you want to purchase a book from someone who just took the class, just to find out that you'll be using a newer edition
this semester is a little wacky
they have me learning C# and Java at the same time
how does that even make any sense?
 
newer edition... hehe. Its happened to me also :D
 
Sam
@RezaSh I don't think you should be encrypting and decrypting passwords
 
well atleast you are learning languages. Unlike me(did electrical engg). I had to learn about wires, resistors, capacitors, inductors and what not.
@Sam storing the passwords as plain text is not safe
 
Sam
@RezaSh I'm not certain about credit card numbers, but for passwords, you can try this
@ShyamK lol.....I know; I think you only need to hash (hopefully, the right word) it, store the hashed version in the db, and use it as needed
 
WP uses some sort of md5 hashing(with a whole bunch of other things) and then checks the hash values for the entered passwords with that of the stored one. At least that is what I heard.
 
Sam
4:26 AM
electrical engineering is cool
I heard that md5 is extremely weak
that you are better off using bcrypt instead
 
ya.. thats why they added other stuff also...
 
Sam
it's been a very long time since I stored passwords as text
 
@Sam well it'll be cooler if I had got a job in that field... that way at least the time spent in college was of some use :D
 
Sam
lol......that's true
so, electrical engineering's job prospects is weak? :-P
 
for a fresher... yes. They usually seek out experienced hands
 
Sam
4:30 AM
lol....similar to programming
 
My mom is like the software field is so unstable... get a job in your core field (electrical)
ya... similar but not same... stricter rules... since if you screw up its a lot more costlier... blowing up a generator or transformer :D
deadlier too
ppl can die :( from short circuits and what not... especially if you get a job at a power station...
 
Sam
lol
did you take any programming classes during your electrical engineering education?
 
they(college) taught us some basic C... I can't write a half decent C program thanks to that... besides that the only other programming was programming on a chip... microprocessor 8085 programming... that was sort of nice...
 
Sam
lol......that sounds cool, Iron Man
 
haha... sure...
 
Sam
4:39 AM
I'd love to program on a chip soon
 
would've been super awesome if I could actually try something like that out... but its not like I can get the hardware for that into my house even if I could afford it (they told us it was expensive stuff)
 
Sam
I'm getting sick of just writing HTML
 
how long have you been coding?
any kind of coding
I just began some 6 months ago... so I guess I have a long way to go in terms of improvement and getting fed up :D
 
Sam
trying.....about 5/6 years; actually learning a language, about 3 yrs
but I can actually start calling myself a web programmer about 2 yrs ago
*about a yr and half, actually
I first tried my hands on C; abandoned it after a few chapters
 
aah...
 
Sam
4:43 AM
some yrs later, tried C++.......got rid of it quicker than C
 
files was the tough part(for me)... scared the hell outta me
 
Sam
I can't even remember if I touched files then
then started HTML/CSS
left it when I realized that it wasn't really programming per se
signed up for a 2 month class on ASP.NET; didn't learn much from that
 
ya... HTML/CSS important as it is... not really programming... more of designing
@Sam rolling stone are ya?
 
Sam
a friend got me interested in Coldfusion, but I couldn't really do much, and he didn't have much time to help
lol
my problem was in 2-folds
no community to help me whenever I needed help
all my friends were not into that.......and I was kinda left dangling in the middle of the ocean
second problem was that I hadn't understood the power of google then too
anyway, I took my first formal programming class, C#
 
ya... most of my friends only use the computer for gaming or facebook... oh ya n downloading via torrents too
 
Sam
4:49 AM
lol
sometimes, I would spend days trying to figure out solution to a problem
after a while, I just give up the whole damn thing
 
so I was pretty much in the same situation as you...
not much of a thinker though... scatter brain... get lost in thoughts...
 
Sam
I always knew I wanted to be in programming; I just wasn't sure where to start
I don't usually get lost in thought.......I just sometimes, needed an experienced mind pushing me in the right direction
I started PHP a little more than a yr ago
before then, I worked with C# for about a yr, which is why I dislike MS-based languages
 
so a whole lot of experience there eh?
at least more than me :D
 
Sam
lol.....nope
negative experiences in a way
that's why I come here often
 
turn negatives into positives :D two negatives do make a positive :D
 
Sam
4:57 AM
my programming skills have increased since I came here
lmao
in real life, negatives don't usually turn into positives
 
its all in your head...
 
Sam
if someone chops off your hand, and then, your leg,
I'm hard-pressed on how that'll turn positive for you
:-P
 
then you either get a prosthetic... or learn to deal with it
 
Sam
lol.....so, which part of those is positive?
you are still 2 limbs incomplete :-P
 
okay... u got me there... nothing positive about that...
but maybe it'll lead to a better understanding of the simple joys of life
 
Sam
5:01 AM
if all you've had is 6-months experience before joining this site, you've probably saved yourself years of hair-pulling
 
a month of supposed C training in college... beyond that no coding experience
 
Sam
lucky bastard......:-P
 
hehe... ya and I found SO too... so two thumbs up :D
 
Sam
without SO, I probably would have bought countless books
downloaded countless videos
subscribed to countless sites, just to be good in programming
 
totally... your one stop 'shop' for anything coding
 
Sam
5:10 AM
lol......exactly
and it's more than just asking questions
listening to experienced programmers talk, debate, answer questions, reasoning......it allows you to get better
 
:D
 
Sam
I'm currently playing with my Ubuntu CLI; trying to see if I can write a cool shell script
still at work?
 
ya... I only reach home in... another 8 hours or so...
 
Sam
goodluck with that
 
haha... thanks :)
shell scripts are nice... what are you trying to do?
 
Sam
5:22 AM
nothing in particular......just playing with it
eventually, an idea might pop up
 
@Sam I remember doing that with Windows batch files :-)
 
Sam
lol......how did that work out for you?
doesn't all Window script files have ext .bat?
 
@Sam They do.
 
Sam
okay......maybe I'll try some Windows scripting once I'm done with Ubuntu
 
I accidentally created an endless loop of cmd windows, each starting another. The system slowed to a crawl. It was triggered by either a key being pressed, or a timeout (choice.exe). I had 10 secs, I think, to close some.
 
5:35 AM
aah... shell scripts...
 
Sam
lol.......how did u stop it? Re-starting the system?
 
Alt+F4 and clicking X repeatedly, very quickly, on lots of windows :-)
 
Sam
ahhh.....Alt+F4; what does it do again?
close windows?
 
@ShaquinTrifonoff u must be really good at shooter games?
 
@Sam Yep.
@ShyamK I don't play those.
 
5:38 AM
aim... click... die window
 
I code instead.
Or I might have used taskkill /f /im cmd.exe.
 
Sam
you know.....those of us who use Windows have been spoilt rotten
we just love to click
 
windows = spoilt brats
 
Sam
which is why I switched to Ubuntu.......I don't think a good programmer should be clicking on programs all the time
 
linux = budding hacker?
 
5:42 AM
I found it. It gives you two seconds. I can post the code, if you like. I designed it to do that, but because of the timeout, I didn't think it would keep on going.
 
Sam
lol.....exactly
sure
 
@Sam Who are you talking to? :-)
 
Sam
@ShaquinTrifonoff lol....you
u said you wanted to drop a Windows script
 
Okay, I'll post it then.
I find it funny, but you might not.
Also, I don't know if it is a fork bomb or not.

Here is the file:
 
Sam
and I said, "sure"; I'll like to see some Windows script in action
 
5:45 AM
@echo off
REM
REM *** WARNING!!! ***
REM
REM THIS IS A FORK BOMB!
REM DO NOT RUN THIS BATCH FILE UNLESS YOU ARE PREPARED
REM TO HAVE YOUR COMPUTER SLOW DOWN SO MUCH YOU CAN HARDLY USE IT
REM OR HAVE IT CRASH!
REM
REM * USE THIS AT YOUR OWN RISK! *
REM
REM
REM The start of the program.
cls
echo.
echo This is a very important question.
echo.
echo If you do not answer in time,
echo the worst possible choice will be selected.
echo.
echo ===
pause
echo ===
choice /c Y /t 2 /d Y /m "Do you want your computer to expode now?"
It's called choices.bat.
I'd advise you not to run it.
 
Sam
lol.......all it'll do is crash my Windows, right?
 
Sam
no trojan worm embedded in it, right?
 
No. Call it choices2.bat to make it not recursively call itself, though.
 
Sam
what part of the code causes the replicating pattern?
 
5:58 AM
hi guys
 
Sam
hi dianuj
 
in CI how to restrict function no to take parameter any idea??
CI means codeigniter
 
6:27 AM
hi friends, which is the best framework for a community website using PHP?
 
@MansoorkhanCherupuzha I use plain PHP.
 
@ShaquinTrifonoff, me too...
 
@Sam - I'm back, after running the batch file. I tried to get control back for 10 mins, but then I gave up and held down the power button for 5 seconds to force a shutdown.
 
@ShaquinTrifonoff hehe... so the second attempt with the same code was less successful?
 
@ShyamK Correct, it was 'less successful' to say the least. I forgot that there was an infinite loop at the end, calling itself. So I renamed the file, but that doesn't completely fix the problem. That only removes the 'fork' aspect of the 'bomb'. It kept opening 'Command not found' cmd.exe windows, and the keyboard and mouse stopped working.
 
6:46 AM
lol... so in fact renaming the file actually made the problem worse?
where do you give the 2 seconds? I mean which command?
 
This:
choice /c Y /t 2 /d Y /m "Do you want your computer to expode now?"
It's the /t 2.
 
@ShaquinTrifonoff I noticed that only after I asked it.... I kept looking at pause :D
 
@ShyamK Renaming it didn't make it worse, I think it was because I had Chromium, Firefox, and Notepad++ open, therefore had less memory space (therefore I had less time to react).
 
ah... that is possible...
 
7:36 AM
yay!!! "It’s now possible to create, edit, and delete comments via the Stack Exchange API" blog.stackoverflow.com/2012/09/stack-exchange-api-v2-1/?cb=1
 
oh yeah. that's not gonna get abused at all. :)
eh. i'ma go sleep now.
night :)
 
8:35 AM
This website is very familiar with any kind of programmer, it will make your coding level improve! :D
 
8:54 AM
Hello...
i am currently using the Oauth for facebook Login
But i would like to know, is it possible to authenticate users using facebook, without any popup window? Is there any API, such that if a user enters his username and password, it would use Ajax to authenticate the user? I would like the user to enter his credentials in my website form itself...
 
@dskanth no, the point of OAuth is to authenticate against a provider you trust and not some shady 3rd party website collecting your credentials. That site is only supposed to get the authorization token
 
@Gordon So i cannot force the user to enter his login credentials in my website form ?
 
@dskanth you can force the user to enter the credentials on your site, but its not how OAuth works
 
ok, got it
Is there any facebook API, that can accept the login credentials and validate them and return a response, like true or false ?
 
@dskanth see hueniverse.com/oauth/guide/workflow for the protocol workflow
 
9:10 AM
Ok, i believe it is not recommended to ask for a user's facebook credentials in my form... it is not secure too... let the user be navigated to facebook and get authenticated there... and return back to my site
 
@dskanth right
 
does PDO fetch and fetchAll work on the same prepared statement... if used one after another?
 
@ShyamK afaik yes
 
how to run these command
i tried it on mysql consol
 
10:19 AM
mornings
 
hello
anybody live?
 
$stmt = $db->prepare('SELECT * FROM employees WHERE emp_name=?');
$stmt->execute(array('John Doe'));
// Using fetchAll
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo $rows[1]['emp_id'];
// Using fetch in a loop to display all the statements
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo $row['emp_id'].' '.$row['emp_name'].'</br>';
}
this doesn't return values for both... but if I comment out either one it works... Am I missing something here?
 
@ShyamK i think you have to execute the statement again
the prepared statement itself is reusable
 
@Gordon oh... ya. You are right.. Executing it once again, does the trick
 
@ShyamK you really should have learned how to format code by now
=P
 
10:34 AM
@tereško you mean the Ctrl K thing? Sorry... my bad. I thought I would add some non-code text also.
 
anyway , what you are trying to do can be performed with buffered queries , but it would b a bad idea
should just use one of ways for fetching data and be done with it
also , i fail to see the point , you have already fetched all the values in the array .. why loop through them all again ?
 
@tereško +1
♫♪ Hey, I just saw you, and this is crazy, but here's my voting, cv maybe … ♫♪
 
10:50 AM
That question makes no sense.. hitting cv for "difficult to tell what is being asked here"
and also, lulwut? "I am using php and mysql(not mysqli for the moment because i want to master mysql first)"
 
@tereško I presume this is directed at me. My answer to that is "I just checked it out (to know if it was possible) and was not really planning on looping through it again."
@tereško and yes. There is no point in looping through them again.
 
it's kinda hard to do too , because you have no control over the pointer in result array
 
11:39 AM
hmmm... ZF2.0 has gone stable
strange
 
hello!
@tereško instead of doing a login mvc stuff, i tried starting with helloworld from r.je .. hahaha...can you check on this github.com/iamspix/loginTest
 
hmmm .. you should be executing action on controller , not on view
which is why you passed both view and model instances to it
 
ahh..hihi..
so it would be like $controller->index()
?
 
yes
 
noted.. other than that? what else is wrong?
 
11:47 AM
dont use public properties
you are breaking the object's encapsulation that way
 
in the model? the text?
 
yes
you should use a getter and setter for manipulating that value
 
thanks, i need to figure more things out...thank you
 
and you really would benefit from using namespaces and autoloader
 
ah okay, in the controller?
 
11:50 AM
very interesting, what project every created?
if not secret
 
i haven't understand that namespaces
and autoloader..
 
i create readfrom.net
 
@JoeySalacHipolito , have you read the documentation for spl_autoload_register() ?
 
yes, but as you have told me before, programming literature is kinda deep,
can't understand much...
 
poor chat (
 
11:53 AM
well , here is an example : stackoverflow.com/a/9884264/727208
that method is executed every time you are creating an object with a clas that php does not know at that moment
 
okay, so spl_autoload_register will only load if you try to use a class?
 
if you try to use a class which has not been loaded yet
 
ahhhHH! when you told me that i will benefit from using it, its because you saw this
require 'models/Index_Model.php';
require 'views/Index_View.php';
require 'controllers/Index.php';
$model = new Index_Model();
$view = new Index_View($model);
$controller = new Index ($view, $model);
$view->index();
 
and it receives the full class name as a parameter in that function
that full name would include a namespace , if used
 
okay, i haven't grasp it yet, seems my brain is taking too long to understand...
quite poor in english i guess
@tereško can i, just this time, share the git to you and make corrections, well the best corrections you can give with my helloworld...and ill try to understand it?
 
12:04 PM
it would be pointless
you are always insisting that you do not need to read stuff and you learn by doing ... well ..
 
:D
okay, one thing, you've seen the index.php right? i could use the spl_autload_register there right?
 
you would define it there , yes
 
thanks....
i'll read namespaces and look for examples about it, coz it's better to have it along with the spl_autoload_register right?
 
yes
 
12:19 PM
but i can use spl_autoload_register without it?
 
hi all,
 
waahh..anyway..thanks...i gooottta read...
 
12:31 PM
yes , you can use it without namespaces
 
@tereško i'm currently reading this . sitepoint.com/php-53-namespaces-basics . .
 
well, hello everyone, i'm just stuck with a problem. i am trying to make a mobile like keypad with php. i.e if the user enters 22272 then the output will be cp. if the input is 2 2207707 then output is ab q p.
any ideas on how to proceed with it. i tried writing it but the codes grows long and long...
 
hi
can somebody help me on this
0
Q: Creating XML Fragment in domdocument and adding to its parent

nepsdotinBelow is the piece of code that I am using to create a bunch of xml nodes and trying to attach to parent that is passed to it. Not sure whats going wrong, Parent node is not getting augmented. input.xml <?xml version="1.0"?> <root> <steps> This is a step </steps> ...

all
hi
 
12:47 PM
@tereško
 
@blackbee Basic flow goes like this:
- Start with a map of key tokens to char translation
- Split the input string into key tokens
- Iterate over tokens and use the map to translate them to output chars
 
map of key token !! u mean a look up table like thing !! @DaveRandom
 
hi
 
@blackbee Yes exactly
 
hi all need some experts advice on parsing xml
I am creating fragment, and trying to add, When I add to it. Its not adding it actually
 
12:53 PM
@nepsdotin change new DOMDocument() to $parent->ownerDocument
 
i am trying the same thing @DaveRandom :) the problem is with the splitting part.... but i am trying afresh now, let me c where do i get to this time. Wait for my call ;)
 
let me try it
@salathe sadly it didnt work
can u explain a bit
how it has to be done
 
1:15 PM
@nepsdotin "it didn't work" is no use to man nor beast.
 
1:30 PM
anyone give me a simple help
after adding following lines

AddType Application/x-httpd-php .php
LoadModule php5_module "c:/php/sapi/php5apache2_2.dll"

to apache httpd.conf file.. unable to start apache
what is the prob?
 
Hey guys, does php.net/manual/en/function.strrev.php go through the string one character at a time or does it work some magic?
I was going to use strpos() where what I'm looking for is likely to be towards the end of the string
so I was going to work backwards through the string
i.e. use this (strrev) to reverse the needle and haystack before using strpos
to save time
but if strrev goes through the string by each character then it doesn't make sense
 
ended up using it
 
reluctantly not writing my own function:P
@MikeB thanks
 
@AdamLynch as @cHao said, what's wrong with strrpos() ?
 
4 mins ago, by Adam Lynch
ended up using it
 

« first day (690 days earlier)      last day (4265 days later) »