« first day (2025 days earlier)      last day (2920 days later) » 

Wes
12:22 AM
@bwoebi yep, but you could isolate the thing (internally) rather than passing around an array like [startnode, endnode, count] eg for slice boundaries
maybe boundaries could be a good name
 
Would anyone mind taking a look at stackoverflow.com/questions/36973123/… ? If you're good with php/curl/json posting
sorry to come in here asking
 
@SvenKahn your $post_data structure doesn't quite match the json you've posted.. easy way to see the difference is to work backward from the desired result - json_decode the json and print_r or var_dump the result
 
["AdvancedOrderType"]=>
string(6) "Simple"
["IsAdvancedOrder"]=>
string(5) "false"
}

right?
i just fixed that, same result unfortunately :(
 
not just that
 
I'll look but if you know which part it would be appreciated lol
 
12:32 AM
check the value of 'Legs'
 
'Legs' => array (
'Id' => '0',
'SecurityId' => '643',
'SecurityName' => 'AAPL',
'SecurityExchange' => 'NASDAQ national market',
'Side' => 'Buy',
'Quantity' => '100'
),


"Legs": [{
"Id": 0,
"SecurityId": 643,
"SecurityName": "AAPL",
"SecurityExchange": "NASDAQ national market",
"Side": "Buy",
"Quantity": 100
}],
am I not seeing something
Sorry if I'm being a hassle in the chat
 
no worries
yes, in your json it's an array of things, whereas you've just got a thing
 
these look the same to me
ahhh
I promise I'm not an idiot but

'Legs' => array (
'Id' => '0',
'SecurityId' => '643',
'SecurityName' => 'AAPL',
'SecurityExchange' => 'NASDAQ national market',
'Side' => 'Buy',
'Quantity' => '100'
),

is my code, is that not in array?
 
encode it and look at the result, it should be apparent pretty quick
 
array(1) {
["tradeOrder"]=>
array(3) {
["FirstOrder"]=>
array(17) {
["Legs"]=>
array(6) {
["Id"]=>
string(1) "0"
["SecurityId"]=>
string(3) "643"
["SecurityName"]=>
string(4) "AAPL"
["SecurityExchange"]=>
string(22) "NASDAQ national market"
["Side"]=>
string(3) "Buy"
["Quantity"]=>
string(3) "100"
}
["SymbolLastPrice"]=>
string(5) "93.72"
["Price"]=>
string(5) "93.72"
["StopPrice"]=>
string(4) "0.01"
["Type"]=>
string(5) "Limit"
["TimeInForce"]=>
string(3) "Day"
["AllOrNone"]=>
string(5) "false"
I'm just not seeing it, but I appreciate you telling me there is an error
 
12:46 AM
also, use something like gist or pastbin for large snippets rather than posting them directly in chat here
on that link scroll down to stdout and see what's missing from the Legs bit
also, remove the quotes from around your booleans.. use true rather than 'true' and the same for false
as is you're giving it strings instead
 
Thank you so much Paul
 
you're welcome
 
AAPL 8:54:18 PM
New
Day
93.7200 Buy 100 AAPL @ $93.72 Limit Buy 100
100 / 0


:) :) :) So happy, again, thank you.
 
Wes
/me still tries to solve problems heuristically... randomly changing code till it works. who else does that? don't be shy. i can't be the only :B
 
I was trying that, usually coming to SO is last resort
 
12:59 AM
I do that with off-by-one errors when my brain's gone cross-eyed.. +1, nope.. -1 yesss
 
Wes
Apr 28 at 5:47, by Wes
/me randomly adds +1 / -1 hoping that off by one errors would magically disappear #programming101
+1 for the honesty :B
 
Also just for record, in the end I do polish up the code with correct ''/false/true stuff, just devving function right now - so everyone doesn't think I'm a lazy idiot
 
this is php chat, you're in a room full of lazy idiots
 
LOL :)
 
Wes
@PaulCrovella hey, speak for yourself... i'm not lazy :B
 
1:05 AM
oh that's right, you jogged once
 
Wes
:B
though, i'm a massive idiot indeed :B
 
hahahaha
GBSN 9:07:34 PM New Day 3.3500 Buy 100 GBSN @ Mkt Buy 100 100 / 0
GBSN 9:07:33 PM New Day 3.3500 Buy 100 GBSN @ Mkt Buy 100 100 / 0
GBSN 9:07:32 PM New Day 3.3500 Buy 100 GBSN @ Mkt Buy 100 100 / 0
GBSN 9:07:30 PM New Day 3.3500 Buy 100 GBSN @ Mkt Buy 100 100 / 0
GBSN 9:07:29 PM New Day 3.3500 Buy 100 GBSN @ Mkt Buy 100 100 / 0
GBSN 9:07:28 PM New Day 3.3500 Buy 100 GBSN @ Mkt Buy 100 100 / 0
GBSN 9:07:26 PM New Day 3.3500 Buy 100 GBSN @ Mkt Buy 100 100 / 0
Sooo cool. I've been developing an algorithmic trading platform for last 1.5years, this is like the final step

Not all in PHP, some python and R for a lot of data analysis
 
1.5 years of development in three languages for a trading platform and your last hurdle was fucking up a string... sounds like time for a beer
 
1:21 AM
;)
 
1:40 AM
Hey guys, quick question
I have a site built in Prestashop
we've recently migrated it to a new host
it has new nameservers
however, Cloudfront is returning 404 images
I do purge Cloudfront cache?
 
0
Q: Prestashop recommended configuration for php and Apache

Jason MarshI have a site built in Prestashop. It receives pretty high traffic Visits 23015 Unique Visitors 16767 This is volume of traffic that I get per month. Currently PHP memory limit is set to 128MB. I have experience in configuring Woocommerce php / apache memory to super high and it actually ended...

 
2:04 AM
Paul you crack me up
 
2:15 AM
sup guys
 
Wes
2:43 AM
time to jog. 2 times now, paul
lata
 
3:10 AM
cya
 
Wes
3:48 AM
7km :B \o/
i neez shower
 
4:07 AM
if I'm redirecting from example.com/1234/en/cat to example.com/1234/es/gato due to a language selection change, what status code do I use? 301 or 302 or 307?
 
Wes
why redirect? can't you use a link?
 
well its definitely not a 301 unless you want to screw up SEO
 
Wes
it's not 302 or 307 either imho, it's just another page
 
ya sounds like it
 
@Wes so use 200?
 
Wes
4:16 AM
@crypticツ what are you doing? like redirecting automatically after detecting user's locale? don't do that, but rather offer a link "go to the spanish version"
 
@Wes only redirects if user manually changes language code in URL or via dropdown menu.
 
Wes
if user manually changes code in url then it's going to be a new request entirely, not a redirect
dropdown menu must work the same way
 
It will redirect as the path is not in the correct language. /en/cat /es/gato is correct but /en/gato is not so it will redirect to /en/cat. If the manually change the lang code in URL the url text should update to the new language so they can properly bookmark, share, etc that URL in that language.
 
Wes
that's a 404
in the 404 page you can suggest pages, but that's definitely not a thing i'd redirect automatically
what if at some point you create /en/gato, an actual page that previously redirected to /en/cat ?
it's just a 404...
in the 404 you can have a "did you mean..." list of links, tho
makes sense?
 
@Wes it will only redirect if there is no 'gato' in the 'en' translation table.
 
Wes
4:26 AM
what if you add it one day
you can't turn a redirecting url into an actual page. you need to make it permanent and wait a considerable amount of time to think to reuse it
 
if I add it one day then no redirect happens as the URL would be correct. The redirect would only happen if there is a translation mismatch. I see your point in doing the 404 error and suggested links instead.
 
Wes
from a seo perspective that would be really bad
 
hello
 
ok, dropping any redirection then.
 
can i ask here?
 
4:36 AM
you already did?
welcome
bah
 
thank you :)
can i call function from extends class like this :
class1::func();
i've try but error "Using $this when not in object context"
 
self::func();
 
Wes
don't use static methods
 
wait
 
Wes
they are deprecated and they are going to be removed in next php release
#terrorism
 
Wes
\o
 
@Wes which php version?
 
morning
 
Wes
i was joking. but was a good advice :B
 
4:43 AM
oh lol
 
class a{
private $say;

public function __construct(){
$this->say = 'hello';
}

public function hello(){
return $this->say;
}
}

class b extends a{

}

a::hello();
echo Topics::find_all();
error Using $this when not in object context
 
Wes
$classInstance = new a();
$classInstance->hello();
 
@Wes thanks, i know if use 'new a()' . but can i call like a::hello() ?
 
Wes
evidently not.
 
hmm. but, i see on laravel can call like this Table::all()->get(); CMIIW
 
4:48 AM
That looks like a chained method
it will not work unless you make it private static $say = 'hello', because the static call won't use __construct()
 
yes, i was make chaining method, but i want call a function like
a::hello()->etc();
not
$a = new a();
$a->hello()->etc()
 
moin
 
@kresek well your function isn't static and neither is $say
 
'nin
 
Wes
5:02 AM
\o
 
i'll try, @taco
 
http://stackoverflow.com/questions/36975267/starting-from-scratch
 
@Subin that looks like an ugly solution, but it's already been answered stackoverflow.com/a/8962081/1075902
 
@taco Same problem still exists
@taco The output is not made until the program finishes
 
Ekn
5:39 AM
mornin
 
omin ekin
 
Man..... I want tacos
I wonder if Taco Bell is open
 
@Sara Stoners across the US are probably in Taco Bell drive thru's wondering the same thing
 
:D
 
5:49 AM
I'm hungry now >:/
 
anybody uses php to hide your ip? i just want to spam my unpaid clients
 
Ekn
lol I'm eating cereals at 3am
 
anybody have any ideas?
 
Wes
tempted to flag...
 
@MaryDaisySanchez spam your clients? Why would you spam your clients?
 
5:55 AM
they have scam me
 
lmao, shutdown their service and move on
 
i want to take revenge , by spamming my works , but hiding my ipaddress
just sort of a cron job for spamming
 
@MaryDaisySanchez I think the fine for 1 spam email is like $250,000, so have fun with that, especially since these chats are logged
 
i'm not spamming an email
just spamming the forms that i made , on there site if they dont pay me
 
That sounds petty. have fun with that.
 
Good morning
man, I hate coming in to work after a vacation
 
6:42 AM
Man, you guys sure are quiet today
 
mornin
 
mornin @tereško o/
seems busy these days :p
 
Wes
@JoeWatkins with your typed fields patch i don't really know whether i should start using them as public...
eg for struct-ish stuff, but not only that
 
@MaryDaisySanchez just use jquery
 
@AnmolRaghuvanshiVersion2.0 yes, slightly
 
6:56 AM
@Wes it's not a game changer, if today you are using simple setter/getter pattern only to enforce types, and those methods are public, then I see no reason not to remove the methods you wouldn't have written in the first place, were properties typed ...
obviously, this will break many API's, but if you're writing new code, using new features, bit different ...
 
Wes
yeah i'm talking of new code
 
same though, public methods that only enforce types don't seem necessary if properties are typed
 
Wes
maybe there's a difference, imagine i want to add logic to the get/set. if it's fields i can't do that, as php doesn't have properties (get;set;) this is in the cons list
 
then that's not a public method that only enforces types, that's part of your api ...
emphasis should be on only ...
 
Wes
imagine i want to add logic <ins>in a later moment</ins>
maybe it's more prudent to continue using get()set()
 
7:01 AM
that's a consideration you make
 
Wes
imagine the simplest example, decorating a field for logging when it's set
clearly i can't do that...
 
there are times you know from the outset that it's never going to happen, that should any particular field need any kind of additional processing upon access, that this logic is not part of the class where the property is declared for example ... or just that it's never going to happen for some other reason ...
 
Wes
btw, since you are at it, maybe it's also time to start thinking about properties (get{}set{}) :P
 
if you can see that sometime in the future you may need additional logic, then, don't use properties directly ...
@Wes I didn't like the only working implementation that has ever existed for that
and it was a good implementation ...
 
Wes
why wasn't good? i remember the rfc and that never happened, but not the details
 
7:04 AM
it was by necessity very complicated
the only thing that may have changed, is that we can cope better with complexity .... since a lot of it is now confined to first pass in compile (ast) ...
I can think of another approach ...
the original patch was half syntactic sugar, and half first class support ...
in that, it used the syntax after the property to generate a normal function, insert that into the function table, this makes anything that uses the function table more complex, it means you have to mangle names in strange ways to avoid collisions with user declared functions, and it makes everything rather complicated
 
Wes
it looks complicated indeed
 
we could do it another way, leaving the function table alone ... we could confine the changes to things that deal with properties, and give getters/setters first class support within the engine ... so that zend_property_info stores get/set zend_function and read_property handlers deal with that in the appropriate way (as they deal with __get) ...
 
Wes
why using the function table was better than the fields table?
 
yeah it isn't ...
 
morning
 
Wes
7:13 AM
i see. you mean by hacking into the existing __get __set __isset or by creating similar functions that do basically the same, and that they have more precedence over __get,set etc?
 
it's complicated a little though ... because actually we don't have a fields table for declared properties, they are inline with the zend_object ... so today when you access a declared property, there is no hashtable lookup, the property (zval*) is at zend_oject + property_offset(idx), but we would have to change that so that zend_property_info is always fetched, which stores both the offset to the property and the get/set functions ...
I refused to make this change for typed properties and found another way, because this will have measurable impact on the performance of all properties ...
 
Moin
 
@Wes similar functions that do the same, but invoking them in the same way as we do for magic ...
 
Wes
maybe use another symbol table rather than injecting into the "fields table" and give it precedence?
 
the other way was additional cache slots ... caches are meant to be tiny ... already we are asking too much I think ...
 
Wes
7:16 AM
private $foo = 10;
public $foo = {
function get(){ return $this->foo; },
function($v){ $this->foo = $v; }
};
 
the table isn't really the problem, it's fetching the location of something other than the zval* for the property
the zval doesn't know about scope, type, or get/set if they were present, what we need is a different structure which are currently only stored in a hashtable ...
 
morning
 
if that structure (zend_property_info) and zval were the same size, we could use the same offset we use to calculate the address of the zval* to calculate the address of zend_property_info* ... that may be a solution ...
 
@Oldskool '
 
(I'm sure they are not the same size, and not sure how reasonable that it ... it's nearly always doable but may be messy) ...
 
Wes
7:18 AM
@JoeWatkins i love how i'm being your rubber duck :B i get nothing of what you are saying, but it's welcome if it helps :B
 
:)
the problem is the simple way I described to do it, is now complicated, requiring that we change other parts of the engine ...
this makes me dislike things ...
 
Wes
will it be slow(er)?
 
there is absolutely no way to see every consequence of the changes you are making, not even if you are niki, bob or dmitry ...
no, it would actually make certain things faster
 
13 hours ago, by Saitama
Can I chroot for a thread, but not the parent process...? /cc @JoeWatkins
 
@Saitama no
 
Wes
7:20 AM
yeah i know that feel. not rarely i changed gillion of lines just to realize what i was trying to do was impossible
 
@JoeWatkins :(
 
maybe we could merge the property info and the zval, so that property info could go inline
if zend_property_info starts with zval, you can cast between zval* and zend_property_info* ...
I think, like I said, this is by necessity complicated however you do it ... I'm sure a patch could be written that I'd be okay with, but I still can't really think of it ... even when I try really hard ...
hard for 8:25 on a Monday morning that started with vomiting :(
moin new peepz
 
o.../
 
posted on May 02, 2016

New Cyanide and Happiness Comic

3
 
Wes
@JoeWatkins aw :( sorry about that. flu?
 
@Wes I think just bad food
I feel pretty okay now, woke up hours ago ...
 
!!version
 
@JoeWatkins take care Joe
 
Good morning everyone
 
7:41 AM
nin'
 
I have an issue with mPDF generation, it can't generate PDF with nested numbering like jsfiddle.net/dgne0a0d
 
@JoeWatkins tell me about it... last weekend my wife and I started vomitting at 2am...
 
Wes
@FlorianMargaine simultaneously? ahahahaha
did you film it :B
 
@Wes I was going to tell that too :P
 
@Wes she was one hour ahead of me
 
Wes
7:50 AM
ahah, dammit :P
 
is there stomach pain too??
 
but we basically spent the rest of the night with each one a bucket on both sides of the bed...
 
Is mbstring suppose to show up in phpinfo()
 
that must be romantic...?
 
Wes
ahahaha, i'm sorry but it's too funny :P
 
7:52 AM
the less funny part is that we were too out of strength to take care of the little guy...
thankfully we could offload this part
 
Wes
as i kid i once i woke up, got my breakfast done myself like a little man, got dressed and ready for kindergarten and waited for my parents to bring me there for hours, while they were both in the bed K.O.'d by flu :B my mom always reminds me this story...
 
heh...
 
Morning
 
@MadaraUchiha '
 
@MadaraUchiha moin
 
Wes
8:00 AM
\o
 
http://stackoverflow.com/questions/36977523/need-help-deciding-what-‌​frameworks-to-use-if-any#36977673
 
Morning
 
@PeeHaa '
o/
 
Ekn
mornings 2
 
whatchoo talkin bout willis
 
8:07 AM
:/
 
8:23 AM
at first I was disappointed in the question, then I read the answers stackoverflow.com/questions/36977460/…
 
hehe
 
o/
 
@Patrick \o long time no see!
 
@Patrick ohai
 
@Saitama new job and sitting in the middle of the room. can't have chat open all day :D
 
8:25 AM
@PeeHaa Could you pull @Jeeves?
 
@DaveRandom ^ what's the status?
 
What's the issue? Something broken?
 
Nope/maybe :) I was waiting for the next deploy until @DaveRandom did his magic, but yesterday he decided his previous magic sucked so he was about to start another rewrite
So tbh I'm not sure what the status currently is.
\o/ for no branches :P
 
8:43 AM
@PeeHaa Did you use the Redis SubscribeClient yet?
 
Nop
 
@PeeHaa Just deploy it, the thing I'm currently doing doesn't actually give it any new functionality, it's just refactoring.
 
Eveything currently in master works?
 
Yeh I don't push upstream unless I'm reasonably confident it does
 
ty
 
8:45 AM
(i.e. it's tested)
 
brb getting food and coffee
 
@PeeHaa lata
 
ThW
8:57 AM
Morning
 
zend_accel_schedule_restart_if_necessary
^an actual thing ...
 
Wes
at least it's descriptive :B
 
@Saitama So you put a function name in a function name so you can name functions while you name functions?
Kinda missing that ;-)
 
@Oldskool wait, lemme make a meme using that...
 
9:09 AM
The xzibit meme should always involve inception ;-)
 
hehe
 
:P :D
 
9:24 AM
Suggest you check out my master branch to inspect it because the diff is... big.
> Commits 1
Files changed 66
I am a bad person
(it's totally worth it though, and there is no sane way to break the changes up into smaller commits)
 
Not sure poop really is worth a mute people
 
Wes
@bwoebi @NikiC imho, generators should do this automatically 3v4l.org/YS6Ze rather than error on rewind()
 
@PeeHaa I'm pretty sure it's not.
 
I am agree
 
Wes
9:38 AM
> Exception: Cannot rewind a generator that was already run
 
@DaveRandom Fair enough
 
Wes
ie call the function again with the same parameters, and not care if parameters changed meanwhile
 
@Wes did you make the definition? here
 
Wes
i did
 
You deserve something....
 
Wes
9:41 AM
a beer, thanks :B
 
@Wes 🍺
^ dat's a unicode letter for a mug of beer :D
 
Wes
lol
 
What is LS on caniuse? Living standard?
 
Wes
yes
 
@PeeHaa yes
 
9:44 AM
!!eval for($i = 0; $i < 100; $i++)
{
echo "yes\n";
}
 
[ 5.5.0 - 5.6.21, 7.0.0 - 7.0.6 ] Parse error: syntax error, unexpected end of file, expecting ';' in /in/8IHjB on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
[ hhvm-3.9.1 - 3.12.0 ] Fatal error: syntax error, unexpected $end, expecting ';' in /in/8IHjB on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
 
@PaulCrovella tnx @Wes
 
@Oldskool heh...
 
Wes
living standards are like walking deads
still can't understand how that happened...
 
9:46 AM
So is it the html standard or isn't it?
I remember there are two bodies now?
 
morning
 
@bwoebi '
 
Morning bobski
 
Morning Bob
 
!!urban oldschool
 
9:47 AM
[ old school ] Anything that is from an earlier era and looked upon with high regard or respect. Can be used to refer to music, clothing, language, or anything really.
 
@PeeHaa The -ski prefix is reserved for Aaron.
 
Oh sorry @Trowski
 
Wes
@PeeHaa it's a <drevil:airquotes>standard</drevil:airquotes> that is subject to changes
 
@Wes ....
 
9:48 AM
That sucks
 
moin bob
 
Wes
yo bob
@PeeHaa and it's not even good
 
@Ekn What language is that?
 
Ekn
not really sure..
 
moin nikita
 
Ekn
9:51 AM
what language do you think it is? morning
 
@Ekn Companies settle for lesser talent because of huge demand and low supply.
 
Ekn
True
 
You are right, you should store the data for a single entity in its own row, @KavyaShree. There is no need to create separate rows for same entity that will introduce data redundancy. — Mubashar Abbas 12 mins ago
 
@Ekn It seems to have a mild resemblance to English...
 
Can anyone help me to get out of this problem
0
Q: Upload Multiple Images And Store each image path in different column in mysql Dtatabase

Kavya ShreeHiii Everyone, Here is my HTML Form. <form action="" id="uploadForm" class="col-md-8 col-md-offset-2" > <h2 class="bold text-uppercase"></h2> <br> <div> <div class="input-group form-group"> <label for=""> Upload You...

 
Ekn
9:59 AM
@NikiC Right, only a mild resemblance. By the way, I.. just realized, is that a nicely drawn e8 root system?
 

« first day (2025 days earlier)      last day (2920 days later) »