« first day (1011 days earlier)      last day (4163 days later) » 

13:00
@tereško I was looking at amazon.com/dp/0072224770 this one
the above problem is not working...where status is a checkbox
@rdlowrey who connected what was sent
@rdlowrey this would help me debug the mobile test
not sure why i can not see the data sent in negotiate
@user2206616 that code can be shortened to
$status[] = $this->input->post('status');
$this->db->insert('task', array(
    'project_id' => $t_id,
    'Task_title' => $this->input->post('task_title'),
    'working_hour' => $this->input->post('working_hour'),
    'status' => $status
));
user895378
13:01
@Baba Hold on, give me about five minutes. It's kind of difficult to access right now. I'll push some changes and then it'll be simple.
@silverflash that could be ok. A good rule of thumb is: avoid MySQL books that have "and" in the title. Like "learn mysql and php in 24 hours" .. or crap like that.
@rdlowrey thanks
chaps
how goes
so... many of you had much experience designing rest APIs?
@user2206616 however, you should make sure that your insert method uses prepared statements or sanitizes the input before it inserts the data
13:02
@tereško Amazing rule :) Do you have any other such rule for selecting books ?
How come the mysql service uses 500mb memory
@tereško So this should be avoided at all costs. bookdepository.co.uk/book/…
lol, true
@Tredged Did you configure MySQL, or just install it?
thank u @Gordon for the suggestion but still codes are giving me an error
13:05
@Leigh Install it, but it was with my directadmin lol
@Tredged So you haven't edited my.cnf?
@user2206616 cant help you with the error because you never said which error you get
@Gordon you should just know :P
@Leigh no, could you explain :-)?
Good morning all
13:05
@neal Goodmorning
@CarrieKendall 42
@Gordon You are a mod, you should know things like that.
@Tredged Wassup?
so yeah... any one experienced with rest like to give this QnA a bit more smarts?
@Neal Fine thanks, u?
13:06
@Tredged Good good. A lil hungry
Bleh same xd @Neal
@dragon112 I know where the kick button is, if you know what I mean :P
soorry
Haha
Error Number: 1054

Unknown column 'Array' in 'field list'

INSERT INTO `task` (`project_id`, `Task_title`, `working_hour`, `status`) VALUES ('1', 'wdwdw', '3', Array)

Filename: D:\wamp\www\system3\system\database\DB_driver.php

Line Number: 330
here is error
13:07
@Gordon ^_^
@user2206616 right there... Array
@Gordon Now, now don't go all Rambo on me.. :p
@dragon112 how about Chuck Norris?
@user2206616 well .. the source of problem seems quite clear
@Gordon That'd be fine.
@Tredged Well the preconfigured my-small.cnf is a good base if you want to use less memory, and you're not heavily loading your MySQL (like it's on a cheap VPS or something)
13:08
@Gordon ah, super close but no dice, 1054
@tereško it may but i m really new in these things ...
@Leigh Well its not cheap, but still 500mb is kinda much ;d
@user2206616 You should read the error and try to understand it. If you don't you'll never be able to fix problems yourself
@user2206616 your $this->db->insert() method you are using is trying to use the $status array like it was a string. find out how to insert an array with whatever you are using there.
@Tredged 500mb is nothing for a heavily used server
13:09
Oh then its fine :P
@user2206616 you mean , you are new to english ?
take a look at the example configuration files my-small to my-huge - they'll give you an idea of how different configuration options scale
user895378
@Baba pushed.
@rdlowrey ok one moment
Ha ill sure do thanks! @Leigh
user895378
13:11
@Baba After you pull, add this at line 93 of src/Aerys/Mods/Protocol/ModProtocol ...
user895378
var_dump($socketInfo, $rejectedHttpTrace);
@tereško if u dont want to solve it dnt make fun of it ..
also .. you really should look into getting that new keyboard .. with all the keys
because everyone falls many times before learning to walk
@rdlowrey Ok
13:13
@user2206616 speak for yourself, we were wonder babies.
5
Loool
gals/guys, I know you have a point there, but let's not be mean.
@user2206616 which array did you want to add? The syntax itself is wrong 2 if you want to create a array language construct you have to write it like: array()
user895378
@CarrieKendall Just so you know ... going forward I will only refer to you as @WonderBaby
13:15
@user2206616 it's more a case of kid walking around in stupid pants and falling down all the time .. you have no idea how to write code, but you are already using CodeIgniter
@user2206616 depends ..... number of fall is differ from kid to kid :P
@tereško LOL xD
0
Q: Upload KCFinder files in 1 directory with different domains

Daan B.I have 3 different domains on the same server. I want the KCFinder to upload everything on 1 domain for example helloworld.com. I want the other 2 domains to also read those files. Is this possible? I tried alot in the config and searched the internet without succes. Regards, Daan

how anyone can even walk or run in those pants ;D
user895378
hehehe
13:16
Legen wait for it, Dary.
@CarrieKendall You better change your name now.
@Tredged Legen wait for it, Baby
@rdlowrey nice .. hold on
sadly those trousers resemble the ones I used to wear in my teenage years :(
@dragon112 lol
> I tried alot in the config and searched the internet without succes.
13:17
// Why do I have to write such ugly construct to access a::$c ?! … I hate you, PHP :-(
const a = "b";
class b { public static $c = "d"; }
print ${"_".!$_=a}::$c;
@user2206616 the message says "Unknown column 'Array' in 'field list'". If you look at the query, you will see that it says Array for the 4th column value. That's what happens when PHP tries to use an Array in a String context. You have a string context because the insert method is building the SQL query for you. So apparently CodeIgniter does not allow to use arrays as values to an Insert.
you will get much better results if you show what you've tried. it'll also lower the likeliness of your question getting closed @DaanB.
ok thanks I will adjust my question
@bwoebi You're just looking for ways to write terrible code by finding situations that will never exist?
@bwoebi that's perfectly fine. no one should enjoy using statics!
13:19
@bwoebi You need to write ugly code, because your code is ugly
As a) you are using a static property and b) using a constant in an inappropriate way
@NikiC sup wünderkind
I'm gonna buy some vanilla ice now. laters.
if it keeps raining here, i am pretty sure the baptists are going to start building an ark
@Gordon Enjoy ..
13:21
@NikiC why is it bad to use a constant here? and statics aren't bad … (this is because of the special handling of statics in the pthreads extension… ;-))
@CarrieKendall Had some pretty nuts weather here in the UK, 30 degrees C, and thunderstorms
as in pthreads statics are thread-local.
@bwoebi Constants are - quite obviously - for truly constant things. PI is a constant. DB_PASSWORD is not a constant. CLASS_NAME_TO_LOOK_FOR_SOME_STATIC_PROPERTY is not a constant.
user895378
@bwoebi you lost me at public static.
@Leigh we were 20 miles into a 34 mile ride on Saturday when the sky fell.. i was fairly sure i was gonna die :P
PLB
PLB
13:23
I ended up with: codepad.viper-7.com/Bx6n8p But I hate myself for using eval. But also I am hell lazy to create whole parser for this simple task. Does anybody have any alternative?
@rdlowrey this just was an example… I have in real code a private static^^
@NikiC well, a class name should be constant...
@NikiC would it be very difficult to implement visibility for constants?
@NikiC for me DB_PASSWORD should be a constant (for applications which use only one db)
@bwoebi gl growing that app
13:24
@bwoebi See, that's the core of the problem
PI is a constant in the global scope (the known universe), class name should be constant in the local scope (your project)
user895378
@Gordon That's basically what I use private static for ... emulating "private" class constants.
@CarrieKendall but usually a DB_PASSWORD is only needed in exactly one place of the whole application; isn't a lot work to make it scalable to multiple DB's
@bwoebi I guess his point is, if it changes between applications, it's not constant
@Gordon lol
13:26
Hey again
@Leigh a constant is for me application-local, not world-local
@NikiC humans should blame someone for writing bad code, not the interpreter/compiler :o
@bwoebi There's no law on what you can use constants for. If you want to define constants with a value that can vary between requests, that's your prerogative.
@Leigh no. between requests, no. but in an unscalable application, it won't change; it's constant.
@bwoebi And what about the test server?
for things which vary between requests, I use define (like for define('APP_PID', posix_getpid());)
13:30
why net banking always sucks ...:(
@NullPoiиteя You have Zeus installed?
@bwoebi Really, using constants for configuration is just exactly the same as the "global variable" issue
@Danack I think you should use constants for a configuration file
@NikiC to be fair, the PID is the one variable that I think a constant is ok for...
It doesn't make sense to constrain yourself to using constants defined in a PHP file
E.g. it would totally make sense for me to load DB credentials from an INI file
or from whatever
13:31
@ircmaxell That's typically more variable than things like .. dirname(__DIR__) or something.
Using constants for things that are not inherently constant can easily become painful
@Leigh not on a per-request basis though...
It really is. Worker threads come and go, applications don't usually change their location on disk between requests
And I don't see a particular problem with doing define('APP_ROOT', realpath(__DIR__))
B***** on the alcohol
13:32
@ircmaxell I'm not saying it's a problem, I do that myself.
@Leigh yupp ..in my inner soul :P
i want to make a floting social sharing button like this site radiokotha.com .. any one can help me. please go this site and you can see right side in this blog a floting sharing button.. anyone can help me?
@NikiC makes it a difference if we use a configuration file in ini-style or if we just define constants?
hey any php lover here?
13:36
@bwoebi Point is that variables allow you to use anything, whereas constants restrict you to defining them as actual constants in a php file
nope @BenLind
@BenLind only PHP haters. PHP has too many quirks.
oh...crap!
@ircmaxell Nice, although I'd hedge that kind of deployment strategy is a rarity, and still less varying than the PID of on-demand workers.
13:37
@BenLind we only do this ^^^
I have got an impossible php puzzle...
@NullPoiиteя lol
aannnnd it's gone
@BenLind impossible
13:37
@NikiC bless you
i couldn't look away but i wanted it to stop
HAMMERTIME!
@NikiC you are devil .... :P
ok...so here's the thing...let me tell you in advance that there is a solution to this problem...extract each frame of a gif image and display it serially
@NikiC I don't understand? Please reformulate this?
any "php lover" here who can solve this?
13:39
@BenLind why would you do it in php in the first place ?
we all haters @BenLind
what if...a gif is given you an input and you hhave to hallmark it... @HamZa
@HamZa admit it that you can do this
@BenLind heh are you participating in a CTF ? Then do it !
13:41
what is CTF?
@bwoebi Really, constants are bad for the same reason that all other globals are bad (static members included)
@BenLind Catch the Flag, sort of hacking competition
@HamZa ...you got serious
@rdlowrey fixed first problem .. the mobile app would soon be ready .. do you like to test ???
13:42
Part of me wants to write a follow-up to Lorna's post: phpmaster.com/lesser-known-features-of-phps-oo-model Lesser Known Oddities of PHP's OO Model
user895378
@Baba Sure, just ping me. FYI I'm about to push some extra parameters to ProtocolHandler::onOpen() ... The change will be:
@rdlowrey ok
@Orangepill ...that is just resizing...I asked to extract each frame
@NikiC I don't think they're really bad. There exists only bad usage of them. (and not every usage of them is necessarily bad)
user895378
ProtocolHandler::onOpen($socketId); // old
ProtocolHandler::onOpen($socketId, $openingMsg, array $socketInfo); // new
user895378
13:43
@Baba ^
@bwoebi Yes, using them for things that can not possibly change is okay :) As I already said.
@rdlowrey main difference ?
@Orangepill - you failed my challenge...admit it...you can never do it
@rdlowrey or should i say advantage ?
@ircmaxell Containing real oddities?
13:44
@NikiC yeah, things that are either undocumented or really poorly understood...
@BenLind That's pretty rude towards someone who is trying to help..
user895378
@Baba Well the old way if you wanted access to the opening message you'd have to store the $rejectedHttpMessage from the Protocol::negotiate() method if you wanted to access it once the socket import completed. This could be problematic if the protocol was initialized with additional data such as:
user895378
line-feed\r\n
\r\n
first message\r\n
second message\r\n
@dragon112 - sorry i did not mean to be rude...I have got the answer also...just challenging @Orangepill - please do not mind
@rdlowrey Ok ...
user895378
13:46
@Baba Anyway, you'll just need to add those two params to onOpen in your implementation class because the interface is changing.
@rdlowrey No problem ....
Question: why is $array[$key]::$static valid php, but $object->prop::$static invalid?
@bwoebi Because PHP
@HamZa @NikiC @baba
bye
@NikiC this is the correct answer.
13:48
@BenLind bye
But why does nobody change it? … you know these oddities, but you don't correct them… why?
/me sighs
@bwoebi Why don't you fix it?
It's sad when someone who sees himself as "professional web developer" does not understand the difference between CC and BCC
2
@bwoebi I would only fix stuff like this if I were allowed to introduce various BC breaks in the variable syntax - which won't happen :)
13:50
@NikiC If anyone then also would merge my PR…
@BenLind bye
@NikiC is it a bc break to replace an actual parse error by valid code?
@bwoebi you mean after you wrote an RFC for it an it was discussed and voted? :) I'm sure someone will merge it then
user895378
@Baba Okay those are pushed -- you'll need to update your ProtocolHandler::onOpen() implementation's method signature after you pull.
@bwoebi no
13:51
@rdlowrey cool .. one moment
user895378
(It's already been updated in the LineFeedProtocolHandler example code)
@NikiC I sometimes don't understand why these little consistency changes need a rfc………
@bwoebi Because they are usually a lot more complicated than you might think
this is more like a fix than a new feature in my eyes…
@NikiC the possible side effects?
I understand that they should be discussed on the internals… but a whole rfc?
Regressions, new inconsistencies introduced, messed up in edge cases (esp around write semantics). That's why an RFC with proper documentation is prefered
13:54
^ that
I think this is why these things aren't fixed: too much work for this little thing
is interessting
@tereško It's sad when people don't know why it's called Carbon-Copy. Or perhaps people are just too young...
3
Probably people will also argue that $foo->Bar::$baz can be interpreted both as {$foo->Bar}::$baz and as $foo->{Bar::$baz} etc
where exactly do -> and :: fall in the precedence chain? It doesn't appear to be documented
user895378
13:55
@bwoebi I don't know ... when you have millions of people using the language you can't haphazardly change things and just assume there isn't breakage. A major flaw in something like that could have long-lasting damaging effects on the language.
user895378
It's very important not to introduce problems when there's such a large number of people depending on the stability of the project.
Syntax changes aren't simple, especially if they involve variables in some way
@NikiC yes. Then I'd ask why {$foo->Bar}::$baz isn't supported syntax.
@NikiC No I didn't, but when $foo->{Bar::$baz} is supported, $foo->Bar::$baz (when {$foo->Bar}::$baz isn't supported) should naturally be equivalent to {$foo->Bar}::$baz
13:58
@ircmaxell My yacc is rusty
@bwoebi We already have partial work for (...)-> and (...)[] and (...)(), so it might make sense to add (...):: too
@NikiC yeah, I would support that
@bwoebi "naturally" ^^ As PHP has no strict left-to-right semantics for variable syntax, it's not that natural. (Note: I would love strict left-to-right semanctics)
@NikiC what would be better: (...):: or {...}::?
@bwoebi dunno
14:00
why do we have sometimes () and sometimes {} when using variables?
we don't
@bwoebi what in particular are you referring to there?
() wraps an expression, where {} is "use this as the variable name"
yup :)
$this->{"bla"} vs. (new cl)->bla
14:01
"variable, property or method name" to be more precise
user895378
@bwoebi that's called constructor dereferencing.
but it's a label, not a result
just like in JS, the difference between [] and ()
In this case it would be "class name". On the other hand :: also accepts an object, so both {} and () seem somewhat appropriate in this case
@ircmaxell {} can also contain expressions?
14:02
Dayyuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum
@bwoebi limited ones, but yes
Because FU** Logic ! that's why !
${'_'.!$_=foo()}
@ircmaxell for example.
1 message moved to bin
it can't accept any arbitrary expression.
14:03
@Alucard lol from which anime is that ?
@HamZa héhé Hijirai mashin garu
@ircmaxell lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#1089 … it accepts expr inside…
what's limited there?
@Alucard machine girl ?
@bwoebi that's a string offset
the one below it is what you want
and it's limited. Just because it's called an expression in the grammar, doesn't mean it's what you think it is
php > $Array = "value";
php > print @${[]};
value
(yes, this is abuse of php^^)
14:10
@ircmaxell since the Wunderkind didnt answer I'ma aks you: would it be much effort to implement visibility for constants?
user1125394
if anyone is up for some sqlfiddle.com/#!2/e860a/19 I'm not finding out how to update 2 temp vars
@HamZa exactly
PLB
PLB
@Gordon What's the point of visibility for constants?
@ircmaxell yes, all that's done is a string cast. (what I'd expect as variable, method and property names are strings)
PLB
PLB
Their value can't be modified from outside world and if their value is not used properly, it's not fault of your class.
14:12
posted on July 23, 2013 by hakre

