Posts

Copy Paste in Bash on Ubuntu on Windows -

how execute copy paste operation windows 10 bash on ubuntu on windows environment? i tried following: ctrl + shift + v right click paste any suggestions? another solution enable "quickedit mode" , can paste right-clicking in terminal. to enable quickedit mode, right-click on toolbar (or click on icon in upper left corner), select properties, , in the options tab, click checkbox next quickedit mode. with mode enabled, can copy text in terminal clicking , dragging. once selection made, can press enter or right-click copy.

java - JUnit Test Cases for Config -

i have javaconfig file looks this: @configuration public class serviceconfig { @autowired foobean somebean; @bean @scope(value="session", proxymode = scopedproxymode.target_class) public fooservice fooservice() { return new fooserviceimpl(somebean, foob()); } private foo foob() { return new foob(); } } and have created junit test file based on this stack answer : @runwith(springjunit4classrunner.class) @contextconfiguration(classes = serviceconfig.class) public class serviceconfigtest { } but have couple questions: should test config files 1 junit test file? have 4 config files in total including serviceconfig file, in contextconfiguration should list them out or have junit test each 1 indivually? what supposed test here? tried reading spring guide i'm not understand behavior should test here....just if gets autowired successfully? should test config files 1 junit test file? have 4 confi...

javascript - socket.io 404 cant connect with socket.io server -

i have webrtc / socket.io / nodejs running on server, works fine when go https://domain.com:8080 test video conference. but want script run in webserver /public_html/ but dont know why not connecting 8080 server. "socket.io.js https://domain.com/socket.io/?eio=3&transport=polling&t=lpgzs2k 404 (not found)" my server (server.js) // load required modules var https = require("https"); // http server core module var express = require("express"); // web framework external module var servestatic = require('serve-static'); // serve static files var socketio = require("socket.io"); // web socket external module var easyrtc = require("../"); const fs = require('fs'); // easyrtc external module const options = { key: fs.readfilesync('key.pem'), cert: fs.readfilesync('cert.pem') }; // set process name process.title = "node-easyrtc"...

matlab - Why gpu slower than cpu? -

i have gpu >> d = gpudevice d = cudadevice properties: name: 'geforce 800m' index: 1 computecapability: '2.1' supportsdouble: 1 driverversion: 6 toolkitversion: 5 maxthreadsperblock: 1024 maxshmemperblock: 49152 maxthreadblocksize: [1024 1024 64] maxgridsize: [65535 65535 65535] simdwidth: 32 totalmemory: 2.1475e+09 freememory: 1.9886e+09 multiprocessorcount: 1 clockratekhz: 1475000 computemode: 'default' gpuoverlapstransfers: 1 kernelexecutiontimeout: 1 canmaphostmemory: 1 devicesupported: 1 deviceselected: 1` i try use gpu in neuralnetwork train, gpu slower cpu. if try use gpuarray, gpu faster cpu, haven't speed acceleration in neural network training. example >> a1 = rand(1000); b1 = rand(1000); tic; c1 = a1 * b1; toc; elapsed time 0.044095 seconds. >...

Perl- searching for values in one file which could be present in another -

i have file following list of products mentioned : dl750-12d1 dl750-12d2 dl750-12d3 dl750-12d4 dl750-12d5 dl750-12d6 dl750-12d9 dl750-12d11 i have file contains list of json objects follows: { "type": "dl750-12d5", "productlevelsimcheck": false, "hwcompatibilitycheck": true, "fwversioncheck": true, "configcheck": true, "createdat": "2016-07-23t04:00:00.000z", "active": true, "imeirequired": true, "hwcompatibility": "01 01 01 01 01 00 00 00", "fwversion": "d6.57", "config": "tmc02", "generation": "gen 2", "modifiedby": "chanakyav", "updatedat": "2016-07-28t17:42:48.249z", "id": "5794182ba6832e7056349c76" } how 1 search if list of products listed ...

python - How does asyncio's event loop know when an awaitable resource is ready? -

i'm learning python asyncio asynchronous programing. know event loop watch on future objects until ready , resumes appropriate coroutines continue execution in point await keyword occurred. this understandable when use asyncio.sleep because sleeping function knows how many time take , know event loop what happens relies on networking ( example) waiting time unknown? . how event loop know when resource ready or how many time take gather data source? how event loop know when resource ready or how many time take gather data source? the default event loop (based on selectoreventloop ) uses selector module keep track of resources monitor , notified when new data ready. baseselector.select where magic happens .

javascript - MEAN Stack App Structure -

i used express-generator npm create boilerplate mean stack app , worked didn't understand purpose of few files. for example: the package.json contained following code: "script":{"start": "node ./bin/www"} the app contained folder called bin contained file called www contained code below: #!/usr/bin/env node /** * module dependencies. */ var app = require('../app'); var debug = require('debug')('myapp:server'); var http = require('http'); var port = normalizeport(process.env.port || '3000'); app.set('port', port); var server = http.createserver(app); server.listen(port); server.on('error', onerror); server.on('listening', onlistening); function normalizeport(val) { var port = parseint(val, 10); if (isnan(port)) { // named pipe return val; } if (port >= 0) { // port number return port; }...