Posts

android - Cloning an object in java: org.objenesis.ObjenesisException: java.lang.NoSuchMethodException: newInstance [class java.lang.Class, int] -

i using espresso test application. i using library uk.com.robust-it:cloning ( java deep cloning library ) version 1.9.2 clone object. if using application, have no exception, when tests running, have following exception: org.objenesis.objenesisexception: java.lang.nosuchmethodexception: newinstance [class java.lang.class, int] @ org.objenesis.instantiator.android.androidinstantiator.getnewinstancemethod(androidinstantiator.java:62) @ org.objenesis.instantiator.android.androidinstantiator.<init>(androidinstantiator.java:38) @ org.objenesis.strategy.stdinstantiatorstrategy.newinstantiatorof(stdinstantiatorstrategy.java:75) @ org.objenesis.objenesisbase.getinstantiatorof(objenesisbase.java:90) @ org.objenesis.objenesisbase.newinstance(objenesisbase.java:73) @ com.rits.cloning.objenesisinstantiationstrategy.newinstance(objenesisinstantiationstrategy.java:18) @ com.rits.cloning.cloner.new...

php - Laravel 5 phpunit is not running tests -

i'm been @ days no success. running laravel 5.1 . understand according laravel doc. an exampletest.php file provided in tests directory. after installing new laravel application, run phpunit on command line run tests. ok after running phpunit found not globally installed , located in vendor/bin/phpunit . proceeding run vendor/bin/phpunit gives me screen command options phpunit. not run tests. i searched more , came across post mentioned symlink issue. followed instructions in post no success. memory installed laravel composer symlink should not issue anyway. these instructions involved deleting various files. did notice composer pulling files cache when updating. cleared cache , followed process again. still no success. what tests not running? i'm @ wits end. since supposed run out box. you need install phpunit globally: composer global require phpunit/phpunit then can run phpunit project root.

node.js - ReferenceError: webpack is not defined -

in webpack app have basic build process that's triggered "npm run build" executes webpack binary , copies index.html in /app /dist. whenever run npm run build referenceerror: webpack not defined when run npm start , starts webpack-dev-server, everything's fine. this webpack config file: var extracttextplugin = require('extract-text-webpack-plugin'); var config = { context: __dirname + '/app', entry: './index.js', output: { path: __dirname + '/app', filename: 'app.js' }, module: { loaders: [ { test: /\.js$/, loader: 'babel', exclude: /node_modules/ }, { test: /\.html$/, loader: 'raw', exclude: /node_modules/ }, { test: /\.scss$/, loader: extracttextplugin.extract('style', 'css!sass'), exclude: /node_modules/} ] }, plugins: [ new extracttextplugin('app.css') ] }; if (proces...

r - Include all factor combinations in contingency table to create square probability table/matrix -

i trying create 9 x 9 probability matrix contingency / frequency table. it contains frequencies pair of values (x1,x2) transitioning pair of values (y1,y2) . x1 , y1 have values of a , b , or c , , x2 , y2 have value of d , e , or f . transitions between xy pairs not exist. however, have these 'missing' transitions present zeros table / matrix make square (9x9) use in other analyses. df <- structure(list(x1 = structure(c(1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l), .label = c("a", "b", "c"), class = "factor"), y1 = structure(c(1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l, 1l, 2l, 3l), .label = c("a", "b", "c"), class = "factor"), x2 = structure(c(1l,2l, 3l, 1l, 1l, 1l, 2l, 2l, 2l, 2l, 3l, 1l), .label = c("d", "e", "f"), class = "factor"), ...

jquery - IE inputs without borders -

Image
so, i've been trying fix terrible bug in internet explorer (duh) affecting system, cant think else fix it. i have few inputs in jquery ui dialog, , reason being displayed without borders! borders appears after move cursor through them. dont have keep hover , neither keep input focused: passing cursor enough borders rendered. the inputs correctly displayed in chrome , firefox, example, , tried things like: giving input outline in css- result terrible , bug persists; added !important border property in css - no changes; added background-color (for testing only) - still no changes; just acknowledge, there previous bug on modal, in parts of rendered transparent background, making 50% white bg , 50% transparent, example. managed fix adding background-color property modal body , title, in css. any tips? edit: i'm using jquery ui 1.9.2 i figured out has pc, video card drivers. i ran application @ browserstack.com check behaviour in virtual machine,...

TypeError: int() argument must be a string or a number, not 'Popen' Python -

i have these lines using popen numcpu = sub.popen("($(cat /proc/cpuinfo | grep 'physical id' | awk '{print $nf}' | sort | uniq | wc -l))", shell=true, stdout=sub.pipe, stderr=sub.pipe) numcores = sub.popen("($(cat /proc/cpuinfo | grep 'cpu cores' | awk '{print $nf}' | sort | uniq | wc -l))", shell=true, stdout=sub.pipe, stderr=sub.pipe) numsibling = sub.popen("($(cat /proc/cpuinfo | grep 'siblings' | awk '{print $nf}' | sort | uniq | wc -l))", shell=true, stdout=sub.pipe, stderr=sub.pipe) but run traceback error traceback (most recent call last): file "./cputool", line 53, in <module> cputool() file "./cputool", line 45, in cputool numthreads = int(numsibling)/int(numcores) typeerror: int() argument must string or number, not 'popen' on line numthreads = int(numsibling)/int(numcores) i'm new scripting there anyway assign these popen values string or i...

java - how save and perist method works in hibernate -

hello trying understand behavior of save , persist method of hibernate. write simple method , try run transaction , out transaction confused me. @test public void saveorpersist() { person person = new person(); person.setfirstname("naveen"); person.setlastname("kumar"); // 1 session.begintransaction(); session.persist(person); // 2 session.save(person); // 3 session.flush(); // 4 session.gettransaction().commit(); } with method did following things. uncomment line 1, 2 , 4 , comment line above line 2 test behavior of save method. works fine , give me following out on eclipse console. hibernate: select nextval ('hibernate_sequence') hibernate: insert baseentity (createdatetime, description, updatedatetime, firstname, lastname, discriminator, id) values (?, ?, ?, ?, ?, 'p', ?) also check db , 1 more entry inserted person table. second comment line 1 , line 4 again run same...