« first day (2204 days earlier)      last day (2748 days later) » 

1:00 PM
yours works I never said it doesn't
 
@Riccardo you're going a bunch of weird things there, like using date('01') + $i to add one to the day of the month number. :/
 
my issue is that I can print only fridays
 
@Riccardo where you could just start the loop at 1
 
Anonymous
@tereško :)
 
while I need to print all the name of the days in a given month
 
1:02 PM
I already told you how to do that
 
if the user chooses a month and a year for that month and year all the days and the name of the days
 
@Riccardo and you're using $y = date('w'); to get the current day of the week number, not the day of the week number of the date that you're trying to work with.
 
@Riccardo no need to get defensive. I'd just like to understand why you think you cannot use my version
 
Either inspect and use the code or not. But don't keep coming back asking the same thing over and over if you don't like the answer
 
@PeeHaa I know you told me
 
1:03 PM
So why are you back asking the exact same questions?
Nothing in your code tells me you have listened to either myself or gurden
 
@salathe I'm trying to assign that $y to an array containing the name of the days
 
Listen to gurden!
 
@PeeHaa I appreciate your explanations but I'm trying to go this way
 
@Riccardo Yeah I can see that, but you're only ever using the day of week number of today.
 
I'd like to understand why I'm failing using that code
I know yours and @Gordon solution work I just need to understand why I'm failing that's it
@salathe how can I fix it? I'm using the day of week number of today but I don't want to
 
1:07 PM
you are failing at it because 1) your variable name in the for loop is misspelled and 2) because date("w") gives the "Numeric representation of the day of the week" for the current date, e.g. now becuase you are not passing in a timestamp
 
@Gordon that's a great explanation thank you this is by far very useful to me
 
if you want to do it with date at any cost, consult php.net/manual/en/function.date.php and php.net/manual/en/function.strtotime.php
 
i've been looking it up for long time and I can't get out of this unfriendly issue
but let me get back at your statement I have a mispelled variable name where?
or better what variable name
 
numberofDaysInMonth
variable names are case sensitive
 
corrected @Gordon pastebin.com/NG8hXG7E
 
1:11 PM
but honestly, using a DatePeriod makes much more sense
 
thank you for telling me 1st problem fixed
$weekDays = array from Sun to Sat
$y = date('w');
 
which you dont need when you use a DatePeriod and DateTime objects
 
$monthlyHour[$i]->days= $weekDays[$y];
that problem is that $y isn't it?
weekdays is an array from Sun to Sat so today is number 5 Fri
 
yes, that $y will always be the same in your loop
 
I need all the number from 0 to 7
 
1:14 PM
The problem is date('w') where you want something like date('w', $unixTimestampNewDate)
 
bc $y is date('w')
 
no, you need the number for the date you are currently iterating
 
@salathe $unixTimestampNewDate how can I set this var correctly?
 
I gave you the link already
 
@Riccardo You can use mktime() and specify the month, day, year values that you already have.
 
1:16 PM
@Gordon I know you gave me and I wouldn't be here if I had been able to do it by myself I failed to understand how to do it properly
 
in Python, 16 mins ago, by maridlhr
anyone read this ? http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
2
 
(Yes, mktime()... I'm really going there!)
 
@Riccardo No you never properly tried it
 
@PeeHaa believe I simply failed
 
Anonymous
So then try again
 
1:18 PM
@salathe mktime needs to be set to the month and year variables I have at the beginning of the code?
 
@Riccardo Yes, and the day of the month needs to go there too ($i + 1 for you).
 
$y = mktime($i+1,$month, $year);
and then I assign the $y to $weekDays
 
No, you need to give all the values as the manual page I liked to tells you.
 
@salathe I don't get at what you mean
 
Now I know why you are the docs guy @salathe!
 
1:21 PM
oooooor you just use the DatePeriod code you know that works and be done with it
 
Anonymous
Fucking mobile.
 
Fucking @JayIsTooCommon
- Mobile
 
@JayIsTooCommon TMI. Please keep your objectophilia to yourself
 
heheheh
 
Anonymous
lol
 
1:22 PM
@Gordon I know it works but first I need to fix my approach
 
Anonymous
I'll try my sentence again..
 
Anonymous
@Riccardo Out of interest, why do you need to fix your approach first? Why not refactor it?
 
matter of fact I dind't understand you @salathe
@JayIsTooCommon bc I started that way and I'll refactor as soon as I end my way
so I have to working approaches than only one
 
Anonymous
Why do you want two approaches?
 
bc two approaches is better than one in my opinion
and since my approach almost works it a pity to refactor now
I'm almost at the finish line man
 
1:26 PM
you still finished last though
 
Anonymous
You're at the finish line, but you're still coming in last place.
 
by a mile
 
Anonymous
fuck off @Gordon
 
@JayIsTooCommon type faster noob
 
Anonymous
:P
 
1:26 PM
I successfully print all the days in a given month all I miss is the name of the days
if I nearly did it it means that the majority of my code is right else I'd still be stuck at the beginning
 
Hi need urgent help on magento message change in my account section
please help its urgent
 
Anonymous
@Riccardo no, it doesn't
 
@Riccardo my english teacher used to say "nearly, but not really" when people would argue like that
 
@makemelive Is it urgent?
 
@JayIsTooCommon why I don't?
 
1:28 PM
@makemelive sorry, we already have a super urgent request running
 
Can any one tell me I want to know where the message "The account information has been updated" when I update anything in myaccount section of magento website
 
@Gordon at a certain point I was suggested to use mktime function
 
@PeeHaa
 
@makemelive
@makemelive .....
 
Anonymous
@Riccardo Just because it works doesn't mean it's done right
 
1:29 PM
and I thought to use the 1st day + the month and year variables
am I right?
 
@PeeHaa please help
 
Nope
 
why ?? @PeeHaa
 
I don't help urgent whiners
It's company policy
People yelling urgent are going to have to wait two weeks
 
@PeeHaa dear ok its not urgent Iam seraching it but cant find
 
1:30 PM
@JayIsTooCommon what's your opinion?
 
!!? "The account information has been updated" magento
 
Sorry @PeeHaa I am stuck thats why asking :(
 
@makemelive when its not urgent it still has time, so come back next week
 
Sorry you already ended up on the bottom of my stash
 
I have an array os the days of the week that goes from Sat to Sun
 
1:31 PM
As said: company policy
My hands are tied here
 
and a y variable which currently correspond to the current number or the day
 
@Tiffany can u help
 
Anonymous
@Riccardo I haven't actually looked at the issue, was just advising on your approach. Listen to @Gordon, looks like he gave you a solution
 
so today it's five friday
 
Anonymous
@makemelive Your question makes no sense.
 
1:32 PM
@makemelive google is your friend
 
he gave his approach to go ahed i'm just telling him and you I have my approach first that's it no more than that
@Gordon may I give you my last reasoning?
 
I am going home now
 
It makes sense @JayIsTooCommon how can you say that .. i need to change the verbiage thats it cant find the file from where its coming
@tiffa
 
can you give me 2 mins?
 
Anonymous
4 mins ago, by makemelive
Can any one tell me I want to know where the message "The account information has been updated" when I update anything in myaccount section of magento website
 
1:33 PM
I have no knowledge of Magento.
 
@Tiffany I am trying but it would be good if someone can help me on this as I am stuck for 4 hours
 
@makemelive so use your IDE to search over the files? or grep on the shell?
 
magneto is my father
 
Ok Gordon thanks will try your way ..atleast someone tries to help me
 
@Riccardo we really already told you all you need to know.
 
1:34 PM
@Gordon $daysoftheweek from 0 to 6
and $y = mktime($i +1 , $month, $year);
am I right?
 
ok, 2 minutes. you tell me what $y contains
 
$y = mktime($i +1, $month, $year);
where month and year are already assigned vars
 
yes, and what does $y contain then? did you look at the manual page for mktime yet?
 
and then $dayoftheweek[$y];
mktime expects three parameters
 
thats not what I am asking
 
1:37 PM
i.e day month and year
so what?
what are you asking me?
 
I want you tell me what $y contains. what mktime return?
see, if we link you to pages in the manual, we do expect you to look at them
 
$y should contain a range from 0 to 7 where 0 is Sun and 7 is Sat
 
should- does it? is that what mktime returns?
 
then I can do $myarr[$y];
 
Welcome to this week's episode of MTV's boilingpoint.
 
1:39 PM
all I need here is an index to my array
if I have the index I have all
 
Anonymous
@Riccardo Have you read the manual page for mktime?
 
yes, correct. but you dont have it yet. otherwise you wouldnt still be asking and fiddling with it, right?
 
yeas I have
 
so what does mktime return?
 
@JayIsTooCommon
@Gordon I could have an index
 
1:41 PM
ok, that's it. two minutes are over
 
$y= mktime($i + 1, $month, $year);
this is my index
 
I am heading into the weekend now
 
Anonymous
@Riccardo Read the docs.
 
and I have free day on monday
 
1:42 PM
and tuesday is a holiday here
so dont expect me to be back before wednesday
 
@JayIsTooCommon I read it
 
Anonymous
What does mktime return?
 
@Gordon have a nice weekend
 
and @Jimbo: I think you got my phone number so just ping me on whatsapp or twiter if you dont
@Riccardo thanks. you too
 
@JayIsTooCommon it can also return the day the month and the year
@JayIsTooCommon i.e. echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));
 
1:46 PM
@Gordon tahnk you very much .. used netbeans to serach the entire folder .. and I got the path where that message is rendering :)
 
Evenin all
 
o/
 
\o
 
o/
 
Anonymous
@Riccardo Yes, so use that to get your $y. Why are you using an array of days?
 
1:55 PM
why shouldn't I?
@JayIsTooCommon
what else could I use to achieve my goal?
 
Anonymous
Why can't you use ('l') ?
 
Hi
 
if I used date('l') I only have the current day that is Friday
 
Anonymous
Yes, so this is why you need to use mktime.
 
Anonymous
Use ('l') with mktime as an argument
 
1:57 PM
so $myindex=mktime(date('l'),$month,$year);
 
Hi, How can I get all the id's inserted from the INSERT ON DUPLICATE KEY UPDATE?
mysql_insert_id() is only display the last id.
 
@JayIsTooCommon am I right?
 
@Wes It took me to just now the understand what you were doing there
 
Wes
lol
 
Anonymous
@Riccardo no, here's an example of using 'l' in your incorrect solution 3v4l.org/J3FiE
 
2:08 PM
@Wes I should have just clicked to get context instead of assuming random images
 
@JayIsTooCommon you're my superman
 
fucking great fucking genius
I'll vote you up all your questions and answers
let me say thank you my own way
 
Anonymous
@Riccardo If you don't understand Gordons solution, then that's fine. Sticking to a solution that you understand would make sense. However, take the time to understand what Gordon sent you, as it's better than what you currently have. Just because something works, doesn't mean it's right
 
Anonymous
@Riccardo Don't, you'll probs get banned / suspended and you don't need to thank me. Just take the advice on board and take the time to refactor that code
 
2:14 PM
can I at least tell you thank you?
 
Anonymous
You already did :) And you're welcome. But to reiterate, don't stick with that solution. You're never going to progress if you continue that way. Study what Gordon sent you, research line by line if you need to.
 
@JayIsTooCommon that's what I will do
just tell me a last advice can be useful to me to debug what I have by writing to a new file all the php does?
I mean something like
fwrite($myfile, $mysolution);
fclose($myfile);
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
what do you think about this way to debug?
 
@Leigh how much money are they wasting on this?
 
iunno
 
2:22 PM
and with "this" I mean elections as whole
 
Anonymous
@Riccardo Sounds like overkill if you just want to view the output in a dev environment. I would just use var_dump / print_r or you can use an actual debugger.
 
and what if I wished to overkill it ?
 
@JoeWatkins i hope you dont hate me now :D
 
I mean I can't write and object thus I need to convert the needed object to a string
bc write expects a string
 
Anonymous
imo, you won't achieve anything by writing the output to a file. Just dump it for debugging
 
2:26 PM
^
 
o/
 
I am currently using vagrant for local development. Is anyone using docker for that?
 
\o/ my avatar
 
@Andrea Do we currently track length and null terminate?
I've never really looked under the hood.
 
@Stricted huh ?
 
2:35 PM
Null terminator would be required for things like gdb inspection of strings, right?
 
@LeviMorrison Yes, for C APIs' sake. We use a lot of null-terminated strings.
 
@JoeWatkins because of my pull requests :D
 
@Stricted now implies he didn't hate you before ;-)
 
:D
 
@Andrea I think we need to see how many 6 char or fewer strings there are then.
Instrument the binary somehow.
 
2:36 PM
@LeviMorrison simple enough to do. One way would just be to hook the code that frees strings and count their length there. Or just dump the content, then we can track their content and such.
 
@Stricted ah I just saw them ... why targetting release branch ?
 
because of the travis-ci image in the readme
 
ah I see, I forgot to add .travis
 
@Andrea Would that work for persistent strings?
 
@LeviMorrison ah, no, but we can hook the interning thing
@Levi Idea of hooking the free function is because a lot of strings are created blank and then have their size or content filled out.
 
2:39 PM
Because interned strings of small length could go away - that may help a lot if interned strings are commonly used.
 
@LeviMorrison mhm. and interned strings are immutable anyway, so we don't have to worry about them being easy to modify etc.
@LeviMorrison one of the tricks I did with my packed string implementation was to pretend they were interned
 
so what does this --depth thing actually do ?
I thought that was for things with submodules
 
It doesn't check out the entire history
 
hmm
 
oh oooh oh
 
2:42 PM
:)
 
@JoeWatkins --depth clones only one commit not the entire repository
*'--depth 1'
 
@Stricted I like
 
I think I found a typo in the non-ZTS interned strings code
Does that branch ever get taken at compile-time? heh.
 
there is only non-zts interned strings
zts doesn't do interning, and it doesn't do one_char_string either, and probably other stuff related to that which I don't know about ...
 
ZEND_API uint32_t zend_intern_known_strings(const char **strings, uint32_t count)
{
    uint32_t i, old_count = known_interned_strings_count;

    known_interned_strings = perealloc(known_interned_strings, sizeof(char*) * (old_count + count), 1);
    for (i = 0; i < count; i++) {
#ifndef ZTS
        zend_string *str = zend_string_init(strings[i], strlen(strings[i]), 1);
        known_interned_strings[known_interned_strings_count + i] =
            zend_new_interned_string_int(str);
#else
        known_interned_strings[known_interned_strings_count + i] =
note the >zend_new_interned_string_int, which is presumably a typo
 
2:47 PM
I dunno what that is about, that is not a function
zend_zts_interned_string_init
it's not a typo
 
_int is a typo of _init surely?
Also I can't access LawnGnome's lxr at uni for some reason. Only at home. Some kind of TLS error.
 
Anonymous
@Archer what the fuck is that..
 
good morning
 
no it's int
I think it means internal
 
oh huh sure enough
 
2:49 PM
it was like that in 5 too, I took it to mean internal, you can set zend_new_interned_string
\o @Orangepill
 
@JayIsTooCommon some loli anime girl?
o/
 
yo @Orangepill
 
\o/
 
Anonymous
@Archer ..
 
@JayIsTooCommon its kawaii!!!!
 
2:51 PM
ooh, we have a known strings mechanism, when did this get added
 
with zend_string I think
 
cool.
 
@Andrea Could we use zval.u1.v.reserved to store the length?
 
@LeviMorrison good question. I don't know much about the extra zval fields and where they're used, someone else probably would
 
2:54 PM
/cc @NikiC then
If we can then I think that's a pretty big deal.
 
@JayIsTooCommon I know I'm overkilling it but how would you write your example to a file? 3v4l.org/J3FiE
 
Anonymous
I wouldn't and never have, so can't really help - sorry
 
fopen fwrite fclose
if fopen opens a new file called mydebug.txt
and fwrite writes the object in it and fclose close it I should be done
 
Yeah @JayIsTooCommon. How?
 
store the length of what ?
 
2:59 PM
Honest typo
 
Anonymous
lol xD
 
Anonymous
Screenshot. You won't be allowed into any more conferences
 

« first day (2204 days earlier)      last day (2748 days later) »