Posts

Showing posts from June, 2012

vb.net - Error IdentityNotMappedException was unhandled -

i want create folder accessible owner. i've tried , got code error identitynotmappedexception unhandled . folder create @ server drive , had mapped server drive local drive. dim fs filesystemsecurity = file.getaccesscontrol(q_filepath) fs.addaccessrule(new filesystemaccessrule("owner", filesystemrights.fullcontrol, accesscontroltype.deny)) file.setaccesscontrol(q_filepath, fs)

jquery - Responsive scrolling x&y (horizontal for desktop, vertical for mobile)...how? -

i've been fighting while , it's driving me crazy. i've tried multitude of different custom jquery scollbars support horizontal mousewheel scroll every time try implement switch of scrolling direction ends breaking. for example, greater 960px scroll horizontal content set nowrap. less 960 scroll vertical mobile responsive design. how can , if so, possible have custom scrollbar? with bootstrap can define custom css different resolutions.

emulation - Android emulator "New Hardware Profile" not working -

after recent update on android studio, deleted hardware profile of emulator , new hardware profile not working while creating new emulator :/. when tap "new hardware profile", see nullpointerexception: null on message bar of android studio. can help? created app specific hardware , not being able work on it.

iOS App Store - Wi-Fi download limit -

i have run weird issue while submitting app update on itunes connect: when submitted app got email ipa may on 100mb limit after it's released in app store. i went on build properties under testflight -> ios builds ->choose build number -> build details -> app store file sizes. shows list of ipad devices , app store sizes. in of ipa size under 100mb, aside column called "universal" , ipa on 100mb. does know means? my app not universal, supports ipads, mean it's under limit?

ERROR: in JAVA STAND ALONE: SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message -

