Posts

Featured post

mysql - C3P0ConnectionProvider error when deploying on JBoss -

i'm attempting connect mysql database via jpa on jboss server. i following exception when deploying project. 13:04:41,035 error [org.jboss.msc.service.fail] (msc service thread 1-1) msc00001: failed start service jboss.persistenceunit."dryrun.war#dbname": org.jboss.msc.service.startexception in service jboss.persistenceunit."dryrun.war#dbname": failed start service @ org.jboss.msc.service.servicecontrollerimpl$starttask.run(servicecontrollerimpl.java:1767) [jboss-msc-1.0.2.ga.jar:1.0.2.ga] @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) [rt.jar:1.7.0_15] @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) [rt.jar:1.7.0_15] @ java.lang.thread.run(thread.java:722) [rt.jar:1.7.0_15] caused by: javax.persistence.persistenceexception: [persistenceunit: dbname] unable build entitymanagerfactory @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:914) @ org.hiber...

.net - how do I obtain or create a .srprofile file when nuget doesn't create it? -

to configure , use many features of specrun (beefed version of specflow, cucumber .net), need sort of .sfprofile file. file " default.sfprofile " supposedly , (i assume) typically created when nuget package installed. did not me. is there way trigger creation of " default.sfprofile "? if not, if create myself? if work, please post initial contents of file should be? thanks! the template file in packages\specrun.specflow.1.2.0\content\default.srprofile.pp copy , replace {...} placeholders values. projectid guid.

c++ - How to test/verify that zero-initialization takes place -

i trying test 0 initialization on virtual machine g++ options -std=c++98, -std=c++03, -std=c++11 unfortunately there not many garbage values , see zeros in place shouldn't be. how force random values can test this? #include <iostream> #include <string> using namespace std; class { public: int a; }; class b { public: b(){} int x; }; int main() { { int tab[50000] = {0}; } a; a* aa = new a; b b; b* bb = new b; cout << a.a << endl; cout << aa->a << endl; cout << b.x << endl; cout << bb->x << endl; return 0; } you not guaranteed see random numbers. c/c++ standard says uninitialized values undefined, cannot values have. 0 ok (maybe virual machine zeros memory before allocating). if need random numbers, generate them using <random>

iphone - sqlite file path created using iOS - UIWebView -

in application using sqlite uiwebview store user preferences , details. moving functionality in native objective-c code, , want preserve defaults when application updated. i thinking of accessing .sqlite file objective-c code , transfer preferences in nsuserdefaults . can .sqlite files created uiwebview , whats default location ? if you're on simulator, db files here: /users/<your-user>/library/application\ support/iphone\ simulator/user/applications/<your-app-id>/library/webkit/databases/file__0/<database-name> on device, try: /var/mobile/applications/<your-app-id>/library/webkit/databases/file__0/<database-name>

React Native allow user to reorder elements in a scrollview list -

i'm trying let user reorder elements in scrollview list long-pressing on 1 of elements. we're trying let user use long press pick element of scrollview list, , put element somewhere else in list. have working using animated view, issue it's difficult integrate scrolling , swipe-to-delete animated view. we're hoping add "pick , reorder" scrollview. is there preferred method accomplishing this? touchablewithoutfeedback has onlongpress method, can implement this: _onlongpress() { // perform sort }, <touchablewithoutfeedback onlongpress={ () => this._onlongpress() }> <text>click , hold call onlongpress</text> </touchablewithoutfeedback> as far sorting, can use type of library such lodash or underscore, plus there ways sort using vanilla javascript. check out this thread. i've set basic project using sort function on listview here . https://rnplay.org/apps/mpbktg 'use strict'; var react = requ...

node.js - Webpack/TypeScript Raising Errors When node_modules is Excluded -

Image
i have following webpack , typescript configs: webpack.config.js module.exports = { entry: { dev: './src/ts/site' }, output: { filename: './com/js/site.js' }, resolve: { extensions: ['', '.ts', '.tsx'] }, module: { loaders: [ // typescript { test: /\.tsx?$/, loader: 'ts-loader' } ] } } tsconfig.json { "compileroptions": { "noimplicitany": true, "module": "commonjs" } } i've simplified project include following dependencies: package.json (partial) "typescript": "^1.7.5", "ts-loader": "^0.7.2", "webpack": "^1.12.9" when run webpack, massive slew of errors: the list goes on many many screen lengths, far i've scrolled every 1 duplicate identifier err...

ruby - Why did I get `main.using is permitted only at toplevel` when I used a Refinement in IRB? -

i tried use refinement in irb (v0.9.6, ruby 2.3.0): module foo refine object def foo() "foo" end end end using foo # => runtimeerror: main.using permitted @ toplevel this the exact setup documentation (which results in same error). what went wrong? how fix this? it's either bug or misfeature of irb. well-known due pretty hackish way irb implemented, not behave correctly corner-cases. the incompatibility knows in ruby, methods defined @ top-level become private instance methods of object , whereas in irb, become public instance methods of object . obvious behavioral difference in irb, require_relative doesn't work, because searches relative current file, in irb, there is no current file. there differences in syntax gets accepted, believe, , local variables , when , aren't defined. so, not inconceivable there might behavioral differences wrt. refinements. in fact, myself have encountered error message, , running exact same c...