« first day (973 days earlier)      last day (3980 days later) » 

7:00 AM
If I do something like khud ka soch ke, than client says no I want the bad way, if I do it the bad way, bosss says kuch changes kiye hi nahi hai, lol now I am lyk what to do in this situation
 
Always take full requirement from client and after that go ahead.
And the situation as you described is same everywhere :(
 
actually my boss purchases templates, and modifies them, I hardly create anything from scratch, he tells me tym lagta hai
so if I change the original template, client gets sad, if I don't my boss shouts, so I am just a donkey dancing between 2 guys
@YogeshSuthar What you are planning ahead? job or business?
 
In product based company we have to create from scratch, but in service based comapany we have to do just modification of code.
 
yea
 
@Mr.Alien I will do do business but not now after 3-4 year.
 
7:04 AM
oh same plans here
gaining some exp
 
exp is most required in any field
 
not necessary if it's dads business
 
But we have to stick with our plan otherwise we will be doing job for lifetime.
Yeah if its a shop.
 
yea, really, just gain exp and learn side by side
 
learning and leading should be there.
 
7:09 AM
even capital
 
thats the imp
thing
he wants to fatch records
 
@Mr.Alien i second you
@YogeshSuthar trust me after some years its very hard to start business ... for us
 
if we have idea and we implement it correctly than it's not tough
 
@NullPoiиteя that's why I said "But we have to stick with our plan otherwise we will be doing job for lifetime."
 
7:14 AM
@Mr.Alien trust me it is ..... more when you live in small city
 
@Mr.Alien I have lots of idea but too lazy to implement it.
 
@NullPoiиteя more when you live in big city
@YogeshSuthar haha same here, I just told @NullPoiиteя that working alone bores me
 
Right now working on bit.ly kind of url shortning service
as my personal project
 
we can develop website ... but its not a hard nut ..... what we need is project ... and question is how to get project
 
@YogeshSuthar tons out there, anything unique?
 
7:17 AM
@NullPoiиteя We can build anything, not just websites but the thing is when its our personal project we get bored.
 
@NullPoiиteя make a project, throw it online, if it attracts people, we can get sponsors..
 
@Mr.Alien I was just testing that wether can I alone build like that or not.
 
yes its a good idea ... but we can not really on those project for money ...
 
@YogeshSuthar it's simple, save your own random url, save his original url, when user clicks the link, redirect on the original
 
@YogeshSuthar its just require 1 hour work
 
7:19 AM
@NullPoiиteя yea, seriously...
link will point to our own url
pick the id in the link
fetch the original link
redirect the user to that original link
 
@Mr.Alien Yeah I have created that kind of system, but just look into the bit.ly its huge with from where the link was accessed.
 
tadaaaa... omg I just built a project
muhahahaha
@YogeshSuthar REFERRER?
 
LOL
@Mr.Alien referrer is also a easy task
 
@NullPoiиteя obv it's easy
 
Yes, but we get bored with personal projects.
 
7:22 AM
we can build a better linked in, or we can make something useful which will be usd by many peopl
 
@YogeshSuthar while project get us popularity or $$ ..... its hard to get bore :P
 
I need the first .. $ comes automatically
 
@NullPoiиteя true :)
but we have to start anyhow.
 
think think think m in, m free and bored
 
instead of working on php project i would rather want to work on c project where i will control the hardware
 
7:25 AM
If a person works alone , he gets bored quickly. :P
 
@NullPoiиteя Now that was from nowhere.. I will have to refresh the c concepts again
wil brb
 
@NullPoiиteя everyone knows PHP.
 
however its just my thought ...i wont work ... thinking to complete law and file ton of PIL
 
In Indian law,Article 32 of the indian constitution contains a tool which directy joints the public with judiciary public-interest litigation (PIL, or जनहित याचिका) is litigation for the protection of the public interest. PIL may be introduced in a court of law by the court itself (suo motu), rather than the aggrieved party or another third party. For the exercise of the court's jurisdiction, it is unnecessary for the victim of the violation of his or her rights to personally approach the court. In PIL, the right to file suit is given to a member of the public by the courts through judicia...
 
7:28 AM
@NullPoiиteя Actually I am working on law project :P
 
@YogeshSuthar what kind of law project ?
 
its used by judges and lawyers
 
i thought to create a website where user can fill the legal form online ... since lawyer cost much for them
@YogeshSuthar link please
 
its ipad app
 
@YogeshSuthar ohhh ...
 
7:31 AM
its for ipad,android and it has desktop app
 
@YogeshSuthar is developing for android difficult?
 
@Happyninja no
 
@Happyninja it should not be ....android is quite identical to java
 
@NullPoiиteя you can build in c# too
 
@NullPoiиteя @YogeshSuthar can developing a chromonium extension be a viable solution too?
 
7:39 AM
@YogeshSuthar c# is also good language ....rather better then pHp
@Happyninja dont know ... may be DaveRandom know
 
@NullPoiиteя we can build android app in c# too
 
have you had issue with android 4.1?
 
as a user ... i have but as a developer not a single one because i never tried android development
 
:P
@NullPoiиteя Its tough though
 
7:44 AM
lol
 
after a long time, good to see some sunlight here...
 
@Mr.Alien Yeah, its good time to leave from office. :P
 
khaane hi gaya tha mai :p
 
@YogeshSuthar as a android dev have you experience issue with 4.1?
 
And i am leaving now Bye all. :)
 
7:50 AM
oh yes, saturday.... JEalOUS
CyA
 
@Happyninja I am working on iPad app, my junior is building Android app, so i don't know
 
cya all
 
ah ok
 
cya all
 
7:51 AM
cya
 
Hi
 
I used fgets to read a line from a file. I've always read file created in Linux.
Now, I've tried a file created in Windows, and fgets($handle) reads the whole file in a line
 
@Innuendo does the file have a particular structure?
 
just 2 lines in a such way:
a1;a2;a3;a4
b1;b2;b3;b4
 
7:59 AM
are you trying to parse a CSV file ?
 
extension is .txt, but yes, it is csv
hm, I see. there is a fgetcsv function)
 
@Innuendo
<?php
    	$open = fopen('file.txt','r');
    	$length = ftell($open);
    	$data = stream_get_line($open,$length);
    	$result = explode(' ',$data);
    	for($i = 0; $i < count($result); $i++){
    		echo $result[$i].PHP_EOL;
    	}
    ?>
 
yes , that's why i asked
 
8:15 AM
@tereško fgetcsv returns whole file as a structure, but not only a line
@Happyninja, thanks, I'll try now
@Happyninja, `explode(' ', $data)` is not what I need because spaces can be inside the data.
This code divides file on lines by whitespaces, but not by newline-symbols
 
fgetcsv does not return the file as a structure
 
@JoeWatkins, yeap, it should return one line as a structure. But by some reason file is read as one big line
when I used files, created in Linux - it was OK. But now I got file created in Notepad++ in Windows, and it's seen as a big line
 
@Innuendo maybe an issue with encoding?
 
I resaved it with UTF8
I'll look now where the newline symbol is configuring in Notepad++
 
8:21 AM
@Innuendo it happens to me i had a similar issue and saving in utf8 without BOM did the job
 
Line wrapping is my guess
I think I had similar problem before
 
a CRLF should not encode differently in any character set ... you should just auto detect line endings and when creating files that you intend to read cross platform save them in a compatible way
 
@Happyninja didn't help without BOM
I see CRLF symbols in Notepad++ in the file
 
did you change encoding in your php file?
 
8:24 AM
@Happyninja, no, I don't change encoding in php
I receive that file by POST in php
 
Hi room , I am learning to use phpmyadmin and there is a database tshirtshop which has a table department now I want to create a category table but the sql in phpmyadmin is giving me error following is SQL query `CREATE TABLE 'category' (
'category_id' INT NOT NULL AUTO_INCREMENT,
'department_id' INT NOT NULL,
'name' VARCHAR(100) NOT NULL,
'description' VARCHAR(1000),
PRIMARY KEY ('category_id'),
KEY 'idx_category_department_id' ('department_id')
) ENGINE=MyISAM;
` and following is the error `#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL serv
 
sometime ago i was trying to send json data and the data sent was invalid because the encoding of my php file contains BOM
 
In linux newline feed is different from window's
 
yes
that's why using PHP_EOL is a good idea
 
@Telkitty猫咪咪 , I've changed EOL convension in N++ to Unix, newline symbols changed from CRLF just to LF, and again I have the same problem
 
8:32 AM
@Innuendo i think there is a issue with your file because i just tried with fgetcsv and it works for me and i created the file in notepad++ in windows
@RegisteredUser i think it's `` not '' you are suppose to use
 
ok check the correctly formatted question here
0
Q: learning sql creating table gives error

Registered UserI am learning to use phpmyadmin and there is a database tshirtshop which has a table department now I want to create a category table but the sql in phpmyadmin is giving me error following is SQL query CREATE TABLE 'category' ( 'category_id' INT NOT NULL AUTO_INCREMENT, 'department_id' INT NO...

 
I used backticks here on chat just to format the question properly
 
mornin'
 
@Innuendo I think you can change the setting to see the newline character
Does Edit -> EOL Conversion help?
 
8:41 AM
 
oh thanks how did you manage to make a snapshot and post here with an arrow
 
@Happyninja, @Telkitty猫咪咪,
I've tried to change EOL convension, it doesn't help.

Thank you for replies. I need to go out for an hour. Later I try to create a new file, similar to that I need. I think it file issue too
 
@RegisteredUser it's not about your question formatting is about your query not using ' instead of `
i just used windows 7 sniping tool, save it and upload it into the chat ;)
u
i just read myself and was too late to edit; it's about using ` as you can see in the image
 
Is there any backtick key on iOS? I just realised I can't write any inline code when using it
 
12
Q: Is there a way to enter back tick (backtick) on SO when using iPad or iPhone?

動靜能量There are times when I only can use iPad to access SO, and the back tick ` is needed to quote the literals... but it seems on iPad, there is no way to enter a back tick on the keyboard? Can it be somehow entered?

 
9:09 AM
Ahh thank you
 
9:46 AM
hello
anyone can help me plz for php code of "On which of the two days of the week, Saturday or Sunday, does New Year’s Day fall often"
0
Q: code to find new year for a given criteria

jyotiI came to a see a interesting post that i am trying to write a code for that "Hello,On which of the two days of the week, Saturday or Sunday, does New Year’s Day fall often" Reference :http://answers.yahoo.com/question/index?qid=20080731110435AAlyxd4 i have found solution Calenda...

plz guys
 
@jyoti Your output is the exact same as that yahoo answer
    Array
    (
        [Saturday] => 56
        [Monday] => 56
        [Tuesday] => 58
        [Wednesday] => 57
        [Thursday] => 57
        [Sunday] => 58
        [Friday] => 58
    )

Sun - 58
Mon - 56
Tue - 58
Wed - 57
Thur - 57
Fir - 58
Sat - 56
 
how ?
echo print_r(DayOfNewYearsDay(1901 , 2038)); ?
 
please , hire a developer
 
which year range you have tested ?
 
-5
Q: Why doesn't jQuery work here?

martinaI have this simple code taken from the tutorial in http://www.w3schools.com/jquery/jquery_selectors.asp <!DOCTYPE html> <html> <head> <script type='text/javascript' src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> $(document).ready(function(){ $("...

(s)he was using it's code locally with file:// protocol … and said us nothing :o
 
9:54 AM
@Mile which year range you have used. can you tell me plz
64 bit operating system using wamp
i am using
I have used echo print_r(DayOfNewYearsDay(1901 , 2038)); and i get the outout Array ( [Thursday] => 21 [Wednesday] => 20 [Friday] => 19 [Sunday] => 19 [Monday] => 20 [Tuesday] => 19 [Saturday] => 19 ) 1
i have also try echo print_r(DayOfNewYearsDay(1600, 2000)); and i get output Array ( [Thursday] => 316 [Wednesday] => 15 [Friday] => 15 [Sunday] => 14 [Monday] => 14 [Tuesday] => 13 [Saturday] => 13 ) 1
 
I'm getting different results on different versions of php
 
what year range are you using ?
i am on php 5.3.13
 
Hello All
 
@jyoti pastebin.com/mF8ak5EX PHP 5.3.10-1ubuntu3.6
 
@MikeB are you using 1901, 20138 or 1600, 2000 ?
 
10:00 AM
@jyoti in the paste
 
which one ?
 
1 min ago, by Mike B
@jyoti http://pastebin.com/mF8ak5EX PHP 5.3.10-1ubuntu3.6
codepad gives different results: codepad.org/DvFrZ2oU
 
I means you are testing code for which year range ?
1901, 20138
or
1600, 2000
 
... it's in the code
print_r(DayOfNewYearsDay(1901 , 2038)); print_r(DayOfNewYearsDay(2000, 2400));
 
10:04 AM
lol, so it is php error
PHP is giving different answer
 
This was indicated
calendar is bugged and works only from 1901 to 2038, see bugs.php.net/bug.php?id=40346kajacx 32 mins ago
 
yes, but the php 5.2 has new DATETIME class. I don;t know how to use that
 
0
A: code to find new year for a given criteria

Mike BUse the DateTime object to get around the php limitation in mktime: <?php function DayOfNewYearsDay ($beginYear, $endYear) { for ($i = $beginYear; $i < $endYear; $i++) { $date = new DateTime; $date->setDate($i, 1, 1); $day = $date->format('l'); if (isset ($da...

 
ya
now i am getting
Array ( [Saturday] => 56 [Monday] => 56 [Tuesday] => 58 [Wednesday] => 57 [Thursday] => 57 [Sunday] => 58 [Friday] => 58 ) 1
:)
so now i have to start habit of using the DateTime class
 
good call - I'll take all the help I can get with dates. The built-in libraries make things a lot easier and cleaner than the functional equivalent.
 
10:33 AM
what do you want jyoti?
anything to ask jyoti?
 
 
1 hour later…
11:46 AM
@tereško Hi can you tell me which PHP framework is good and easy to learn?
 
Silex
 
@tereško its based on symphony2. So Silex or Symphony2?
 
it's an symfony-like microframework
 
So should I go for symphony or silex?
 
12:13 PM
Hello again
I've noticed now that my problem isn't only with windows files. Both with unix and linux created files.

I create file, send it by POST, read it in php by fgets (the first line for example I need), and I get the whole document in this line
<?php
if ( $fh = fopen("php://input", "r")) {
$line = fgets($fh);
echo $line;
exit;
}
 
Hey hey room 11!
 
Hey
Hm.. it's only when I send POST request by curl.exe in windows.
When I send POST request via curl in php on server - it's ok. But when I send it to curl.exe in windows - it removes all newlines in files
hm. curl --data-binary helped me. Standard --data-ascii sends without newlines
 
12:39 PM
I'm using json_encode to encode an array but one of the objects in my array contains: "["\r\nUnit 001" \r\n how would I remove this?
I tried str_replace('\r\n', '', pq($a)['a:first']->text())
 
@Gordon Someone is downvoting my questions. Can you look into it?
5 question in a row
 
@YogeshSuthar I'm not a mod :-) I'm also not sure the anti serial voting script will kick on on 5 votes. You may want to ask @Gordon about this when he gets out of bed :)
@YogeshSuthar BTW what do you think about Titanium?
Have you done anything serious with it?
 
@PeeHaa埽 Thanks. :) I asked @Gordon about it.
@PeeHaa埽 I am developing iPad app in Titanium framework
 
@YogeshSuthar Do you like it?
 
12:50 PM
@PeeHaa埽 Not that much. Because titanium is not doing whatever we need, it has limits.
And for porting the iPad code into Android is also a big headache
 
@YogeshSuthar Yes. I have noticed. That's why I asked, because the more I tried to do with it the more I started to dislike it
@YogeshSuthar Even when you develop for both platforms at the same time it is still a big headache :(
 
@PeeHaa埽 It's good to stick with native development. I have to work on it because my wants it.
 
@YogeshSuthar BTW fun fact: I think the person of one of the questions we closed is annoyed :P I also got some love a couple of downvotes
 
Otherwise I loves only native development
 
@YogeshSuthar Yeah I've also switched to native. Works waaaay better for me
 
12:56 PM
@PeeHaa埽 I think the same. :P
 
My money is on this user regarding the downvotes:
You didn't just downvote both me and @yogesh now did you? Did you? — PeeHaa 埽 30 secs ago
@Gordon ^
 
@PeeHaa埽 He used 13 votes in a day.
5 on me
 
its all 11
 
cough Those couldn't possibly be sock-puppets of his then saying what a great question that is.
 
1:00 PM
@Danack It just has to
 
Btw Morning - how's the head @PeeHaa埽 ?
 
@PeeHaa埽 Bye now have to go.
 
@Danack Morning. Not really that good. Yesterday was awesome ;)
@YogeshSuthar Cya later
 
That's usually how it goes.
 
@Danack I'm going to go out to get myself some really horrible snackfood. Maybe it helps
:)
 
1:03 PM
Cool - either it will settle the stomach or you'll chuck it up - either way will feel better.
 
Exactly :D
 
@PeeHaa埽 at three votes it triggers the bot
 
@tereško Ah k. nice
 
@PeeHaa埽 yeah, very likely correct. I'll pass it on to higher authority since the reversal script will likely not kick in with just three votes.
 
@Gordon kk. tnx. and morning
 
1:17 PM
well .. yeah .. the bot is a bit fickle, but usually it works out
 
Morning All
When i give-
<?php echo  $this->headScript()->appendFile($this->baseUrl('/public/js/base.js')); ?>
in zend framework phtml file
it shows-
two script tags instead of one!
Does anyone know why am i getting 2?
its really behaving wierdly..:-(
 
Just guessing - but normally functions either do something or return something. I'm guessing you don't need to echo the return from that function?
 
PHP room must be one of the more friendly rooms
 
1:36 PM
lol
it can be, and it can be pretty harsh at times. Depends on who you are (personality wise) and who you have the luck of meeting
 
morning
 
the new "leaving" animation for userlist seems quite glitch'y and really really bad
 
What did you mean by var_dump output? What is var_dump — user236501 1 min ago
 
what's the good word?
 
"I need to compile java code. Hmm ... PHP seem to be the way to do it"
 
1:43 PM
@ircmaxell what do you mean?
 
@tereško yup. You don't compile java from the CLI generated by a PHP static string? I thought everyone did.. Ok, I can't go through with that... Even I have my limits
 
@ircmaxell friendliness is relative, if you have just spent a month in a lions den, any smaller kitties would look quite cute & fluffy
 
yeah , we are all about fuzzy-felt and rainbows here
 
when unsure, always take it as a complement :p
 
1:45 PM
@Telkitty猫咪咪 it's a good general rule. Leads to a happier life... In general at least...
 
@tereško you forgot unicorns :[
 
unicorns are not real =P
 
you nasty troll, don't lie to these good people
 
Unicorn is spelt so close to unicode, coincidence? I think not! :p
 
1:48 PM
@CarrieKendall fake cuteness is usually somewhere between creepy and insidious
 
They are definitely real. They just came from hell...
 
hell ain't real either
 
but they are tasty, are they not?
 
@ircmaxell happy happy happy happy DEATH
 
hmm.. I need to think of something to wrap the one temple of Glass to pad it slightly, but I don't want it to look like garbage (like tape would)
 
1:50 PM
everything from hell would be healthy (coz exercise) and well roasted (coz fire)
everything from heaven is cold and unhealthy
I dunno ...
 
heat shrink tubing would be great, but can't get it on (won't fit over end of the temple)
 
wait it was a swastika on the unicorn's leg?
 
lol, not quite. Almost, but not quite
 
and actually, the original (as from Dante) concept of "hell" was frozen
 
@tereško is no fun on Saturday :P
 
1:54 PM
@tereško lol
nice, I like that
 
@tereško genius
 
breakfast time, laterz
 
@tereško lol
 
me too, have a good day all :]
 
hardly get chance to see sql injection vulnerability in code which use oops
 
done ;]
 
tnx
 
http://stackoverflow.com/questions/17124517/ajax-cities-is-not-working#17124517
 
sql injection is every where
ill try sql injection in every website from now ....
 
2:18 PM
i don't get why people
have a file for every action
 
i really dont knwo what op thinks
> define("GOOGLE_API_KEY", "AIzaSyDCH_VylomzId8OOWpo9qqfwwR-fa36-t0");
 
@NullPoiиteя this way he doesn't accidentally change it
:)
 
is stackoverflow.com/a/16396677/208809 wrong or did someone just took offense that I provided two answers?
 
2:32 PM
@Gordon i noticed some individual have a bad attitude.
 
@Gordon +1
 
thanks.
 
i only find the question offensive
 
@Gordon you really should have posted only one answer … but +1.
 
2:37 PM
@bwoebi it's two completely separate approaches, so I felt it was okay to do two
 
You guys wanna play a fun game? It's called compared my original version with my client's desired updates
 
@Gordon I would have written simply a --- there ...
 
24
Q: What is the official etiquette on answering a question twice?

Edward TanguayWhen is it ok to post two answers to one question on StackOverflow?

judging by the above i guess it was okay to do so
 
I don't say you were wrong; I just thought I'd be better to write only one answer ;-)
 
well yes, in general one is better than two
 
2:43 PM
@Gordon I'll pretend you were making a backdoor reference to my previous message and take that as a complement. Thanks ;)
 
answering twice ... whatabout this stackoverflow.com/q/15990857/1723893
@Gordon its perfectly fine
 
unless you have 2 accounts
spread 2 answers across 2 accounts
Just joking :p
 
;)
 

« first day (973 days earlier)      last day (3980 days later) »