below java stand alone class soap client. using keystore also. getting severe: saaj0537: invalid content-type. error message instead of soap message exception, tried hard, not able figure out. have attached los below, code: public class soapclient { public static void main(string args[]) throws exception { string keystore = "xxxx/keystore_s1_ariba_uat.jks"; system.getproperties().setproperty("javax.net.ssl.keystore",keystore); system.getproperties().setproperty("javax.net.ssl.keystorepassword","xxxx"); system.getproperties().setproperty("javax.net.ssl.truststore", keystore); system.getproperties().setproperty("http.proxyhost", "web-proxy.xxxx.xxxx.net"); system.getproperties().setproperty("https.proxyhost", "web-proxy.xxxx.xxxx.net"); system.getproperties().setproperty("http.proxyport", "8080"); ...

node.js - How to call a function each 2 min while webserver is running? -

my problem call function every 2 minutes while webserver running. server starts this: app.listen(1309, function(){ console.log("server listening"); dosomething(); }); and function dosomething() var dosomething = function(){ while(true) { sleep.sleep(10); console.log("hello"); //the original function called here code works :p } }; so yes function prints every 10 seconds (10 sec 'cause testcase, don't want wait 2 min atm) after starting webserver can't receive requests. (tested console.log) i tried without function , receives them. guess while loop blocks rest of sever. how can call function every 2 minutes (or 10 sec) while server running , without missen requests ? you need use setinteval function: const 2mins = 2 * 60 * 1000; var dosomething = function() { setinterval(function() { console.log("hello"); }, 2mins); }

User similarities algorithm -

let's have following data users user1: {location: "topeka, ks", school: "university of texas", interests: ["running"] } user2: {location: "austin, tx", school: "university of texas", interests: ["knitting", "running"] } user3: {location: "topeka, ks", school: "university of kansas" interests: ["kayaking"]} given information, i'm writing matching algorithm pairs "best" users. there few criteria - not properties weighted equally. let's "location" far more heavily weighted other property. in above though users 1 , 2 share 2 properties (school , "running"), best match user 1 still user 3 because of high weight of location the algorithm, when running @ scale, should performant. means i'd avoid comparing each user individually each other user. n users o(n^2) operation. ideally i'd develop sort of "score" can generate each ...

linux - Where the probe() function's argument comes from? -

i'm studying linux device driver. currently, understand flows of device driver approximatively, dont know how probe() function gets arguments. for example, here code , based on kernel 3.10. static int gpio_led_probe(struct platform_device *pdev) { struct gpio_led_platform_data *pdata = pdev->dev.platform_data; struct gpio_leds_priv *priv; .... priv = gpio_leds_create_of(pdev); .... } as this, argument 'pdev' using various point of source. i'm understading when probe() called , it's role, cannot find data 'pdev' comes from. thanks read thread, , sorry english not good. platform device specific data while probing comes platform setup code or device tree . can find related code in arch/arm/borad/device files struct platform_device embedded platform_data structure pass platform related data drivers. in modern kernels platform data passed device drivers through device tree. device tree can found in /...

javascript - Detect if input was touched (tablet) or clicked (mouse) -

we developing web-app, launches on desktop , on tablets (ipad, android or surface). building our own keyboard number inputs. when set focus on input field mousclick, costum keyboard opens correct. when set focus input touched click (tablet), default keyboard opens also. our idea is, detect, if there mouse-click or touched click. if it's touched click, can set readonly="true" property input, default keyboard on tabled wouldn't slide in. is there way detect or check "type" of click (touched or mouse). you can define event both actions touchend , click detect 1 triggered using type of event : $('#element-id').on('click touchend',function(e){ if(e.type=='click') console.log('mouse click'); else console.log('touch'); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button id="element-id">click h...

win universal app - Build error for StyleCop.dll -

i trying run prism sample project adventureworks.shopper problem is, when build project, following build error : severity code description project file line suppression state error "stylecoptask" task not loaded assembly c:\users\yeasin.nuget\packages\stylecop.msbuild\4.7.49.1\build..\tools\stylecop.dll. not load file or assembly 'microsoft.build.utilities.v3.5, version=3.5.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' or 1 of dependencies. system cannot find file specified. confirm declaration correct, assembly , dependencies available, , task contains public class implements microsoft.build.framework.itask. adventureworks.uilogic has experience it? i using vs 2015 community update 2 i experienced , resolved after installing .net framework 2.0 , 3.5 on machine. steef-jan

Adding direct reference to a WCF project -

wondering if done before. using wcf in our current architecture , when internally not going on boundaries ability reference project directly. i don't want use tcp or named pipes, know if technically possible alternate between project reference or normal communication wcf eg tcp-http etc.. is there example or approaches achieve this? looked on google , stackoverflow not find answer if title same many thanks

java - Selenium standalone server close browsers when losing connection and/or test manually killed -

is there way tell selenium server automatically close browsers when kill running test, or if connection dropped between test , selenium standalone server ? you should quit driver in after method. hook should called, if connection between server , test lost. if not wait until timeout reached before driver gets killed.

Insert query in cassandra -

here custom udt created in cassandra, i'm not able frame correct insert query udt. create type if not exists 3 ( text, b text ); create type if not exists 2 ( c text, d frozen < list< frozen < 3 > > > ); create table if not exists 1 ( id text primary key, main frozen < 2 > ); the following insert query giving column type incompatible error in datastax dev center insert 1 (id, main) values ('something', [ { 'c' : 'something', 'three': [{'a':'something', 'b': 'something'}] } ]); you might want try insert 1 (id, main) values ('something', { c : 'something', d : [ {a:'something', b: 'something'}] } ); you have gone wrong @ multiple places. definition of one doesn't have list. definition of two contains c,d - not c, three. please use c or "c" ...

jquery - Ajax : Call multiple API with for loop -

since need call brunch of data make chart, need call 10 or more different api created function function trend1() { return $.ajax({ url: '/dashboard/gettrend' + '?period=30d' + "&profileid=" + $(".numberofprofile0").html(), //getting api type: 'get', success: function(data) { } }); } function trend2() { return $.ajax({ url: '/dashboard/gettrend' + '?period=30d' + "&profileid=" + $(".numberofprofile1").html(), //getting api type: 'get', success: function(data) { } }); } function trend3() { return $.ajax({ url: '/dashboard/gettrend' + '?period=30d' + "&profileid=" + $(".numberofprofile2").html(), //getting api type: 'get', success: function(data) { } }); } function trend4() { return $.ajax({ url: '/dashboard/gettrend' + '?period=30d' + "&profile...

java - Change properties of samples during playtime -

i'm trying find way change properties of sample during playtime when events happening, e.g. raise volume or play faster. is possible using jsyn ? or there other tools out there this? according jsyn documentation, , more their presentation slide , there event buffer may support kind of feature ... take @ birds example ( http://www.softsynth.com/jsyn/examples/index.php ) exposes variable noise generation ...

iphone - Cocos2D HighScore framework -

i'm new developer working on game project using cocos2d, need in integrating highscore in game, there framework this? or should scratch using tableview? tried find related using google topics 2009/10. please help! if don't want reinvent wheel , cross-platform not concern, can add simple gamecenter leaderboard first (apple provides standard leaderboard view apps can use, have create leaderboard on itunes connect before implementing it). later, when have default version running, can customize make game. can read more in game center programming guide . if on other hand want avoid using apple provided classes, see this thread on unity forums alternatives mentioned.

html - AngularJS getting error on Post method -

Image
i made restful api in .net .the html created angularjs. the problem is, when page loads, i'm getting following error: and "insert" button doesn't work anymore. this insert script , full html can found @ link: $scope.insert = function insert() { var data = {"id": 3, "name": $scope.name, "description":$scope.description , "price": $scope.price, "categoryid": $scope.categoryid}; $http.post( 'http://localhost:22258/api/product', json.stringify(data), { headers: { 'content-type': 'application/json' } } ).success(function (data) { $scope.products.push(data); }); https://jsfiddle.net/0xb2nh9o/ if kind me make edit button works following model: https://jsfiddle.net/benfosterdev/uwlfj/ make httpput api, wonderful. all restful requests works, ap...

How to remove a Yeoman generator -

i accidentally installed generator don't want. can't find method remove it. should accomplish this? generators normal npm modules, can remove with npm uninstall -g generator-[nameofgenerator]

SSL handshake throwing error, as server upgraded to TLSv1 -

our tokenserver upgraded accept tlsv1/tlsv1.1/tlsv1.2 connections. code handshake using ssl failing. how upgrade code suuport tlsv1 handshake? java version 1.6. below ssl client code. public static void settruststore(string truststorepath, string truststorepwd) { if( truststorepath != null && !truststorepath.trim().equalsignorecase("null") && truststorepath.trim().length() != 0 ){ java.security.security.addprovider(new com.sun.net.ssl.internal.ssl.provider()); system.setproperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); system.setproperty("javax.net.ssl.truststore", truststorepath); if( truststorepwd != null && !truststorepwd.trim().equalsignorecase("null") && truststorepwd.trim().length() != 0 ){ system.setproperty("javax.net.ssl.truststorepassword", truststorepwd.trim()); ...

Tornado - Get variable from URL -

i have 2 handlers. in first 1 (foohandler) show form, in method, , value of field, post method. once obtained value wanna pass handler through uri. barhandler catch , able make query. class foohandler(tornado.web.requesthandler): def get(self): self.render("templates/fooform.html") def post(self): var1 = self.get_argument('var1') #number self.redirect('/query/{}'.format(var1)) class barhandler(tornado.web.requesthandler): def get(self, var1): q = query.... def main(): io_loop = tornado.ioloop.ioloop.instance() connect("test", host="localhost", port=27017, io_loop=io_loop) app = tornado.web.application( [ (r"/", foohandler), (r"/query/\d+", barhandler) ], debug = true, ) app.listen(8888) tornado.ioloop.ioloop.current().start() if __name__ == "__main__": main() i error: traceback (most recent ...

ember.js - Unable to load data with emberJS -

i have following ember app. when go /products route i've got following error: error while loading route: typeerror {} var app = ember.application.create(); app.router.map(function() { this.route('products'); }); ds.store.extend({ revision: 11, adapter: ds.restadapter.create() }); var product = ds.model.extend({}); var productsroute = ember.route.extend({ model: function() { return app.product.find(); } }); first, code wont run because model , route not exist scope of app . should this: var app = ember.application.create(); app.router.map(function() { this.route('products'); }); ds.store.extend({ revision: 11, adapter: ds.restadapter.create() }); app.product = ds.model.extend({}); app.productsroute = ember.route.extend({ model: function() { return app.product.find(); } }); next, may want replace: this.route('products'); with: this.resource('products'); as using restadapter . ...

node.js - How to enable --rest in Windows XP 32 bit -

i have installed mongo db window service , verified service in msconfig. version 2.0.6 compatible of windows xp 32bit. , wanted use simple rest interface through browser localhost:28017/databasename/collectionname/ i stored data via node.js , know can retrieve data through command line. want view rest interface through browser. since browser shows "rest not enabled. use --rest turn on. check port 28017 secured network too." think suppose enable --rest on command line don't know how , enter it. if mongodb installed --config file , can enable rest there : rest=true otherwise, you'll have re-install mongodb --config file or --rest enabled after stopping , deleting existing mongodb service: mongod.exe --install --rest ... or, through regedit , can edit service's imagepath .

python - django unit test for logged in or anonymous user -

i have service returning dictionary depending on whethter user logged in or anonymous or anonymous email.i have used service in django rest api , put logic in api view. want create unit test api , want test following different situation i.e if user logged in if user anonymous no email if user anonymous email i.e, for 1, if user logged in ,we have different value, 2, if user anonymous, have different value, 3, if user anonymous provide email,we have different value now in django unit test,how can check different situation? for better convenient,i sharing have tried(which not working perfectly) def test_requirement_header_create_api(self, mocked_get_or_save_anonymous_user_email): mocked_get_or_save_anonymous_user_email.return_value = dict() client = apiclient(enforce_csrf_checks=true) logged_in = client.login(username=self.user.email, password=self.user.password) if logged_in: self.data = { "user_id": self.user_id, ...

android - How to create a graph with 2 complimentary seriesItem using DecoView lib -

i trying create wheel graph shows 2 complementary seriesitem example (red line 80%, blue line 20% ) add 100% of graph. in decoview github repo found example similar want not able reconstruct graph again. here video of example in action @1:30 if can me out , break down me, because there isn't documentation lib i able add 2 independent seriesitems not complementary in people sample series animated @ same time give impression second series pushing first series along. done using series of timed events. at 3 seconds series1 animated 19%, after 11 seconds series2 starts animating 45% , @ same time series1 animates 64%. means series1 pushed along , occupy same 19% of chart visible. other 45% of series1 covered series2 . here code samplepeoplefragment.java sets these events: addanimation(arcview, mseries1index, 19, 3000, imgview, r.drawable.ic_avatar_man, color_blue); addanimation(arcview, mseries2index, 45, 11000, imgview, r.drawable.ic_avatar_woman, co...

svn - How, using TortoiseSVN, to include some of a file's changed lines but not others in a commit? -

i know possible git (by selecting changed lines in changed files want bundle in single commit before executing commit). is in svn (and tortoise svn)? you can tortoisesvn, but: only partially same way, in git only tortoisesvn 1.8 - read "commit parts of file" in release notes

javascript - IE8 giving very wierd error -

this error receiving, webpage error details user agent: mozilla/4.0 (compatible; msie 8.0; windows nt 5.2; trident/4.0; .net clr 1.1.4322; .net clr 2.0.50727; .net clr 3.0.4506.2152; .net clr 3.5.30729) timestamp: mon, 9 may 2016 09:54:15 utc message: 'key' null or not object line: 2031 char: 9 code: 0 uri: https://www.example.com/scripts/odata-query-builder.js this js file microsoft using, https://odatasamples.codeplex.com/sourcecontrol/latest#tools/odataquerybuilder/scripts/odata-query-builder.js line: 2031 looks me, $.each(options, function (index, e) { line 2031: var $option = $('<option />', { value: e.key, text: e.value }); if (typeof e.type !== 'undefined' && e.type == 'navigationproperty') { $option.addclass('navigationdropdown'); } $option.appendto(select); }); update i using jquery 1.9.1 2.0.0 not supported ie8 update 2 to make things move forward added bit options, if(...

.net - How do I find out where my application depends on BouncyCastle and log4net? -

Image
my application has references 2 packages bouncycastle , log4net : how find if application depends on them? can't work out if need deploy them installer. have noted similar question . update i not sure when file app.config used application, have reference log4net: <?xml version="1.0" encoding="utf-8"?> <configuration> <startup> <supportedruntime version="v4.0" sku=".netframework,version=v4.5.1" /> </startup> <runtime> <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentassembly> <assemblyidentity name="system.net.http.primitives" publickeytoken="b03f5f7f11d50a3a" culture="neutral" /> <bindingredirect oldversion="0.0.0.0-4.2.22.0" newversion="4.2.22.0" /> </dependentassembly> <dependentassembly> <assemblyidentity nam...

javascript - Select2 selected options with ajax -

i'm using select2 generic filters. options server ajax request, need set selected options data cookie. i'm trying with: $("#categoriesselector").select2("val",["01002"]); $("#categoriesselector").val(["01002"]); $("#categoriesselector").select2().val(["01002"]); but not works. idea happening? thanks, iván. from select2 docs have set data when calling select2, so: $('#categoriesselector').select2({ data: [ { id: '01002', text: '01002' } ] });

Java: method-chaining and dependency injection -

is acceptable use method-chaining, when working service managed dependency injection framework (say hk2 )? i'm unsure if allowed "cache" instance, if within scope of injection. example service creates pizza: @service public class pizzaservice { private boolean peperoni = false; private boolean cheese = false; private boolean bacon = false; public pizzaservice withpeperoni() { peperoni = true; return this; } public pizzaservice withcheese() { cheese = true; return this; } public pizzaservice withbacon() { bacon = true; return this; } public pizza bake() { // create instance , return } } here service injected jax-rs resource: @path('pizza') public class pizzaresource { @inject pizzaservice pizzaservice; @get public response getpizza() { pizza pizza = pizzaservice .withpeperoni() .withcheese() ...

json - ReactJS - Array comparison, Render only if name exists in both arrays -

i working on star wars web app using reactjs data being pulled swapi (api returning json data star wars). have working more control on results pulled. every character being pulled swapi, specify characters displayed in own json file , compare results swapi. here breakdown of tasks: use fetch pull star wars character information json swapi , apiresonse.props.results add array of specified characters app state.characters compare names app.state.characters apiresponse.results , render list of characters here current code: /* app */ class app extends react.component { // set initial state constructor() { super(); this.state = { characters: [], } } // add specified characters app.state.characters componentdidmount() { this.setstate ({ characters : require('./charnames') }); } render() { return ( <div> <navbar/> ...

Css3 hover menu -

is possible hover image , visible other css element such menu links: <div class="carousel"> <div class="row" style="margin-top:60px;"> <div class="col-md-6 col-sm-6 col-xs-7 text-left" > <div class="logo"></div> </div> <div class="col-md-5 col-sm-5 col-xs-4 text-right" id="mymenu" style="padding-right:80px;"> <a href="#" class="m">home</a> <span class="d">|</span> <a href="#" class="m">about</a> <span class="d">|</span> <a href="#" class="m">contact</a> <a href="#" class="m"> </a> </div> <div class="col-md-1" id="myimg"> <img ...

javascript - How to trigger JS native even addEventListener("change",function) by JQuery -

this not duplicate of how trigger jquery change event in code , since deals interaction of jquery jquery event listeners, while question discusses interaction of jquery native event listeners. i use addeventlistener bind change event input, $('#input').val('bbbb').change(); can't trigger alert, how trigger addeventlistener("change",function) function jquery <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>code</title> </head> <body> <script src="http://o6flfbzth.bkt.clouddn.com/jquery-1.12.0.min.js"></script> <input id="input" type="text" value="input" /> <script type="text/javascript"> document.getelementbyid("input").addeventlistener("change", function() { alert(this.value); }); </script> <input ty...

javascript - Getting raw HTML and re-rendering it as HTML -

i'm creating script rewrite local version of etrack system college uses it's horrific, , have bit of issue formatted text. see, there's div on system class .visitfeedback , , in div has loads of <p> tags. want move these paragraphs scrollable div due paragraphs overflowing normally. issue is, these paragraphs have html styling within them ( <strong> etc.). want reserve formatting , add scrollable div. far i've managed move over, methods i've tried far return stuff [object htmlparagraph] instead of text want. far i've tried .get() , .html() , .text() , , few others. can please help? relevant stuff below: var feedbacktxt; $('.visitfeedback p').each(function(){ if ($(this).hasclass('info')) { } else { feedbacktxt += $(this).text(); $(this).remove(); } }); $('.visitfeedback').append('<div style="overflow-y: scroll;">...

jquery resizable - is there any chance to get whether div is getting resized bigger or smaller than current size -

with jquery 'resizable' want resize div. .outerdiv has 1 more .innerdiv. what want achieve is: when user resizes outer div, want calculate height of inner div (i can not give 100% height inner div). i able new height this: resize: function( event, ui ) { var currentheight = $('.table-container').height(); $('.table-container').height(currentheight+1); } but when resize div smaller size want have resize: function( event, ui ) { var currentheight = $('.table-container').height(); $('.table-container').height(currentheight-1); } i not sure, how can condition, if resized upwards, size should smaller (height should - 1), , if downwards, size should bigger (height should + 1) can give clues, how go it.. i believe function below solve problem. note semaphore , question mark operator: function handleresizesignum(context) { var previousheight; ...

Adding Images to Tab in Android -

i have developed simple android application in have implemented tabs using fragments... unable display images tabs.. have attached source code below.. please let me know error... my activity class tabdemofragmentactivity.java public class tabdemofragmentactivity extends fragmentactivity { /** * instance variable of type {@link fragmenttabhost} */ private fragmenttabhost fragmenttabhost; /** * call method, gets invoked * when instance of class created. * * <p> * method used set tab host , * add tab host fragments screen, * acts ui. * </p> */ @override protected void oncreate(bundle bundle) { super.oncreate(bundle); setcontentview(r.layout.activity_fragment_main); fragmenttabhost = (fragmenttabhost) findviewbyid(android.r.id.tabhost); fragmenttabhost.setup(this, getsupportfragmentmanager(), r.id.realtabcontent); fragmentt...

Include dynamic paths in FitNesse -

is there way include dynamic paths in fitnesse ? assuming have following structure credentials - local - customer - admin - staging - customer - admin testlogin + in testlogin page like !define platform (local) !include .credentials.${platform}.customer .... test tables i've (unsuccessfully) tried defining path: !define path (.credentials.${platform}.customer) !include ${path} edit accepted answer, strictly speaking, doesn't answer question (seems it's not possible) provides alternative. could trying achieve like: example of why 1 want symbolic links in user guide ? would acceptable switch 'axes' of reuse (i.e. create single suite containing testlogin , use symbolic link include in hierarchy each environment each hierarchy defines variables (used in testlogin) specific environment)?

How to install Node.js in a remote Ubuntu machine -

as system admin, following in of ubuntu machines:- find out if node.js installed user in ubuntu machine. install version upgrade version. i remote ubuntu machine within lan. software/tools should use want? for class of problem write scripts using python fabric http://docs.fabfile.org/en/1.6/ . wraps ssh, needs no special installation hosts. using fabric means can execute same task on multiple hosts easily. while can use puppet or chef this, lot of less flexible use fabric, (as require setup , licenses). once have setup fabric file able connect host, su particular user, , invoke node -v , take action accordingly. a more robust solution , scaleable solution though host own package repository, build own node installation packages, , use whichever package manager (yum apt etc) linux hosts uses run , update. happy node hacking.

c# 4.0 - Dynamically change the orientation of a page in Word using C# -

i have different images database , insert word document,but each image has placed inside word document depending on orientation of word s page. i.e every process have insert images same page of word document,so need dynamically change orientation of particular page depending on image being inserted. please let me know how can dynamically change orientation of 1 particaular page in word using c# to apply landscape only current page, used this: range newrange = _worddoc.range(currentdocumentposition, currentdocumentposition); newrange.insertbreak(wdbreaktype.wdsectionbreaknextpage); _worddoc.sections[_worddoc.sections.count].pagesetup.orientation = wdorientation.wdorientlandscape; it important apply break of type wdsectionbreaknextpage .

sql - Generate numbers between min_value and max_value oracle -

i have 2 methods solution, both high inefficient work value of order 10 8 , greater. method 1 select 100 + rownum - 1 dual connect level <= (200 - 100 + 1) method 2 select rownum + 100 - 1 (select 1 dual group cube(1, 2, 3, 4, 5, 6, 7, 8, 9)) rownum < (200 - 100 + 1) but first method fails when max value 100,000,000 , second method takes lot of time process. please suggest efficient method, think of sequences suppose time cost higher. update error in first method ora-30009: not enough memory connect operation for many rows pipelined function best solution: create or replace type t_numbers table of number; / create or replace function generate_series(p_min integer, p_max integer) return t_numbers pipelined begin in p_min..p_max loop pipe row (i); end loop; end; / a simple: select count(*) table(generate_series(1,100000000)); this takes 30 seconds on laptop

node.js - socket.io with express generator -

before write tried solution @ using socket.io in express 4 , express-generator's /bin/www the terminal show error on /routes/messages.js:12 io.on('connection', function(socket){ typeerror: cannot read property 'on' of undefined here comes files: /routes/messages.js var express = require('express'); var controller = require('../controllers/messagecontroller'); var passport = require('passport'); var router = express.router(); router.get('/', controller.plain); module.exports = function(io){ var router = express.router(); io.on('connection', function(socket){ console.log('**********************************************************'); console.log('mensaje desde socket.io en el archivo de rutas messages.js'); console.log('**********************************************************'); }); return router; }; /bin/www #!/usr/bin/env node /** * module dependencies. */ v...

shell - Copy folder from Android app to local Windows directory -

i'm trying use android adb command prompt copy folder inside app container local windows folder. device running android 5.1.1 , not rooted . adb pull or cp aren't working. how can copy folder? the following approaches aren't working: approach 1 adb shell adb pull /data/data/droidsample.droidsample/files/metrolog/metrologs c:/temp/test error: device not found inside shell can't see adb pull . see here . approach 2 ddms can't access data folder. approach 3 adb shell run-as droidsample.droidsample cp /files/metrolog/metrologs/ c:/temp/test cp: /files/metrolog/metrologs/: no such file or directory approach 4 adb shell run-as droidsample.droidsample cp /data/data/droidsample.droidsample/files/metrolog/metrologs/ c:/temp/test cp: /data/data/droidsample.droidsample/files/metrolog/metrologs directory (not copied). this not working. approach 5 adb shell run-as droidsample.droidsample chmod 777 /files/metrolog/metrologs e...

android - java.security.InvalidKeyException when implementing DH protocol -

in android application implement diffie-hellman protocol in order generate common secret between 2 users. what following: when first user sends friendship request second one, app generates key pair, storing public 1 in remote database , private in local database. here code first part: generatekeys(); localdb.insertprivatekey(userid, entityid, privatekey); remotedb.insertfirstpublickey(userid, entityid, publickey); the generatekeys method following: private void generatekeys() { try { final keypairgenerator keypairgenerator = keypairgenerator.getinstance("dh"); keypairgenerator.initialize(1024); final keypair keypair = keypairgenerator.generatekeypair(); privatekey = keypair.getprivate(); publickey = keypair.getpublic(); } catch (exception e) { e.printstacktrace(); } } when second user accepts request, key pair generated, once again storing private key in loca...

Error in Magento Test Automation Framework (MTAF) -

Image
i have installed magento test automation framework in local machine below reference pdf. http://www.magentocommerce.com/images/uploads/download/magentotestautomationframeworkinstallationguide.pdf all installation setup has completed per reference. after have added project netbeans. when try add project in netbeans seems error. below error message, got netbeans. magento\app\design\adminhtml\default\default\template\catalog\product\attribute\js.phtml this first try of magento test automation tools. don't know went wrong. any appreciation. perhaps can try changing bit directory structure from magento\app\design\adminhtml\default\default\template\catalog\product\attribute\js.phtml to magento\app\design\adminhtml\default\template\catalog\product\attribute\js.phtml in experience, magento directory structure changes across versions.

wpf - Why does binding expression detach in OneWay mode? -

could explain me why first binding expression detached after click checkbox3 object... <stackpanel> <checkbox x:name="chackbox1" content="checkbox1" ischecked="{binding elementname=chackbox2, path=ischecked, mode=oneway}" /> <checkbox x:name="chackbox2" content="checkbox2" ischecked="false" /> <checkbox x:name="chackbox3" content="checkbox3" ischecked="{binding elementname=chackbox1, path=ischecked, mode=twoway}" /> </stackpanel> ...and not happen in following scenario... <stackpanel> <checkbox x:name="chackbox1" content="checkbox1" ischecked="{binding elementname=chackbox2, path=ischecked, mode=twoway}" /> <checkbox x:name="chackbox2" content="checkbox2" ischecked="false" /> <checkbox x:name="chackbox3" content="che...

bash - Is there a way to group parameters into command in Linux? -

i know in linux can this: $> cat file.txt > total.txt and understand following same thing: $> cat < file.txt > total.txt as cat copies whatever in stdin stdout so wondering if following: $> cat file1.txt file2.txt > total.txt can done in way : $> cat < file1.txt file2.txt > total.txt but turns out file1.txt redirected cat there way " parenthesis" group parameters of cat or other command ?? in : $> cat < (file1.txt file2.txt) > total.txt if there txt files cat *.txt > output_file any limitations using this? or did wrong?