Posts

Showing posts from February, 2013

how to add a widget which has two spinner items and put in a single dialog in android -

Image
i trying design confirmation dialog has 2 lists (scrollable). 1 part shows numbers of foot , shows inches values. should in single dialog shown in image below. suggestions appreciated. i achieved ui using following code mycustomwidget.xml <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <textview android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="0.5" android:text="@string/txtheight" android:id="@+id/tvheight" /> <edittext android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.50" android:id="@+id/edittext_height" android:hint="select height" android:paddingbottom="8dp"

c# - Why doesn't row command properly work? -

i have download function getting called in rowcommand of gridview. works when click stops working if click(call) function in rowcommand. doesn't throw exception. tried debugging every step no luck. why ? download function: public void downloadfile(string filename) { try { string filepath = filename; string fullfilepath = server.mappath("../../siteimages/bpa/" + filepath); response.clear(); response.clearheaders(); response.clearcontent(); response.addheader("content-disposition", "attachment; filename=\"" + path.getfilename(fullfilepath) + "\""); response.contenttype = contenttype; response.transmitfile(fullfilepath); } rowcommand: protected void grdviewuploadedmaterialother_rowcommand(object sender, gridviewcommandeventargs e) { try { if (e.commandname == "download") { mdlimgpreview.hide();

php - phpredis function mSet with ttl -

i'm using memcached, i'm trying move mechanism redis. my goal save entire array (key => value) every 1000 iterations. old solution: <?php $data = array( 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' ); $memcached->setmulti($data, time()+864000); new solution: <?php $data = array( 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3' ); $redis->mset($data); the operation of these scripts identical. as can see, redis can not set expire date when i'm using multi (mset function). any solution? mset doesn't support ex , px options available set . have 2 options depending on needs: if need atomic, use either transactions or lua scripting . example transactions (from redis-cli ) this: > multi ok > set key1 value1 ex 10 queued > set key2 value2 ex 10 que

gruntjs - Calling a function defined outside of the Javascript library -

i working on video.js library. trying modify it, uses custom player instead of html5 player. replaced function calls play() etc calls custom player(say custfunc1() ). these calls defined in separate javascript file: custplayer.js . so in index.html file, first include custplayer.js file , built video.js file. however problem while building video.js package using grunt, error custfunc1 not defined , grunt not able create video.js library. now able find out colleague adding /* global custfunc1 */ @ beginning of particular file in video.js package calling custfunc1 resolves issue. grunt build succeeds , works fine. so want know is: how resolve issue, since comment in javascript, how treat differently , understand indicating function definition present outside library? is word global sort of keyword in javascript? are there other ways of achieving apart mentioned? on different note, wanted ask if grunt rough equivalent of make ? your javascript be

html - Scrollable content inside a fixed element with max-height -

i'm trying implement scrollable popup has header, body , footer. it has fixed positioning parent has max-height depending on screen, , both header , footer absolute positioned on top , bottom respectively. what i'm trying achieve make body scrollable on max-height reaching, using css . i've tried far: <div class="popup"> <div class="popup-header">header</div> <div class="popup-body">body</div> <div class="popup-footer">footer</div> </div> style: .popup { position: fixed; top: 10%; left: 0; margin-left: 10%; width: 80%; max-height: 80%; } .popup-header { position: absolute; top: 0; left: 0; width: 100%; height: 40px; background: #eee; } .popup-body { margin-top: 40px; margin-bottom: 40px; overflow-y: scroll; max-height: 100%; } .popup-footer { position: absolute; bottom: 0; left: 0; width: 100%; height: 40px; }

json - Data-Driven Testing in Protractor -

i new protractor. can please guide me data driven testing using protractor. below code, config file , testdata.json file. 'use strict'; var testdata = require('../example/test data/test.json'); describe('loginpage', function() { var logindata = require('../example/test data/test.json'); testdata.foreach(function (data) { it("data.description", function (data) { browser.get("http://127.0.0.1:8080/#/login"); element(by.model("username")).sendkeys(data.username); element(by.model("password")).sendkeys(data.passwordfield); element(by.buttontext("authenticate")).click(); }); }); }); config file: // example configuration file. exports.config = { directconnect: true, //seleniumaddress: 'http://localhost:4444/wd/hub', // capabilities passed webdriver instance. capabilities: { 'browsername': 'chrome' }, // framework use. jasmine recommended. framework: 

codenameone - EOFException when reading file from storage (cn1) -

i have made externalizable object - user. works fine when writing , reading storage except if exit app , reopen it. error occurs: java.io.eofexception @ java.io.datainputstream.readfully(datainputstream.java:197) @ java.io.datainputstream.readutf(datainputstream.java:609) @ java.io.datainputstream.readutf(datainputstream.java:564) @ com.codename1.io.util.readutf(util.java:962) i have registered class follows in statemachine: @override protected void initvars(resources res) { util.register("user", user.class); } this class: package userclasses; import com.codename1.io.externalizable; import com.codename1.io.util; import java.io.datainputstream; import java.io.dataoutputstream; import java.io.ioexception; import java.util.date; /** * * */ public class user implements externalizable { private static final int version = 1; public int userid; public string username; public string password; public string f

elasticsearch - Program to generate sample log to feed to logstash? -

i have written small java program generates dummy logs (writes stuff txt file basically). want feed data elk stack. logstash should read data txt file , want visualize these changes on kibana, feel of it. what want change speed @ program writes dummy logs txt file can see changes on kibana. i have started exploring elk stack , might wrong way kind of analysis. please suggest if there other better ways (considering don't have actual logs work right now) edit : @val input { generator { message => “’83.149.9.216 - - [17/may/2015:10:05:03 +0000] "get /presentations/logstash-monitorama-2013/images/kibana-search.png http/1.1" 200 203023 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "mozilla/5.0 (macintosh; intel mac os x 10_9_1) applewebkit/537.36 (khtml, gecko) chrome/32.0.1700.77 safari/537.36”” count => 10 } } so here logstash.conf : input { stdin { } } filter { grok { match => {

angular - Can't install angular2-datatable in VS2015 project with npm -

i'm developing angular 2 web app asp.net 5. want install angular2-datatable npm create table. i've added following dependency package.json file: "angular2-datatable": "^0.4.2" after save file dependency doesn't installed. on opposite following result: path=c:\program files\nodejs;%path%;.\node_modules\.bin;c:\program files (x86)\microsoft visual studio 14.0\web\external;c:\program files (x86)\microsoft visual studio 14.0\web\external\git "c:\program files\nodejs\npm.cmd" install > angular2-datatable@0.4.2 postinstall c:\hmr9sw\rwd\src\rwd\node_modules\angular2-datatable > cd src && typings install undefined:1 { ^ syntaxerror: unexpected token in json @ position 0 @ object.parse (native) @ exports.parse (c:\users\admin\appdata\roaming\npm\node_modules\typings\node_modules\rc\lib\utils.js:15:17) @ addconfigfile (c:\users\admin\appdata\roaming\npm\node_modules\typings\node_modules\rc\index.js:31:20) @ modul

alchemyapi - Alchemy News API - How to retrieve full text of a article? -

the field "enriched.url.text" returns snippet of article.but documentation says has full text , searchable i'm not able understand clearly. any appreciated the alchemydata news api deprecated ( https://www.ibm.com/watson/developercloud/alchemy-data-news.html ) , in place watson discovery news ( https://www.ibm.com/watson/developercloud/discovery.html ). to migrate watson discovery, ibm has document here: https://www.ibm.com/watson/developercloud/doc/discovery/migrate-adn.html according documentation: "the query structure , structure of data returned different between watson discovery news , alchemydata news. recommended query single result in watson discovery news view how data structured." if you're still working on question, best approach migrate discovery api , run test queries verify full text "enriched.url.text" intended.

symfony - Can't manage to work doctrine-translatable-bundle with symfony2 -

i read documentation , examples @ github, can't figure how make doctrine-translatable-bundle + a2lix translation form work project. this autoload.php <?php use doctrine\common\annotations\annotationregistry; use composer\autoload\classloader; /** * @var classloader $loader */ $loader = require __dir__.'/../vendor/autoload.php'; $loader->add('prezent\\doctrine\\translatable', __dir__ . '/../lib'); annotationregistry::registerloader(array($loader, 'loadclass')); annotationregistry::registerautoloadnamespace('prezent\\doctrine\\translatable\\annotation', __dir__ . '/../lib'); return $loader; my article.php entity <?php namespace appbundle\entity; use doctrine\common\collections\arraycollection; use doctrine\orm\mapping orm; use prezent\doctrine\translatable\annotation prezent; use prezent\doctrine\translatable\entity\abstracttranslatable; /** * @orm\entity * @orm\table(name="articles") */ cla

java - Getting a pom file in my jar created using maven clean package -

i have spring boot application along maven handle dependencies. i creating jar file using maven command "mvn clean package". jar file getting created when see content of jar lib/all-1.1.2.pom in lib folder includes required dependency jars. could please tell possible reason getting since dont have such dependency in pom.xml. if you're using spring boot, in pom.xml , should have : <parent> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-parent</artifactid> <version>1.3.5.release</version> </parent> this parent of spring boot application include dependencies spring boot application. also, suggest see documentation : http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-build-systems.html

linux - Skipping configuration of projects that do not need compiling -

i'm running long build script compiling lot of projects, , builds make returns make: nothing done 'all' , because i'm not changing code on every build. script still takes long time finish, however, because calls autotools configure script each project, , other scripts. i've read somewhere make uses timestamps test if needs build. is there way ask make if needs build or not before calling configure script? or maybe way prevent re-configuring of projects? having configured each project once, not need run each configure script again unless configure scripts change, or have reason believe test results have changed. if necessary, can run config.status instead recreate output files without re-running tests. if can confident output files not need recreated, either, can run make . moreover, if using automake in conjunction autoconf, makefiles built tooling detects when configure 's m4 source, configure.ac , has changed, therefore requiring reco

objective c - Testing without simulator using xctool -

i'm trying run unit tests without simulator using xctool . set 'host application' none in test target's general tab, following directions this comment . when run xctool -project myproject.xcodeproj/ -scheme myproject test error. <unknown>:0: failed: caught "nsinvalidargumentexception", "could not find storyboard named 'main' in bundle nsbundle </applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/ developer/sdks/iphonesimulator9.2.sdk/developer/usr/bin> (loaded)" i made sure main.storyboard member of test target. why happening , how can fix it? figured out, this post helped. my test case set method initialized storyboard this uistoryboard *storyboard = [uistoryboard storyboardwithname:devmainstoryboardname bundle:nil]; problem passing nil bundle parameter, uses main bundle not used in test target -- have specify want use test bundle writing uistoryboard *storyboard = [uistor

SQL Server UPDATE WITH ROWLOCK Doesn't seem to be working -

i have scenario whereby need retrieve int database table, increment 1 return old value. need ensure if stored procedure called again returned value (nextbookingid) not identical value returned first call of stored prodcedure. i've been using code below , assumed working don't think it's been tested until , appears not working, 2 seperate , immediate calls of stored procedure appear returning same value. declare @nextbookingid int update company (rowlock) set @nextbookingid = (nextbookingid), nextbookingid = (nextbookingid + 1) companyid = @companyid select companyid , @nextbookingid nextbookingid company companyid = @companyid should wrapped in transaction? have clustered index on companyid primary key.

android - Phonegap build: How to explicitly ask for permissions? -

i building hybrid app android , ios, , using phonegap build cli-5.2.0 i using camera plugin <plugin name="cordova-plugin-camera" source="npm" spec="2.2.0" /> i have line specified in config.xml <preference name="permissions" value="none"/> <feature name="http://api.phonegap.com/1.0/camera"/> and notice on android device, asks read/write access of usb storage. when using camera take photo, android doesn't ask permission , camera how works. i want know how explicitly require camera permission on android prior app installation? need have because believe causing other bug related video functionality app has. i have tried build without permission none line, did not make difference. the way add config-file element. don't know why hard find. <gap:config-file platform="android" parent="/manifest" mode="add"> <uses-permission android:name=

tabpanel - JavaFX TabPane : Why is the content not refreshed after selecting different tab? -

so working tabpane in javafx first time. after didn't work expected reduced tabpanes content 1 bit @ time until looked this: <scrollpane prefwidth="infinity" prefheight="infinity" fittowidth="true" xmlns:fx="http://javafx.com/fxml" fx:controller="de.cos4u.ui.scene.control.cosplayview"> <vbox alignment="top_left" minwidth="200" prefheight="200" spacing="5"> <tabpane prefheight="infinity" minheight="infinity"> <tabs> <tab text="tab1"> <content> <label text="test"/> </content> </tab> <tab text="tab2"> <content> <label text="tests2"/>

Record not getting deleted from MySQL database -

i added record in table in mysql database, trying delete particular record table, not getting deleted & showing message: #1062 - duplicate entry '3107' key 'primary' how delete entry? you can not error during delete . update or insert can return either not running delete or have trigger on table, making other changes, give error. if child tables have on delete cascade ,check them triggers well.

Issues with SearchVIew in Recycler Android -

Image
i working on on app keeps track of someones expenses, user adds have purchased , keeps track of that, expenses displayed in recyclerview, there comes time when 1 has many items , needs search hence added search functionality working find, because dealing expenses adapter has check box indicate if or not expense has been paid for, when search item , tick have been paid feature works fine exit search mode notice something, item goes original position in list item occupies position modified item inherits paid state, ticked paid well, explanation makes sense, here screen shots demonstrate mean: in first screen shot have normal list search dgdf currently dgdf @ position 1 after search dgdf it takes position 0 in array since have item looking in case dgdf decide mark paid do but here issue exist edit-mode item takes position 0 ticked paid for below code using searching: protected filterresults performfiltering(charsequence constraint) { final filt

java - Capture a photo and display it full size in ImageView in Android -

i trying capture photo , display in imageview. first part done , image saved: public void takephoto (view view) { string basedir = environment.getexternalstoragedirectory().getabsolutepath(); string filename = "myphoto.jpg"; intent intent = new intent(mediastore.action_image_capture); imagefile = new file(basedir + file.separator + filename); uri uri = uri.fromfile(imagefile); intent.putextra(mediastore.extra_output, uri); intent.putextra(mediastore.extra_video_quality, 1); startactivityforresult(intent, 0); } however, cannot image displayed in full size in imageview: protected void onactivityresult(int requestcode, int resultcode, intent data) { if (requestcode == 0) { if(imagefile.exists()) { toast.maketext(this,"file saved!",toast.length_short).show(); imageview myimage = (imageview) findviewbyid(r.id.imageview1);

android - Issue on update data by notifyDataSetChanged in RecyclerView -

i used recycler view show list of data. called web service , data server , update current arraylist server data. how fill data in current arraylist. maluotesdatas.clear(); maluotesdatas = (arraylist<billboarddata>) webservice.data; muotesadaptor.notifydatasetchanged(); and apply notifydatasetchanged() reflect in list of data doesn't reflect list. in maluotesdatas shows updated data doesn't shows updated list of data. after change maluotesdatas.clear(); maluotesdatas.addall(res.data); muotesadaptor.notifydatasetchanged(); this works fine. surprising me, how works??, though both have updated data after web service call. can me understand how can be.? this class. package com.mimran.aphorismus.models; import android.os.bundle; import android.support.v7.widget.recyclerview; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import com.mimran.aphorismus.r; import com.mimran.aphorismus.adapters.quotesadaptor;

sql - Database design: Better to store more columns or use a single column with a dictionary on Backend? -

i'm building web app takes preferences , saves them. the dataset want save consist of unique id, search string , finite list of parameters represented true or false. list of parameters 10 in number. i haven't decided type of database i'm using assuming has rows , columns, more efficient have id, search string , parameters separate columns or more efficient have id, search string , single column representing parameters using sort of dictionary translate on end. for example represent option a, c , d a-c-d in single column , use dictionary on retrieval work in application. or else using cola: true, colb: false, colc: true, cold: true, ..., coln in table , working when pull through would more useful choose sql style db on mongodb in either case? the answer depends. normally, 1 uses relational databases store relational information. mean have separate columns options , values. there traditionally 2 ways of doing this. the common normalized form, each op

objective c - iOS JSON Parsing, array with multiple array -

i have json array multiple object , don't know how grab "url" tag nsarray or nsdictionary , show image url in tableview. can't change json data format.how should this? here json response looks like: { "meta": { "total_count": 10 }, "pages": [ { "id": 7, "meta": { "type": "dashboard.newsevents", "detail_url": "http://suno.to/api/v1/pages/7/" }, "title": "noevent", "created_at": "2016-03-06t10:42:19.646000z", "cover_url": [ [ { "url": "/media/images/maha_shivratri2.original.jpg", "title": "maha shivratri2.jpg" }, { "url": "/media/images/maha_shivratri1.original.jpg",

java - How to compare two classes -

i try create factory, here's code: public class myfactory { public static <t> mybase create(class<t> _c) { if (_c.getclass().equals(derived1.class)) // (1) return createnewderived1(); return null; } } // caller myfactory.create(derived1.class); it compiles warning @ line (1) : error 'equals()' between objects of inconvertible types 'class<derived1>' , 'class<capture of ? extends class>' <br>reports calls .equals() target , argument of incompatible types. while such call might theoretically useful, represents bug. and in runtime if statement fails reason. how can intended behaviour? public class myfactory { public static <t> mybase create(class<t> _c) { return ( _c == derived1.class ) ? createnewderived1() : null; } } // caller myfactory.create(derived1.class); see compare class objects further info. fiy, "real" class obje

symbolic math - Efficiently programming in Maple -

i need tips on efficiently programming in maple (as in computer algebra software). efficient not mean making program/code more efficient (performancewise) rather efficiently working maple codes. ironic, quite spoiled software , tools developed programming in languages such c/c++ e.g. : ide, debuging tools (watches, breakpoints, etc. etc.), compilers , language structure (object orientedness, more flexibility procedures, overloading, passing reference or value etc.). in sense feel more comfortable programming in c/c++ (i use visual studio) or in script languages python (no real debugging feel more in control , discipline working). maple on other hand, 1 of few languages (somehow have similar problems other cas maybe lesser degree) feel not have discipline. tried working text file (most people call .mpl files) , read text file in maple , load text file maple e.g. read("some.mpl") , allows me diff changes when using version control svn or git (the .mws or other maple file

java - Is jdk provided doubly linked list circular? -

is java doubly linked list circular ? it written in java docs. looks likes circular when see linked list source code here relevant code snippet if private entry<e> more ...entry(int index) { ... entry<e> e = header; if (index < (size >> 1)) { ... } else { (int = size; > index; i--) e = e.previous; } return e; } update :- circular mean header previous node should last node seems true here and last node next node should header node going criteria header previous node should last node seems true here and last node next node should header node linked list circular because if see add method implementation internally calls addbefore , entry going insert points header next link , header points last entry inserted previous link

python - Error when accessing element in structured array -

1i using structured array save measurements sensor. array (named "data") of dimension 2000x3 3 fields: "samples", "timestamp" , "labels", samples vector of 6 elements. example, 1 row looks this: ([-19.837763650963275, -19.61692779005053, -18.5301618270122, -13.413484985874076, -13.192649124961326, -12.105883161923], 0.0, 0) [('samples', '<f8', (6,)), ('timestamp', '<f8'), ('labels', '<i4')] if want have samples of 1 row access row this: data["samples"][10] which works fine if turn around , write this: data[10]["samples"] i following error: valueerror: truth value of array more 1 element ambiguous. use a.any() or a.all() does know why happening? edit: better understanding here first 10 rows of "data" array: [ ([-19.837763650963275, -19.61692779005053, -18.5301618270122, -13.413484985874076, -13.192649124961326, -12.105883161923]

javascript - how to display kendo month and year calender in grid and on selection saves the first day of the month -

i have kendo grid have calender column showing mm/dd/yyyy. want change display year , month calender . , on month selection, should save first day of month in database. @{ viewbag.title = "cds contract utilization"; } <h2>@viewbag.title</h2> &nbsp; <div class="grid-scrollable"> @(html.kendo().grid<viewmodels.admin.cdsutilizationviewmodel>() .name("cdsgrid") .columns(columns => { columns.bound(c => c.id).width(150).hidden(true); columns.bound(c => c.transaction_id).width(150).hidden(true); //columns.bound(c => c.contract_id).width(150); //columns.bound(c => c.contractor_id).width(150); //columns.bound(c => c.servicedetail_id).width(150); //columns.foreignkey(p => p.fund, (system.collections.ienumerable)viewdata["fundtype"], "value", "text&q

mysql - SELECT & Calculate SQL but answer wrong -

i want select data mysql. , wanted calculation @ query excution time. had 2 sql tables: loan table : loan_id|customer_name|total_amount 1000 |sashika |55000 1001 |amell |11000 settlement table : sett_id|loan_id|amount a123 |1000 |1000 b123 |1001 |2000 thats how 2 tables like. want due value of loans. used below code generate wont' show correct values. select loan.loan_id,loan.customer_name,loan.total_amount,sum(settlement.amount) 'total received', ((loan.total_amount)-sum(settlement.amount ))as 'total due' loan , settlement loan.loan_id = 1001; this code value of total(column) of settelement table. when try loan id(where loan_id=) amount of total of settlement value show , calculate. isn't value want. please me guys loan_id| customer_name|total_amount|total_received|total_due 1000 |sashika |55000 |1000 |54000 this how want edit question , make more understandable :) y

javascript - Webpack: 'bindings is not defined' -

i'm building application nodejs (server) , reactjs (client).. fine, have problem webpack.. after run webpack have error in browser console: uncaught referenceerror: bindings not defined i've got no idea issue.. ? here webpack config: var extracttextplugin = require('extract-text-webpack-plugin') var webpack = require('webpack') module.exports = { entry: [ 'babel-polyfill', './src/client/index.js' ], devtool: 'source-map', output: { path: './src/static/js/', filename: 'bundle.js' }, module: { loaders: [{ exclude: /node_modules/, loader: 'babel-loader', query: { presets: ['react', 'es2015', 'stage-1'] } }, { test: /\.scss$/, loader: extracttextplugin.extract('css!sass') }, { test: /\.json$/, loader: "json-loader" }], noparse: /lie\.js$|\/leveldown\// },

csv - MySQL load ignores some records -

i have csv file 16.916 records. when load mysql, detects 15.945 records. thats mysql says: records: 15945 deleted: 0 skipped: 0 warnings: 0 can tell why mysql ignores records , how can fix this? i load file using load function this: load data local infile 'germany-filtered.csv' table point_of_interest fields terminated ',' enclosed '"' lines terminated '\n' ignore 1 lines (osm_id,lat,lng,access,addr_housename,addr_housenumber,addr_interpolation,admin_level,aerialway,aeroway,amenity,area,barrier,bicycle,brand,bridge,boundary,building,capital,construction,covered,culvert,cutting,denomination,disused,ele,embankment,foot,generator_source,harbour,highway,historic,horse,intermittent,junction,landuse,layer,leisure,ship_lock,man_made,military,motorcar,name,osm_natural,office,oneway,operator,place,poi,population,power,power_source,public_transport,railway,ref,religion,route,service,shop,sport,surface,toll,tourism,tower_type,tunnel,water,

c# - Veridis Biometric SDK: Get ANSI378 template from fingerprint image file -

i have been fiddling veridis sdk 5.0. need ansi 378 template fingerprint image file. here sample code that. var r = veridislicense.installlicense(mykey, string.empty); var bitmap = bitmap.fromfile(imagepath) bitmap; var sample = new biometricsample(bitmap, 500); var biotemplate = new biometrictemplate(sample, biometrictemplateformat.ansi); var data = biotemplate.getdata(); however, app crashes ntdll heap corruption error after executing installlicense line. if omit that, veridis.biometric.biometricexception "not started (error #-4)" biometrictemplate constructor. can tell me going on here? have same problem while installing license dot net sample comes it. however, demo application inside veridis sdk package not give error while installing license. i believe forgot call static function biometriccapture.startsdk(eventlistener) you need class inherit icapturelistener . new class event listener.

ibm mq - Websphere MQ Client ver 9.0 compatibility with .NET framework -

we using mq client ver 7.5.0.5 (64 bit), want migrate ver 9.0(64 bit). downloaded installer here . with said, ask below: app compiled against ver 7.5.0.5; enable app work ver. 9.0 mq client installation need compiled against 9.0.? mq client ver. 7.5.0.5 works .net framework 4.0. guess mq client ver. 9.0. works .net framework 4.0, right? i searched ibm site, didn't pages explaining above compatibility info. might have not found if pages explaining above. if know, give link? i think asking .net apps, answer expands on that, things c applications, should work. when compile against 7505, build in dependency on 7.5.0.5 version of amqmdnet example. mq ships policy files indicate newer versions or fix packs support functionality of one, , hence should run without change on v9 yes, mq supports .net framework 4 same 7.5.0.5 , should work seamlessly, assuming worked @ 7.5 as example ran 7.5 simpleput.exe sample against v9 primary install , worked. (although looks

javascript - How to do unit test in dependent modules (node.js)? -

i have application 2 modules (book , user). book model looks this: var mongoose = require('mongoose'), schema = mongoose.schema; var bookmodel = new schema({ name: string, author: string, description: string, _user: {type: schema.types.objectid, ref: 'user'} }); module.exports = mongoose.model('book', bookmodel); and user model: var mongoose = require('mongoose'), bcrypt = require('bcryptjs'), schema = mongoose.schema; var usermodel = new schema({ name: string, username: string, password: string, }); module.exports = mongoose.model('user', usermodel); i want unit test in post method (inserting book in db) condition of not allowing empty name. have in post method: var post = function (req, res) { var booknew = new book(req.body); // paylod user's token var payload = tokenmanager.getpayload(req.headers); if (req.body._user) delete req.body._user; if (!req

java - Trying to run code in IOKE shell results in error? -

when try execute code in ioke shell crashes. >ioke iik> "hello world" println exception in thread "main" java.lang.nullpointerexception @ ioke.lang.iokeio$2.activate(iokeio.java:129) @ ioke.lang.typecheckingnativemethod.activate(typecheckingnativemethod.java:50) @ ioke.lang.iokeobject.activate(iokeobject.java:1053) @ ioke.lang.iokeobject.getoractivate(iokeobject.java:1038) @ ioke.lang.iokeobject.getoractivate(iokeobject.java:514) @ ioke.lang.iokeobject.perform(iokeobject.java:659) @ ioke.lang.iokeobject.perform(iokeobject.java:592) @ ioke.lang.iokeobject.perform(iokeobject.java:522) @ ioke.lang.message.sendto(message.java:999) @ ioke.lang.message.evaluatecompletewithoutexplicitreceiver(message.java:1145) @ ioke.lang.message.getevaluatedargument(message.java:979) @ ioke.lang.message.getevaluatedargument(message.