cppcms-users Mailing List for CppCMS C++ Web Framework (Page 46)
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
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: Artyom B. <art...@ya...> - 2013-10-20 04:39:16
|
One point... In the output you posted there was no word error... Am I correct? So it is only warnings? Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Sun, 10/20/13, 陈抒 <csf...@gm...> wrote: Subject: Re: [Cppcms-users] Ubuntu 13.10 compile problem To: "cpp...@li..." <cpp...@li...> Date: Sunday, October 20, 2013, 6:04 AM yesterday I built it on Ubuntu 13.10 (64bit) with clang-3.4, it worked. Just got many warnings about no used local variables.You could try clang if you need make it immediately. Dean Chen Best regards http://blog.csdn.net/sheismylife On Fri, Oct 18, 2013 at 8:42 PM, Artyom Beilis <art...@ya...> wrote: Please open a bug report. I'll take a look on it when I can. Hand't worked with 13.10 yet Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Fri, 10/18/13, Sergei <ser...@gm...> wrote: Subject: [Cppcms-users] Ubuntu 13.10 compile problem To: cpp...@li... Date: Friday, October 18, 2013, 1:45 PM http://pastebin.com/d4y3HrYR g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.1- 10ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable- languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program- suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib -- without-included-gettext --enable-threads=posix --with-gxx-include- dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ -- enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes -- enable-gnu-unique-object --enable-plugin --with-system-zlib --disable- browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java- home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm- root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar- dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable- multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with- multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release -- build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users -----Inline Attachment Follows----- ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk -----Inline Attachment Follows----- _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: 陈抒 <csf...@gm...> - 2013-10-20 04:04:36
|
yesterday I built it on Ubuntu 13.10 (64bit) with clang-3.4, it worked. Just got many warnings about no used local variables. You could try clang if you need make it immediately. Dean Chen Best regards http://blog.csdn.net/sheismylife On Fri, Oct 18, 2013 at 8:42 PM, Artyom Beilis <art...@ya...> wrote: > Please open a bug report. > > I'll take a look on it when I can. Hand't worked with 13.10 yet > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > -------------------------------------------- > On Fri, 10/18/13, Sergei <ser...@gm...> wrote: > > Subject: [Cppcms-users] Ubuntu 13.10 compile problem > To: cpp...@li... > Date: Friday, October 18, 2013, 1:45 PM > > http://pastebin.com/d4y3HrYR > > > > > > g++ -v > Using built-in specs. > COLLECT_GCC=g++ > COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper > Target: x86_64-linux-gnu > Configured with: ../src/configure -v > --with-pkgversion='Ubuntu/Linaro 4.8.1- > 10ubuntu8' > --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs > --enable- > languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr > --program- > suffix=-4.8 --enable-shared --enable-linker-build-id > --libexecdir=/usr/lib -- > without-included-gettext --enable-threads=posix > --with-gxx-include- > dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls > --with-sysroot=/ -- > enable-clocale=gnu --enable-libstdcxx-debug > --enable-libstdcxx-time=yes -- > enable-gnu-unique-object --enable-plugin --with-system-zlib > --disable- > browser-plugin --enable-java-awt=gtk --enable-gtk-cairo > --with-java- > home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre > --enable-java-home --with-jvm- > root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 > --with-jvm-jar- > dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 > --with-arch-directory=amd64 > --with-ecj-jar=/usr/share/java/eclipse-ecj.jar > --enable-objc-gc --enable- > multiarch --disable-werror --with-arch-32=i686 > --with-abi=m64 --with- > multilib-list=m32,m64,mx32 --with-tune=generic > --enable-checking=release -- > build=x86_64-linux-gnu --host=x86_64-linux-gnu > --target=x86_64-linux-gnu > Thread model: posix > gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application > performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. > Get the most from > the latest Intel processors and coprocessors. See abstracts > and register > > > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Artyom B. <art...@ya...> - 2013-10-18 12:42:32
|
Please open a bug report. I'll take a look on it when I can. Hand't worked with 13.10 yet Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Fri, 10/18/13, Sergei <ser...@gm...> wrote: Subject: [Cppcms-users] Ubuntu 13.10 compile problem To: cpp...@li... Date: Friday, October 18, 2013, 1:45 PM http://pastebin.com/d4y3HrYR g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.1- 10ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable- languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program- suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib -- without-included-gettext --enable-threads=posix --with-gxx-include- dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ -- enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes -- enable-gnu-unique-object --enable-plugin --with-system-zlib --disable- browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java- home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm- root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar- dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable- multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with- multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release -- build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Sergei <ser...@gm...> - 2013-10-18 11:46:23
|
http://pastebin.com/d4y3HrYR g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.1- 10ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable- languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program- suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib -- without-included-gettext --enable-threads=posix --with-gxx-include- dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ -- enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes -- enable-gnu-unique-object --enable-plugin --with-system-zlib --disable- browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java- home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm- root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar- dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable- multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with- multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release -- build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) |
|
From: Artyom B. <art...@ya...> - 2013-10-16 14:28:11
|
There are two types of application, synchronous and asynchronous. Synchronous are created multiple time and kept in a pool. They handle one request at a time and for performance use thread pool. Asynchronous run as single instance and can handle multiple connections via release_context() Further reading: http://cppcms.com/wikipp/en/page/cppcms_1x_chat http://cppcms.com/wikipp/en/page/cppcms_1x_event_loop http://cppcms.com/wikipp/en/page/cppcms_1x_application_lifetime http://cppcms.com/wikipp/en/page/thread_safety Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ -------------------------------------------- On Wed, 10/16/13, Christian Mattar <chr...@va...> wrote: Subject: [Cppcms-users] Multiple concurrent HTTP requests To: cpp...@li... Date: Wednesday, October 16, 2013, 4:08 PM Hi Artyom, first of all: thank you for developing CPPCMS. I'm currently integrating it into a project of mine. However, I ran into the following issue: Apparently, CPPCMS only supports processing of one concurrent HTTP request. If I launch a second request while another one is still being processed, it stalls until the first request is completed. Is this normal behavior? Do I need to manually store/release the http_context in a different thread for better concurrent performance? I'm using an asynchronous application (which itself is thread-safe) on Windows. Many thanks for any advice you can give. Best regards Christian ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: Christian M. <chr...@va...> - 2013-10-16 14:15:13
|
Hi Artyom, first of all: thank you for developing CPPCMS. I'm currently integrating it into a project of mine. However, I ran into the following issue: Apparently, CPPCMS only supports processing of one concurrent HTTP request. If I launch a second request while another one is still being processed, it stalls until the first request is completed. Is this normal behavior? Do I need to manually store/release the http_context in a different thread for better concurrent performance? I'm using an asynchronous application (which itself is thread-safe) on Windows. Many thanks for any advice you can give. Best regards Christian |
|
From: Stanimir M. <sta...@zo...> - 2013-10-10 08:46:13
|
We are also using cppcms with Google Closure Tools https://developers.google.com/closure/ via RESTful services. That is just AJAX calls to cppcms application. It works just fine. Stanimir On Thu, Oct 10, 2013 at 10:28 AM, Christian Gmeiner <chr...@gm...> wrote: > HI Joe > >> >> Hello everyone. I see that this framework is probably one of the most >> powerful hidden gems on the web and I don't see as much activity using it >> as >> with other frameworks. I'd like to change that. >> >> I would like to know if cppcms can integrate well with a frontend >> framework >> like Twitter Bootstrap? I'd like to take the power of a C++ backend >> framework and combine it with the beauty of a frontend framework like >> Twitter bootstrap. >> > > This is possible as all the html/css/js stuff can be put into a template - > see > http://cppcms.com/wikipp/en/page/cppcms_1x_tut_hello_templates > I am using cppcms in combination with knockout.js and jquery - a wonderful > combination :) > > At the moment there is no bi-directional communication technique like > websockets > supported but you could archive the same with JSON-RPC and ServerSentEvent > (SSE). > > greets > -- > Christian Gmeiner, MS > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Christian G. <chr...@gm...> - 2013-10-10 07:29:13
|
HI Joe > Hello everyone. I see that this framework is probably one of the most > powerful hidden gems on the web and I don't see as much activity using it > as > with other frameworks. I'd like to change that. > > I would like to know if cppcms can integrate well with a frontend framework > like Twitter Bootstrap? I'd like to take the power of a C++ backend > framework and combine it with the beauty of a frontend framework like > Twitter bootstrap. > > This is possible as all the html/css/js stuff can be put into a template - see http://cppcms.com/wikipp/en/page/cppcms_1x_tut_hello_templates I am using cppcms in combination with knockout.js and jquery - a wonderful combination :) At the moment there is no bi-directional communication technique like websockets supported but you could archive the same with JSON-RPC and ServerSentEvent (SSE). greets -- Christian Gmeiner, MS |
|
From: Joe <wac...@gm...> - 2013-10-10 01:50:14
|
Hello everyone. I see that this framework is probably one of the most powerful hidden gems on the web and I don't see as much activity using it as with other frameworks. I'd like to change that. I would like to know if cppcms can integrate well with a frontend framework like Twitter Bootstrap? I'd like to take the power of a C++ backend framework and combine it with the beauty of a frontend framework like Twitter bootstrap. If this is possible, just explain vaguely how you did it and from then on, I will try writing a tutorial of my own to get it to work. Regards, Joe |
|
From: Klaim - J. L. <mj...@gm...> - 2013-10-08 21:41:21
|
On Fri, Oct 4, 2013 at 5:34 PM, madman zigbee <mad...@gm...>wrote: > What are some of the good free hosting sites that are know to work with > cppcms? I don't know any free hosting that allows native executables to be run. There is a lot of cheap hosting if you don't need much memory. |
|
From: madman z. <mad...@gm...> - 2013-10-04 15:35:05
|
Hi guys, What are some of the good free hosting sites that are know to work with cppcms? |
|
From: Artyom B. <art...@ya...> - 2013-10-02 11:27:27
|
Not
booster::regex("ABcD",take_bc,booster::regex("..."))
but
booster::regex_search("ABcD",take_bc,booster::regex("..."))
Second not (?ibC) but (?i)(bC)
(?i) is global option
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>________________________________
> From: CN Liu <cn...@gr...>
>To: cpp...@li...
>Sent: Wednesday, October 2, 2013 1:45 PM
>Subject: [Cppcms-users] booster::regex - How to do case insensitive match?
>
>
>
>It appears that booster::regex() ignores argument "flags". How do I case insensitively match strings?
>
>The following code leads the regex engine to throw exception:
>
>booster::smatch take_bc;
>if(booster::regex("ABcD",take_bc,booster::regex("(?ibC)")))
>std::cout << take_bc[1].str() << std::endl;
>
>Regards,
>CN
>
>----- Original Message -----
>>From: Artyom Beilis
>>Sent: 09/30/13 08:20 PM
>>To: cpp...@li...
>>Subject: Re: [Cppcms-users] Moving from boost::regex to re2 and ability to go without regex checks
>>1. First of all cppcms does not use Boost regex. Booster regex uses PCRE - check the performance against, and actually at some point I'm planning to enable PRCE compiled expressions that actually use JIT. So I suggest check against booster::regex - not boost regex
>>2. Have you tested what is the percent of the time that regex matching actually takes place in comparison to all around work?
>>3. RE2 is not developed by Google but rather hosted on google code (at least that is what I found)
>>4. Does RE2 has stable ABI?
>>5. RE2 uses FSA - that means its size may be exp(|regex|) i.e. the memory used by automata in some cases may grow exponentially depending or regex size - that is why no modern regex engines actually use FSA.
>>6. If you have some critical points - you can always override main() function and use your own dispatching algorithm
>>7. If you want generic approach - that it would be better to provide some selecting functional - i.e. lambda expression
>>
>>Regards
>>
>>
>>Artyom Beilis
>>--------------
>>CppCMS - C++ Web Framework: http://cppcms.com/
>>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>>
>>
>>>________________________________
>>>From: Arsen Zahray <me...@gm...>
>>>To: cpp...@li...
>>>Sent: Monday, September 30, 2013 1:28 AM
>>>Subject: [Cppcms-users] Moving from boost::regex to re2 and ability to go without regex checks
>>>
>>>Hey. I'd like to discuss a possibility of changing the way the app handles regex evaluations.
>>> Some time ago, I heavily used regex. That was before I found out, that it was killing my app's performance. After I got rid of it, my app's speed improved by at least 10 times.
>>> So, here are few suggestions I'd like to discuss implementing:
>>> 1. Move from boost::regex (the app seems to be using that if I'm not mistaken) to re2 (it was developed by google for performance critical apps, and it seems to do the job well enough). re2 doesn't compile for windows, but the vast majority of cppcms users will use framework under linux (me included)
>>> 2. Give the users ability to go without regex altogether. Let us just pass along function pointers instead of regex strings. Performance wise, there is nothing that beats a function pointer.
>>> I've set up some benchmarks to demonstrate what I mean. Build commands:
>>>
>>>g++ -std=c++11 -Wall -fexceptions -g -c main.cpp -o main.o
>>>g++ -o regex-tests main.o -lre2 -lbooster -lboost_regex
>>> I'm attaching the source, and here are the test results:
>>> RE2: 326069boost::regex: 2164850function pointers; 27878
>>> Because cppcms is going to be used by those, who want top performance for the apps, I think that this is a way forward for the library.
>>> What do you guys think?
>>>------------------------------------------------------------------------------
>>>October Webinars: Code for Performance
>>>Free Intel webinars can help you accelerate application performance.
>>>Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>>the latest Intel processors and coprocessors. See abstracts and register >
>>>http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
>>>_______________________________________________
>>>Cppcms-users mailing list
>>>Cpp...@li...
>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users
>>>
>>>
>
>------------------------------------------------------------------------------
>October Webinars: Code for Performance
>Free Intel webinars can help you accelerate application performance.
>Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>the latest Intel processors and coprocessors. See abstracts and register >
>http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
>_______________________________________________
>Cppcms-users mailing list
>Cpp...@li...
>https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
> |
|
From: CN L. <cn...@gr...> - 2013-10-02 10:58:25
|
It appears that booster::regex() ignores argument "flags". How do I case insensitively match strings?
The following code leads the regex engine to throw exception:
booster::smatch take_bc;
if(booster::regex("ABcD",take_bc,booster::regex("(?ibC)")))
std::cout << take_bc[1].str() << std::endl;
Regards,
CN
----- Original Message -----
From: Artyom Beilis
Sent: 09/30/13 08:20 PM
To: cpp...@li...
Subject: Re: [Cppcms-users] Moving from boost::regex to re2 and ability to go without regex checks
1. First of all cppcms does not use Boost regex. Booster regex uses PCRE - check the performance against, and actually at some point I'm planning to enable PRCE compiled expressions that actually use JIT. So I suggest check against booster::regex - not boost regex
2. Have you tested what is the percent of the time that regex matching actually takes place in comparison to all around work?
3. RE2 is not developed by Google but rather hosted on google code (at least that is what I found)
4. Does RE2 has stable ABI?
5. RE2 uses FSA - that means its size may be exp(|regex|) i.e. the memory used by automata in some cases may grow exponentially depending or regex size - that is why no modern regex engines actually use FSA.
6. If you have some critical points - you can always override main() function and use your own dispatching algorithm
7. If you want generic approach - that it would be better to provide some selecting functional - i.e. lambda expression
Regards
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
-----------------------------------------------------------------
From: Arsen Zahray <me...@gm...>
To: cpp...@li...
Sent: Monday, September 30, 2013 1:28 AM
Subject: [Cppcms-users] Moving from boost::regex to re2 and ability to go without regex checks
Hey. I'd like to discuss a possibility of changing the way the app handles regex evaluations.
Some time ago, I heavily used regex. That was before I found out, that it was killing my app's performance. After I got rid of it, my app's speed improved by at least 10 times.
So, here are few suggestions I'd like to discuss implementing:
1. Move from boost::regex (the app seems to be using that if I'm not mistaken) to re2 (it was developed by google for performance critical apps, and it seems to do the job well enough). re2 doesn't compile for windows, but the vast majority of cppcms users will use framework under linux (me included)
2. Give the users ability to go without regex altogether. Let us just pass along function pointers instead of regex strings. Performance wise, there is nothing that beats a function pointer.
I've set up some benchmarks to demonstrate what I mean. Build commands:
g++ -std=c++11 -Wall -fexceptions -g -c main.cpp -o main.o
g++ -o regex-tests main.o -lre2 -lbooster -lboost_regex
I'm attaching the source, and here are the test results:
RE2: 326069boost::regex: 2164850function pointers; 27878
Because cppcms is going to be used by those, who want top performance for the apps, I think that this is a way forward for the library.
What do you guys think?
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Cppcms-users mailing list
Cpp...@li...
https://lists.sourceforge.net/lists/listinfo/cppcms-users
|
|
From: Klaim - J. L. <mj...@gm...> - 2013-10-02 00:01:22
|
On Mon, Sep 30, 2013 at 12:28 AM, Arsen Zahray <me...@gm...> wrote: > I'm attaching the source, and here are the test results: > > RE2: 326069 > boost::regex: 2164850 > function pointers; 27878 I think it would be useful to also compare with std::regex implementation for both gcc and clang. |
|
From: Artyom B. <art...@ya...> - 2013-09-30 12:20:46
|
1. First of all cppcms does not use Boost regex. Booster regex uses PCRE - check the performance against, and actually at some point I'm planning to enable PRCE compiled expressions that actually use JIT. So I suggest check against booster::regex - not boost regex 2. Have you tested what is the percent of the time that regex matching actually takes place in comparison to all around work? 3. RE2 is not developed by Google but rather hosted on google code (at least that is what I found) 4. Does RE2 has stable ABI? 5. RE2 uses FSA - that means its size may be exp(|regex|) i.e. the memory used by automata in some cases may grow exponentially depending or regex size - that is why no modern regex engines actually use FSA. 6. If you have some critical points - you can always override main() function and use your own dispatching algorithm 7. If you want generic approach - that it would be better to provide some selecting functional - i.e. lambda expression Regards Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Arsen Zahray <me...@gm...> >To: cpp...@li... >Sent: Monday, September 30, 2013 1:28 AM >Subject: [Cppcms-users] Moving from boost::regex to re2 and ability to go without regex checks > > > >Hey. I'd like to discuss a possibility of changing the way the app handles regex evaluations. > >Some time ago, I heavily used regex. That was before I found out, that it was killing my app's performance. After I got rid of it, my app's speed improved by at least 10 times. > >So, here are few suggestions I'd like to discuss implementing: > >1. Move from boost::regex (the app seems to be using that if I'm not mistaken) to re2 (it was developed by google for performance critical apps, and it seems to do the job well enough). re2 doesn't compile for windows, but the vast majority of cppcms users will use framework under linux (me included) > >2. Give the users ability to go without regex altogether. Let us just pass along function pointers instead of regex strings. Performance wise, there is nothing that beats a function pointer. > >I've set up some benchmarks to demonstrate what I mean. Build commands: > >g++ -std=c++11 -Wall -fexceptions -g -c main.cpp -o main.o >g++ -o regex-tests main.o -lre2 -lbooster -lboost_regex > >I'm attaching the source, and here are the test results: > >RE2: 326069 >boost::regex: 2164850 >function pointers; 27878 > >Because cppcms is going to be used by those, who want top performance for the apps, I think that this is a way forward for the library. > >What do you guys think? > >------------------------------------------------------------------------------ >October Webinars: Code for Performance >Free Intel webinars can help you accelerate application performance. >Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >the latest Intel processors and coprocessors. See abstracts and register > >http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Lee E. <le...@el...> - 2013-09-30 11:56:50
|
shouldn't the condition in your sample should be: if((sequenceLen<=simplifiedPatternLength)||(sequence[simplifiedPatternLength]!='/')) about your point - using regEx is great for ease of configuration & building i like the ability to change the regex implementation being used (not just for performance) but using your own functions - or preferably function objects will be the best in my opinion and then just provide a default function object (or lambda) that uses the boost::regex engine On Mon, Sep 30, 2013 at 1:28 AM, Arsen Zahray <me...@gm...> wrote: > Hey. I'd like to discuss a possibility of changing the way the app handles > regex evaluations. > > Some time ago, I heavily used regex. That was before I found out, that it > was killing my app's performance. After I got rid of it, my app's speed > improved by at least 10 times. > > So, here are few suggestions I'd like to discuss implementing: > > 1. Move from boost::regex (the app seems to be using that if I'm not > mistaken) to re2 (it was developed by google for performance critical apps, > and it seems to do the job well enough). re2 doesn't compile for windows, > but the vast majority of cppcms users will use framework under linux (me > included) > > 2. Give the users ability to go without regex altogether. Let us just pass > along function pointers instead of regex strings. Performance wise, there > is nothing that beats a function pointer. > > I've set up some benchmarks to demonstrate what I mean. Build commands: > > g++ -std=c++11 -Wall -fexceptions -g -c main.cpp -o main.o > g++ -o regex-tests main.o -lre2 -lbooster -lboost_regex > > I'm attaching the source, and here are the test results: > > RE2: 326069 > boost::regex: 2164850 > function pointers; 27878 > > Because cppcms is going to be used by those, who want top performance for > the apps, I think that this is a way forward for the library. > > What do you guys think? > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
|
From: Arsen Z. <me...@gm...> - 2013-09-29 22:28:40
|
Hey. I'd like to discuss a possibility of changing the way the app handles regex evaluations. Some time ago, I heavily used regex. That was before I found out, that it was killing my app's performance. After I got rid of it, my app's speed improved by at least 10 times. So, here are few suggestions I'd like to discuss implementing: 1. Move from boost::regex (the app seems to be using that if I'm not mistaken) to re2 (it was developed by google for performance critical apps, and it seems to do the job well enough). re2 doesn't compile for windows, but the vast majority of cppcms users will use framework under linux (me included) 2. Give the users ability to go without regex altogether. Let us just pass along function pointers instead of regex strings. Performance wise, there is nothing that beats a function pointer. I've set up some benchmarks to demonstrate what I mean. Build commands: g++ -std=c++11 -Wall -fexceptions -g -c main.cpp -o main.o g++ -o regex-tests main.o -lre2 -lbooster -lboost_regex I'm attaching the source, and here are the test results: RE2: 326069 boost::regex: 2164850 function pointers; 27878 Because cppcms is going to be used by those, who want top performance for the apps, I think that this is a way forward for the library. What do you guys think? |
|
From: Lee E. <le...@el...> - 2013-09-28 17:30:26
|
You can use any object that is convertible to json::value and if the primitives, vector and are not sufficient, you can always define json_traits class to convert whatever type you have to json::value and back On Thu, Sep 26, 2013 at 11:18 PM, Marcel Hellwig <ke...@co...> wrote: > On 26.09.2013 15:14, Abhishek wrote: > > Thanks for the clarification Marcel. > > > > And yeah, I mean ["Hello", "world", "value1", "value2"] , but mistakenly > > added curly brackets (braces). I meant array only. > > > > So lets say, if I use: > > > > cppcms::json::array is assigned std::vector<any_custom_object> > > > > , where "any_custom_objects" trait class has been defined with json > getters > > and setters, will give the desired json array (of any_custom_object or > > string, whatever used in vector)? > Sorry, but after the 10th read, I still don't get what you want ;) > What I can say to you: > * I don't know if cppcms parser support any other type than object as > root, I never tried > * for any other information see > http://cppcms.com/wikipp/en/page/cppcms_1x_json and the api at > http://cppcms.com/cppcms_ref/latest/namespacecppcms_1_1json.html > > If you have further question, please specify it. I'm sorry I'm not able > to help you atm. > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
|
From: Ross R. <ros...@gm...> - 2013-09-27 00:45:40
|
After racking my brain yesterday, firing off the last post was enough of an
inspiration to solve my own problem... apologies for the noise.
The issue is that my corporate g++ installation is the kitchen-sink install
and the linker knows about many libraries. They take priority over
LD_LIBRARY_PATH when creating a shared library
ldconfig -p | g libgcrypt
libgcrypt.so.11 (libc6,x86-64) => /usr/lib64/libgcrypt.so.11
libgcrypt.so.11 (libc6) => /usr/lib/libgcrypt.so.11
libgcrypt.so (libc6,x86-64) => /usr/lib64/libgcrypt.so
The workaround is to add to the linker command by appending this to my
cmake runline:
-DCMAKE_CXX_LINK_FLAGS='-L /tmp/rbroger1/libgcrypt/lib -L
/tmp/rbroger1/libgpg-error/lib'
- Ross
On Thu, Sep 26, 2013 at 5:26 PM, Ross Rogers <ros...@gm...> wrote:
> I am a newb to both cppcms and cmake. I have to compile with tar-balls,
> because I am in a corporate linux environment.
>
> That said, my "-DCMAKE_LIBRARY_PATH" option doesn't seem to be honored. I
> run cmake from the suggested build directory like:
>
> /usr/intel/pkgs/cmake/2.8.10.2/bin/cmake -DCMAKE_CXX_FLAGS='-fpermissive'
> -DCMAKE_INCLUDE_PATH=/tmp/rbroger1/libgcrypt/include
> -DCMAKE_LIBRARY_PATH=/tmp/rbroger1/libgcrypt/lib:/tmp/rbroger1/libgpg-error/lib
> ..
>
> (The -fpermissive switch is necessary due to using the 4.8.1 version of
> gcc. Also, I'm doing a trial installation in a temporary area.)
>
> cmake goes on its merry way and then I run
>
> make VERBOSE=1
>
> The header files seem to be found locally, because I no longer get
> complaints about missing function signatures, but when it goes to the
> linker it complains about missing symbols:
>
> /nfs/pdx/itools/em64t_SLES10/pkgs/cmake/2.8.10.2/bin/cmake -E
> cmake_link_script CMakeFiles/cache_backend_test.dir/link.txt --verbose=1
> /usr/bin/c++ -fpermissive -Wall -Wextra -O2 -g -DNDEBUG
> CMakeFiles/cache_backend_test.dir/tests/cache_backend_test.cpp.o -o
> cache_backend_test -rdynamic libcppcms.so.1.0.4 booster/libbooster.so.0.0.2
> -lpthread -lpcre -lgcrypt -ldl -lz
> -Wl,-rpath,/tmp/rbroger1/cppcms-1.0.4/build:/tmp/rbroger1/cppcms-1.0.4/build/booster
>
> If I run strace -o log -f make VERBOSE=1 and look at which directories
> are being scanned for libgcrypt.so, it seems to be looking at the corporate
> NFS installation:
>
> 26940
> open("/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/libgcrypt.so",
> O_RDONLY) = 13
>
> If I run the line that it is trying to run with a tweak, then the compile
> works for that one line:
>
> /nfs/pdx/itools/em64t_SLES10/pkgs/cmake/2.8.10.2/bin/cmake -E
> cmake_link_script CMakeFiles/cache_backend_test.dir/link.txt --verbose=1
> /usr/bin/c++ -fpermissive -Wall -Wextra -O2 -g -DNDEBUG
> CMakeFiles/cache_backend_test.dir/tests/cache_backend_test.cpp.o -o
> cache_backend_test -rdynamic libcppcms.so.1.0.4 booster/libbooster.so.0.0.2
> -lpthread -lpcre -lgcrypt -ldl -lz
> -Wl,-rpath,/tmp/rbroger1/cppcms-1.0.4/build:/tmp/rbroger1/cppcms-1.0.4/build/booster -L
> /tmp/rbroger1/libgcrypt/lib
>
>
> How can I get the cppcms build flow to look in my specific library
> directories first?
>
> - Ross
>
>
|
|
From: Ross R. <ros...@gm...> - 2013-09-27 00:26:26
|
I am a newb to both cppcms and cmake. I have to compile with tar-balls,
because I am in a corporate linux environment.
That said, my "-DCMAKE_LIBRARY_PATH" option doesn't seem to be honored. I
run cmake from the suggested build directory like:
/usr/intel/pkgs/cmake/2.8.10.2/bin/cmake -DCMAKE_CXX_FLAGS='-fpermissive'
-DCMAKE_INCLUDE_PATH=/tmp/rbroger1/libgcrypt/include
-DCMAKE_LIBRARY_PATH=/tmp/rbroger1/libgcrypt/lib:/tmp/rbroger1/libgpg-error/lib
..
(The -fpermissive switch is necessary due to using the 4.8.1 version of
gcc. Also, I'm doing a trial installation in a temporary area.)
cmake goes on its merry way and then I run
make VERBOSE=1
The header files seem to be found locally, because I no longer get
complaints about missing function signatures, but when it goes to the
linker it complains about missing symbols:
/nfs/pdx/itools/em64t_SLES10/pkgs/cmake/2.8.10.2/bin/cmake -E
cmake_link_script CMakeFiles/cache_backend_test.dir/link.txt --verbose=1
/usr/bin/c++ -fpermissive -Wall -Wextra -O2 -g -DNDEBUG
CMakeFiles/cache_backend_test.dir/tests/cache_backend_test.cpp.o -o
cache_backend_test -rdynamic libcppcms.so.1.0.4 booster/libbooster.so.0.0.2
-lpthread -lpcre -lgcrypt -ldl -lz
-Wl,-rpath,/tmp/rbroger1/cppcms-1.0.4/build:/tmp/rbroger1/cppcms-1.0.4/build/booster
If I run strace -o log -f make VERBOSE=1 and look at which directories are
being scanned for libgcrypt.so, it seems to be looking at the corporate NFS
installation:
26940
open("/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/libgcrypt.so",
O_RDONLY) = 13
If I run the line that it is trying to run with a tweak, then the compile
works for that one line:
/nfs/pdx/itools/em64t_SLES10/pkgs/cmake/2.8.10.2/bin/cmake -E
cmake_link_script CMakeFiles/cache_backend_test.dir/link.txt --verbose=1
/usr/bin/c++ -fpermissive -Wall -Wextra -O2 -g -DNDEBUG
CMakeFiles/cache_backend_test.dir/tests/cache_backend_test.cpp.o -o
cache_backend_test -rdynamic libcppcms.so.1.0.4 booster/libbooster.so.0.0.2
-lpthread -lpcre -lgcrypt -ldl -lz
-Wl,-rpath,/tmp/rbroger1/cppcms-1.0.4/build:/tmp/rbroger1/cppcms-1.0.4/build/booster
-L
/tmp/rbroger1/libgcrypt/lib
How can I get the cppcms build flow to look in my specific library
directories first?
- Ross
|
|
From: Marcel H. <ke...@co...> - 2013-09-26 20:18:13
|
On 26.09.2013 15:14, Abhishek wrote: > Thanks for the clarification Marcel. > > And yeah, I mean ["Hello", "world", "value1", "value2"] , but mistakenly > added curly brackets (braces). I meant array only. > > So lets say, if I use: > > cppcms::json::array is assigned std::vector<any_custom_object> > > , where "any_custom_objects" trait class has been defined with json getters > and setters, will give the desired json array (of any_custom_object or > string, whatever used in vector)? Sorry, but after the 10th read, I still don't get what you want ;) What I can say to you: * I don't know if cppcms parser support any other type than object as root, I never tried * for any other information see http://cppcms.com/wikipp/en/page/cppcms_1x_json and the api at http://cppcms.com/cppcms_ref/latest/namespacecppcms_1_1json.html If you have further question, please specify it. I'm sorry I'm not able to help you atm. |
|
From: Abhishek <abh...@gm...> - 2013-09-26 13:14:46
|
Thanks for the clarification Marcel. And yeah, I mean ["Hello", "world", "value1", "value2"] , but mistakenly added curly brackets (braces). I meant array only. So lets say, if I use: cppcms::json::array is assigned std::vector<any_custom_object> , where "any_custom_objects" trait class has been defined with json getters and setters, will give the desired json array (of any_custom_object or string, whatever used in vector)? |
|
From: Marcel H. <ke...@co...> - 2013-09-26 12:56:29
|
On 26.09.2013 14:00, Abhishek wrote:
> Hi All,
>
> Right now, I have seen examples of setting JSON key to set a value, for eg:
>
> my_object["name"]="Moshe";
> my_object["salary"]=1000.0;
>
> which creates json like:
> {name:"Moshe", salary:"1000.0"}
This is called an object.
> But what if I want to create a json string like:
>
> {"hello", "world", "value1", value2} ?
>
> I have these values in a std::vector<std::string>
>
> so, how should I create my_object to create json like --> {"hello", "world",
> "value1", value2}
what you mean is called array in json [0]
An array is something that is enclosed in squared brackets, like
[1,2,3,4]. This is possible. You just use the cppcms::json::array, which
is a typedef for std::vector<cppcms::json::value>. So it should work ;)
If you are using c++11 you can write this:
> #include <cppcms/json.h>
> cppcms::json::array a = {"string1", "string2", "string3"};
[0] http://en.wikipedia.org/wiki/Json#Data_types.2C_syntax_and_example
|
|
From: Abhishek <abh...@gm...> - 2013-09-26 12:00:46
|
Hi All,
Right now, I have seen examples of setting JSON key to set a value, for eg:
my_object["name"]="Moshe";
my_object["salary"]=1000.0;
which creates json like:
{name:"Moshe", salary:"1000.0"}
But what if I want to create a json string like:
{"hello", "world", "value1", value2} ?
I have these values in a std::vector<std::string>
so, how should I create my_object to create json like --> {"hello", "world",
"value1", value2}
|
|
From: Artyom B. <art...@ya...> - 2013-09-18 06:00:00
|
- The session is loaded automatically in synchronous applications before the application::main is called. - In asynchronous applications you need to call load() - because session loading can be blocking )depending on the backend) - so use with care. - The session is saved upon first output from the program - i.e. when you need to send the HTTP headers. i.e. you call out() the session is automatically saved. You can save it manually before the out() is called using save(). Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Joseph Antony <jsa...@gm...> >To: cpp...@li... >Sent: Tuesday, September 17, 2013 11:08 PM >Subject: [Cppcms-users] Session Load and Save events > > >Hi Artyom, > >I have been tinkering with CPPCMS in the last few weeks after its discovery >and I must say it is a wonderful work from you. It has a great potential as >a highly scalable and light-weight web server application. I have a set >C/C++ libraries which has so far no face and I would like to use CPPCMS to >build a WebAPI face for them. So I thank you very much for contributing a >such a great useful product. > >My question is, within the web application process, how I do I get to know >when a session is loaded and when the session is saved (to the file or other >persistence options you have provided). Session interface currently exposes >"save" and "load" methods. It also allows us to set an expiration policy >which enables the session to expire when it is idle. But how the web >application process will be notified of such events as Session::Load and >Session::Save in order to employ some critical operation such as updating a >table in the database about when a user's session started and terminated ? > >Your advice is greatly appreciated. > >Joseph. > > >------------------------------------------------------------------------------ >LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! >1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint >2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes >Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. >http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |