« first day (1889 days earlier)      last day (3285 days later) » 

user924016
16:00
I will try some more later today
user924016
great share
@PeeHaa Nope, perfectly legit, in fact that's how you have an SPF record > 255 chars
@PeeHaa I'm using readAsDataURL()
And @ TXT "my super duper awesome text" is the same as ` TXT "my super duper awesome text"` which is the same as domain.com. TXT "my super duper awesome text"
Right @DaveRandom?
God that formattig is horrible
Then what should I do ?
16:02
@               TXT     "my super duper awesome text"
                  TXT     "my super duper awesome text"
domain.com.               TXT     "my super duper awesome text"
@PeeHaa Yeh @ means domain root of the zone file
@PeeHaa Did you said "That formatting is horrible" to me ?
Empty domain is sort of weird, not sure if that's specified as meaning anything
Neh was pointing out my own fuckup :) @ZahidSaeed
Ahh okay. @PeeHaa but what should I do ? I told you that I'm using readAsDataURL()
> The readAsDataURL method is used to read the contents of the specified Blob or File. When the read operation is finished, the readyState becomes DONE, and the loadend is triggered. At that time, the result attribute contains the data as a URL representing the file's data as a base64 encoded string.
base64 should be a very strong hint
What should I do then ?
What I told you to do about 10 minutes ago
Laurence is Xiao or Yasuo?
@PeeHaa the primary NS for that domain is not responding to lookup requests
16:06
It's base64
So handle it
@PeeHaa No, I meant to say that should I readAsBinaryString() ?
Why?
Cause i thought it would make binary encoded image string
so that it could be easily converted back to image
Binary over http sucks. Just ask http2
badumtish
Just send as base64 encoded string
The MAIN QUESTION is, how should I convert it back to image ?
I already have base64 string in server
Now what ?
16:10
base64_decode? ;)
base64_decode gives an awful string
The MAIN ANSWER is, google
@ZahidSaeed Yes. Which is most likely your image
...
user924016
@ZahidSaeed did you see the link I replied with earlier?
But I how do I store it in database then ?
@RonniSkansing Yes
You don't
16:11
I did
WHy are you asking to me how in that case?
One says it should contain binary data of an image
user924016
Send the data via. a form or a ajax request
Use the stuff from the link (first link) I gave you. (to save the file )
Save the name of the file in the database
Also, Yasuo is a Japanese name, Xinchen is not.
16:15
@Danack yep, thanks
@PeeHaa the primary NS for that domain is now responding to lookup requests but still not returning any TXTs, FYI
Yeah. I am now at randomly removing and adding stuff phase
how does php distinguishes between different requests? Am using Volley to request to my apache server. ????
FUck this shit
Volley is an android libberary.
liberary*
16:23
The only txt record I have now is
@               TXT     "ms=ms36692659"
@UmerAsif *library
I've made a new \Zend\Http\Response\Stream() object with what I assume are appropriate headers. However, I pass this object to my view and I'm not sure how to trigger the download for a user.
shit
lol
i suck
Yes. The same you suck at typing full sentences or at least multiple words on a single line
okay i suck bro. I am working on it.
how does php distinguishes between different Http requests?
PHP doesn't, the web server does
16:26
4 hours ago, by Danack
@UmerAsif You need to learn how to google. You won't get much help from this room if you are continually asking basic questions.
Srsly. Google is your friend.
Thanks Mark.
Gonna google how web server does it? i thought there were some ways to do stuff for http requests in php.New to back end even to programming, bear it with me please.
$imageData = base64_decode($_POST["image1"]);
$fopen = fopen("test.jpg", "w");
fwrite($fopen, $imageData);
fclose($fopen);
It is creating a file, but it is not viewable
Some kinda corrupted
So clear me guys. Web server distinguishes different http requests with the data sent in it and performs the required Action. right?
@UmerAsif Indeed
:D thanks guys. I thought i had to add some code to check the request and then do the action
:D
You guys are best.
just last thing
user924016
16:34
@ZahidSaeed you didnt really do stackoverflow.com/questions/6106470/…
@RonniSkansing There are 4 answers there, which one should I look ?
All of them.
@RonniSkansing I'm using 3rd answer
But that isn't working
And understand what they are saying, rather than asking to be spoon fed information.
I used the same code as he did
16:37
@Danack you are mean and that's good for us :D
Did somebody leave some bait / lure in our room this morning or something like that?
In fact file_put_contents("test.jpg", base64_decode($string)) isn't working !
The file is always CORRUPTED
@PeeHaa :D :P
Man I hate php :D
lol
user924016
lol
16:42
lol
@RonniSkansing I'm not asking you to give me the code so that I could copy-paste.
I'm just asking to point out What I'm doing wrong
user924016
@ZahidSaeed I am not sure, did you try the first answer?
But late, but ok ok
@RonniSkansing You got your answer now ?
16:47
haahahaaa
user924016
Could you paste your blob string base64 thingy to a pastie? @ZahidSaeed
Even If I don't decode the blob, writing on it on file still doesn't work
okay
@RonniSkansing pastebin.com/Yt8Q9prv
user924016
and what is it png. jpg ?
Look up what base64 looks like
16:54
@RonniSkansing That's a blob which I sent
Did you meant decoded string @RonniSkansing ?
@RonniSkansing What happened now ?
var_export doesn't seem to handle floats properly
$ php -r 'var_export(0.0); echo PHP_EOL;'
0
$ php -r 'var_export(123.0); echo PHP_EOL;'
123
Usually this doesn't matter, but some things do strict type checks etc.
16:57
@Andrea You should fix it in 7.0
@NikiC yeah that's what I'm thinking
wondering if it might break anything
var_dump(0.0) => float(0)
my current idea for implementation is to look and see if the output contains a . or an e
@Andrea It will probably break people's unit tests. Don't worry :P
@NikiC yes :D
user924016
16:59
@ZahidSaeed
This kind of change should probably go on the changelog in the PHP manual if it gets in
hmm
@RonniSkansing Yes ?
user924016
when you decode it, you should not have the non base64 in the string
user924016
so remove the "data:image/jpeg;base64," in the start
user924016
so the string starts with /9
user924016
16:59
and try again
omg @bwoebi closed this as "not a bug": bugs.php.net/bug.php?id=66179
Wes
Wes
\o phpl
Yes that's right
I try it now @RonniSkansing
@Andrea float(1) is correct, but literal 1 is not a float, so it is incorrect.
@LeviMorrison exactly
17:04
posted on December 18, 2015 by nlecointre

/* by The coding love */

@RonniSkansing That still doesn't work
Have you tried it ?
user924016
yes
user924016
Your picture was 2 kitties
@RonniSkansing Yes it has
But why isn't working on my side ?
user924016
well could you put your current code in a pastie?
17:07
Sure
case IS_DOUBLE:
    tmp_len = spprintf(&tmp_str, 0,"%.*H", PG(serialize_precision), Z_DVAL_P(struc));
    smart_str_appendl(buf, tmp_str, tmp_len);
    /* Without a . in the number, PHP will treat it as an integer */
    if (!strchr(tmp_str, '.')) {
        smart_str_appendl(buf, ".0", 2);
    }
    efree(tmp_str);
    break;
This looks sensible, right?
the new lines are 4 thru 7
@Andrea I think so. Just double check strchr for edge cases or something.
@LeviMorrison I'm wondering if var_export ever does 1.23e10 type things
$ sapi/cli/php -r 'var_export(1.0); echo PHP_EOL;'
1.0
$ php -r 'var_export(1.0); echo PHP_EOL;'
1
Progress!
Ah yes, var_export does do E:
$ php -r 'var_export(100000000000000000000000000000000000000000000); echo PHP_EOL;'
1.0000000000000001E+44
Wait, but in any such case it'll contain a ., won't it?
@Andrea Compare to what json does
17:15
@NikiC ah, good thinking
user924016
@ZahidSaeed you deleted a char too much
@NikiC it does the same thing, turns out :D
user924016
the start of the string is /9j not 9j
works fine
if (options & PHP_JSON_PRESERVE_ZERO_FRACTION && strchr(num, '.') == NULL && len < PHP_JSON_DOUBLE_MAX_LENGTH - 2) {
    num[len++] = '.';
    num[len++] = '0';
    num[len] = '\0';
}
case IS_DOUBLE:
    tmp_len = spprintf(&tmp_str, 0,"%.*H", PG(serialize_precision), Z_DVAL_P(struc));
    smart_str_appendl(buf, tmp_str, tmp_len);
    /* Without a decimal point, PHP treats a number literal as an int.
     * This check even works for scientific notation, because the
     * mantissa always contains a decimal point.
     */
    if (NULL == strchr(tmp_str, '.')) {
        smart_str_appendl(buf, ".0", 2);
    }
    efree(tmp_str);
    break;
17:31
@Andrea It was NaB for me, but well…
@bwoebi I think you missed what the problem was :)
@Andrea is var_export() supposed to preserve types in every case?
@bwoebi it's not always going to with integers because of overflow... but it's better to prevent bugs if we can
PHP has some places where they behave differently
This is especially a problem now with strict types
17:45
hmm
- be me
- be in a need of a magnet to remove forgotten safety tag from your jacket
what would you do ?
@tereško do you have an old speaker you can rip apart?
nope
hmm
but I found an dead HDD from a laptop
17:54
oh, the motor might contain a magnet
@bwoebi even if PHP doesn't care, external stuff might
no, there is usually a strong magnet on the "counter-weight" side of HDD's heads
ah
strip the HDD then
Ugh... Mornin'
@tereško phone up the shop/online place you bought the jacket from and ask them for assistance?
1. shop is quite far away, 2. jacket was bought about 3 months ago, 3. I didn't keep the check
18:01
Put the jacket on, put stuff in the pockets, walk into other shops that sell clothes and ask if they can help you to get the thingy out?
Professional thieves would know how to get it out, so by asking you're showing that you're not one...
the sad part is that I dont have a magnet at home
hell ... I dont even have a nail an piece of wire
I drilled a hole in a fence today. To tie some netting in place to try to prevent foxes from coming and crapping on the path in the garden.
On the other hand.....I have a 5200mAh external battery. Anyone have something similar and how long does yours take to charge? Mine seems to take more than 5 hours when plugged into my computer.
hmm, it's probably charging at usb1 0.5A I guess......
Actually thinking about frying these foxes I take it?
Going to my sisters for Christmas......which I find a bit stressful as she and her family are the exact opposite of chill. So might need to go to the pub for an hour.....or ten.
18:18
morning
18:28
@Danack Are they perfectionists or just chaotic?
WhyNotBoth.jpg
She just always schedules way too much stuff going on and so is always rushing around, and the rest of the family has the same pattern.
Like, my family is higher stress because things need to be a certain way.
But my wife's family is high stress because there is no structure at all and things are incredibly chaotic... or completely dull.
A small example is that both she and her husband work full time jobs......and they also keep chickens for the eggs.......I have heard rumours that having a job could mean that you can afford to buy eggs from a local market, rather than having the time consuming task of looking after chickens.
@Danack Some people like growing and raising things.
My dad has a small farm that he loses money on each year while also sucking up all of his free time. It's just what he enjoys.
Yeah....that's the problem. My sister doesn't seem to enjoy it - she feels it's something she ought to do, but then it adds to her stress levels, and she does occasionally lose her shit.
If they cut back on what they were trying to do by 10%, they would enjoy the other 90% a lot more.
18:51
Hi. ;]
19:02
well, today I spotted a glaring error in a test
foreach($valid_bool as $float_value) {
no wonder the "float values" it was testing were so weird
19:19
$ php -r 'setlocale(LC_ALL, "german", "de","de_DE","de_DE.ISO8859-1","de_DE.ISO_8859-1","de_DE.UTF-8"); var_dump(1.2);'
float(1,2)
today I learned
Hi.. on main machine its still 1.2 not 1,2
Wes
Wes
19:32
btw, someone using setlocale for anything these days?
producing bugs mostly.
Wes
Wes
lol
@Andrea did a video of your php7 talk at phpnw ever get onto the interwebs?
It's not thread safe, and a lot libraries are not safe to use with it.
@Orangepill it'll be up eventually
@Jimbo's talk is finally up
sadly, you will not be able to see me using NT4 :<
Wes
Wes
19:37
michael heap. best surname ever for a programmer
I saw that ... that's what made me think of it.
Wes
Wes
there are many interesting talks i don't have the time to watch
I've ended accidentally watching some of these
19:54
Hey, should we add a PHP opcode decompiler so that var_export(function () { ... }); works? :D
Wes
Wes
yes please
i needed that previously :D
JavaScript does this, actually. Try (function () { /* something */}).toString(); in your JS console
Wes
Wes
yeah i know :P
20:07
@Andrea Would be nice!
20:20
@Andrea yay to information disclosure
is it really that much worse than var_dump(file(__FILE__)); ?
nope
not at all really
VAR_EXPORT ALL THE AWS KEYS!!1!
/oh wait, that's already implemented in phpinfo.
@Danack Yep, it's the best idea ever to store credentials in environment variables.
21:07
if you didn't see it yet mail.openjdk.java.net/pipermail/valhalla-spec-experts/… it's pretty interesting in the way how they solve their bc problems while evolving the language
that's the most surprisingly not rebecca black friday ish link I've seen yet^^
hehe yeah I should have mentioned it's not Friday link. ugh I'm even sober today
21:40
If an object rendering templates is in the View\ namespace, what is the namespace of the object that contains the transformed data being rendered?
John.
eg \View\Site->render('template',new \{insertNamespace}\Site())
lol.
This is where namespaces fall apart....where they don't have a good semantic meaning by themselves and instead are just 'a bunch of stuff'. ViewHelper is not the worst name possible.
Can you can make them site specific e.g. when customers want their stuff rendered differently "CompanyNameViewHelper"
oh wait, unless you actually have some meaning behind the transformed data?
the transformed data is more screen specific than company specific, if I get you correctly
So I'd have Section1ViewHelper, Section2ViewHelper
but I'd rather put all that in ViewHelper, since it's all the same application
Why do you need so many view helpers?
21:46
probably because my whole design is globally messed up. Many screens, with many different things being presented
And I think I have too much templates, each implying different view helpers
Hello guys. if i use InserwithonConflict in Mysql. will the other data in the same row other than constraints will get deleted or recreated?
please.
@UmerAsif you appear to be failing once again to use Google, and this time it's about Android stuff.
so ... just heard about the Instagram clusterfuck
this sounds like an interesting BlackHat talk in making
It sounds like an interesting federal prosecution in the making.
I don't think federal courts handle harassment and intimidation
21:54
don't they handle prosecuting people hacking websites such as instagramm? I'd wager instagramm might have a dollar or two to spend on such a pursuit
@FélixGagnon-Grenier so , you are of the Oracle school of security
@tereško allegedly he went a lot further than just proving the vulnerability.
@FélixGagnon-Grenier he was a security researcher who was in contact with facebook security.....mostly.
not just a random hacker.
@FélixGagnon-Grenier Oracle policy is "3rd party security researchers should just go away": seclists.org/isn/2015/Aug/4
@Danack well ... if you discover a hole, it is just natural to take a look through that hole. Maybe the vulnerability just leads to a tiny forgotten outhouse
22:01
@tereško classic
> Hey, the bank left the vault door open so I just came inside to see how much money I could load onto this cart before anyone noticed.
.. it was a think few months ago
@Danack wrong analogy
@ircmaxell you can do that already :p
22:17
How to prevent of giving vote to his own post?
Here is the structure of Votes table
| id | post_id | user_id | value | timestamp  |
As you see, I doesn't have the user of author
so, should I check this $_SESSION['user'] with what?
Anonymous
ask it in the main site
I think it will get downvote ..!
Anonymous
put some effort into it then
@Andrea hehe
> Expectations are backwards compatible enhancement to the older assert() function.
why did we keep the new name
it was only renamed 'Expectations' when we were going to add a replacement alongside assert()
oh well
22:28
hey guys I just had the worst idea ever
2
Anonymous
keep it to yourself :)
an INI configuration, coupled with a userland function, that is basically the inverse of disable_functions and disable_classes (a whitelist instead of a blacklist)
wow
that's pretty terrible
I don't see how that could be useful
RFC incoming
:P
(j/k obviously)
@ScottArciszewski no :p
oh, lemme write a userland implementation, gimme 15 minutes
22:31
I'll send an RFC
just to see if I can get a unanimous NO
from everyone
Anonymous
Is php7 out yet? I haven't touched my laptop since December 1
@samayo php8 is too
@ScottArciszewski I think we had those before already
@ScottArciszewski Wait until April 1, then send it in, complete with implementation.
22:37
@ScottArciszewski Found it: wiki.php.net/rfc/alpanumeric_decrement /cc @Andrea
@NikiC I like how even the author voted no :D
@FlorianMargaine Peer pressure
@Shafizadeh I would do two things
first - hide the vote buttons
second - create a 0-vote with "too old to remove" timestamp with owners ID
that way you can let DB be responsible for ensuring the integrity of data
@FlorianMargaine GNU/LGPLv3 wuuuut
note: that "too old" number for a timestamp can also be just 0 (that way you will be able to filter out the "implicit votes" later, if you need to do some analysis of user behavior), @Shafizadeh
22:54
@samayo it is
@tereško Well, what you said, is really vague. I'm processing them. If I hide vote-button, then user should click on what for giving a vote?
38 mins ago, by Shafizadeh
How to prevent of giving vote to his own post?
ah!! your mean is I hide it just for author
ok
<%

Function whitelist_functions($funcs) {
    for ($i = 0; $i < pow(strlen("abcdefghijklmnopqrstuvwxyz0123456789_"), strle
n("htmlspecialchars")); $i++) {        $j = $i;
        while (!empty($j)) {
            ini_set('disabled_functions', ini_get('disabled_functions') . "abcdefghijklmnopqrstuvwxyz0123456789_"[$j % strlen("abcdefghijklmnopqrstuvwxyz0123456789_")]);
            $j = (integer)($j / strlen("abcdefghijklmnopqrstuvwxyz0123456789_"));
         }
        ini_set('disabled_functions', ini_get('disabled_functions') . ';');
2
@ScottArciszewski userland implementation done!!! ^
22:57
<%
?
just read the code :D
wat.
@tereško em, user can open a post (which is not his own) and set his user id and click on vote button ..!
the mechanism of operation is very simple ^^
9 mins ago, by tereško
second - create a 0-vote with "too old to remove" timestamp with owners ID
22:58
:-)
ok wait ..
which is why I said that you have to do two things
@Danack do you understand the code yet

« first day (1889 days earlier)      last day (3285 days later) »