« first day (418 days earlier)      last day (4536 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
when using ajax, can i transfer php generated graphics as well?
 
why shouldn't you be able to do that?
Is some German here right now?
 
Hi does anyone know a good place to find online tutors for php?
also does anyone us zend
 
4:22 PM
programmers.stackexchange.com/users/11515/ircmaxell?tab=answers <-- no answers, but a good answer badge... Odd...
 
@NikiC ze German!!
 
Indeed, but apparently you answered a question about productivity effects from the use of drugs!
At least according to Stack Exchange
 
@Gordon Great. How would you translate Code Unit / Code Unit Sequence to German?
 
What's a Code Unit?
sorry. I am having these weird connection losses again. using the browser intermittently kills my modem.
 
I'd say it's the smallest bit sequence that can represent a character. I.e. a byte for UTF-8 and two for UTF-16
wait a sec, I'll get an official definition
Code Unit. The minimal bit combination that can represent a unit of encoded text for processing or interchange. The Unicode Standard uses 8-bit code units in the UTF-8 encoding form, 16-bit code units in the UTF-16 encoding form, and 32-bit code units in the UTF-32 encoding form. (See definition D77 in Section 3.9, Unicode Encoding Forms.)
 
4:38 PM
@NikiC Code Point
 
@NikiC im not sure there is a proper technical term in german
 
@ircmaxell ^^
 
ya
 
@Nikic there is none unicode.org/terminology/about_term.html so i suggest you stick to codeunit and codepoint
 
@Gordon Well currently somebody put Zeichenfolge in the translation which isn't quite right imho ;)
 
eaj
4:48 PM
Given that the French translation of code point is "point de code" I'd say you're probably safe with that. :)
 
PHP Notice:  Undefined index: extension in test.php on line 6

Notice: Undefined index: extension in test.php on line 6
How can you get such duplicate error messages?
 
error handler?
2 notices being thrown?
 
Hm, I'll just ask frozenfire, whoever that is
 
@NikiC well, the literal translation would be Codeeinheit and Codepunkt and Codeeinheitensequenz. Not sure this clarifies anything over the english technical terms.
 
@Gordon I'd go with 符号位置
 
5:12 PM
Okay,
I'll use Code Unit Sequenzen
 
5:33 PM
anyone know of some good php mysql tutorials? im trying to create a for loop of the assoc array derived from a mysql query, for each element in the array i handle it with some html formatting
 
Hm, I don't like preg_replace with e
It calls addslashes on every inserted match :(
 
how i can implement comet long polling ?
 
@JMRboosties Are you using mysql_, mysqli or PDO?
 
@NikiC I don't like it either. Because it's eval
 
@NikiC the method im using is mysql_fetch_assoc
 
5:42 PM
@ircmaxell That's no reason ;) I'd need the eval anyways. But the way e works just doesn't work for me
@JMRboosties I would recommend you to look for a tutorial that teaches PDO. mysql_ is quite outdated and doesn't have lots of handy features and will eventually be removed. So it's better to learn and use PDO.
 
eval equals evil
 
No
 
@NikiC Why would you need the eval?
 
@ircmaxell I'm evaluating inline expressions in test files
 
@NikiC example:
 
5:45 PM
@NikiC thanks, i will look at that right now
 
@ircmaxell currently only things like @@{ chr(0) }@@
 
1 message moved from JavaScript
 
Should I use the 'DECIMAL' data type for my MySQL column when storing values like 0.32, 21.155 and 9?
 
@Chris Depending on your range of values. If you are always having numbers like xxxx.yy (like prices) you should use decimals (as they are precise)
 
5:48 PM
hello have question about comet
any thr ?
 
@NikiC Alright, but the . isn't in a fixed position as with prices. I might have vales like x.yy, xx.yyy and x (these were my examples as posted above), should I still use it?
 
@NikiC oddd... ok
 
@Chris Hard to say. Basically FLOATs are imprecise but allow a large range of numbers and DECIMAL is precise but has only a limited number range. Depending on what you need in your case ...
@ircmaxell And what I wanted to do at some point was @@{ "\v" }@@ well and that didn't turn out well as it was run as \"\\v\" ^^
 
@Chris Why are you thinking about that? what are the requirements for the data?
@NikiC Ah
 
Hm 5.4.0RC3 is there
 
5:56 PM
@NikiC How would you define 'imprecise' here? As in 'sometimes retrieved as different in value than how it was stored'? That would seem strange :o. As for the number range, the numbers I'll store will be 5 digits in length at most, plus a dot. Will that be a problem?
 
@ircmaxell I know, I shouldn't do this and bla bla bla but it seems like the only sane way for me to handle inline expressions
 
@NikiC I didn't say anything. I can't think of any clean ways of doing it that don't involve eval or some form of custom parser/token replacement anyway. Go for it
 
:)
I wasn't sure whether Ah is same as Uh ;)
 
@ircmaxell I'll be storing some numbers ranging from 0.0000 (6 digits + dot) 99.99 (4 digits + dot).
*to
 
@Chris Floats are generally imprecise due to how they represent numbers (in any language)
Probably in your case you want a DECIMAL ;)
 
6:03 PM
@NikiC Ok, should I then set the length to 5 (excluding the dot, messed up in the previous message) or 6 (including the dot) for numbers like 0.0000?
 
What's the point of the numbers though? What does it represent?
 
Percentages, but I don't know if I'll store them in a way which is easy to read (xx.yy) or easy to perform calculations with (0.xxyy)?
minus the question mark, that is.
brb
 
Well, does it have to be precise? Meaning can a result from a calculation be estimated?
 
@Chris dev.mysql.com/doc/refman/5.5/en/fixed-point-types.html So DECIMAL(5,2) if you got a total of 5 digits and 2 after the dot
 
6:27 PM
hi @Levi
 
Remember Unicorn Voting???? well now we have Unicorn Staring
here is the actual link
0
A: Unicorn Voting - Bringing the Joy of April 1 All Year 'Round!

rlemonHere is a userscript to add the same functionality to the chat system.. enjoy Only uses the OP images. Same License. Don't sue me George userscript source

 
7:05 PM
GitHub is like the facebook of coders
makes me feel all warm inside
 
7:15 PM
GitHub is cool - have you tried masterbranch?
 
You mean created a repo and uploaded things to it? Is this like a trick question?
 
No, I meant as a social thing as you were comparing with FaceBook
 
Yea I'm not sure I follow
I meant more like, collaborate with other's your-kind when I said "Facebook for coders"
So
Fatal error: Access to undeclared static property: routes::$route
what does this mean? Did not find anything useful on stack
 
7:49 PM
im trying to generate a blog post with php... but when i attempt to insert variables it doesnt work. can anyone have a look at this real fast? pastebin.com/fQRQZJCu
 
8:18 PM
use <?php echo $body; ?> instead of <? $body ?>
and what is the meaning of this ?
catch(PDOException $e) {
      $e->getMessage();
}
 
something i saw in a tutorial, just catching a PDO exception right?
 
please , read the tutorial , instead of copy-pasting the code
 
thats the same structure for catching exceptions that ive worked with
 
what do you think the $e->getMessage(); does ?
 
8:25 PM
i just forgot the echo its time for deep breaths
prints the stack similar to e.printStackTrace();
 
no, that method does no print anything , it returns a string
 
so echo ____
 
next .. what does PDO::query() return ? is it an array ?
 
Exception handling.. Meaning exceptions are supposed to be handled.
 
@tereško something like a result set it looks like
 
8:30 PM
did you look at the manual ? php.net/manual/en/pdo.query.php
 
a while back i looked through that
according to that link its a result set
called PDOstatement object but essentially a result set
 
gods below , this guy is so full of shit that there small wonder he has no room left for brains
http://www.php.net/manual/en/class.pdostatement.php read the page
 
im dying here lmao
 
so quick to anger
why do you answer questions and hang out here if everything makes you mad? if you dont like hearing questions from people new to programming you probably shouldnt frequent SO
 
8:39 PM
that's typical @tereško
he's a one of a kind douchebag.
 
its funny i want to save these logs and share htem
 
lol
 
the best is that he contradicted himself up there and then deleted the veidence and said who cares
 
ahh yes, that's so like him, too
 
well in the end i got the info i needed so works for me
 
user142019
8:44 PM
Hello.
 
Perhaps tereško has forgotten what it was like when he started to learn programming..
We all start somewhere @tereško
 
well anyway another question if you dont mind: im looking to have a filter option on my blog page, clicking an author's name will display all posts by that author only. so when i do my query as of now its....
SELECT * FROM blogs
could i do something like this? SELECT * FROM blogs WHERE author = '$filterAuthor'
where $filterAuthor defaults to *, but if it is specified it could be author-name or whatever
could sql handle "SELECT * FROM blogs WHERE *"?
 
author/user really should be a separate entity.
and then you have a foreign key to the user's id in the blog entity.
 
i dont think im bringing user into this at all?
oh i think i see what you mean
 
And in my opinion specifying what you want back is better than just using * to grab all.
 
8:49 PM
well i do use everything in the blogs table
consists of id, author, body, date, title
 
So I would write something like SELECT blogs.id, blogs.title, blogs.content, author.id, author.name FROM blogs, author WHERE blogs.authorId = author.id
 
hm that looks good
 
I can't be arsed to go into detail but trust me you should really have two tables here:
 
im pretty new as you can probably tell
 
Blogs: id, body, date, title
Authors: id, name, email
or something like that
 
8:52 PM
ive never really worked with multi table queries
but that seems pretty simple
 
I suggest you read up on database normalisation.
 
know of any good resources for that? dont want to make you search but if you know it off the top of your head
 
In fact read up on everything to do with databases. Plenty to learn. :P
 
hi@all
why are some pictures right on the chat gray?
 
transparent => hasn't talked in a while
 
9:03 PM
thx
 
9:41 PM
Hi! I'm trying to develop a site where users can list the items they want to sell --- when sold, I want the users to be paid but a certain amount of the payment to be deducted. What is a possible way to do this? Can anyone give me some pointers? I felt I could do it by transferring the money to my account first and then transferring the deducted sum to the seller's account but that would result in 2 times the transfer fees.
 
What would you guys say to an app that helps the user build a CMS. Yes a CMS, not a website.
 
Apologies if this is the wrong place to ask this; I couldn't think of a better place.
 
9:55 PM
Hi all ^_^
^_^ check it out ppl!
 
I think I know what people will say about that ;)
"people" = "people in this chat"
 
@Neal Tries to be MVC without the Model layer?
 
a) App::set App::get => static => evil
b) Usage of PHP 4 style classes, at least in your README (the classes themself look PHP 5 though)
 
    class TestController extends AppController {
        var $name = 'Test';

        function index(){
            $rows = array();
            $result = $this->_mysql->run_query('SELECT * FROM TABLE');
            while($row = $this->_mysql->get_row($result)){
                $rows[] = $row;
            }
            $this->set('rows', $row); //for use in the view
        }
    }
need I say more?
 
10:11 PM
Look one post above yours ;)
 
@NikiC I'm not pointing out the php4 style class (with public members).
 
@ircmaxell What are you pointing out? That the controller somewhat contains the model?
 
@NikiC it is the model
 
I can see what @ircmaxell is pointing out.
 
I don't like the Model/Controller distinction categorally
It's fuzzy
 
10:14 PM
@NikiC It is?
 
At least I have found many contradictory views on what belongs where and what is what
 
I can't fathom why MVC is still so popular when RMR beats it hands down. Am I the only one who sees this?
 
@Daveo Yes
 
If I knew what RMR was, maybe ^^
@ircmaxell Somewhat. I think if you ask five people how MVC looks like, you'll get at least six different answers.
 
I like the principle of RMR. But I don't see how it's really applicable. What if I need a CLI component to my application. With MVC it's clear how that would fit. With RMR, it doesn't fit
@NikiC Absolutely. But only one really makes sense in all respects
:-P (j/k btw)
 
10:17 PM
@NikiC because four of them will quibble about implementation and only one will give the Fowler definition
 
@Gordon Though yet another might question whether the Fowler definition really is the definition ;)
 
@NikiC it leaves room for all the others
 
@Gordon Yeah, everybody says that ^^
 
I don't
 
Wenns nicht passt, wirds passend gemacht
 
10:21 PM
peej.co.uk/articles/rmr-architecture.html <-- Resource-Method-Representation
 
@ircmaxell Misunderstanding
 
blah
Ok, later
 
By the way, for those who want to know
Duplicate error messages come if you are using CLI and have both display_errors and log_errors enabled
You'll get the error in stdout once and another time in stderr
 
@Neal , hell i cannot even understand the order in which you application gets initialized
index.php loads > /config/app_config.php
/config/app_config.php loads > /config/autoloader.php
which in turn load /classes/App.php , and then it all stops
 
Hello all. I'm /still/ trying to get a hold on MVC stuff, I can get implement the more basic examples, but get stuck when there are multiple related (simple one-to-many) tables involved
 
10:36 PM
@MSpreij , maybe because you are confused about Model part
 
hey
 
Model is not a class , it is a layer
 
you've heard that php IS NOT a programming language?
(that's what one of php contributors said)
 
@zerkms , long time no' see
 
@tereško: yep ;-) I'm currently down-under, in NZ ;-)
 
10:37 PM
you mean Rasmus ?
 
nope
 
@zerkms Depending on your definition ;)
 
2
A: MySQL connection: globally or in object?

Kris CraigIn PHP, the best practice is to take the global approach. This is mainly due to the fact that repeated connects/disconnects to the MySQL server can cause a significant decrease in performance. In fact, though this may seem counter-intuitive, most PHP experts (including myself) recommend that yo...

@NikiC: isn't programming language definition well composed for years?
 
@tereško but they use classes for each table which they call models, everywhere?
 
@zerkms It is?
 
10:39 PM
@NikiC: isn't it?
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely. The earliest programming languages predate the invention of the computer, and were used to direct the behavior of machines such as Jacquard looms and player pianos. Thousands of different programming languages have been created, mainly in the computer field, with many more being created every year. Most programming languages describe c...
 
It isn't.
 
@MSpreij , who are "they" ?
 
how about "A programming language is a notation for writing programs, which are specifications of a computation or algorithm"?
 
@tereško uhm. tutorials for any of the frameworks have "model classes"
 
@zerkms Could be. But as you can see that guy you are reffering to disagrees with it ;)
 
10:41 PM
@zerkms , there are people who still think that javasctript is not a programming language
 
@NikiC: there are people who don't know about sun placed in the center of our galaxy. That doesn't mean it is incorrect
 
@tereško I don't really care what they are called tbh, I'm just getting stuck in the implementation details. And everytime I try to read a tutorial to see how they do things it's " .. and then copy/paste /this/ code, and then run ->herebemagic(); and you should see it working!"
 
@MSpreij , model is the layer which contains all the business domain logic , which is build on top of data access layer .. to some extent
 
Oh, Java is scripting language now too ^^ It isn't compiled to machine code neither ^^
 
yes
java is not a programming language
it is translated and evaluated in a virtual environment
 
10:43 PM
what you usually call "models" are "domain objects" , the represent concepts in you you business logic an do not necessary map directly 1:1 to the DB tables '
 
ok
 
domain objects themselves are not responsible for storing ad retrieving data
 
Compiled programming language OR interpretted programming language.
 
that is done using datamappers
 
well, I vote to cut off php from stackoverflow
stackoverflow is about programming
 
10:44 PM
Though Java, JavaScript, C, Perl, etc are all programming languages.
 
since php is not a programming language - it is offtopic
 
does # in html mean "this URL"?
 
domain object are only responsible for the part of logic , which is associated to the concepts they represent
@zerkms , there was a movement to segregate jquery to a separate SE subdomain , just like it was done with wordpress
 
@JMRboosties: nope
 
@zerkms oh its a separate thing
i found the right way to google search it lol, a href # wasnt turning up much
 
10:46 PM
Hm, I just checked and kriscraig indeed has a php.net account, but I couldn't find him in global_avail (i.e. no karma defined)
 
im looking to put a filter function in, so i should just do the url with the params
 
If I'm posting data to a controller that creates a new record 'pageItem' which has to belong to some record 'Page', I pass along (in the post data) 'page_id', to, say, /pageItem/add/
so it loads the controller pageItem, and runs method/action 'add', with the post data. at some point I need to instantiate the Page class too - do I do that inside 'add' ? or the constructor? or the class from which pageItem was extended?
 
MVC is like pornography : it's hard to explain what makes it one , but you know, when you see it
 
or some abstract request object?
I think that's the only thing they have in common then...
 
10:50 PM
Doesn't look like Kris wants to come chatting ^^
 
@NikiC: yep
because it will be difficult to agree that java is not a PL
 
yes
 
who am I then? scripter?
:-S
 
i guess this makes XSLT not to be programming language either
 
huh, and what kind of crap is that:
 
10:53 PM
though , it is Turing complete
 
0
A: PHP's preg_match_all() to pull out all php tags

Kris CraigIt looks like what you're looking for is lookahead and lookbehind. These regex operators basically allow you to include text in the search but omit it from the final result. So first, you'd want to change your regex to this: '/(?<=\<\?)[^(\?\>)]*(?=\?\>)/' For EOF, you'd use the ...

 
The game of life is Turing complete :-p
 
@tereško: isn't xslt a declarative language?
while php and java and C are empirical
 
@zerkms That doesn't mean much ;) Haskell is a programming language, even if it's function. Not every programming languages needs to be imperative ;)
 
@MSpreij you got a point there
 
10:57 PM
Touring completeness doesn't count much
 
@NikiC: sure, just wanted to get it right, since I didn't work with xslt much enough
 
Some sources are even saying that CSS3 and HTML5 are Turing complete
 
@NikiC: btw, that guy continues debating there, lol
 
@NikiC , dont you need an IF for that to be true ?
 
HTML is not a programming language, surely?
 
10:59 PM
anyway , this hole thing is bullshit
 
or I mean, Turing complete, I have trouble believing that
 
@tereško There something called rule 110 or something like that, which is proven to be Touring complete. And it can be implemented in CSS3 (though with user interaction, but that isn't contradictory to Touring completeness).
 
sounds like someone made a virtual OR-gate in css
wii
 
@NikiC got a url for that?
 
@zerkms I especially like how he talks about trolling ^^ As if he weren't trolling right there
 
11:01 PM
the implementation I mean, I know the Wolfram thing
 
@NikiC , leave it be , just give -1 for being stupid and leave it alone
 
@NikiC: it would be amazing if he had trollface at his avatar when he was saying that
 
that looks perverse
 
curious if he will add anything to my latest comment
which should be the latest
(in that discussion)
anyway it's a lunch-time, see you in an hour
 
11:04 PM
It's sleep time, so see you tomorrow ^^
 
huh ? weren't you russian , @zerkms ?
oh .. wait .. location : New Zealand
 
Is there a way to join this chat via something other than a browser?
I wonder if one can implement GOL in CSS3 now :-p
 
@MSpreij , no , this is a browser based chat , no IRC server running at the backend for this
 
@MSpreij No you can't. Remember Turing Completeness BIG_WALL Reality
 
@NikiC ?
 
11:10 PM
@MSpreij Turing Completeness has nothing, absolutely nothing to do with programming reality
 
Rule 110 is a cellular automatum of a kind, and if they managed that in CSS3 (if with lots of user interaction), then GOL could be done the same way maybe?
 
annoying. i am trying to split a string at the </p> mark
it does it, except it leaves a < behind
$breakdown = preg_split('</p>', $body);
 
@NikiC maybe, but my question had nothing to do with anything being Turing complete
 
@MSpreij Yes, theoretically, yes, you are right.
 
I was just wondering, is all
 
11:14 PM
It's just that Rule 110 is a very trivial example and it already needs incredibly complex code. Can you imagine how GOL would look like?
 
:-)
 
@JMRboosties In </p> the <> are taken as delimiters and pcre splits on /p then ;) Just do explode('</p>', $body)
 
explode huh, good tool
 
@zerkms , why did you advertise the use of singletons ? -1 , bad boy , no cookie
 
I love explode
 
11:16 PM
thanks i will try that @NikiC
@NikiC perfect, if chat had a ^1 id give it to you lol
 
:)
 
@tereško: it is too difficult for newbies to follow DI-way
@tereško yup ;-)
 
Thought @tereško was Tiesto for a second...
 
I don't see what is so difficult about DI and I could be considered a newbie
 
@CharlesSprayberry: that's not common ;-)
in general people don't even understand singletons
you need good knowledge base as well as clean code base to be able to introduce DI into a project
 
11:26 PM
ehh ... gonna play Anno 1404 for a bit
 
omg, someone deleted my comments
IS IT A F*** JOKE?!?!?
 
no
I flagged the discussion for deletion ;)
 
@NikiC: hey!!! btw, you're supposing to be asleep now!!
 
as it was quite a bit off topic
 
:'-(
you made zerkms sad today, not cool :-(
 
11:28 PM
You have to see it the other way around
I hid a mistake you did ;)
 
i didn't any :-)
 
Well, assuming this is a Singleton using the traditional instance held in a static variable, I don't like this way of teaching. Was talking with a fellow student about one of his projects for school and he had virtually everything static. I think misusing static is a far worse offense than stumbling with DI.
 
i've proven there that php and c# behave in similar way
 
As you know: "Never argue with an idiot, they drag you down to their level and beat you with experience"
You kind of broke that golden rule :)
And I did too
@zerkms +- an hour doesn't make a difference
 
@CharlesSprayberry: I agree with you, that following "best" practices is a good thing to do. But in real life a lot of developers are not just confident enough to even understand what is it about and what benefits it does
so they either will blindly follow it or will not follow it at all. Both cases are bad
 
11:31 PM
And, just as importantly, they don't really understand the impact of having a lot of static methods and variables.
Sometimes I guess the only way to learn is to get stung
 
(just my personal opinion based on a lot of conversation with a lot of "developers")
 
Agreed
 
" they don't really understand the impact of having a lot of static methods and variables." -- this will come with time
 
Well, the one thing I see other students in my class abusing is static...or just writing horrendously poor formatted code
 
You definitely wouldn't be able to explain DI to a year ago. It takes time to get the concepts
 
11:32 PM
it is not possible to get the idea what is good and bad in a moment. It takes months
and I think it is a good thing to make mistakes - you will always remember it
 
But, you have to know it is a mistake first. The problem in my perspective is that it was never really explained to them that static should be used sparingly.
 
if you don't understand it is a mistake - then who cares? :-)
there is no absolutely correct solutions in programming
but there are solutions that best fit the case
 
I believe that there is absolutely wrong solutions in programming though
 
anyway, going to have tea with cake :-P
yup, and singleton is not absolutely wrong ;-)
 
But, how often is a true Singleton really the answer?
What's wrong with a singleton, a normal class that you just only instantiate once?
If you understand why global scope is bad I don't see how you can't understand why static is bad
 
11:36 PM
I didn't propose to inherit from singleton
@CharlesSprayberry nothing wrong ;-) It just does the work it should
anyway, gotta go
 
@CharlesSprayberry In PHP, never ^^
 
Yes, I'm talking strictly PHP
I see the value of static in specific situations, particularly with Java
 
@CharlesSprayberry well .. this is what you get , when people who love to use global variable are forced to write OOP
 
@CharlesSprayberry I think the problem is that people don't understand that global state is evil. They are only told that global (as in: the global keyword) is evil. But the step from global to global state in general is quite hard ;)
 
Yea, I guess I just wish we went over that in my prog & logic class I guess. I see some really brutal slaughtering of code...it makes me kinda sad sometimes
 
11:42 PM
Anyways, going to sleep now. That KrisCraig said something about him coming over here soon, but I don't want to wait any longer
good night
 
00:00 - 16:0016:00 - 00:00

« first day (418 days earlier)      last day (4536 days later) »