You can subscribe to this list here.
2004 |
Jan
(57) |
Feb
(71) |
Mar
(80) |
Apr
(40) |
May
(49) |
Jun
(20) |
Jul
(3) |
Aug
(9) |
Sep
(8) |
Oct
(2) |
Nov
|
Dec
(11) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(10) |
Feb
(25) |
Mar
(24) |
Apr
(26) |
May
(71) |
Jun
(35) |
Jul
(5) |
Aug
(3) |
Sep
(18) |
Oct
(4) |
Nov
(5) |
Dec
(2) |
2006 |
Jan
(50) |
Feb
(12) |
Mar
(7) |
Apr
(24) |
May
(1) |
Jun
(17) |
Jul
(51) |
Aug
(38) |
Sep
(38) |
Oct
(33) |
Nov
(8) |
Dec
(13) |
2007 |
Jan
(44) |
Feb
(25) |
Mar
(21) |
Apr
(68) |
May
(52) |
Jun
(24) |
Jul
(17) |
Aug
(12) |
Sep
(4) |
Oct
(14) |
Nov
(1) |
Dec
(3) |
2008 |
Jan
(9) |
Feb
(1) |
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
|
2009 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(21) |
Jun
(5) |
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
|
Dec
|
2010 |
Jan
(15) |
Feb
(36) |
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
(3) |
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
2011 |
Jan
(22) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2012 |
Jan
(14) |
Feb
(6) |
Mar
(20) |
Apr
(12) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(2) |
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(1) |
May
(9) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
(11) |
Jul
(1) |
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael R. <re...@eu...> - 2004-03-10 18:59:40
|
Hi Javier, > Michael, my real full name is Javier Garcia (Stolz is my nick). Thanks, fixed. What does "Stolz" mean to you? I'm asking because "Stolz" is the german word for "pride" :-) > Here is an "improvised" TO DO list : > -add a function to fetch data (not only the number of rows) from the database > -use persistent connections (connect on init and disconnect on exit) to improve CPU usage > -add some kind of connection trackin > -set default server, user , pass and database in the Variables > if mySQLquery() is called with: > 5 args, do it kike the old way > 2 args, use them like database and query, use default server, user and pass > 1 arg, use it like query, use default server, user , pass and database > -add an argument to mySQLstatus funtion. > The argument will indicate what to return:Uptime, Threads, Questions,Slow queries, Flush tables,... > If uptime, return it Like: Days,hours,minutes Fine! I'm expecting results until tomorrow evening :-) > How can I get the variables from the config file, is there any function? Of course there are. Take a look into plugin_imon.c Basically, there are two function: For Strings, use char *cfg_get (section, key, default) section would be "MySQL" (it's the "Block" from the config file key is the requested parameter name default is the default value which will be returned if the key does not exist in the config file For Numbers, use cfg_number(section, key, default,min,max,int *value) acts like cfg_get(), but does some range checking with min and max bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Javi <ja...@gs...> - 2004-03-10 10:16:26
|
Hi. Thanks all for your answers. Michael, my real full name is Javier Garcia (Stolz is my nick). Here is an "improvised" TO DO list : -add a function to fetch data (not only the number of rows) from the data= base -use persistent connections (connect on init and disconnect on exit) to i= mprove CPU usage -add some kind of connection trackin -set default server, user , pass and database in the Variables if mySQLquery() is called with: 5 args, do it kike the old way 2 args, use them like database and query, use default server, user and = pass 1 arg, use it like query, use default server, user , pass and database -add an argument to mySQLstatus funtion. The argument will indicate what to return:Uptime, Threads, Questions,Sl= ow queries, Flush tables,... If uptime, return it Like: Days,hours,minutes > For the variables I would choose a different approach: specify server,=20 > user and password directly in the config file, e.g. >=20 > MySQL { > =A0 =A0Server 'foo.bar' > =A0 =A0User =A0 'michael' > =A0 =A0Password 'swordfish' > } How can I get the variables from the config file, is there any function? Thanks. bye. |
From: Michael R. <re...@eu...> - 2004-03-10 09:10:38
|
Hi Nico, > As far as I know does the mechanism _quit function only exists for drivers > and widgets and not for the plugins. But I would appreciate if the plugins > supports this too. There is, thanks to Martin. I hope that someday in the near future, when we have dynamic loading of plugins, that this quit function can be called transparently by a dl_unload() or something similar. bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Nico W. <Nic...@po...> - 2004-03-10 09:02:37
|
Hello, > I propose you to connect to the server in plugin_mysql_init and don't > forget to disconnect in plugin_mysql_quit. Maybe you should introduce > some connection tracking : if the connection is lost (bad link, > overload, timeout), reconnect to the server. As far as I know does the mechanism _quit function only exists for drivers and widgets and not for the plugins. But I would appreciate if the plugins supports this too. Bye, Nico |
From: Michael R. <re...@eu...> - 2004-03-10 07:53:52
|
Hi Xavier, Nice to hear from you! > I've read the code of the plugin and I have one suggestion : I think the > plugin will be mostly used with a single MySQL server. > Maybe the user can set his server, user and pass once in the Variables, > and then call the mySQLquery() with only two arguments. There's a big > argument for this : > Using one persistent connection to the server will use less CPU and will > keep the plugin faster. Connecting to the server and disconnecting at > each refresh loop isn't clever and will make it lag. > > I propose you to connect to the server in plugin_mysql_init and don't > forget to disconnect in plugin_mysql_quit. Maybe you should introduce > some connection tracking : if the connection is lost (bad link, > overload, timeout), reconnect to the server. Good idea! Especially the persistent connection! For the variables I would choose a different approach: specify server, user and password directly in the config file, e.g. MySQL { Server 'foo.bar' User 'michael' Password 'swordfish' } To allow even more flexibility, the query() function could allow either two or five arguments, if there are two, use the values from the config file, if there are five, act like now. bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Michael R. <re...@eu...> - 2004-03-10 07:49:53
|
Hi Javier, > I attach the first release of plugin_mysql. Thanks, I did check it into CVS As for your questions regarding CVS, you can of course use Cervisia or something similar, but the 'basic' usage is quite simple, too: you need ssh installed, and you have to tell CVS to use SSH: export CVS_RSH=ssh (maybe add this to your .profile) First-Time check out: (all in one line!) cvs -z3 -d:ext:dev...@cv...:/cvsroot/lcd4linux co lcd4linux (substitute 'developername' with your SF account) will create you a new directory 'lcd4linux' Updates from the CVS (should be done very regularly, especially before you start working on the code): cvs -z3 update (in the lcd4linux directory) I want you not to do any check ins at this time (I want this from every new developer), rather send me a patch with the following command: cvs -z3 diff -u >patch.txt As for your plugin, I added a quite simple autoconf check for the mysql.h, and depending on this parts of the plugin will not be compiled (and will not produce errors for the missing mysql.h) As I don't have mysql installed here, I could net test it, but I'm shure it will not work: The library is not specified anywhere. We need to create a better test for MySQL in the configure.in, which detects not only the existence of the header, but the library, too, and sets the LFLAGS accordingly. Anybody has a ready-to-use autoconf macro for this? bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Xavier V. <xav...@fr...> - 2004-03-09 21:46:36
|
Hello list, Buenos dias Javier :) > Please send comments,feedback and corrections. I've read the code of the plugin and I have one suggestion : I think the plugin will be mostly used with a single MySQL server. Maybe the user can set his server, user and pass once in the Variables, and then call the mySQLquery() with only two arguments. There's a big argument for this : Using one persistent connection to the server will use less CPU and will keep the plugin faster. Connecting to the server and disconnecting at each refresh loop isn't clever and will make it lag. I propose you to connect to the server in plugin_mysql_init and don't forget to disconnect in plugin_mysql_quit. Maybe you should introduce some connection tracking : if the connection is lost (bad link, overload, timeout), reconnect to the server. What about this ? Jerry ? Michael ? Adios ! -- Xavier VELLO <xav...@fr...> |
From: M. R. <mr2...@gm...> - 2004-03-09 20:35:16
|
Hi Javi, On Tuesday 09 March 2004 18:59, Javi wrote: > I've never used CVS, so I don't know how it works. I'll read the official > docs. Since you are using KMail, I guess you might have Cervisia installed too. If so, you may find this articel "http://dot.kde.org/1077262834/" -> OSNews.com: Learning CVS Using KDE's Cervisia quite useful. Cheers, Moppel |
From: Javi <ja...@gs...> - 2004-03-09 17:06:16
|
Hi. > Fine! So you are the maintainer of the MySQL-plugin! There are several > things to manage: > - you should be subscribed to the lcd4linux-devel mailing list Done :) > - you will get a developer access for the SourceForge CVS. Do you > already have a account on SourceForge? If not, please get one, and tell > me your username. My SF username is "javistolz". I've never used CVS, so I don't know how it works. I'll read the official docs. I attach the first release of plugin_mysql. A sample layout could be: ################ Variables { minute 60000 } Layout testMySQL { Row1 { Col1 'mySQLtest1' } Row2 { Col1 'mySQLtest2' } } Widget mySQLtest1 { class 'Text' #expression mySQLquery('server','login',password','database','query') expression mySQLquery('192.168.0.25','johnSmith','topSecret','myShop','SELECT orders_id FROM orders WHERE orders_status = 1') width 20 align 'R' prefix 'New Orders:' update minute } Widget mySQLtest2 { class 'Text' expression mySQLstatus('192.168.0.25','johnSmith','topSecret') width 20 align 'M' prefix 'Server:' update minute } ################ Please send comments,feedback and corrections. Bye Javier. |
From: Michael R. <re...@eu...> - 2004-03-09 13:42:09
|
I'm resending this mail because i got several "relaying denied" errors from my provider. Sorry if you get this twice... Hi Javi, >> MYSQL conex; mysql_init(&conex); > :) That was the problem!. I was using the code that the oficial > tutorial shows as an exaple so I supposed it to be correct. Great! I love it when I can fix bugs with both eyes blind :-) > Ok. I just was disappointed because I thoght there could be a problem > in the mysql_init() out of my programing level . I'll continue > developing the plugin, adding and improveing new features. Fine! So you are the maintainer of the MySQL-plugin! There are several things to manage: - you should be subscribed to the lcd4linux-devel mailing list - you will get a developer access for the SourceForge CVS. Do you already have a account on SourceForge? If not, please get one, and tell me your username. >> But I see another problem here: These plugins can take some time to >> deliver a result (if, for example, the query is quite complicated, >> or lots of rows are affected) This would distrub lcd4linux's quite >> tight timings. > > Because of its simplicity, MySQL is a very quick DB manager but I > don't know if it can satisfy lcd4lnux's time requirements. I'm afraid it will not. Especially if the monitored database is on another server (which is possible, isn't it?) >> Such plugins should work asynchronously. Which in turn is quite >> complex to implement. The plugin should fork() on initialization, >> the child would be responsible for fetching the data, the parent >> takes the results via shared memory (and locked by a mutex) and >> delivers them to the evaluator. > > hummmmm, my programing level still can't reach these stuffs Ok, lets go for it the following way: You cevelop and maintain the plugin in a "normal" way, and I try to implement the async stuff with the mail plugin, and finally we put things together. bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Xavier V. <xav...@fr...> - 2004-03-08 22:02:33
|
Hi Michael, hi list ! > I've just finished the new evaluator. It does not contain any code from > Mark Morley anymore, therefore there's no license issue, everything is GPL. Good job ! It had a bug wich is corrected in today's cvs patch. But I didn't find a trace of the :: delimiter. Maybe you should check ? and : together, and not : alone. I don't know how you imagine this in your head, but go ahead and code as you like :) > The new evaluator does "pre-compile" all expressions, and stores them in > a special tree. Evaluating this tree should be much faster now. One thing, it isn't more CPU-intensive than the old version, as both make my CPU (1000MHz) between 0 and 2 at idle. I'll test both on a 133MHz notebook, and write here when finished :) > Because of this tree being highly dynamical, I'm afraid there are tons > of bugs. But I'm too tired now (I've been working on this since 6 in the > morning..) I had a 'freeze' at first launch, dunno if this was a segfault (it didn't reproduce), but this new code runs now good for 2 hours. > Any testing and bug-hunting and memory-leak-fixing and > pointer-overrun-detecting and off-by-one-fixing and stuff would be very > appreciated! There's no memory leak at first sight (in fact, I check with top :) not very professional) > Now I'm gonna have a beer (or two.. or three...) Err... don't drink too much, or you'll want to call v0.10.0 the "Feisty Dunnart" version (think about kernel 2.6.2 :) ====> [] ) Bye ! -- Xavier VELLO <xav...@fr...> |
From: Michael R. <re...@eu...> - 2004-03-08 10:27:20
|
Hi Javi, > I've installed gdb and these are the results: >=20 > # gdb --args lcd4linux -Fq > GNU gdb 6.0 > Copyright 2003 Free Software Foundation, Inc. > (gdb) run > Starting program: /home/javi/programacion/lcd4linux/lcd4linux -Fqf >=20 > Program received signal SIGSEGV, Segmentation fault. > 0x40020995 in mysql_init () from /usr/lib/libmysqlclient.so.12 > (gdb) bt > #0 0x40020995 in mysql_init () from /usr/lib/libmysqlclient.so.12 > The problem seems to be the mysql_init () function, from /usr/lib/libmy= sqlclient.so.12 You are right. Strange.... I know nothing about MySQL, but the following from your code looks=20 strange to me: MYSQL *conex; mysql_init(conex); conex seems to be something like a 'Context'. As it is a pointer, it=20 points to nowhere, and no memory is allocated for the data structure. Maybe this should be: MYSQL conex; mysql_init(&conex); Note that here the structure is allocated on the stack, and the address=20 is passed to mysql_init(). > =BFIs there something I can do? or is better I forgets the plugin and w= ait untill the "exec" plugin is ported to the NextGen. No, I don't want you to forget this plugin. This looks cool! I think=20 there are a lot of uses for such a database plugin! What would be even cooler are some status informations from MySQL. Any=20 ideas where to get them from? But I see another problem here, same as with the (not yet ported, for=20 exactly this reason) mail plugin: These plugins can take some time to=20 deliver a result (if, for example, the query is quite complicated, or=20 lots of rows are affected; or if the mailbox must be polled via a slow=20 internet connection). This would distrub lcd4linux's quite tight timings. Such plugins should work asynchronously. Which in turn is quite complex=20 to implement. The plugin should fork() on initialization, the child=20 would be responsible for fetching the data, the parent takes the results=20 via shared memory (and locked by a mutex) and delivers them to the=20 evaluator. Or is there another (probably easier) way to achieve this? Anyone out there with experience with such things? bye, Michael --=20 Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Javi <ja...@gs...> - 2004-03-08 10:06:29
|
=2D----- El Lunes, 8 de Marzo de 2004 05:33, Michael Reinelt escribi=F3: --= =2D--- > How did you test it? Are you shure the segfault is caused by your=20 > plugin? (The current CVS code isn't very stable at the moment) >=20 > I'm always testing plugins with the "interactive" mode (lcd4linux -i). >=20 > Are you familiar with gdb? gdb is good for locating such segfaults. >=20 >=20 > bye, Michael >=20 I've installed gdb and these are the results: # gdb --args lcd4linux -Fq GNU gdb 6.0 Copyright 2003 Free Software Foundation, Inc. (gdb) run Starting program: /home/javi/programacion/lcd4linux/lcd4linux -Fqf Program received signal SIGSEGV, Segmentation fault. 0x40020995 in mysql_init () from /usr/lib/libmysqlclient.so.12 (gdb) bt #0 0x40020995 in mysql_init () from /usr/lib/libmysqlclient.so.12 #1 0xbfffee18 in ?? () #2 0x4100b480 in _dl_runtime_resolve () from /lib/ld-linux.so.2 #3 0x080544a7 in my_consulta (result=3D0x806ac80, arg1=3D0x0) at plugin_sq= l.c:57 #4 0x0804d5d8 in EvalTree (Root=3D0x1) at evaluator.c:964 #5 0x0804d6e9 in Eval (root=3D0x806ac60, result=3D0xbfffef60) at evaluator= =2Ec:1170 #6 0x0804f7aa in widget_text_update (Self=3D0x80694f4) at widget_text.c:238 #7 0x0804ec89 in timer_process (delay=3D0xbffff000) at timer.c:160 #8 0x0804a730 in main (argc=3D-1073745920, argv=3D0x805e580) at lcd4linux.= c:627 The problem seems to be the mysql_init () function, from /usr/lib/libmysqlc= lient.so.12 =BFIs there something I can do? or is better I forgets the plugin and wait = untill the "exec" plugin is ported to the NextGen. Thanks. Bye |
From: Michael R. <re...@eu...> - 2004-03-08 05:50:23
|
Hi Javi, > I want to develop a pluging to connect to a MySQL server, execute a > query and show on the LCD the number of afected rows. Fine! > That program compiles and runs perfect by itselft on my PC. The only > thing that I should done is just to include that simple program into > a plugin. The plugin will be named plugin_sql.c Please call it "plugin_mysql" > I've followed the README.plugins and I can copile succesfully my > plugin, but when running lcd4linux I can see a "beautifull" Viloacion > de Segmento (which is the spanish term for SEGMENTATION FAULT) > > Here is the code. Hope someone could help me. A very sort description > of the changes I've made on the plugin_sample.c file is included on > the code. It's only a 50 lines' file so it's very easy to read. The code looks quite clean, I can't see any bugs here. But I could not test it, as I don't have MySQL installed anywhere. But I did a test with the plugin_sample.c, this one works fine without segfaulting. How did you test it? Are you shure the segfault is caused by your plugin? (The current CVS code isn't very stable at the moment) I'm always testing plugins with the "interactive" mode (lcd4linux -i). Are you familiar with gdb? gdb is good for locating such segfaults. bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Michael R. <re...@eu...> - 2004-03-08 05:46:06
|
Hi Javier, >>> I want to write on LCD the Celsius (=BA) character, (which has the >>> 8 bits code 1101 1111) as the postfix of my Temp Widget. How can >>> I do it? >> Specify the ascii code as octal after a backslash. In your example, >> 11011111 is decimal 223 or octal 337. Try a Postfix of '\337' > If I use postfix \337, when running ldc4linux I get the error:=20 > "Evaluator: parse error in <\337>: garbage <\337>" Correct. As it's a string, you have to enclose it in within single quotes. > If I use postfix '\337', the LCD shows Y337, (really is not a "Y", > but a very similar strange character) No matter what number I use, I > allways get Yxxx. I've try writing only the slash, and I get the same > strange character. You are very right. The corresponding code vanished during=20 transformation to NextGeneration :-( Thanks for the hint! Question to the development team: where shoud this code be added again?=20 In 0.9.11 this has been in the parser, along with the Token handling.=20 There is no such thing anymore. We could add it to the config code, so the program would never see the=20 "real" backslash sequence, but always the correct ascii value. Or we could add this to the widget code, so internally the program would=20 work with the backslash sequences, and convert them to one single ascii=20 value when displaying it. The second has one big disadvantage: length calculations will fail. bye, Michael --=20 Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Javi <ja...@gs...> - 2004-03-08 01:23:21
|
Hi list. It's the first mail I send to the list, so I salute all :) It's the first time I write a programa for a public project, so please forgive if the code is dirty. I want to develop a pluging to connect to a MySQL server, execute a query and show on the LCD the number of afected rows. A very simple C program for doing tha could be like: --------------------------------------------- #include <mysql/mysql.h> #include <stdio.h> int main() { MYSQL *conex; MYSQL_RES *result; char *consulta = "select * from categories"; mysql_init(conex); mysql_real_connect(conex,"192.168.0.12","user","pass","databasename",0,NULL,0); mysql_real_query(conex,consulta,(unsigned int) strlen(consulta)); result=mysql_use_result(conex); printf("%d",mysql_field_count(conex)); mysql_close(conex); return 0; } --------------------------------------------- That program compiles and runs perfect by itselft on my PC. The only thing that I should done is just to include that simple program into a plugin. The plugin will be named plugin_sql.c I've followed the README.plugins and I can copile succesfully my plugin, but when running lcd4linux I can see a "beautifull" Viloacion de Segmento (which is the spanish term for SEGMENTATION FAULT) Here is the code. Hope someone could help me. A very sort description of the changes I've made on the plugin_sample.c file is included on the code. It's only a 50 lines' file so it's very easy to read. Thanks in advice. Stolz. ------------------------------------------ /* $Id: plugin_sql.c,v 0.1 2004/03/07 Exp $ * * plugin for exec SQL queries into a MySQL DB. * * Javier Garcia <ja...@NO...> * * This file is part of LCD4Linux. * */ /* * exported functions: * * int plugin_init_sql (void) * adds various functions * Remember to add -lmysqlclient option into Makefile. I.E: CC = gcc -lmysqlclient or run * #gcc -I/usr/include/mysql -L/usr/lib/mysql plugin_sql.c -lmysqlclient -o plugin_sql.o * This is an initial version for testing. my_consulta is basically the mult3 function * included on the plugin_sample.c file. I only added: * #include <mysql/mysql.h> t include the mysql API. * MYSQL *conex; to store the conection data. * Two lines to connect and disconnect to the DBSM. * mysql_init(conex); * mysql_close(conex); * */ #include <mysql/mysql.h> // define the include files you need #include "config.h" #include <stdlib.h> #include <string.h> #include <ctype.h> // these should always be included #include "debug.h" #include "plugin.h" #ifdef WITH_DMALLOC #include <dmalloc.h> #endif #include <mysql/mysql.h> #include <stdio.h> static void my_consulta (RESULT *result, RESULT *arg1) { double value=R2N(arg1)*3.0; MYSQL *conex; // MYSQL_RES *result; // MYSQL_ROW fila; // char *consulta = "select * from categories"; // int numero; // mysql_init(conex); // mysql_real_connect(conex,"192.168.0.2","myUser","myPass","myDB",0,NULL,0); // mysql_real_query(conex,consulta,(unsigned int) strlen(consulta)); // result=mysql_use_result(conex); // numero=mysql_field_count(conex); // printf("%d",numero); mysql_close(conex); // store result SetResult(&result, R_NUMBER, &value); } int plugin_init_sql (void) { AddFunction ("consulta", 1, my_consulta); return 0; } void plugin_exit_sql(void) { } |
From: Michael R. <re...@eu...> - 2004-03-07 16:47:57
|
Hi Moppel, > I finished writing a driver for the EPSON - Seiko sed1530 for lcdproc > yesterday. I havn't had a look at lcd4linux driver API yet and therefore I > have no idea how difficult it would be porting that thing. I have a SED display myself, but couldn't find the time to connect it. It's made by Optrex, and uses a SED1531 controller. Would this be compatible to your driver? As for the API, they differ a lot. I think the lcd4linux driver API is easier and smaller (because of such things as parallel port abstraction, generic text and/or graphic display drivers, ...). For text displays, you need to define three functions: goto(x,y), write (text, len) and define_char(ascii, bitmap). A graphic display just needs one blit() function. Everything else is done by the other layers. Really easy and straightforward, believe me. Just a quick example: The Cwlinux driver has 350 lines of code in lcd4linux, but 1550 lines in lcdproc... btw, I tried to find your driver, but failed.... > Due to lack of time I won't be able to do that myself in the foreseeable > future but I'd happily provide the code if someone would like to do that. Of > course, I would be willing to test it too. > Is anyone interested? Of course I'm interested! Where can I find it? I checked lcdproc CVS, and lcdproc-0.5 CVS, but could not find any sed1530 driver there... bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: M. R. <mr2...@gm...> - 2004-03-07 12:48:08
|
Hi Michael, hi list, I finished writing a driver for the EPSON - Seiko sed1530 for lcdproc yesterday. I havn't had a look at lcd4linux driver API yet and therefore I have no idea how difficult it would be porting that thing. Due to lack of time I won't be able to do that myself in the foreseeable future but I'd happily provide the code if someone would like to do that. Of course, I would be willing to test it too. Is anyone interested? Cheers, Moppel |
From: Michael R. <re...@eu...> - 2004-03-06 21:00:09
|
Hi there, I've just finished the new evaluator. It does not contain any code from Mark Morley anymore, therefore there's no license issue, everything is GPL. The new evaluator does "pre-compile" all expressions, and stores them in a special tree. Evaluating this tree should be much faster now. Because of this tree being highly dynamical, I'm afraid there are tons of bugs. But I'm too tired now (I've been working on this since 6 in the morning..) Any testing and bug-hunting and memory-leak-fixing and pointer-overrun-detecting and off-by-one-fixing and stuff would be very appreciated! Now I'm gonna have a beer (or two.. or three...) bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Martin H. <ma...@he...> - 2004-03-05 22:38:01
|
Hi Xavier, >>I will do a rewrite from scratch, and optimize the whole thing so that it >>- uses our Namespace::delimiter >>- does a pre-compile of the expression and stores it as a tree > > Which expression do you want to pre-compile ? I don't understand this one ! I'm not sure if this is a simple language problem (possible, since most here are not native speakers to English), or something else - but to me, "expression" is a term very commonly used when building compilers or parsers. In specific, the "expression" Michael was referring to was the different strings given to the evaluator to evaluate (actually, the first parameter of the Eval function, which is even called "expression"). So, in short, anything specified in the config as "expression", "expression2", "prefix" or "postfix" (maybe some others that I haven't come across yet). The idea is to avoid having to re-parse a string over and over again, when it already has been parsed at an ealier point in time. By saving the "pre-compiled" version, and re-using that one, one saves time (CPU cycles). This is a very common thing to do, and can result in significant reduction of CPU usage, when the expressions used get more complicated (this concept is heavily used for "prepared statements" in Databases, for example, since parsing complex SQL statements and running the optimizer on that can be _rather_ expensive). HTH Martin |
From: Xavier V. <xav...@fr...> - 2004-03-05 22:15:17
|
> Hello Michael ! > I will do a rewrite from scratch, and optimize the whole thing so that it > - uses our Namespace::delimiter > - does a pre-compile of the expression and stores it as a tree Which expression do you want to pre-compile ? I don't understand this one ! Bye ! -- Xavier VELLO <xav...@fr...> |
From: Michael R. <re...@eu...> - 2004-03-05 06:08:31
|
Hi there, > The only problem I spot is the part "However, you may not charge anyone > else for the use of this code!" Too bad, but there's a positive aspect, too (see later) > There are many possibilities: > > - non-free > - contrib (depend on Evaluator) and (changed) Evaluator in non-free > - main either by removing Evaluator (possibly rewrite the code from > scratch) or by making Evaluator free (contact the author by whatever > means to change license, but I don't think he will change it as the > license is pretty clear and you haven't got an answer by e-mail :-() I like none of them. I will do a rewrite from scratch, and optimize the whole thing so that it - uses our Namespace::delimiter - does a pre-compile of the expression and stores it as a tree I found a quite old code from myself which does basically the above. I'll go for it this weekend. bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |
From: Xavier V. <xav...@fr...> - 2004-03-03 12:43:23
|
Hi Michael, hi Luk, all list. > > The files are evaluator.c and .h > > The code based on something I found in the net, but was heavily modified > > by me (the original code could only handle numeric values, for example, > > and I did add lots of new levels and expressions. > > [...] > The only problem I spot is the part "However, you may not charge anyone > else for the use of this code!" Yes, this is not compatible with the GPL :/ > > I could not reach the author, I tried several times (but per email only, > > not snail mail). > > What should we do here? > There are many possibilities: > - non-free > - contrib (depend on Evaluator) and (changed) Evaluator in non-free I don't think we should have this discussion if this is the only solution. non-free is not used by everybody (a large mass think non-free contains closed-source programs only). It's not worth the price to go to non-free. > - main either by removing Evaluator (possibly rewrite the code from > scratch) or by making Evaluator free (contact the author by whatever > means to change license, but I don't think he will change it as the > license is pretty clear and you haven't got an answer by e-mail :-() Michael, you should try to send him a snail mail, stating our situation, with all the possible means to contact you back (email, mail, phone, fax, ...). I think he didn't think that someday a little Michi would find his code and include it in lcd4linux. I don't think he has interest of keeping this non-comercial clause. Maybe he changed his email, did you google for his name ? Other thing Luk : isn't (604) 479-7861 a phone number in Canada ? Bye ! -- Xavier VELLO <xav...@fr...> |
From: Luk C. <in...@us...> - 2004-03-03 11:46:20
|
Michael Reinelt wrote: > Hi Folks, especially Luk, Hi > Luk, as you're a debian maintainer, and as debian seems to be very > pedantic about licensing, I hope you can answer her (or at least know > someone who can). I can surely try ;-) > The files are evaluator.c and .h > The code based on something I found in the net, but was heavily modified > by me (the original code could only handle numeric values, for example, > and I did add lots of new levels and expressions.) > > > The original copyright statement reads: > > /*************************************************************************** > > ** ** EE.C Expression Evaluator ** > ** AUTHOR: Mark Morley ** COPYRIGHT: (c) 1992 by Mark Morley > ** DATE: December 1991 ** > ** HISTORY: Jan 1992 - Made it squash all command line arguments > ** into one big long string. > ** - It now can set/get VMS symbols as if they > ** were variables. > ** - Changed max variable name length from 5 to > ** Jun 1992 - Updated comments and docs ** > ** > ** You are free to incorporate this code into your own works, even if it > ** is a commercial application. However, you may not charge anyone else > ** for the use of this code! If you intend to distribute your code, ** > I'd appreciate it if you left this message intact. I'd like to ** > receive credit wherever it is appropriate. Thanks! ** > ** I don't promise that this code does what you think it does... ** > ** > ** Please mail any bug reports/fixes/enhancments to me at: ** > mo...@ca... ** or ** Mark Morley > ** 3889 Mildred Street ** Victoria, BC Canada > ** V8Z 7G1 ** (604) 479-7861 > ** > ***************************************************************************/ The only problem I spot is the part "However, you may not charge anyone else for the use of this code!" > I could not reach the author, I tried several times (but per email only, > not snail mail). > > What should we do here? There are many possibilities: - non-free - contrib (depend on Evaluator) and (changed) Evaluator in non-free - main either by removing Evaluator (possibly rewrite the code from scratch) or by making Evaluator free (contact the author by whatever means to change license, but I don't think he will change it as the license is pretty clear and you haven't got an answer by e-mail :-() Cheers Luk |
From: Michael R. <re...@eu...> - 2004-03-03 03:58:26
|
Hi Folks, especially Luk, There's a licensing issue with the Evaluator, which I tried to solve months ago, but failed. As there raised a discussion on the lcdproc mailing list about such issues lately, this came to my mind again. Luk, as you're a debian maintainer, and as debian seems to be very pedantic about licensing, I hope you can answer her (or at least know someone who can). The files are evaluator.c and .h The code based on something I found in the net, but was heavily modified by me (the original code could only handle numeric values, for example, and I did add lots of new levels and expressions.) The original copyright statement reads: /*************************************************************************** ** ** EE.C Expression Evaluator ** ** AUTHOR: Mark Morley ** COPYRIGHT: (c) 1992 by Mark Morley ** DATE: December 1991 ** ** HISTORY: Jan 1992 - Made it squash all command line arguments ** into one big long string. ** - It now can set/get VMS symbols as if they ** were variables. ** - Changed max variable name length from 5 to ** Jun 1992 - Updated comments and docs ** ** ** You are free to incorporate this code into your own works, even if it ** is a commercial application. However, you may not charge anyone else ** for the use of this code! If you intend to distribute your code, ** I'd appreciate it if you left this message intact. I'd like to ** receive credit wherever it is appropriate. Thanks! ** ** I don't promise that this code does what you think it does... ** ** ** Please mail any bug reports/fixes/enhancments to me at: ** mo...@ca... ** or ** Mark Morley ** 3889 Mildred Street ** Victoria, BC Canada ** V8Z 7G1 ** (604) 479-7861 ** ***************************************************************************/ I could not reach the author, I tried several times (but per email only, not snail mail). What should we do here? TIA, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |