Posts

Joomla Custom component with sample form in admin -

i need sample form in administrator having add,edit,delete options manage "success stories" in web app. i searched sample component install. if that, change form according app & table too. please me giving link resource suits requirement. sorry ask this, new joomla. thanks in advance, sunil. take @ joomla component creator: http://www.notwebdesign.com/joomla-component-creator/

c++ - std::stringstream does not name a type (Global) -

i'm doing simulation of few ising models (lattice 1 or -1) , don't want use files (don't gonna details here, guess :d). so, thing is, i'm using stringstreams format data & data's filename separate them bash. show example code #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <sstream> #include <string> using namespace std; void print2bash(string file, string data); int main(int argc, char *argv[]){ int i, j, n = atoi(argv[1]); // want put outside main() { stringstream ssbash; ssbash.clear(); ssbash.str(""); stringstream ssfile; ssfile.clear(); ssfile.str(""); //} // don't have ss.clear , ss.str("") every time before using them ssfile << "this_" << n << "_is_the_filename.dat" << endl; for(i = 0; < n ; i++){ for(j = 0; j < n; j++) s...

xml - Java Xpath query failing on compile -

i have following xml document: <application xmlns="http://www.example.com/schemas/app-config/1.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.example.com/schemas/app-config/1.0 http://www.example.com/schemas/app-config/1.0/app-config-1.0.xsd"> <info name="dummy application" runningon="dev"/> </application> when run following code: xpathfactory factory = xpathfactory.newinstance(); xpath xpath = factory.newxpath(); xpathexpression expr = xpath.compile("/application/info@name"); i xpathexpressionexception on compile method. exception's message " null ". looks i'm correctly using xpath locate name attribute, i'm wondering if xmlns , xsi declarations causing problems here? if not i'm totally clueless , have no idea what's causing exception. one thing - how can compile failing before ever associate xpath instance ac...

authorization - How does a XACML PEP interact with a context? -

my question has role , purpose of xacml context handler. if understand oasis xacml3.0 spec properly, pep intercepts request resource or access client app uses context handler create native xacml context object suitable pdp process. in design, have context handler global class methods create request objects , parse xml results. envision class looking this: public static class contexthandler { public static bool createpolicy(policytype policyname) { // serialize policytype xml document } public static policytype loadpolicy(string policyname) { // 1. load policy db, filesystem... // 2. hydrate/deserialize xacml policy object // 3. return policytype object } public static requesttype buildrequest( dictionary<string, string> subjects, dictionary<string, string> resources, dictionary<string, string> actions, dictionary<string, string> environment) { ...

asp.net mvc 3 - Manage multiple calls of Membership.GetUser().ProviderUserKey; -

i thinking yesterday how solve issue, because give or check user depended of provideruserkey (id). so made 1 static function public static guid getuserid() { string userid = string.empty; if(httpcontext.current.session["userid"] != null) { userid = httpcontext.current.session["userid"].tostring(); } if(!string.isnullorempty(userid)) { return new guid(userid); } userid = membership.getuser().provideruserkey.tostring(); httpcontext.current.session["userid"] = userid; return new guid(userid); } main point of class reduce database connections check/get user id. my problem function not not working, problem if logged user log out , log account? or better add session value on log in , clear session value on log out? where can see other problem kind of "get user id"? if log user out should killing session. when login user have session reinitialized. note you'll wa...

Why do tools like yacc and ANTLR generate source code? -

these tools input grammar , output code processes series of tokens more useful, syntax tree. these tools written in form of library instead? reason generating source code output? there performance gain? more flexible end user? easier implement authors of yacc , antlr? sorry if question vague, i'm curious historical reasons behind decisions authors made, , purpose auto-generated code has in today's environment. there's big performance advantage achieved parser generator working out interactions of grammar rules respect 1 another, , compiling result code. one build interpreters accepted grammars , did parsing; there parser types ( earley ) relatively @ that, , 1 compute grammar interactions @ runtime (earley parsers kind of anyway) rather offline , execute parsing algorithm. but pay parsing performance penalty of 10 100x slowdown, , big storage demand. if parsing using small grammars, or parsing small documents, might not matter. grammars many parser gen...

ruby on rails - Phusion Passenger error with rvm -

i have rails 2 app im upgading rails 3. installed rvm can run both app @ same time. the rails 3 app works fine. when try revive rails 2 app error. processing applicationcontroller#index (for 122.179.134.45 @ 2012-06-04 09:56:46) [get] argumenterror (wrong number of arguments (1 2)): <internal:prelude>:10:in `synchronize' passenger (3.0.12) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request' passenger (3.0.12) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request' passenger (3.0.12) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler' passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application' passenger (3.0.12) lib/phusion_passenger/utils.rb:479:in `safe_fork' passenger (3.0.12) lib/phusion_passenger/class...