Posts

java - Report design not valid. Field not found Jasper Reports -

im trying create basic jasper report jrbeancollectiondatasource . in there im having list of objects inside javabean. public class course { private int id; private list<student> students; } student object looks like public class student { private string name; private int id; } i want print student information inside report. how jrxml looks like <subdataset name="dataset1" uuid="09015d96-ad5a-4fed-aa9e-19d25e02e205"> <field name="students" class="java.util.list"> <fielddescription><![cdata[students]]></fielddescription> </field> </subdataset> <field name="id" class="java.lang.integer"/> <field name="students" class="java.util.list"/> <field name="name" class="java.lang.string"/> <componentelement> <reportelement x="200" y="0" width="400...

ASP.NET MVC not show ckeditor -

there 1 layout page , 1 page using layout page. in create page there 1 textarea id= editor1 . in js , css load successful. ckeditor not show, blank textarea the output: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>sb admin 2 - bootstrap admin theme</title> <!-- bootstrap core css --> <link href="/css/bootstrap.css" rel="stylesheet"> <link href="/css/font-awesome.css" rel="stylesheet"> <link href="/css/sb-admin-2.css" rel="stylesheet"> <link href="/css/jquery-ui.css" rel="stylesheet" /> <script s...

javascript - How to make nodejs to talk with golang -

i creating web app in node.js , golang. need connect nodejs golang code talks mongodb , returns data node program. there way connect so? tried use gonode api.this code using gonode api. my node.js file contains below code: var go = require('gonode').go; var options = { path : 'gofile.go', initatonce : true, } var go = new go(options,function(err){ if(err) throw err; go.execute({commandtext: 'hello world gonode!'}, function(result, response) { if(result.ok) { console.log('go responded: ' + response.responsetext); } }); go.close(); }); ` and code in gofile.go file: package main import( gonode "github.com/jgranstrom/gonodepkg" json "github.com/jgranstrom/go-simplejson" ) func main(){ gonode.start(process) } func process(cmd *json.json) (response *json.json) { response, m := json.makemap() if(cmd.get("commandtext").muststring() == "hello") { ...

android - Reload the Fragment is not Working -

i have following situation: navigationdrawer creates fragment handle user information. fragment on oncreateview() calls web service , return view. when web services finishes callsback fragment detach , attach itself. when fragment attached second time on oncreateview() should create view user information. in fact happening view not change. what missing? thank in advance, fragment code: private boolean misrefresh = false; @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // gets application context mcontext = getactivity().getapplicationcontext(); // set environment use database mglobal = (global) getactivity().getapplicationcontext(); mdaofactory = mglobal.getdaofactory(); mfragment = this; mfragmentview = inflater.inflate(r.layout.fragment_user_info, container, false); buildview(); if (misrefresh) { return mfragmentview; }else { ...

c++ - Does C++11 guarantee memory ordering between a release fence and a consume operation? -

consider following code: struct payload { std::atomic< int > value; }; std::atomic< payload* > pointer( nullptr ); void thread_a() { payload* p = new payload(); p->value.store( 10, std::memory_order_relaxed ); std::atomic_thread_fence( std::memory_order_release ); pointer.store( p, std::memory_order_relaxed ); } void thread_b() { payload* p = pointer.load( std::memory_order_consume ); if ( p ) { printf( "%d\n", p->value.load( std::memory_order_relaxed ) ); } } does c++ make guarantees interaction of fence in thread consume operation in thread b? i know in example case can replace fence + atomic store store-release , have work. question particular case using fence. reading standard text can find clauses interaction of release fence acquire fence, , of release fence acquire operation, nothing interaction of release fence , consume operation. replacing consume acquire make code standards-compliant, t...

javascript - Create proxy according URL path -

i need create proxy according url coming browser, since new topic im not sure how test it...:( need way test , see working use following code blog http://blog.nodejitsu.com/node-http-proxy-1dot0/ var httpproxy = require('http-proxy') var proxy = httpproxy.createproxy(); var options = { 'foo.com': 'http://website.com:8001', 'bar.com': 'http://website2.com:8002' } require('http').createserver(function(req, res) { proxy.web(req, res, { target: options[req.headers.host] }); }).listen(8000); what need when put in browser localhost:8000 route(proxy) new server diffrent path described in options. if want user typing foo.com go http://website.com:8001 need setup virtual host foo.com example nginx. nginx host virtual host foo.com , bar.com, "proxy pass" node.js app. when user go foo.com nginx server pass request node app proxy request relative url setup in options. if need can give ngi...

c++ - Could not convert from <brace-enclosed initializer list> to int(*) array -

i new c++, , error keep getting. #include <iostream> #include <string> using namespace std; void print (int test[2][2]= {{1,2},{3,4}}) { cout << test[0][0] << endl; cout << test[1][0] << endl; } int main() { print(); return 0; } the error is: not convert '{{1, 2}, {3, 4}}' '' 'int (*)[2]'| i beginner in c++ , still learning. function parameters declared arrays adjusted implicitly pointers first elements. so function declaration looks like void print ( int ( *test )[2] = { { 1, 2 }, { 3, 4 } } ); and pointer may not initialized such way because scalar object. in fact these function declarations void print( int test[10][2] ); void print( int test[2][2] ); void print( int test[][2] ); void print( int ( *test )[2] ); are equivalent , declare same 1 function. however define parameter reference array. in case expected result. example #include <iostream> void print ( const ...