Atomic deploys at Etsy Tagged: Deployment, Etsy, PHP

@Gordon hmmm... it is likely not trivial. Not an engine rewrite, but not a 5 line patch either...
@PLB the point is to build better APIs. Right now, all class constants are public API and I want to hide them. Right now I can only use constants methods to achieve hidden constant values, which is much effort than needed.
I think I'd rather see protected and private classes though
Which if these services should be on their own server or put on the same server? httpd, mysql, mail, dns? For security, performance, etc
@Alucard heh, do you suggest any other anime ?
PLB
PLB
14:15
@Gordon I am not sure if hiding constants will really improve APIs
private: private to your namespace only. Protected: protected to your namespace and any parents/children
@crypticツ for security: One service per server. Even one application. But more generally, you can not say just by the types of services.
user895378
@PLB I am.
@PLB so why do you use visibility at all then?
@ircmaxell like friend classes?
@crypticツ depends on the load ... if you have limited resources it might be reasonable to place mail and dns on the same box (assuming you are not dealing with "email marketing" tards)
PLB
PLB
14:16
@Gordon To encapsulate data
user1125394
a mysql pair as temp variable would be perfect
PLB
PLB
Mostly.
also, for testing environment, it might be pragmatic to have mysql and httpd on same box
@Gordon basically. So that you can have worker or node classes that aren't exposed unless you expose that object
@crypticツ DNS is often an extra server (actually more than one) so that the whole infrastructure won't break down in case disaster happens.
14:17
@crypticツ but yeah , as @hakre said : one box per server is the optimal setup
@ircmaxell mhm. somewhat different UseCase but would solve the problem to some extent as well
atlantic.net/vps/linux-vps.html#comparison-chart getting multiple servers then, right now I am using 'small' for my httpd and will scale it up as needed. What should I use for MySql and DNS? All can be increased later, what is the lowest I should get?
@hakre depends on if you work in a 10 employee company or some 1000 employee monolith
@PLB but you apparently dont think that helps building better APIs
@Gordon definitely
I've just been playing with some datastructures where having a private "node value" class would be handy
14:20
@crypticツ "Hosted Cloud DNS: FREE" - maybe you don't need one for DNS? and for mysql, it loves RAM :D
@Feeds you forgot to put an article /cc @hakre
PLB
PLB
@Gordon Hiding constants would not give much improvement to APIs, in my opinion.
@crypticツ Why you no have kimsufi!?
@Gordon nah, I dunno why this is in the RSS line-up, it's a link-only post.
@hakre aww I want muh own!, ok I suppose I don't need DNS =oP
PLB
PLB
14:22
I think something like packages (with all visibility stuff) in java would be better.
or like friend in visual basic :D
@hakre so get two 'small' accounts for right now?
@Jimbo huh? O_0
@crypticツ DNS needs to be set up. Also you might need backups. Are you up to configuring bind and named ?
@crypticツ yes I would say that's good for starters.
also , what the fuck is "small" ?
14:23
I mean, I have a mysql on the run on my 512MB raspberry pi which uses 64MB already for the graphics.
And it works. So .... .
> Small 1024 MB 2.4 GHz Xeon 80 GB
@PLB it improves them the same way it does for methods and properties.
@tereško probably not, ain't nobody got time for that =oP
@hakre there are phones with more RAM
@tereško and there is C64 :D
PLB
PLB
@Gordon I can't think of any situation where it improves. I'd love to hear it from you.
14:26
@PLB anywhere where people use the constant outside the class where its meant to be an internal detail only
@tereško my calculator from college has more RAM
anyways, thanks for the info guys, bbl
what is "calculator" ... i thought it was an app/program ?
user895378
@Gordon +1
PLB
PLB
@Gordon So your point is to hide implementation details, is not it?
user895378
Lately I'm bothered more and more by stray publicly accessible class constants.
14:27
@hakre I had php/percona/nginx on a 256mb pi
@PLB yes, obviously
@HamZa euh, another 'http://www.animeka.com/animes/detail/another.html' was my favorite last year. Now I love 'Attack on titans' (shingeki no kyojin)
@Leigh yay!
@hakre stackoverflow.com/questions/11501971/… - for reference, if you ever try and install percona on ARM
@rdlowrey the problem with them is that you have to consider them public api because you cannot know whether a client uses them. plus, the coupling they introduce them when they use them.
14:29
@Gordon Is there any stack site for microsoft access?
@Tredged i hope not
user895378
@Gordon Exactly. It stresses me out to change constant names for that reason -- you don't know if outside code depends on them. That's why I've been using private static for those kinds of things lately and adding specific comments saying that they should never be modified.
user895378
But visibility on the constants would obviously be preferable ...
@rdlowrey yeah, I usually use constant methods for that, e.g. private function getFoo() { return 42; }
14:33
@Alucard Yeah was a great one another. From which team do you download ?
seriously, who comes up with a unit like 8 ears of corn?
corn doesnt have ears
they heard that.
@hakre Thanks for your answer yesterday. My test case was wrong, no JavaScript issue involved :)
@HamZa animeserv are my favorit, they have like all the animes in the world in HQ
14:39
@Alucard je vois
y u no close this room 11
user895378
@Baba I forgot to mention this earlier. Sockets exported to ModProtocol obey all the socket-related options for the main HTTP server. So for example, if you set the Aerys\Server option 'maxConnections' => 2500 and you have 2500 combined users connected to your websocket + custom protocol chat application the HTTP server will not accept new connections until one of the chat users disconnects. The same applies for things like the socketSoLingerZero option.
user895378
The main server class handles server-initiated socket closing and will use any settings you've defined in your global configuration to do things like that regardless of the protocol used for the socket in question.
@CarrieKendall don't look at me. I already voted.
14:46
@CarrieKendall Downvote why not but close? I don't think it is a good question but to me this is a legit one. Am I the only one?
@cheesemacfly its a typo question that's incredibly unlikely to help others
it also is incredibly clear that this person lacks basic HTML/JS understanding
user895378
@cheesemacfly To me, closing is a kinder option than a downvote?
I do agree this is a bad question but still it has a code example to reproduce the issue
user895378
Closing is a nice way to say, "Don't do that again, moron" without negatively impacting their rep ...
14:48
also, in its current wording, the actual problem/solution would be impossible to find in a search
Well, @CarrieKendall, I guess you are right as 5 people agreed with you :)
@cheesemacfly i just try to think in terms of search value on questions like that.. i could answer it properly and use keywords that might help search indexing, but then its just a duplicate of self closing tags questions and i don't think we need any more of those :P
> $this->add($class);
^^ my code really adds a touch of class. Because I'm English, dontcherknow.
@CarrieKendall yeah this question's title wasn't that good :D
@rdlowrey Oh am add look and feel to the mobile chat .. almost done
user895378
14:56
@Baba Hey no hurry. I've got plenty of stuff to work on. Just let me know whenever you need a test guinea pig :)
@rdlowrey lol ok ... since you are in a hurry .. we can leave it till tomorrow then
user895378
@Baba No, I was saying I'm not in a hurry. Take your time. I'll be at the computer all day :)
@rdlowrey Oh ok ...
Hi

« first day (1011 days earlier)      last day (4163 days later) »