cppcms-users Mailing List for CppCMS C++ Web Framework (Page 82)
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: <ele...@ex...> - 2012-06-18 08:56:35
|
I went ahead and made a patch my self. File attached. Goes ahead HEAD. Now doing response().ostream().precision(9) works. Petr |
From: Artyom B. <art...@ya...> - 2012-06-18 08:54:56
|
----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: cpp...@li... > Cc: > Sent: Monday, June 18, 2012 10:29 AM > Subject: Re: [Cppcms-users] How to set default response().out() stream precision? > > Looking at the implementation of http_response::out() it writes out > headers so no wonder set_redirect_header is broken() if I do > out().precision(9). > > Would it be possible to expose the ostream without writing headers? > No, the access to out() flushes the headers by design as the data stream goes after the headers so the headers should be written. See: http://cppcms.com/cppcms_ref/latest/classcppcms_1_1http_1_1response.html#a39e48c676a3f2c79b26d60b8d455658c Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: <ele...@ex...> - 2012-06-18 07:29:23
|
Looking at the implementation of http_response::out() it writes out headers so no wonder set_redirect_header is broken() if I do out().precision(9). Would it be possible to expose the ostream without writing headers? |
From: <ele...@ex...> - 2012-06-18 06:58:35
|
Ive tried putting response().out().precision(9) into overloaded application::init() but that seems to break things. Whats the proper way? Thanks Petr |
From: <ele...@ex...> - 2012-06-16 01:22:17
|
> Hi all, > > currently I am looking into a way to integrate client side form validation > into > a cppcms application. > I have looked around and found this nice jquery based one: > jQuery-Validation-Engine > https://github.com/posabsolute/jQuery-Validation-Engine > > The nice thing is that it provides a nice Ajax api - > https://github.com/posabsolute/jQuery-Validation-Engine#ajax-protocol > > Is there some way to reuse the defined validations (e.g. struct > login_form : public cppcms::form) with this api? You can do validation of each widget individually: http://cppcms.com/cppcms_ref/latest/classcppcms_1_1base__form.html#af7d0a7b4c760b43ea3161181906ee4d0 Look at the JSON-RPC guide on the cppcms wiki. So I guess you can. |
From: <ele...@ex...> - 2012-06-16 01:14:19
|
> Why wouldn't you use regex_field widget or derive your own widget from the > test widget? > It would be more correct approach, you try to change the function of > numeric widget > and it is bad idea. I didnt use regex_field because I wanted the interface of numeric and also its low, high etc functions/ regex_field::value() would return a string thats either an int or date. I didn't think that's a good idea. I didn't think about deriving from numeric<int>, and overloading load(). I think that's a better approach than overloading form::load(). Thanks. |
From: Christian G. <chr...@gm...> - 2012-06-15 13:05:21
|
Hi all, currently I am looking into a way to integrate client side form validation into a cppcms application. I have looked around and found this nice jquery based one: jQuery-Validation-Engine https://github.com/posabsolute/jQuery-Validation-Engine The nice thing is that it provides a nice Ajax api - https://github.com/posabsolute/jQuery-Validation-Engine#ajax-protocol Is there some way to reuse the defined validations (e.g. struct login_form : public cppcms::form) with this api? thanks --- Christian Gmeiner, MSc |
From: Artyom B. <art...@ya...> - 2012-06-15 11:57:21
|
----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: cpp...@li... > Cc: > Sent: Friday, June 15, 2012 11:31 AM > Subject: Re: [Cppcms-users] Setting field value after form.load() still fails validation > > It's not a default value. > > The widget can either write an Int or YYYY-MM-DD in the widget. > > my overloaded form.load() uses regex to see if its an Int or Date. If it's > a date, it converts it to an Int based on some rules. > Why wouldn't you use regex_field widget or derive your own widget from the test widget? It would be more correct approach, you try to change the function of numeric widget and it is bad idea. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > The intention was to convert Date into Int before validation runs. The > field will then be validated as if it's an Int. > > I simply had to set num.valid(true) after the conversion to Int. > > My main point is that widgets::numeric::load silently validates the form, > when validation should be done when validate() is called. > > Petr > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: <ele...@ex...> - 2012-06-15 08:31:57
|
It's not a default value. The widget can either write an Int or YYYY-MM-DD in the widget. my overloaded form.load() uses regex to see if its an Int or Date. If it's a date, it converts it to an Int based on some rules. The intention was to convert Date into Int before validation runs. The field will then be validated as if it's an Int. I simply had to set num.valid(true) after the conversion to Int. My main point is that widgets::numeric::load silently validates the form, when validation should be done when validate() is called. Petr |
From: <ele...@ex...> - 2012-06-15 08:31:16
|
It's not a default value. The widget can either write an Int or YYYY-MM-DD in the widget. my overloaded form.load() uses regex to see if its an Int or Date. If it's a date, it converts it to an Int based on some rules. The intention was to convert Date into Int before validation runs. The field will then be validated as if it's an Int. I simply had to set num.valid(true) after the conversion to Int. My main point is that widgets::numeric::load silently validates the form, when validation should be done when validate() is called. Petr |
From: Artyom B. <art...@ya...> - 2012-06-15 07:29:46
|
If this a default value than - you should set it before you render the form so it would be seen in the HTML - you should allow the widget to be empty and check if it is widget_name.set(). If it is not set use default, Using c.form.load(context()) c.form.num.value(10); c.form.validate() Is not correct. You should either do if(request()=="POST") { c.form.load(context()) c.form.validate() } else { c.form.num.value(10); render("myform",c); } Or Do not sent constrains on a num and then c.form.load(context()) c.form.validate() if(c.form.num.set()) { realval = 10;// we got default } else { realval = num.value(); // do other checks } Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: ele...@ex... > Cc: cpp...@li... > Sent: Thursday, June 14, 2012 4:59 PM > Subject: Re: [Cppcms-users] Setting field value after form.load() still fails validation > >> I've looked through the form.h header into widgets::numeric::load >> >> and found this: >> >> ss.imbue(context.locale()); >> ss>>value_; >> if(ss.fail() || !ss.eof()) >> valid(false); >> else >> set(true); >> > > > Sorry for the repeat emails, I pressed space key several times without > realizing that the focus was set on the "send" button and ive been > working > for 14 hours today. > > Question is, is it proper to set a validation flag without to running > form::validate()? > > What I have is a numeric<int> widget which can either take an int or a > date. Ive overloaded form::load to calculate days from a given date. > > Petr > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: sergey l. <ccp...@gm...> - 2012-06-15 07:23:15
|
just lol On Thu, Jun 14, 2012 at 2:07 AM, Marcel Hellwig <ke...@co...> wrote: > Am 13.06.2012 18:46, schrieb sergey lavrov: > > Hello All! > > In my application I need more then 4 parameters in dispatcher().assign() > function but there are only 4. > How can I get values of 5, 6, 7 regexp matches in assign function > (controller)? > > Thanks in advance. > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > Cppcms-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/cppcms-users > > I think you do something really wrong. If you really need more than 4 > paramters to handle you really should ask yourself why. > Again, if you really need them, try to avoid it. > You may can do a regex first and then concat and seperate them via an > sign, like ; (csv) and then assign them. > > As I said before. Rethink you design! > > Regards > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Artyom B. <art...@ya...> - 2012-06-15 07:20:49
|
----- Original Message ----- > From: Ovanes Markarian <om_...@ke...> >>> My main consideration is the faked >>> boost lib: booster and dependencies to some C stuff like PCRE... >> >> >> I'll explain. >> >> booster is not "fake" boost library it is a subset of essential >> C++0x/Boost like interface needed for CppCMS. >> >> You can use freely any Boost or C++11 library with it >> without any problem. >> >> Why? ABI Stability >> >> I can't use Boost with CppCMS because it breaks its interfaces >> >> every 3 months - both ABI and what is even harder API! >> Good point: >> >> [Snip] >> >> There is no a single mainstream C++11 compiler that actually implements >> >> C++11 regex! (neither gcc nor msvc-10) > > Just looked up Clang 3.0 libc++ has it (3.1 respectively as well) > http://llvm.org/svn/llvm-project/libcxx/tags/libcpp-30/include/regex > http://llvm.org/svn/llvm-project/libcxx/tags/libcpp-31/include/regex > libc++ is far from being production ready.... It currently works only on Mac OS X. I tried to compile it on Linux recently I did enormous tricks to do it. And still got some problems. > GCC 4.6.3 has it (4.7.x respectively as well) > http://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a01192.html > > Did not lookup if earlier versions of gcc have the regex support as well. > Ok... gcc-4.5 had not supported it (it was the last time I checked) also it seems that gcc-4.6 does supports it. Older version allowed me to compile the code but the "match result" was always false. It is good news but I can't relay on it as I support many compilers, so I'll need to keep PCRE. Also note... ABI stability - this exactly gives me an ability to switch the implementation. If I want to I can replace pcre with std::regex or other engine without affecting ABI! Anything I need is to replace an opaque class booster::regex::data. So I can easily remove the dependency on PCRE if the compiler supports regex. Actually this may be an action item for next version... >> >> Boost.Regex is great library but it is not ABI friendly... So >> if I just "copy" boost.regex to booster I will not be able >> to fix bugs easily. > > I somehow do not understand how the bugs are now easily fixed? You > still need to issue a new version (or patch) of an internal regex lib. > If PCRE has bugs, why are they easier to fix as the regex in the > boost? > Because booster::regex uses pimpl ideom. The implementation details are hidden. every booster class looks like class foo { public: foo(); ~foo(); void bar(baz const &); private: struct data; copy_ptr<data> d; }; Where data keeps the actual members, this gives me a great flexibility to fix bugs or even switch implementation without affecting API or ABI. This is something can't be done with Boost. This makes the huge difference between two libraries. > At that point I would like to point out another solution without any regex lib: > > I understand your objections, but there would be another workaround... > To let users implement the url dispatcher theirselves. This might > violate DRY, since many users will implement the same class again and > again... May be, it makes sense to introduce the cppcms corelib and > cppcms helper lib for those who wish stability. I personally would > like to use boost::xpressive at all. > Ohhh please don't talk to me about xpressive. It is SLOW to compile hard to understand to _AVERAGE_ C++ programmer and what is more important hard to debug. Also **nothing** prevents from you to create your own dispatcher... I don't tell my users how to write the code. >> Another goodies you get with PCRE are: >> >> 1. Very fast copy (as fast as memcpy) >> 2. Support of JIT (yeah...) > > And now I came along as a C++ developer and ask: "What happens if PCRE > was unable to internally use heap?" Will cppcms throw a bad_alloc or > what kind of error should I expect. > Sure it might be a hypothetical > issue, but how are PCRE errors generally reported Take a look on the code, and yes, you'll get bad alloc. > compilation failed, since I provided a bad regex, how is that > reported? I did not find the answer in the docs. Then you didn't read them... http://cppcms.com/cppcms_ref/latest/classbooster_1_1regex.html#a7e6af85360eada29c9058621a859edbd >I know for example > that xpressive will issue a compilation error ;) > > Now to the JIT. It seems like being a nice feature, which is executed > once at start up. How much slower is the start up of my application if > JIT is going to be used? According to the first table: > > http://sljit.sourceforge.net/pcre.html > > JIT seems to make the initial regex compilation on average 20 times > slower. So if I really going to have many URLs or locations, my app > might start 20 times slower. But if all my regex patterns are known at > compile time I prefer xpressive ;) > So create your own dispatcher... Don't ask an average C++ user to use xpressive. >>> The same applies to faked >>> booster::function. What if I want to use C++11 lambdas, are they going >>> to nicely play with them? >> >> Yes of course, you can even assign (std/boost)::function to > booster::function >> and vise versa >> >> >>> I know that boost::function is the base of >>> std::function which really greatly plays with lambdas etc. The same >>> applies to threading lib and asio, which is now proposed for C++ TR2. >>> >> >> What was proposed to TR2 is very different from ASIO, so the >> thread is different from boost.thread - very different. > > Ok, but as far as I can see boost thread lib tries to catch up with > the standard. On the other hand. Clang 3.1 and GCC 4.7 have support > for major threading features. But here I must agree, if boost catches > up with C++11 the ABI is not going to be stable. > std::thread does not include two critical parts: - shared_mutex - thread local storage support This is major drawback for me. I uses it intensively. Also booster has recursive_shared_mutex that neither boost not std provide. So no I can't switch booster::thread with std::thread Also boost - by definition can't be ABI stable and in fact is not ABI or API stable. For example boost.locale was broken in trunk for some period due to API changes. >> >> >> Long story short I can tell you a long story about Asio (I use it on dayly > basis) >> and it is good library but it was hard decision and correct one, small >> problems list: fork, detach native socket, stream-socket for TCP!=UNIX >> ones, loooooooooooooooooooooooooooong compilation times and more. >> >> >>> Could you please explain what is the benefit in faking boost >> >> It is not faking. It is taking good interfaces and exposing >> them. Booster does not replace boost and not intended to. >> >> But it allows me to create ABI and ABI stable applications which >> is impossible to do with Boost > > Ok, I partially agree. But it might be possible to introduce a generic > interface? > Ok, compilation times will get longer, but I can personally > live with it. On the other hand, users are free than which lib should > be used. They can use a cppcms helper lib or boost. > No, because if I use boost under the hood user will still have ABI incompatibilities. For example I use some boost code under hidden cppcms_boost namespace (boost with renamed namespace) but it is not exposed and I have to use alternative namespace Even if boost is not in interface you will have ABI problems if somebody accidentally uses for example boost.1.46.1 instead of boost.1.46 that cppcms is compiled with... Also entire point of ABI stability fails. >> No, you can't because Booster!=Boost. Booster is "fat-free" > version >> of some boost interfaces, it is much smaller and you can use them both. > > Sorry I typed to fast. The sentence should be "I can see some benefit > for boostER in embedded world,..." > > How portable are booster interfaces??? What if I decide to use really > strange compiler with a great hardware intended to run my site > infrastructure really efficiently. I known that boost does not provide > the insurance as well, but is there a guarantee, that boost is going > to support at least the same majority of compilers that boost > supports? > http://cppcms.com/files/nightly-build-report.html And Boost? Boost is not as portable as you may think. For example boost.thread does not work on SunStudio... for a loooong time. Booster is portable if there some problems report or send patches. In these terms I don't think there is a big difference between boost and booster +/- some CppCMS works with gcc>=3.4, MSVC >= 2005 clang >= 2.9 SunStudio >=5.11 and Intel 11 So if you want to tell me that boost is more portable? I'm not so sure. Most of boost libraries support only recent compilers, many do not support gcc 3.4 >> libpcre and zlib are the basic libraries available anywhere. >> I'm boost developer and I know how crappy >> it is to "cross-compile" and to do _anything_ with Boost.Build >> system... > Actually, boost cross-compilation worked like a charm, because it is > self-contained. Once I defined the user.jam everything worked. But > after starting to deal with cppcms, I had one error after another with > the requirement: to introduce more and more C libs into the > cross-compilation toolset and finally after some download sessions and > compilations I got cppcms. > Boost is not self contained and can't be. Boost.Locale uses ICU Boost.Iostreams uses zlib. More than that the 3rd part library detection of Boost is total crap in comparison to CMake (I know it...) The only difference between "booster" and "boost" in "cppcms" context would be is PCRE and it is not a big deal to compile it (if it is not already done for you) >> I'll add few things. The greatest thing about boost and the most >> horrible thing about it is that it is cutting edge library. >> >> I have a great experience of having code broken between different >> releases of Boost. If you do not limit you project to very narrow >> range of Boost libraries and always synchronize yourself >> with the latest version you will soon discover that it is >> >> impossible to upgrade. > Mhh... I use boost since 2004 and as I counted more than 50 libs are > used in the project, we never had these problems. On the other hand, I > don't understand your statement, since boost features Unit Tests. Are > those broken than? And I had problems to upgrade from 1.38 to 1.42 of a small project that used shared_ptr becuase they broken an interface with auto_ptr. I had to do version dependent compilation in days back to cppcms - 0 that used boost to use boost.thread with both 1.33.1 and 1.35 Boost.Locale was broken in Boost trunk (!) because "header-only" part of boost.thread started requiring boost.system I can count much more and it was in 1 minute I thought. > > Thanks for your great answers, > Ovanes > Regards, Artyom Beilis |
From: <ele...@ex...> - 2012-06-14 23:11:26
|
> I guess you are trying to get a coloumn by its name? Try to get it via > its position instead. As I posted some times ago, never use SELECT * ! > If you do so, you can define the order of the coloums and get them via > the position. Also it's faster. > For you problem: Yes I know however my app generates tables and while the column order is usually preserved it's not always the case. The other problem was some tables have a lot of columns > 20. Accessing them by index sbecomes a pain especially when its still under development and things change. Petr |
From: <ele...@ex...> - 2012-06-14 13:59:19
|
> I've looked through the form.h header into widgets::numeric::load > > and found this: > > ss.imbue(context.locale()); > ss>>value_; > if(ss.fail() || !ss.eof()) > valid(false); > else > set(true); > Sorry for the repeat emails, I pressed space key several times without realizing that the focus was set on the "send" button and ive been working for 14 hours today. Question is, is it proper to set a validation flag without to running form::validate()? What I have is a numeric<int> widget which can either take an int or a date. Ive overloaded form::load to calculate days from a given date. Petr |
From: <ele...@ex...> - 2012-06-14 13:54:03
|
I've looked through the form.h header into widgets::numeric::load and found this: ss.imbue(context.locale()); ss>>value_; if(ss.fail() || !ss.eof()) valid(false); else set(true); |
From: <ele...@ex...> - 2012-06-14 13:54:00
|
I've looked through the form.h header into widgets::numeric::load and found this: ss.imbue(context.locale()); ss>>value_; if(ss.fail() || !ss.eof()) valid(false); else set(true); |
From: <ele...@ex...> - 2012-06-14 13:53:58
|
I've looked through the form.h header into widgets::numeric::load and found this: ss.imbue(context.locale()); ss>>value_; if(ss.fail() || !ss.eof()) valid(false); else set(true); |
From: <ele...@ex...> - 2012-06-14 13:40:49
|
Hi, Example: form.load(context()); form.days.value(4); form.validate(); days is set to validate low(0) but form.validate() still fails as if days was never set to 4. Is this expected if so why? Thanks, Petr |
From: Artyom B. <art...@ya...> - 2012-06-14 05:04:50
|
>________________________________ > From: sergey lavrov <ccp...@gm...> >To: cpp...@li... >Sent: Wednesday, June 13, 2012 7:46 PM >Subject: [Cppcms-users] dispatcher().assign() and more then e4 parameters > > >Hello All! > > >In my application I need more then 4 parameters in dispatcher().assign() function but there are only 4. >How can I get values of 5, 6, 7 regexp matches in assign function (controller)? > > >Thanks in advance. > It is not supported currently. You may open a feature request to implement it in CppCMS 1.1 Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Marcel H. <ke...@co...> - 2012-06-13 22:07:29
|
Am 13.06.2012 18:46, schrieb sergey lavrov: > Hello All! > > In my application I need more then 4 parameters > in dispatcher().assign() function but there are only 4. > How can I get values of 5, 6, 7 regexp matches in assign function > (controller)? > > Thanks in advance. > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users I think you do something really wrong. If you really need more than 4 paramters to handle you really should ask yourself why. Again, if you really need them, try to avoid it. You may can do a regex first and then concat and seperate them via an sign, like ; (csv) and then assign them. As I said before. Rethink you design! Regards |
From: Marcel H. <ke...@co...> - 2012-06-13 22:01:20
|
Am 10.06.2012 13:36, schrieb Manveru: > Hello, > > I've just build wikipp from svn trunk and it runs. I set up the > internal web server for testing purpose. But after that Firefox > complains about bad redirections. So, I tested what happen if I > manually entered HTTP requests and the server always return 302. > > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > GET /wikipp/en/page/main HTTP/1.1 > Host: localhost > > HTTP/1.0 302 Found > Server: CppCMS-Embedded/1.1.0 > Connection: close > Content-Type: text/html; charset=utf-8 > Location: /wikipp/en/page/main > Status: 302 Found > X-Powered-By: CppCMS/1.1.0 > > Connection closed by foreign host. > > What shall I check to get it working? The log of the wikipp contains > no errors: > > 2012-06-10 13:24:20; cppcms_http, info: GET /wikipp/en/page/main > (http_api.cpp:251) > 2012-06-10 13:24:20; cppcms_http, info: GET /wikipp/en/page/main > (http_api.cpp:251) > 2012-06-10 13:24:20; cppcms_http, info: GET /wikipp/en/page/main > (http_api.cpp:251) > 2012-06-10 13:24:20; cppcms_http, info: GET /wikipp/en/page/main > (http_api.cpp:251) > > Whole log contains similar entries. I had once working wikipp, but > based on old version of cppcms. > > Thanks in advance for any advice. > -- > Manveru > jabber: ma...@ma... <mailto:ma...@ma...> > gg: 1624001 > http://www.manveru.pl > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users try to activate the logging feature and see again. http://cppcms.com/wikipp/en/page/cppcms_1x_config#logging |
From: Marcel H. <ke...@co...> - 2012-06-13 21:55:51
|
Am 09.06.2012 12:31, schrieb sergey lavrov: > Hello All! > > I need to get previous url in controller. How can i get it? > > Thanks in advance. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users What do you mean by previous url? E.g. example.com -> click on a hyperlink, go to example.com/test and then you want the example.com page? If you have to use this, you should rethink your design. If you are absolutly sure you need this, you either can do http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z14 or define a form in your webpage and set a parameter the previous url. Regards |
From: Marcel H. <ke...@co...> - 2012-06-13 21:51:29
|
Am 07.06.2012 05:41, schrieb ele...@ex...: > Hi Artyom, > > Im referring to this error message: > > cppdb::invalid_column attempt access to invalid column > > Without specifying the wrong column name in the error, how can you tell > whats wrong? > > Petr > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users I guess you are trying to get a coloumn by its name? Try to get it via its position instead. As I posted some times ago, never use SELECT * ! If you do so, you can define the order of the coloums and get them via the position. Also it's faster. For you problem: either make a solution on your own and then commit as a patch or make a feature request tracker. Regards |
From: sergey l. <ccp...@gm...> - 2012-06-13 16:47:00
|
Hello All! In my application I need more then 4 parameters in dispatcher().assign() function but there are only 4. How can I get values of 5, 6, 7 regexp matches in assign function (controller)? Thanks in advance. |