@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23



Comments:

<0> :P
<1> AxL, I'm not strong on OO - but don't you need to make a collection of the Car cl***... maybe have it extend arrayterator...
<2> Stormchaser: did you understand my question ;\
<3> Stormchaser: prevent arbitrary exeution of code on the server
<4> For some reason, my POST variables are setting my SESSION variables, essentially changing what account my user is logged in to >.>
<5> mikere: you want mysql_real_escape_string
<3> Stormchaser: thanks
<6> AxL, my system has cl***es DBRow and DBRowList then i inherit Car and CarList from them, works like dream
<7> Hm, it's late here. Think I'll update my UML diagrams before I head off to bed ^^
<0> Jemt, the thing is.. what i was writing in PHP4 was becoming very kludgy, trying to get some true OOP behaviour out of a semi-OOP-capable language... like, i had what was effectively an abstract cl***, but overloading methods all over the place is ugly...
<8> Xen0n: did you saw the pastebin? http://pastebin.com/648596 If yes, I will explain: There is a cl*** calle Token which just holds tokens, nothing more. Cl*** Token just holds some data of a type. Ok. Next thing is that there is anothe one cl*** called Stream. This simple cl*** has two function: getc() and eo()=end of stream. The third cl*** is that one I need help with. It is called Tokens and is holding Token cl***es in its $tokens variable. What I
<6> AxL, create internal pointer, and query pointer, create fetch,reset,rollback methods for dbrowlist
<7> Xen0n: Ah, I see. Bugger :)
<6> AxL, you are with me?
<7> Well, PHP5 has infact made it easier to create good OO applications :)
<0> Jemt, so i decided, meh, i'm running PHP5 on both my home servers, my hosting account expires sooon... i might just migrate - nothing holding me back realyl



<0> *really
<0> Jemt, also means i can fix my old scripts for PHP5 forward-compatibility
<7> True ^^
<2> lCiantic:ooops not really .. in fact i begin oop in PHP4 and I can t find a good tutorial on it so ...
<8> Xen0n: and I use PHP4 (debian/sarge)
<7> Xen0n: I have several large systems written in PHP4. And I just don't have the time to "convert" them into PHP5
<6> AxL, if you did not follow me, how can you even think of inventing exactly similiar system i just explained :D
<8> Xen0n: Ah, I forgot to say that the characters from the $TABLE must occure too in $tokens of the Tokens cl*** as tokens as well. (huh, terrible sentence, sorry my english).
<2> Ciantic:so for list you always create a cl*** fooList right ?
<0> Jemt, i have always tried to code to best practices, with error_reporting(E_ALL) on
<6> AxL, yes, that does only one thing, it loops through the query resultset
<6> AxL, but i don't need to create any method or anything inside it
<6> AxL, cause i inherit it from the DBRowList
<2> ok i follow you now :)
<0> uroboros, what significance does newline have in your data file?
<7> Xen0n: Same here. Doing otherwise would definitely make it hard to move a system from one server to another if they are not running with the same configuration
<7> - unless you write really good code and don't haft to have PHP point out "weak" points :)
<0> Another reason for moving to PHP5 - decent SQLite support :D
<7> Heh, actually I'm using XML in my framework :)
<0> Jemt, 99% of problems i get are typos...
<6> AxL, same way you should also have DBRow and CarDB (which inherits from DBRow)
<7> Xen0n: Same here ;)
<0> Jemt, I am using XML output, then run it through an XSLT templating system
<8> Xen0n: can be anything, who nows? That is suposed to be just a tokenizer or "lexer". It has no semantics..
<0> uroboros, right, ok
<8> Xen0n: "\n" is just a token of type 4
<7> Xen0n: But the structure in my framework makes it very easy to change to another data source as I'm using the well-known data source pattern - Row Data Gateway - by Martin Fowler
<0> Jemt, link?
<7> Xen0n: Uhm, actually I have read about it in some books. But let me see if I can dig something up :)
<2> Ciantic: I think i am understanding ...
<6> AxL, if you are not familiar with OOP you will for almost 100% surely do it wrong by the first ~10 times at least
<0> Jemt, like i said, mine is fairly loose framework anyway .. just a load of independant modules
<0> uroboros, hmmm, i think i get what you mean now..
<7> Xen0n: Sounds pretty nice
<7> Xen0n: http://www.martinfowler.com/eaaCatalog/rowDataGateway.html
<6> AxL, ... even without knowing that you did it wrong, but when you nail it... you know it. Thats the point when you see its simplicity and how far superior its against any other ways
<7> Xen0n: Very simple example though. You might be able to find more useful information through Google
<8> Xen0n: great, it is somehow very difficult to express myself in english for me
<9> hi
<9> what is the equivalent of the perl print "ok" x 5; in PHP ?
<0> Jemt, something else i was planning on doing is writing a separate mysql module that can be generated from a database schema, in XML maybe, that enforces referential integrity... but i cant quite work out if it would be worth the processing overheads on the webserver to do that
<10> fridim: I ***ume that would print "ok" 5 times?
<9> Rick, exactly
<0> uroboros, give me a couple of mins, ill just have a little play around with your code and see if i can do something :P
<10> fridim: print str_repeat("ok", 5);
<10> :P
<2> Ciantic:well I think it was wrong ... I created a generic cl***e list and inherit listCar after crrating several cl***es ...
<7> Xen0n: Would be very nice. But a well-designed database (based on ie MySQL using InnoDB tables) would take care of all that for you
<9> Rick, thank you
<8> Xen0n: ok, I can give more information on its purpose, if you needed...
<7> Xen0n: Should be part of the DataBase Management System
<0> Jemt, but a lot of hosts dont offer anything that gives referential integrity :/
<10> fridim: there's also str_pad (as linked from str_repeat php man page)
<7> Xen0n: True
<2> Ciantic: where did you put advanced search ? On DBRowList ?
<6> AxL, for each table in database you should have DBTable, DBRow, DBRowList like CarTable, Car, CarList (you name them, and inherit well)
<8> Xen0n: and thanks a lot for trying to solve it, really, I appreciate it very much
<6> AxL, DBRowList
<0> uroboros, all you are trying to do is parse the input into a sequential array of tokens, yes?
<6> AxL, if no database is involved, it doesn't matter you can create different constructor for dbrowlist and dbrow
<0> Jemt, one of those projects that i will probably only bother starting if i get bored, and probably wont finish :D



<2> Ciantic: what is the aim of DBTable
<6> AxL, do you use Database like MySQL ?
<2> yes ..
<7> Xen0n: Actually I'm considering purchasing a dedicated server next month. I'm going to install Apache2, MySQL5 and PHP5 - and offer cheap hosting. The system is stored in a safe data center and based on professionel ISP management software
<11> lol
<7> Xen0n: Hehe, I got a few of such projects my self ;)
<11> Jemt, join the millions of other hosts out there that do just that
<6> AxL, well, the DBTable you inherit CarsDatabase and fetch cars like this: $cars->GetByMake("Toyota"); which returns CarList
<6> AxL, got it?
<0> Jemt, actually, that describes most of mine...
<8> Xen0n: yes, thats right. In the example given, the first token of $tokens in cl*** Tokens will be "new Token("{",0)", second will be "new Token("a",255)" and so on. The characters in $TABLE will be tokens as well as for instance the "foo" string...
<7> "cheap" would be about $100 per year
<0> Jemt, i am thinking of maybe hosting everything off my home servers, except for files/images...
<11> Jemt, not really
<6> AxL, and then carlist fetch method returns Car which has properties that matches the fields
<7> [M]ax: Well I need my own server as several companies have shown interest in my CMS framework. And there is not many host offering PHP5 support in DK
<11> one of my projects was a 1EUR host
<2> Ciantic:I m thinking ...
<7> Xen0n: I was considering the same for some months - but I prefer a "real" dedicated server on a 100 mbps connection :)
<0> Jemt, a friend of mine is getting an ISP job that involves him getting 100mbit at his house, and he's gonna colocate me for free :D
<6> AxL, take your time, its not going to unveil its secrets for while if you are not familiar with OOP, i repeat myself but that is important
<7> Xen0n: Sweet!
<0> Jemt, also, i can't afford a dedi.... I'm 18 with a crappy part-time job
<7> Xen0n: Ah, I see. I'm 22 myself - still in school (as a Systems developer)
<11> Jemt, i am 22 and i own a web hosting company :P
<6> AxL, think like this: CarsTable is the Cl*** that retrieves the data from the table, like CarsTable::Get(id) retrieves only one result, which obiviously is car, but like GetByMake returns many so it is CarList and looping CarList you can get each car in it
<0> Jemt, i start a degree in software engineering later this year - should have started it last year but had.. financial/residancy issues
<7> Xen0n: Ah, bugger. Hope you make it this year :)
<2> Ciantic: well I think I need a tutorial on that ... Do you have a url on that please ? I googled but I was not able to find something like that :(
<6> AxL, and when you think what CarTable is, its simple it is Table in database DBTable, so you can create general cl*** for each cl***
<6> AxL, there is no tutorial for it, it's too advanced for general PHP use
<0> Jemt, i got my residancy this year, so not a problem - university really wants me there, so i already have my place for this year
<7> Xen0n: Great :)
<2> Ciantic:no tutorial ... why no one did one ... :(
<6> AxL, cause it is so clear to those who can
<7> Xen0n: If all goes well I will be all done in november :))
<6> AxL, and those who can't, doesn't understand that it is far superior way to do it
<11> Jemt, most "chap" hosting co's last 6 months max
<11> cheap*
<6> AxL, i can give you my DBRow, DBRowList, DBTable
<2> Ciantic:can you ? Really ?
<6> AxL, so you can inherit your own stuff from them, but its not much of a use if you don't get it
<2> Ciantic:it is genic cl***es , right ? I ll study them and inherit ...
<7> [M]ax: Because they do it wrong. I know what I'm doing. Besides, I have ensured a nice starting capital
<6> AxL, yes
<11> Jemt goodluck
<2> Ciantic:do you use it for a longtime ?
<7> [M]ax: Thanks
<6> AxL, pretty much
<6> AxL, problem is, i cant give you mine Database cl***, which also makes this simple but these will get you started
<2> Ciantic: what is this DatabaseCl*** ?
<6> AxL, better way to handle database connections like PDO
<2> Ciantic:oh ...ok ... like PEAR DB ?
<7> Hm, is "Implementation" equal to a "static" function? I'm using Dia to build UML diagrams.
<6> AxL, just a moment, i'll convert my data to more suitable for you
<12> how can i see if an check box is checked?
<2> Ciantic:it is very cool from you to do it ... Many thanks !!
<12> how can i see if an check box is checked?
<6> AxL, oh :D forgot to ask, surely there is PHP5 available?
<12> anyone can help me plz?
<6> cause with PHP4 this ain't gonna work
<2> Ciantic:well it is PHP4 but I could fit it ... no ?
<6> AxL, perhaps, but it could be pain
<2> Ciantic:so much ! I can t inspired
<2> ?
<6> AxL, what?
<6> well i give you this code anyways, a moment
<2> Ciantic: ok
<2> to be inspired by your code, I meant
<13> MalMen|: javascript, or $_POST ?
<13> with a $_POST : you check wether it is set or not (via isset($_POST['checkbox_name']) )
<7> I'm off to bed. Later :)
<6> AxL, here=
<8> Xen0n: So, did you find out some way of solving the tokenizing problem?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#linuxhelp
debian encrypted lvm
#linux
USE=nptlonly
unubtu apache
#debian
installing eggdrop debian
#math
sudo apt-get install build-essential linux-headers-`uname -r` gcc-3.4
#perl



Home  |  disclaimer  |  contact  |  submit quotes