cppcms-users Mailing List for CppCMS C++ Web Framework (Page 4)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Fernando F. <die...@gm...> - 2020-07-18 17:56:10
|
Hi, I would like to know about CPPCMS version 1.4 and 2.0, as the last version came out in May 2018. Thanks Diego Fernando Rodríguez Fuentes *Desarrollador C++ Senior* Aranda Software Celular: +57 310 758 7242 Correo: die...@gm... |
From: Martin B. <mar...@gm...> - 2020-07-16 12:59:38
|
Hi Jon! I have another way of doing things. I suspect this will be slightly less performant but removes the dynamic string building. Just prepare the statement, and then loop over the IDs and reexec the same statement for each ID. cppdb::statement stmt = db_handle << "UPDATE my_table " "SET field_1 = \"my val\" WHERE id = ?"; for (int id : <the id vector or whatever>) { stmt.reset(); stmt << id << cppdb::exec; } This will remove additional burden to conciously NOT introduce injection vulnerabilities. Greetings, Martin Am Montag, den 13.07.2020, 16:30 -0700 schrieb Jon Foster: > Hi Martin! > > Thanks for that. I think I like your idea better than mine. I'll have > to > noodle this some. Your assumption is correct. Typical examples would > be a > form that lists a series of DB records of some kind, with check boxes > along > one side. The user checks the boxes and then selects a bulk action > (like > delete, publish, unpublish, ...) and then clicks the "GO" button. > Although > I was asking in general terms since an "IN" operator has other uses. > > THX - Jon > > Martin Bürgmann wrote: > > Hi Jon, > > > > I don't fully get what you are doing but I'm assuming you want to > > update rows which the user selected previously on the HTML form. > > > > Indeed this does sound like a bit of a pain. And I don't know of > > any > > cppdb feature that could help here. > > > > I'd suggest using prepared statements like this: > > > > Start with a std::stringstream with your query and one placeholder > > > > UPDATE my_table SET field_1="my val" WHERE id IN (? > > > > Next, since you know how many rows N the user selected, append N-1 > > times another placeholder > > > > ,? > > > > So you now have your query with N placeholders > > > > UPDATE my_table SET field_1="my val" WHERE id IN (?,?,?,? > > > > And then finish it with a paren and semicolon and make a prepared > > statement from it > > > > cppdb::statement stmt = session_handle << strsteam.str(); > > > > Now put all the row IDs in > > > > for (int rid : vector_of_row_ids) > > stmt << rid; > > > > And finally execute it > > > > stmt.exec(); > > > > Hope I helped at least a little! > > > > Martin > > > > Am Freitag, den 10.07.2020, 09:48 -0700 schrieb Jon Foster: > > > I've skimmed over the C++DB docs a couple of times and I don't > > > see > > > anything > > > about the best way to build queries using the "in" operator. My > > > use > > > case is > > > doing a bulk "UPDATE" command using "in" to target the set of > > > records > > > I > > > want by a list of integer IDs. Example query: > > > > > > UPDATE my_table SET field_1="my val" WHERE id IN (1,3,9); > > > > > > Right now I'm scrubbing strings coming back from an HTML form > > > (via > > > C++CMS) > > > and then building them direct into query string. Seems like C++DB > > > probably > > > already has better way. It seems to be well thought out. > > > > > > TIA - Jon > > > > > > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- > Sent from my Devuan Linux workstation -- https://devuan.org/ > "Init Freedom", Yeah! > > Jon Foster > JF Possibilities, Inc. > jo...@jf... > 541-410-2760 > Making computers work for you! > > |
From: Jon F. <jon...@jf...> - 2020-07-13 23:30:50
|
Hi Martin! Thanks for that. I think I like your idea better than mine. I'll have to noodle this some. Your assumption is correct. Typical examples would be a form that lists a series of DB records of some kind, with check boxes along one side. The user checks the boxes and then selects a bulk action (like delete, publish, unpublish, ...) and then clicks the "GO" button. Although I was asking in general terms since an "IN" operator has other uses. THX - Jon Martin Bürgmann wrote: > Hi Jon, > > I don't fully get what you are doing but I'm assuming you want to > update rows which the user selected previously on the HTML form. > > Indeed this does sound like a bit of a pain. And I don't know of any > cppdb feature that could help here. > > I'd suggest using prepared statements like this: > > Start with a std::stringstream with your query and one placeholder > > UPDATE my_table SET field_1="my val" WHERE id IN (? > > Next, since you know how many rows N the user selected, append N-1 > times another placeholder > > ,? > > So you now have your query with N placeholders > > UPDATE my_table SET field_1="my val" WHERE id IN (?,?,?,? > > And then finish it with a paren and semicolon and make a prepared > statement from it > > cppdb::statement stmt = session_handle << strsteam.str(); > > Now put all the row IDs in > > for (int rid : vector_of_row_ids) > stmt << rid; > > And finally execute it > > stmt.exec(); > > Hope I helped at least a little! > > Martin > > Am Freitag, den 10.07.2020, 09:48 -0700 schrieb Jon Foster: >> I've skimmed over the C++DB docs a couple of times and I don't see >> anything >> about the best way to build queries using the "in" operator. My use >> case is >> doing a bulk "UPDATE" command using "in" to target the set of records >> I >> want by a list of integer IDs. Example query: >> >> UPDATE my_table SET field_1="my val" WHERE id IN (1,3,9); >> >> Right now I'm scrubbing strings coming back from an HTML form (via >> C++CMS) >> and then building them direct into query string. Seems like C++DB >> probably >> already has better way. It seems to be well thought out. >> >> TIA - Jon >> > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users -- Sent from my Devuan Linux workstation -- https://devuan.org/ "Init Freedom", Yeah! Jon Foster JF Possibilities, Inc. jo...@jf... 541-410-2760 Making computers work for you! -- Sent from my Devuan Linux workstation -- https://devuan.org/ "Init Freedom", Yeah! Jon Foster JF Possibilities, Inc. jo...@jf... |
From: Martin B. <mar...@gm...> - 2020-07-13 13:25:36
|
Hi Jon, I don't fully get what you are doing but I'm assuming you want to update rows which the user selected previously on the HTML form. Indeed this does sound like a bit of a pain. And I don't know of any cppdb feature that could help here. I'd suggest using prepared statements like this: Start with a std::stringstream with your query and one placeholder UPDATE my_table SET field_1="my val" WHERE id IN (? Next, since you know how many rows N the user selected, append N-1 times another placeholder ,? So you now have your query with N placeholders UPDATE my_table SET field_1="my val" WHERE id IN (?,?,?,? And then finish it with a paren and semicolon and make a prepared statement from it cppdb::statement stmt = session_handle << strsteam.str(); Now put all the row IDs in for (int rid : vector_of_row_ids) stmt << rid; And finally execute it stmt.exec(); Hope I helped at least a little! Martin Am Freitag, den 10.07.2020, 09:48 -0700 schrieb Jon Foster: > I've skimmed over the C++DB docs a couple of times and I don't see > anything > about the best way to build queries using the "in" operator. My use > case is > doing a bulk "UPDATE" command using "in" to target the set of records > I > want by a list of integer IDs. Example query: > > UPDATE my_table SET field_1="my val" WHERE id IN (1,3,9); > > Right now I'm scrubbing strings coming back from an HTML form (via > C++CMS) > and then building them direct into query string. Seems like C++DB > probably > already has better way. It seems to be well thought out. > > TIA - Jon > |
From: Jon F. <jon...@jf...> - 2020-07-10 16:48:28
|
I've skimmed over the C++DB docs a couple of times and I don't see anything about the best way to build queries using the "in" operator. My use case is doing a bulk "UPDATE" command using "in" to target the set of records I want by a list of integer IDs. Example query: UPDATE my_table SET field_1="my val" WHERE id IN (1,3,9); Right now I'm scrubbing strings coming back from an HTML form (via C++CMS) and then building them direct into query string. Seems like C++DB probably already has better way. It seems to be well thought out. TIA - Jon -- Sent from my Devuan Linux workstation -- https://devuan.org/ "Init Freedom", Yeah! Jon Foster JF Possibilities, Inc. jo...@jf... |
From: Jon F. <jon...@jf...> - 2020-06-22 03:26:37
|
On 06/18/2020 04:58 AM, Artyom Beilis wrote: > On Wed, Jun 10, 2020 at 3:52 AM Jon Foster > <jon...@jf...> wrote: > [...] >> I'm attaching a simple patch that I used to make URL handling in the native >> HTTP server work better. >> [...] >> > In general under most servers you map your fastcgi to a specific > location and files to other location. > > [...] Uh, no. OK, no synergy here. Bummer. - Jon -- Sent from my Debian Linux laptop -- http://www.debian.org/intro/about Jon Foster JF Possibilities, Inc. jo...@jf... 541-410-2760 Making computers work for you! -- Sent from my Debian Linux laptop Jon Foster JF Possibilities, Inc. jo...@jf... |
From: Artyom B. <art...@gm...> - 2020-06-18 11:58:33
|
On Wed, Jun 10, 2020 at 3:52 AM Jon Foster <jon...@jf...> wrote: > > Hi guys! > > It doesn't look like there is a whole lot going on here. Is this the best > place to discuss C++CMS? > Yes it is, also you can post patches/pull requests on github > I'm attaching a simple patch that I used to make URL handling in the native > HTTP server work better. Using URL rewriting to get around weaknesses in > the internal dispatching is just plain silly and counter productive. An app > running in the HTTP server should work the same as it would running fCGI > from Apache or NginX, without needing code changes. In the usual OOP and > Unix philosophies it should plug in and run, essentially the same, where > ever you put it. This is not a completed patch. I'm including it as an > example and to open a discussion if there is interest. Its actually working > well for me already. Here's the patch: > In general under most servers you map your fastcgi to a specific location and files to other location. So if you work with /foo.cgi/bal/bla Or all logic from there: /foo/ You can go with it. But if you want to have / as root if your application and files served from other places you need some rules: http://cppcms.com/wikipp/en/page/run_application_web_server_root Finally you most likely want that your server will serve files and you'll handle dynamic content. > This does a few things for me: > > 1. Allows me to move static file serving off of "/", so an app can be > there. Web apps typically provide limited URL sets that serve static files. > The rest of the URL space being covered by the "app". > > 2. Allows me to serve an app from "/", which is actually "" in the config file. > > 3. The last bit of the patch just fixes a misspelling that I found > humorous. :-) > > I think a "final solution" would be one that is more cooperative. Probably > allowing the APP to pick and choose the URLs to serve and then fall back to > static, or a more PHP style: look for static files and if not found hand > the request off to the app. Both of these scenarios could be programmed to > happen if the file_server was not _hidden_ as _private_, but instead made > available as a pluggable app. > It is very different from PHP - you don't have c++ scripts running around. Finally if you want to have both static files and your application be served by the server you need some rules. It is done using rewriting. Internal server (intended for development/embedded use) does it in same way. Artyom |
From: Jon F. <jon...@jf...> - 2020-06-13 16:50:45
|
Just testing my receipt of email from this list. You can safely ignore. Thanks! -- Sent from my Debian Linux laptop Jon Foster JF Possibilities, Inc. jo...@jf... |
From: Pierre C. <pi...@co...> - 2020-06-10 06:22:49
|
On 6/10/20 2:11 AM, Jon Foster wrote: > On Tue, Jun 02, 2020 at 12:07:14AM +0200, Pierre Couderc wrote: >> I m trying to use cppcms on port 80 (inside a lan) and i do not success. >> >> It seems that there is a minimum port number of 1024... >> >> Is ther some good reason ? > > Hi Pierre! > > Hopefully you'll see this email. > > I'm glad you got things going but it doesn't appear that one of your > questions was answered. The reason for there being a lower limit of > 1024 is because its imposed by the OS, Linux. Unix considers ports > below 1024 to be "privileged" and so they are reserved for the "super > user", root. This is why you have to start it as root. This > restriction is forced on any piece of software that tries to bind to > a network port on Linux, BSD, ... > > - Jon > > I did not know but I had supposed something like that... I shall add a nginx to deal with that and to serve static files. Thank you very much. Pierre |
From: Jon F. <jon...@jf...> - 2020-06-10 00:52:05
|
On Tue, Jun 02, 2020 at 12:07:14AM +0200, Pierre Couderc wrote: > I m trying to use cppcms on port 80 (inside a lan) and i do not success. > > It seems that there is a minimum port number of 1024... > > Is ther some good reason ? Hi Pierre! Hopefully you'll see this email. I'm glad you got things going but it doesn't appear that one of your questions was answered. The reason for there being a lower limit of 1024 is because its imposed by the OS, Linux. Unix considers ports below 1024 to be "privileged" and so they are reserved for the "super user", root. This is why you have to start it as root. This restriction is forced on any piece of software that tries to bind to a network port on Linux, BSD, ... - Jon -- Sent from my Devuan Linux workstation -- https://devuan.org/ "Init Freedom", Yeah! Jon Foster JF Possibilities, Inc. jo...@jf... |
From: Jon F. <jon...@jf...> - 2020-06-10 00:51:58
|
Hi guys! It doesn't look like there is a whole lot going on here. Is this the best place to discuss C++CMS? I recently decided to test the C++ waters again. I've been working with FreePascal for a couple of decades now. My! How C++ has grown in that time! In searching out the various C++ tools and libraries for my various development endeavors I came across C++CMS for web work. Although getting started with it has been extremely time consuming and frustrating I see some *HUGE* potentials and the goals that Artyom states are in-line with mine. Some minor bench-marking shows some astounding performance figures. So I'm committed to going forward with C++CMS. As such I think I may be of some value as a NOOB reference for documentation. If there is some interest I can probably provide feedback. If it weren't that I found your project so intriguing I'd have never put the effort into learning C++CMS, instead turning to something like Ultimate++. The shortcomings that I am running into are probably turning other potential users away. I'm attaching a simple patch that I used to make URL handling in the native HTTP server work better. Using URL rewriting to get around weaknesses in the internal dispatching is just plain silly and counter productive. An app running in the HTTP server should work the same as it would running fCGI from Apache or NginX, without needing code changes. In the usual OOP and Unix philosophies it should plug in and run, essentially the same, where ever you put it. This is not a completed patch. I'm including it as an example and to open a discussion if there is interest. Its actually working well for me already. Here's the patch: ----- diff --git a/private/cached_settings.h b/private/cached_settings.h index ea71ac1..8b5f1e4 100644 --- a/private/cached_settings.h +++ b/private/cached_settings.h @@ -125,7 +125,8 @@ namespace impl { script_names = v.get("http.script_names",std::vector<std::string>()); std::string script = v.get("http.script",""); - if(!script.empty()) + /* TODO: need to detect "" vs. missing (nullish) */ + //if(!script.empty()) script_names.push_back(script); timeout = v.get("http.timeout",30); } diff --git a/src/service.cpp b/src/service.cpp index 8124ec4..cfabfe2 100644 --- a/src/service.cpp +++ b/src/service.cpp @@ -236,7 +236,7 @@ void service::setup() if(settings().get("file_server.async",false)) { flags = app::asynchronous; } - applications_pool().mount(create_pool<cppcms::impl::file_server>(),mount_point(""),flags); + applications_pool().mount(create_pool<cppcms::impl::file_server>(),mount_point(settings().get("file_server.uri", "")),flags); } } diff --git a/src/views_pool.cpp b/src/views_pool.cpp index 0dcb8a8..38f113c 100644 --- a/src/views_pool.cpp +++ b/src/views_pool.cpp @@ -140,7 +140,7 @@ base_view *pool::create_view(std::string const &skin,std::string const &template data::skin_generators_type::const_iterator t=reg_skin.find(template_name); if(t==reg_skin.end()) - throw cppcms_error("cppcms::view::pool: no suck view:" + template_name + " is registered for skin: " + skin); + throw cppcms_error("cppcms::view::pool: no such view:" + template_name + " is registered for skin: " + skin); std::auto_ptr<base_view> v; v = t->second->create(template_name,out,&content); ---- This does a few things for me: 1. Allows me to move static file serving off of "/", so an app can be there. Web apps typically provide limited URL sets that serve static files. The rest of the URL space being covered by the "app". 2. Allows me to serve an app from "/", which is actually "" in the config file. 3. The last bit of the patch just fixes a misspelling that I found humorous. :-) I think a "final solution" would be one that is more cooperative. Probably allowing the APP to pick and choose the URLs to serve and then fall back to static, or a more PHP style: look for static files and if not found hand the request off to the app. Both of these scenarios could be programmed to happen if the file_server was not _hidden_ as _private_, but instead made available as a pluggable app. My main use case would be: I write an app and use the "http" server to run locally for development. Then deploy the finished app to the web server. The code should run unchanged regardless of URL pinning in either the http server or some other traditional web server. I would usually use Apache or NginX to serve the app on all URLs, except for certain branches reserved for static file content. The http server should be able to emulate that without me altering code to make it work (ie no mapper().root() calls). And my patch currently allows me to do this so I'm off and running! - Jon -- Sent from my Devuan Linux workstation -- https://devuan.org/ "Init Freedom", Yeah! Jon Foster JF Possibilities, Inc. jon...@jf... |
From: Pierre C. <pi...@co...> - 2020-06-02 05:13:31
|
Thank you. OK, it works as root... On 6/2/20 12:26 AM, Joerg Sonnenberger wrote: > On Tue, Jun 02, 2020 at 12:07:14AM +0200, Pierre Couderc wrote: >> I m trying to use cppcms on port 80 (inside a lan) and i do not success. > Are you starting it as root? > > Joerg > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Joerg S. <jo...@be...> - 2020-06-01 22:55:56
|
On Tue, Jun 02, 2020 at 12:07:14AM +0200, Pierre Couderc wrote: > I m trying to use cppcms on port 80 (inside a lan) and i do not success. Are you starting it as root? Joerg |
From: Pierre C. <pi...@co...> - 2020-06-01 22:25:12
|
I m trying to use cppcms on port 80 (inside a lan) and i do not success. It seems that there is a minimum port number of 1024... Is ther some good reason ? Note I am on a raspberry pi. Thanks PC |
From: Basile S. <ba...@st...> - 2020-02-22 22:16:37
|
Hello All, I am considering using CppCMS as FastCGI for lighttpd on Linux/Debian. I preferably would like to use it as a mostly static executable, whose only dynamic library would be the libc.so (but libstdc++ being statically linked). I am not familiar with cmake (but I am using Linux since 1993, and contributed to GCC) This is for the http://refpersys.org/ project. The VPS I am running on has Debian 9.11 Thanks for reading Regards -- Basile STARYNKEVITCH == http://starynkevitch.net/Basile opinions are mine only - les opinions sont seulement miennes Bourg La Reine, France; <ba...@st...> (mobile phone: cf my web page / voir ma page web...) |
From: Artyom B. <art...@ya...> - 2019-10-27 14:34:38
|
Hello, CppCMS.com is back online Artyom Beilis On Sunday, October 27, 2019, 9:20:17 AM GMT+2, Artyom Beilis via Cppcms-users <cpp...@li...> wrote: Hello Dear CppCMS users. Currently cppcms.com is downI'm working with Amazon EC2 to resolve the problem. I'll update when the site is back, hopefully it will be resolved withing 24 hours. Artyom Beilis _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2019-10-27 07:19:53
|
Hello Dear CppCMS users. Currently cppcms.com is downI'm working with Amazon EC2 to resolve the problem. I'll update when the site is back, hopefully it will be resolved withing 24 hours. Artyom Beilis |
From: Eric J. <jan...@gm...> - 2019-05-17 05:45:39
|
Hi All, Kindly need your assistance for the implementation on how to create a customized widget input that derived from cppcms::widgets::base_html_input. Following is the way I did but unsuccessful: struct text_input : public cppcms::widgets::base_html_input { text_input(const std::string &s) : cppcms::widgets::base_html_input(s) { } virtual ~text_input() {} virtual void render_input(cppcms::form_context &context) { cppcms::widgets::base_html_input::render_input(context); } virtual void render_value(cppcms::form_context &context) { std::ostream &os = std::cout; context.html_list(cppcms::form_flags::as_p); context.html(cppcms::form_flags::as_html); os << "<input type=\"text\" style=\"font-size:20px; background-color:red;\">"; context.out(os); } }; I tried previously with editing the render_value content for out() to tags: "style=\"font-size:20px; background-color:red;" still not working. The struct implementation is as follow: struct info_form : public cppcms::form { std::string const s1 = "text"; text_input name(s1); cppcms::widgets::radio sex; cppcms::widgets::select marital; cppcms::widgets::numeric<double> age; cppcms::widgets::submit submit; info_form() { //name.message("Your Name"); sex.message("Sex"); marital.message("Marital Status"); age.message("Your Age"); submit.value("Send"); add(name); add(submit); add(sex); add(marital); add(age); sex.add("Male","male"); sex.add("Female","female"); marital.add("Single","single"); marital.add("Married","married"); marital.add("Divorced","divorced"); name.non_empty(); age.range(0,120); } Please let me know if you need anything else to show. Thank you and kind regards, *ERIC JANSEN* Software Engineer |
From: Pierre C. <pi...@co...> - 2019-04-22 17:43:45
|
I want to store data associated to a session somewhere on the server, if possible not in a cookie, except, if needed, some pointer on this data. What is the best policy to do that, so that when the session is destroyed, this data can be cleaned ? May I get derive my_session from some session object, and clean idata in the destructor ? Congratualations for cppcms. It is a jewel... PC |
From: Artyom B. <art...@gm...> - 2019-04-09 11:31:56
|
On Fri, Apr 5, 2019 at 3:38 PM Alexander Mack <ma...@al...> wrote: > > Hello, > > I was wondering if there is some example configuration for cppcms > running under a lighttpd available? > > I googled of course and found > http://cppcms.com/wikipp/en/page/cppcms_1x_config#service.worker_threads > > But, to be honest, I'm not quite sure which parameters I have to change > to be able to handle many requests efficiently. > In general if you handle very high loads you want to increase backlog http://cppcms.com/wikipp/en/page/cppcms_1x_config#service.backlog And number of file descriptors available to the process (ulimit - system configuration) see: http://cppcms.com/wikipp/en/page/cppcms_1x_config#daemon.fdlimit but in general it is more important to change on user permissions level. Number of threads is dependent on type of load - if lots of the threads are waiting for I/O from DB you may need to increase it but in general it is trial and error approach, > Thank you very much in advance. > > Alexander Mack > Regards, Artyom |
From: Alexander M. <ma...@al...> - 2019-04-05 12:38:17
|
Hello, I was wondering if there is some example configuration for cppcms running under a lighttpd available? I googled of course and found http://cppcms.com/wikipp/en/page/cppcms_1x_config#service.worker_threads But, to be honest, I'm not quite sure which parameters I have to change to be able to handle many requests efficiently. Thank you very much in advance. Alexander Mack |
From: Artyom B. <art...@gm...> - 2019-03-31 02:33:13
|
BTW if you look to the first lines in the code #ifdef USE_STD_TR1_BIND #include <tr1/functional> using std::tr1::bind; #elif defined USE_STD_BIND #include <functional> using std::bind; #else #include <boost/bind.hpp> using boost::bind; #endif So just define USE_STD_BIND and you are good to go בתאריך שבת, 30 במרץ 2019, 14:03, מאת Artyom Beilis <art...@gm... >: > in geneally allmost all examples are implemented using C++2003 so boost > was used for simple things not in C++11 yet. You can either use boost > header only or use std::bind or C++11 lambda for this stuff > > Not anything critical. > > Artyom > > בתאריך שבת, 30 במרץ 2019, 04:10, מאת Hurst, Mark <Mar...@sl...>: > >> Hello! >> >> Newbie here; loving the framework so far! >> >> Running on ubuntu 16.04. Downloaded *cppcms-1.2.1.tar.bz2* and followed >> instructions to build and install. No errors. >> >> Simpler examples like, hello_world, url_mapping and others build and run >> correctly. >> >> However, *~/cppcms-1.2.1/examples/json_rpc_chat/* * fails to build*: >> >> markhurst@ubuntu:~/cppcms-1.2.1/examples/json_rpc_chat$ *make* >> *g++ -O2 -Wall -g chat.cpp -o chat -lcppcms -lbooster* >> *chat.cpp:23:26: fatal error: boost/bind.hpp: No such file or directory* >> compilation terminated. >> Makefile:7: recipe for target 'chat' failed >> make: *** [chat] Error 1 >> >> I've searched best I can in online documentation, mailing list, and can't >> find solution. Because instructions say boost is NOT needed, and should not >> be used anyway: >> >> 1. Why does *<boost/bind.hpp>* and actual use of *boost::bind()* appear >> in chat.cpp and other example sources? >> 2. How do I fix the problem? Are there corrected examples? >> >> *THANK YOU, anyone who has an answer*. I'm trying to demo the framework >> to our development team and show the more complex capabilities. >> >> Mark Hurst >> Principal Software Engineer >> SlingTV / Dish Networks >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > |
From: Artyom B. <art...@gm...> - 2019-03-30 06:03:53
|
in geneally allmost all examples are implemented using C++2003 so boost was used for simple things not in C++11 yet. You can either use boost header only or use std::bind or C++11 lambda for this stuff Not anything critical. Artyom בתאריך שבת, 30 במרץ 2019, 04:10, מאת Hurst, Mark <Mar...@sl...>: > Hello! > > Newbie here; loving the framework so far! > > Running on ubuntu 16.04. Downloaded *cppcms-1.2.1.tar.bz2* and followed > instructions to build and install. No errors. > > Simpler examples like, hello_world, url_mapping and others build and run > correctly. > > However, *~/cppcms-1.2.1/examples/json_rpc_chat/* * fails to build*: > > markhurst@ubuntu:~/cppcms-1.2.1/examples/json_rpc_chat$ *make* > *g++ -O2 -Wall -g chat.cpp -o chat -lcppcms -lbooster* > *chat.cpp:23:26: fatal error: boost/bind.hpp: No such file or directory* > compilation terminated. > Makefile:7: recipe for target 'chat' failed > make: *** [chat] Error 1 > > I've searched best I can in online documentation, mailing list, and can't > find solution. Because instructions say boost is NOT needed, and should not > be used anyway: > > 1. Why does *<boost/bind.hpp>* and actual use of *boost::bind()* appear > in chat.cpp and other example sources? > 2. How do I fix the problem? Are there corrected examples? > > *THANK YOU, anyone who has an answer*. I'm trying to demo the framework > to our development team and show the more complex capabilities. > > Mark Hurst > Principal Software Engineer > SlingTV / Dish Networks > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Hurst, M. <Mar...@sl...> - 2019-03-29 20:09:52
|
Hello! Newbie here; loving the framework so far! Running on ubuntu 16.04. Downloaded cppcms-1.2.1.tar.bz2 and followed instructions to build and install. No errors. Simpler examples like, hello_world, url_mapping and others build and run correctly. However, ~/cppcms-1.2.1/examples/json_rpc_chat/ fails to build: markhurst@ubuntu:~/cppcms-1.2.1/examples/json_rpc_chat$ make g++ -O2 -Wall -g chat.cpp -o chat -lcppcms -lbooster chat.cpp:23:26: fatal error: boost/bind.hpp: No such file or directory compilation terminated. Makefile:7: recipe for target 'chat' failed make: *** [chat] Error 1 I've searched best I can in online documentation, mailing list, and can't find solution. Because instructions say boost is NOT needed, and should not be used anyway: 1. Why does <boost/bind.hpp> and actual use of boost::bind() appear in chat.cpp and other example sources? 2. How do I fix the problem? Are there corrected examples? THANK YOU, anyone who has an answer. I'm trying to demo the framework to our development team and show the more complex capabilities. Mark Hurst Principal Software Engineer SlingTV / Dish Networks |
From: Lederhilger M. <M.L...@ds...> - 2019-02-25 11:52:10
|
... by the generator (because I have not specified a path and domain for messages, because I have no translations yet). Please see attached patch. Artyom, maybe you can apply the patch to boost::locale too. Thank you, Martin |