« first day (1021 days earlier)      last day (4153 days later) » 

06:03
0
Q: how to get data between two dates of Last month in YII?

Amit SinglaI want to get data of the last month, i am using the below code to do it, but it is not working correctly for me: Here is my code: public function getLastMonth($user_id) { $criteria=new CDbCriteria; $criteria->condition = 'leave_from_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)...

please help me
Real power lies in give, not take. It takes 9 months of pregnancy and at least 7 years nurturing for a human baby to become independent. But it would only take a knife or gun and less than 5 minutes to take that life away. Same as the mod power here - it seems all mods have the power to ban a user or freeze a room. But it seems no mod has the power to lift a question ban on meta or undelete a chatroom on Stackoverflow. I will view the first mod who prove that (s)he can do that as God(dess) on Stackoverflow! — Telkitty 猫咪咪 24 mins ago
Lol
@Jack but its not give user to download the csv file
06:30
@Jack you even used echo inside function. shit
http://stackoverflow.com/questions/18010187/connecting-to-a-ms-access-database
Is there anything wrong with this question ( so I can edit it ) but this is what my actual problem is.
Maybe it's a bit dodgy explained
Or is it ok?
@YogeshSuthar Yeah, noice right?
The function is called namePrint(), so unless you change the name, it should really do that ;-)
PLB
PLB
Good Friday morning.
@Duikboot You want to expose an MS Access database to the internet? Are you suicidal?
@Jack Using echo inside gives unexpected result. See my edited answer.
06:33
@YogeshSuthar It doesn't :)
In the MSA db are job data ( we would like to create job status reports based on the data from that database ).
I've carefully constructed the function to have the right output.
@Jack You are experienced programmer, but novice programmer can't even think of using that kind of program. IMO we have to say them to use return not echo. :)
hello everybody. I'm trying to reducing a unsigned column in my mnsql database.how can I make warning when unsigned datatype goes to negative
How would you receive that data in a web-app @Jack ?
06:38
@YogeshSuthar Well, fair enough; I've also added a by-return-value portion :)
PLB
PLB
Unsigned datatype can't go negative (and if it does, there's a bug in language/technology you are using).
@Jack gr8 now I can give you +1. :)
haha
okay
@Jack I gave you +1, but my enemy gave me -1. lolzzz
@PLB can't go negative. but I want warning but I need warning in php
PLB
PLB
06:41
@YogeshSuthar Do you have enemies? Oo
OMG this is the answer, what Im looking for.. Thankyou verymuch sir! — Nadler Banit 51 secs ago
What enema enemy?
@PLB Yeah that's why I always got -1 on correct answers. :(
PLB
PLB
@coder trigger_error('some cool warning here', E_USER_WARNING);
@YogeshSuthar Any idea who it is?
06:42
@Jack No. And people get +1 on using global and echo inside function
oh! didnt downvote your answer.. I marked your answer as the correct one. thanks — Nadler Banit 9 secs ago
1
A: PHP using inner function variable in another function

RadhaKrishna$name should be declared and initialized as global variable.then you can the output you need. The code should look like this. <?php $name = 'Rajitha'; namePrint($name); function namePrint($name){ echo $name; } wrap('tobaco'); function wrap($txt){ global $name; echo "Your usern...

PLB
PLB
@YogeshSuthar function that contains print in name should be printing/echoing something out. I guess you've been down-voted because of that.
@PLB ooooh, how u understand I am using trigger. awesome
I suck with preg_match :(
06:44
@YogeshSuthar dv'ed =D
:D
@PLB We can use it in that way. Its general practice to concatenate the function output. And even it doesn't affect the result too.
have a look at this stackoverflow.com/questions/18010090/… if you can :)
PLB
PLB
@YogeshSuthar I prefer output buffering. Anyway, if you want to concatenate function outputs and echo them only once, you should give respective names to functions.
@Adrian.S Why do you feel that regular expressions are suitable for this?
They work okay in regular text domain, but HTML is not regular text.
@PLB I will keep that in mind. :)
06:49
Output buffering does come with memory usage :)
@Jack What other method can I use? All I want to do is check the $_POST['content'] for any links inside the <img src=" " /> and if is not form imgur then delete it
@Adrian.S Use domdocument.
3
A: match all images starting with pics.domain.com

JackUse DOMDocument and simply iterate over each <img> tag; then use parse_url() to find the host of each image path: $doc = new DOMDocument; libxml_use_internal_errors(true); $doc->loadHTML($row['story']); libxml_clear_errors(); foreach ($doc->getElementsByTagName('img') as $img) { if (parse_u...

For example.
PLB
PLB
@Adrian.S Since you have mentioned that it's a blog would not it be better to use bbcode for example? It has 2 advantages in current situation: 1. Usual users are used to it more than html. 2. It's easier to parse (someone may argue with that but... I still find it easier).
I'm using wysihtml5 so it parses the html :)
I just wanted to check if whatever url was inside the img tag was from imgur then if is not delete it and continue inserting the content into the database
<?php echo 'loso' ?>
07:03
anyone knows german here?
I knows
:P
@Mr.Alien Sure, what's up?
@Jack i already tried write as fputcsv(STDOUT, $header, ',', '"');
foreach ($array as $line) {
// generate csv lines from the inner arrays
fputcsv(STDOUT, $line, ',', '"');
} but still get error Fatal error: Out of memory (allocated 1729363968) (tried to allocate 36 bytes)
It tried to allocate 1.6 GB?!
Please revert to a sane 128MB of memory limit.
Jack
edit your answer to DOMDocument one so I can select it aswinner :)
I played around with dom and got it
07:14
Jooooooooooooooooooooooooooooooooo all
It's FRIIIIIIIDAY!
is Friday Friday gotta get (forgets lyrics...) lol
who remember that annoying song..
And happy intarnetiunol bier daiy!
that went viral on youtube
@PeeHaa thanks I not noticed yet
07:16
@PeeHaa yooooooooooo ..... and happy int bier day to you too xD
@Adrian.S and it's NOT annoying! -.-
le mornìng
We0
We0
Hey guys
I have the weirdest thing
came into the office
ohhh you xD
We0
We0
and then refreshed paged I am working on
and BAM: phpinfo(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
I get that error
07:17
@Ocramius morning
We0
We0
no idea why
All hail Rebecca! \o/
@We0 Update to 5.4?
We0
We0
yeah i did
ubnuntu auto updated
ffs
only realised now
what happened?
@We0 then you got a new php.ini with that
We0
We0
07:19
ffs
that is so stupid
now I have to make all my changes again
@We0 it helps to put your common config settings into a separate file and just load that in addition to the regular one
How can I easy enable pdo_odbc
I've added it in my php ini but I think I have to install it manually too.
We0
We0
yeah I should but dev machine
never worry too much
staging live
Do I have to use this one? pecl.php.net/package/PDO_ODBC
We0
We0
is immaculate
07:22
E_TOO_MUCH_FRUSTRATION
still does not work =(
also follow this stackoverflow.com/questions/15116570/… but still same.
15
Q: What Do You Mean "It Doesn't Work"?

maiorano84You're probably reading this because you've likely made or read a statement that provides little to no insight into a given problem. It's a declaration that is well-known and reviled throughout the SO community: "It doesn't work". We know "it doesn't work". That's what we're here for. But in or...

Good morning!
What are some good massive online multiplayer games that are free?
@TheGuyWhoCouldn'tTalkToTheGirl there are none. they all suck. because of people.
07:25
and in case after reading ^^ if you get angry than read vv :P
25
Q: What can I do if I am angry with everything in Stack Overflow

johnchen902 This is a proposed FAQ question for those tearing their hair out on Stack Exchange sites. Recently I asked a question and gave a bounty but nobody gave a good answer. I asked for help on Meta Stack Overflow, but with Streisand effect those answers only got upvotes! I decided to delete the qu...

@TheGuyWhoCouldn'tTalkToTheGirl you can try CS but its not free :(
@Gordon I am bored. So i'd like to play some. There has to be some. Ithought about Minecraft, but it isn't free.
@NullPoiиteя That's not really an MMO right?
@TheGuyWhoCouldn'tTalkToTheGirl SW:TOR is free and some people say it's actually pretty good now.
@TheGuyWhoCouldn'tTalkToTheGirl MC isn't really massive. most servers you'll find have < 100 users
07:27
@TheGuyWhoCouldn'tTalkToTheGirl Counter strike
@NullPoiиteя That's not an MMO and not free
@Gordon i already tried write as fputcsv(STDOUT, $header, ',', '"');
foreach ($array as $line) {
// generate csv lines from the inner arrays
fputcsv(STDOUT, $line, ',', '"');
} but still get error Fatal error: Out of memory (allocated 1729363968) (tried to allocate 36 bytes) and i have set limit to 128mb again as advice from @Jack
@TheGuyWhoCouldn'tTalkToTheGirl a few years back I tried Rapplz, Silk Online and Kal Online. They are korean grinders though, so eventually it will become work instead of fun.
@dragon112 not massive only like ~60
@Gordon LOL.
07:28
@dragon112 is there any good MMO game .. never played MMO game
Let's define "massive" as 60 or more people at a time in the "world."
Guild Wars 2 is a great mmo
But I am looking for free.
@dragon112 Wait, what is SW? I feel stupid asking that.
@NullPoiиteя I've played WoW for the quite some time
@NullPoiиteя I don't think it is free, is it?
07:30
@TheGuyWhoCouldn'tTalkToTheGirl Star Wars: The Old Republic
@TheGuyWhoCouldn'tTalkToTheGirl pick your poison: mmorpg.com/gamelist.cfm/show/custom/id/1007/…
@Gordon Looking for fun right now. I am so bored.
@TheGuyWhoCouldn'tTalkToTheGirl yupp its not free :( and that is only disadvantage of this game xD
"EverQuest Next" seems to have the most hype according to that.
@TheGuyWhoCouldn'tTalkToTheGirl That's only because it's not released yet (or has it been released while I was living under a rock?)
Released 7/3/12
But not free, what the heck
@TheGuyWhoCouldn'tTalkToTheGirl there is also a few flash based MMOs at kongregate.com/mmo-games
which is quite nice if you are after casual gaming
@Jack @YogeshSuthar we don't have to translate here using translate.google.com, as it is giving me some weird result
whats the meaning of the words below
Code eintragen Code einfügen
Aah forget it, I'll just go back to programming :(
@Mr.Alien Enter Code Insert Code
07:36
@TheGuyWhoCouldn'tTalkToTheGirl check this Counter-Strike: Global Offensive its awesome .. i have played a lot
@TheGuyWhoCouldn'tTalkToTheGirl It's for the best :p
@Gordon client told me to use the first word in front of captcha, and the other word in front of the textbox where the captcha code has to entered
@zira you probably run out of memory before writing the stuff to STDOUT then. Maybe the arrays are just too big. Where do you get them from? Database? File? Webservice?
@Gordon from file
Where do I have to place a pecl extension?
a ) http://sht.tl/BUl or b ) http://sht.tl/2fzA
07:43
i put into array because user want certain data only from the files
so i need to combine certain data from 8 files.
that's why i combine it in array first before convert it into csv
@zira do you load all the 8 files into memory completely? how big are the files?
Is this an answer??
@Gordon it can be until 10GB or more
because its depends period date user selected
@YogeshSuthar no
@YogeshSuthar Depends who you ask :)
07:49
@zira you try to load 10GB into memory and have a memory limit set to 128MB. Go figure ;)
But heel no @YogeshSuthar :)
8files for 1 day is 30mb.
@Gordon i tried to set memory limit as -1, but still does not work
@zira you have to stream read the files. Do you need to read them sequentially, e.g. one after the other?
@Gordon @PeeHaa Yey its deleted. :D
@zira if you set it to -1 you are still limited to the RAM in the machine. But you don't want to load 10GB per request into memory anyway
07:52
because of that get +2 for total flags. :)
@NullPoiиteя I would love to play it. The online problem is that it isn't free :(
@zira what is the file content? How is it structured?
@Gordon its csv file that contain 1440 rows and 100 column.data string and int
don't swear, your kids might one day find this post, and what will they think of you then? — Nicky De Maeyer 1 min ago
@Gordon can you explain more detail?one by one file you mean?
because i already read one by one file.each file i put in array after filter which data i need
then i merge all 8 arrays
07:57
@zira the problem is the merging
So it's impossible to get ODBC working on Mac OSX.
@zira you want to go through your files, combine the data for one row and then write that row immediately. Do not create one huge array with all data, but just one row at a time
@Gordon but i need to show all data in one csv file
@zira yes. That's okay. It will be one file in the end
@zira do you need to combine columns from the files or do you just remove unwanted columns?
@Gordon remove columns unwanted.but then there have some request to put -9999 for empty data.
let say file no 2 only hv 1220 row
so another 20 rows must replace with -9999
08:06
Try using <iframe> :p — Mr. Alien 1 min ago
and [row][column] may empty not in full that row.
@zira ok. so you only filter each line in the files and put them into your new csv file one after the other. First you get all content of file1, filter it, write it to csv and then you get all content of file2 and so on. Right?
mornings
mornmin
@Gordon 8 files need to put in csv by expanding column.for example each file i have 10 row , so by combine all,last result csv i need to have 80 column.then since 8 files per day have 1440 row, let say user selected period 1 month i need the last result 43200 row.
but in the real all 8 files have different number of column.
the first 2 column for each file are date and time
and not all in sequence every minute
08:17
hello,
it just so complicated.
i want to ask all of you, any recommendation for website language translator, i used to use google translate and Bing translator but I want to know more, is there any ?
@zira which of the two outputs do you need?
08:20
@zira the first output appends the rows. the second output combines the rows
Wide awake and raring to go this morning - had a debate with someone on the train who firmly believe that using a GOTO in your code is acceptable, "should the correct circumstance prevent itself"
@Gordon second one
Mornings
@DaveRandom Morning
08:23
Apparently, C++ doesn't have a break(3); like PHP does. Know why? Because C++ sucks sack.
since the first 2 column is same date and time for each file
@Jimbo Lol
I'm glad they removed break $n; though :)
@Jack They changed it to a function call?
Eh, what?
You said they removed break $n;
08:28
Yeah.
That's not break($n);
=_=
So not a function call. So, did it used to not be a function call? :P
Yes it is.
break $n == break (((((($n))))))
@Jimbo break is a language construct
08:29
@DaveRandom It is!?
So, there goes my basic theory of anything with () being a function.
Yeh it's not a function call, and nor should it be, it's a flow control operation
@Jimbo if() is also not a function :)
So what's the correct way, break 3; or break(3);
Doesn't matter .. they both work.
@Jack Okay okay, neither's while etc :P
08:31
I like to make it obvious in my code that it's a construct, so I would go for break 3;
@Jack Well, what about include? We don't use () even though the brackets work.
@Jimbo Nope. All language constructs accept values with brackets, but some also accept them without. The ones that don't require them cause the value in the middle to be evaluated as an expression first
For some reason exit does require braces to pass an arg though, because PHP likes being inconsistent
@zira pastebin.com/ehD78JJr will give an output like pastebin.com/CzyxRvya. All you need to do then is go through $csvData, filter it as you need, combine the columns in one array and write that array then to STDOUT
The exception would be empty I think ... afaik you can't write empty $x.
08:32
Hmm, inconsistencies ftw
I was going to say "that's because it returns a value" but actually I think you can do $var = include "stuff.php"; without braces
@DaveRandom Yeah, exit wants parentheses, but exit; is fine =S
@DaveRandom Yep, that would work just fine.
@DaveRandom You can if the included file returns something yep
@Jimbo That wasn't his point, but yes :)
Actually I don't know of another lang other than PHP that supports break <int>; - JS and Java support break label; and named loops but that's not quite the same
08:33
He was trying to reason that PHP semantics are always logical ;-)
I think the break to level is a great thing =D
@Jack Fatal Error: Assumption of Logic in @DaveRandom on line 0
7
haha
@Orangepill , why is your code vulnerable to SQL injection ?
@Jimbo looking around the generally accepted approach in C++ is goto to break multiple levels. There's also a few people suggesting that all loop levels check a shouldContinue-type boolean arg at the start of every iteration but that sucks IMO
08:37
@DaveRandom That's awful. Even as a complete noob I never used goto except just to see how it worked...
can you make a full code for me please. — Basel Atari Jul 8 at 15:30
lol
But yeah, an if (allowedToContinue) { ... or even just setting i to it's max value
@Jack right. you being faster than me with was … unexpected ;)
@Jack Apparently OrangePill doesnt realize when a Help Vampire bites him
Or, he enjoys it :)
08:40
we should reward him with some votes .. hmm
Hi everyone, i have a very difficult question: i need to name field in table that stores estimated time of process completion, how should i name it? I mean what are my variants? Right now i'm considering due_date and eta_date.
actually due_date seems quite acceptable
@Jimbo It's more expensive though, even if it's only one more branch it's still a branch on every iteration. Whereas goto will likely just be compiled to a single JMP op
@DaveRandom Well micro-optimisation vs. cleaner, more readable code... I know which one I'd choose
NB: micro-optimisation is even more ridiculous in C(++) than it is in PHP
08:42
lol
@Ivan0x32 You mean TTC?
What is TTC?
@Jimbo I'm not sure about the readability assertion tbh, goto endOfRoutine; is pretty readable. The main issue with goto is that you need to cleanup your environment before you move on
Actually does C(++) have block-level scope?
@Ivan0x32 Time to completion.
08:46
@DaveRandom It has it in C, not sure about C++
@DaveRandom It has continue; and break; so there's some scope ... not sure about the variable life time though.
Actually gotos are used exactly for that purpose; to clean up afterwards :)
why are you people talking about c/c++ here ?
@Ivan0x32 how does your client call the time?
But wouldn't it be too short for field name, i mean TTC? @Gordon Due date.
According to IBM it does have block-level variable scoping as well, which is nice
08:48
@tereško We have to get the crap out of the way before we move on to stuff with any remote level of importance
@Ivan0x32 then call it due date. there is no point in giving it a different name. it will only confuse people when you introduce a second name for it
Also, @Gordon said that it's okay as long as the conversation is eventually on-topic again :)
@Jack it is programming related, so it's not even off-topic as per the policy.
yay :)
@Gordon Are unicorns on-topic?
08:50
@Jimbo yes. always.
Is the fact that it's Friday on-topic enough to discuss? :)
For some reason the starred messages are mostly ot though :)
@Gordon What about Rebecca Black?
Ah no its not for users, its for database :) I want to find a good name for that field so it won't bother me all the time.
@Jimbo No.
08:51
Waits tentatively with link.. ignoring @MadaraUchiha :p
@Jimbo RB is only on-topic on Fridays. Scroll up ;)
Are kitten GIFs on-topic?
room mode changed to Gallery: anyone may enter, but only approved users can talk
There shall be no Rebecca Black links today!
@MadaraUchiha I already posted her 1h ago.
Umm...
08:51
room mode changed to Public: anyone may enter and talk
@MadaraUchiha - Link already exists ;)
POWER ABUSE
the heck.
@MadaraUchiha you gonna get to fried on Meta now :D
/me posts meta post
08:53
1 message moved to Trash can
@Jimbo I'm not a moderator, I'm allowed to abuse my power.
@DaveRandom E_LOGIC_NOT_FOUND
@salathe by the rules of the internet, kittens are always on-topic.
I'll get myself banned and I like it
Yay kittens :)
Yay Rebecca Black
@salathe awwwwdorable
@Ocramius awwwwdorable, too
08:55
My cat will attack the hand =/
2 messages moved to bin
@PeeHaa *sad face*
I was playing with my cat and took a picture whilst he was yawning - and it came out hilarious
PeeHaa moved to bin
08:57
@Jimbo you call that playing? I call that BDSM!
LMFAO
MadaraUchiha moved to bin
7
@Jimbo you purrvert!!
@DaveRandom lol
@Gordon That's just bad :P
08:59
@BadJokeCat
Yeah, jokes..
179 tweets, 125k followers, following 1 users
following 1 users ... o_0
@Jack yeah, antijokecat ;D
@AntiJokeCat
I don't do jokes.
277 tweets, 286k followers, following 6 users

« first day (1021 days earlier)      last day (4153 days later) »