Posts

Showing posts from August, 2015

Issues with Python pandas: read_html and python3-lxml installation -

i'm trying run following code, no avail. knowledge, there aren't syntax errors. import quandl import pandas pd fifty_states =pd.read_html('https://simple.wikipedia.org/wiki/list_of_u.s._states') print(fifty_states) i'm getting following error when run code: traceback (most recent call last): file "c:/users/dave/documents/python files/helloworld.py", line 15, in fiddy_states = pd.read_html(' http://simple.wikipedia.org/wiki/list_of_u.s._states ') file "c:\python35\lib\site-packages\pandas\io\html.py", line 874, in read_html parse_dates, tupleize_cols, thousands, attrs, encoding) file "c:\python35\lib\site-packages\pandas\io\html.py", line 726, in _parse parser = _parser_dispatch(flav) file "c:\python35\lib\site-packages\pandas\io\html.py", line 685, in _parser_dispatch raise importerror("lxml not found, please install it") importerror: lxml n...

reactjs - Redux use token in every API request -

i trying develop app using react native, redux , redux saga. i have following login flow: login form login attempt action login saga api call login reducer stores auth token i have multiple containers , components each execute actions in turn have sagas doing api calls. correct way pass token store api calling method while keeping code clean , reusable. you can create api saga(s) process api actions other app sagas. use select effect here token store , pass api call . keep api call separated saga more abstraction , dry principle. there several options call saga: direct yield* or throwing redux action.

javascript - Average values based on date from json to array of arrays -

i hesitate post i've made no significant progress. should step away day. attempting average values date use in highstock charts. data in form of json. issue arises when have 2 sets of data on same day, need average these values based on date. on given day there may 0,1, or 2 values. days no values need null rather 0 there highstock show gap. have been trying work on js solution problem. conceptually seems easy; group date, sum , divide length. have not made progress. here fiddle without blunders. assistance or nudge in right direction appreciated. { "nfdrs": { "row": [{ "@num": "141", "sta_id": "350920", "sta_nm": "hehe 1", "latitude": "44.9559", "longitude": "-121.4991", "nfdr_dt": "08\/10\/2016", "nfdr_tm": "13", "nfdr_type": "o...

Turning off ANSI colours for Laravel artisan command -

when run php artisan commands puts trailing characters[32m], [39m] , numbers. how gonna fix ? a:\xampp\htdocs\5.2>php artisan --version [32mlaravel framework[39m version [33m5.2.41[39m those ansi colours - attempt make nicer, easier read. if terminal doesn't support ansi, can turn them off passing command-line parameter --no-ansi : php artisan --version --no-ansi

mysql server keyring Plugin installation -

i have mysql server installed on linux ubuntu , trying install keyring plugin. have edited my.cnf file located @ /etc. file intially empty added below content it [mysqld] early-plugin-load=keyring_file.so after doing server restart , ran below query in workbench , 0 results select plugin_name, plugin_status information_schema.plugins plugin_name 'keyring%'; i trying follow tutorial https://dev.mysql.com/doc/refman/5.7/en/keyring-installation.html this resolved having value in file /etc/mysql/my.cnf

rest - I am working with a SOAP based web service which has been implemented in a RESTful way. What does this exactly mean? -

from know, web service working using soap. is, has envelope, header, body, etc. however, keep hearing particular soap service has been implemented in restful way. interesting thing noticed: when load wsdl in soap ui, have creating "new rest project." goes against entire understanding of soap , rest. can please shed light on this?

android - alignParentBottom appears Offscreen in Fragment with Scroll View -

for wanting have adview in app comprised of fragment layouts, hope below helps you! basically, trying place adview inside layout xml each fragment. caused adview either pushed off screen or not play nice relative layout commands (ex. alignparentbottom). the solution move adview main activity layout outside of the coordinator layout used fragments. wrapped coordinator layout , adview in relative layout. this allowed me control adview , present on each fragment pinned bottom of screen. i have found when change background of scrollview, paints on adview. must place adview below scrollview in code. way, drawn after scrollview , therefore on top. here edited code: <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="m...

Avoiding type confusion with the square (or nth root etc) of some quantity in modern C++ -

immediately after introduction, these recommendations how program in c++ start philosophical assertion 1 should "express ideas directly in code" . sounded great idea until came this: speed s; // there 1 single value std::vector<mass> m; // there may millions/billions of values computetotalkineticenergy(); if there lots of masses, , normal "half-em-vee-squared" laws of physics apply, makes sense square speed outside (implicit, necessary) loop on vector of masses. type of speed s variable once squared? doesn't notion of expressing ideas "directly in code" lead problems moment want compute logarithm or nth root or similar? in case, 1 define (ugly) type of speedsquared , general principle applies equally functions applied speed std::chrono::high_resolution_clock::time_point ? if care having strong types quantities, use boost.units , or write own units library. otherwise, convert speed , mass values real nu...

java - Codahale metrics counter reset and count everyday -

using codahale metrics there way count last 24 hours(today). to generate report below: request count: lastsec lastmin lasthour today ======================================= 1 5 22 45 response count: lastsec lastmin lasthour today ======================================= 1 5 22 45 there meter methods last second, minute, fifteen rates. how last hour , today count? below tried: public class reportmetrics { static final metricregistry metrics = new metricregistry(); static final counter areqcount = reportmetrics.metrics.counter(name(aprocessor.class, "a-req-count")); static final counter arescount = reportmetrics.metrics.counter(name(aprocessor.class, "a-res-count")); private static final aprocessor aprocessor = new aprocessor(); public static void main(string[] args) { startreport(); for(int i=0; i<=5; i++){ //add ...

html - How can I make image fit in div (django)? -

Image
i'm trying make uploaded image( media not static ) fit div element. it seems found solution here : how auto-resize image fit div container but doesn't work me. the size of dive different depending on size of image uploaded. this css img img { padding: 0; display: block; margin: 0 auto auto 0; max-height: 100%; max-width: 100%; } and part of html . <ul class="items col-3 gap"> {% album in albums %} <li class="item thumb {{ album.day }}"> <figure> <div class="icon-overlay icn-link"> <a href="{{ album.get_absolute_url }}"><img src="{{ album.get_image_url }}" /></a> </div><!-- /.icon-overlay --> <figcaption class="bordered no-top-border"> <div class="info"> <h4><...

java - How to display fraction instead of decimal (double) in android TextView (answerview) -

Image
i want show fractions instead of decimal value in textview(answerview) for example - 1.0625 (this value answer calculation) i want show 1.0625 in fractions (added sample image [required fraction image]) 1(1/16) in textview. this not constant value, value keeps changing according user calculations, every answer want convert fractions , display sujay use kexanie that in case should set text in mathview [read kexanie readme.md] string text = "$$" + var1 + "\\frac{" + var2 + "}{" + var3 + "}$$"; here var1 = 1 , var2 = 1 , var3 = 16 add mathview in xml <io.github.kexanie.library.mathview android:id="@+id/formula" android:layout_width="match_parent" android:layout_height="wrap_content" auto:engine="katex" > </io.github.kexanie.library.mathview> then in oncreate() method mathview mathv = (mathview) findviewbyid(r.id.formula); and set formu...

collapse - SAS: Collapsing and weighted averages calculations -

i have sas programming problem can't solve on own , i'm thankful imput. i want collapse data in dataset variable , summarize/average 2 variables based on weights given variable , substract them each other: example data number flag volume measure1 measure2 1 1 2 2 2 b 2 4 5 3 5 8 20 4 b 10 4 1 5 9 10 11 6 b 5 2 9 7 4 11 23 8 b 3 1 8 now: want volume-weighted average of measure1 , two, calculate measure1-measure2. grouped flags , b: number flag volume volweightmeasure1 volweightmeasure2 finalmeasure 1 19 ((1/19)*2)+((5/19)*8)+... ... (volweightmeasure1-volweightmeasure2) 2 b 20 ((2/20)*5)+((10/20)*1)+... ... (v...

java - webjar not loading in spring boot application -

none of js or css loading webjar in spring boot application. added required dependencies , able see jars. <script src="webjars/core-js/client/shim.min.js"></script> <script src="webjars/zone.js/dist/zone.js"></script> <script src="webjars/reflect-metadata/reflect.js"></script> <script src="webjars/systemjs/dist/system.src.js"></script> this giving 404 error, added below configuration resolve still no use. @configuration @enablewebmvc public class webconfig extends webmvcconfigureradapter { public void configuredefaultservlethandling(defaultservlethandlerconfigurer configurer) { configurer.enable(); } @override public void addresourcehandlers(resourcehandlerregistry registry) { registry.addresourcehandler("/resources/**").addresourcelocations("/resources/"); ...

How to "Go to definition" of a function using Visual Assist? -

i using visual assist last couple of months. alt + g useful , fast in finding definition of under cursor . but not able figure out how go definition manually putting function-name or class-name text input (as while searching using ctrl + shift + f or ctrl + , ). what doing right using ctrl + shift + f , trying definition long list of string search result . :( i hope requirement clear. thanks whole tomato software support team, got answer upon raising ticket . keyboard shortcut " go definition " text input is: alt + shift + s it fast , accurate. to exact or strict match, use .symbolname. text-input in find symbol prompt.

video conversion - Hardware requirements for FFMPEG -

i exploring ffmpeg video conversion. wanted know hardware requirements , time taken convert 5gb video file typically depends on how compression want. if want high compression , quality, takes forever. different between video codecs (and small extent, audio codecs, well), faster, slower. hardware requirements "any cpu" (you might speedup graphics card gpu ffmpeg doesn't use them heavily/typically yet). stronger hardware, convert "faster" were.

c# - CN3 barcodereader and imager fails when connected to internet -

im using intermec cn3 device windows mobile 5 on , trying use barcodereader , imager. the itcscan.dll , imager.dll files cannot found when connected internet. please note work while not connected internet. i following error barcodereader: "cant find pinvoke dll 'itcscan.dll'". , error imager: "can not open imager". there lot of posts on web cannot find pinvoke error none of ones found specific being connected internet , people posts seem have failing when offline. they fail on new statements: global var: intermec.datacollection.barcodereader barread; if (barread == null) { barread = new intermec.datacollection.barcodereader(); the imager similar own global var img = new intermec.datacollection.imager(pictureimager, imager.pictureresolutionsize.sixteenth); there settings being set afterwards never passes these statements while connected internet. it ended being memory issue. while connected internet device using bit mor...

java - Google Signed URL in Google Cloud Module Android. (Signature Fails) -

i have managed generate signed url "get" objects bucket using service account xxxxxxxxxxx@appspot.gserviceaccount.com , when change service account xxxxx-compute@developer.gserviceaccount.com fails generate "get" signed url too. i unable generate "put" signed url service account , guess needs special roles service account or bucket think have given.

tfs - MTM wrong video attachment in test result -

we have automated test run (tfs 2013, mtm 2013) , in test settings have configured 'screen , voice recorder' on. problem wrong video displayed when opening attachment after test run. for example, latest run 29/8, , when opening video attachment, video opened 25/8. have encountered issue? a few more points might - run, have test controller , 2 test agents, let`s call them 1 , 2. test controller installed on machine 1, , problem exists when opening attachment agent 1. when opening attachment agent 2 - ok. both machines windows server 2012 r2 (datacenter). thanks in advance! what user's running services? domain, local accounts? test controller stores test result data in user profile directory. maybe test controller , agent running on same user? mtm > lab > controllers has rmb menu clean local store. try , run test again. controllers stores few test runs of test results backup

html - One class override the property of another class -

in code given below, want display font-size property on class: flip-menu-main-icon overridden font-size property on class fa . how can solve problem? html code : .fa { display: inline-block; font: normal normal normal 14px/1 fontawesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .flip-menu-main-icon { /* margin-left: 10%; */ font-size: 18px; float: none; line-height: 2.5rem; margin-right: 0; margin-left: 0; position: relative; top: 0; min-width: 1.5rem; list-style-type: none; } <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"> ...

ios - Should I use dequeReusableCellWithIdentifier? -

i know question dumb. got stuck question. when use dequereusablecellwithidentifier , cells reused. more specific, first 'n' set of cells reused - along references as same references reused, can't store local variables cells. need assign them everytime in cellforrowatindexpath assume i'm using custom complex uitableviewcell. (i know should reduce complexity. still...) some views added cell. best example think of image slider. so number of images in image slider differs based on datasource. need add views in cellforrowatindexpath. can't avoid it. since same reference of cells reused, need add these views everytime cellforrowatindexpath called. think bit of heavy load. i thought of using drawrect method, not work uitableviewautomaticdimension if don't use dequereusablecell, have individual referenced cells, cost memory , performance. so best solution? can use dequereusablecell , still need not rewrite content? edit 1: mentioning dequereu...

python - Sort nested dictionaries and replace dictioary values with ordered numbers -

not sure if problem sound bit tricky..my requirement this: have 3 columns of data in txt file below: col1,col2,col3/n 11,0.95,21/n 11,0.75,22/n 11,0.85,23/n 11,0.65,24/n 12,0.63,22/n 12,0.75,24/n 12,0.45,25/n ... col1 can viewed dict keys repeat <= 5 times, col3 can viewed nested dict keys values in col2, i.e. each key in col1 has <= 5 pairs of (col2: col3). i sort nested dictionary col2 , replace col2 values highest ranking, i.e.: don't care values in col2, care ranking of col3 each col1 value: col1,col2,col3 11,1,21/n 11,2,23/n 11,3,22/n 11,4,24/n 12,1,24/n 12,2,22/n 12,3,25/n ... i tried turning data nested dictionaries like: {col1:{col3:col2}} {11:{21:0.95,22:0.75,23:0.85,24:0.65},12:{22:0.63,24:0.75,25:0.45}} i have searched around , found solutions sort nested dict etc., cannot replace values rankings either...can please help? well, here way in basic python: in [90]: col1 out[90]: [11, 11, 11, 11, 12, 12, 12] in [91]: col2 out[91]: [0.95, 0...

javascript - Regex match with 3 condition? -

i creating math program .if wish solve need separate equation using regex. for example: `10x-10y2+100x-100k=100` the format separate regex output: "10x" ,"100x" ,"100k" ,"10y2","100" i have code separate match function there are: num[a-z]num : ` /([\-+])?\s*(\d+)?([a-z]?(\d+))/g` num[a-z] : ` /([\-+])?\s*(\d+)?([a-z]?(\d+))/g` fon num : `/\b[+-]?[\d]+\b/g` i need 3 match function within 1 regex match function.some 1 combine code single regex expression note :i need match function not split beacause apply regex expression parser thank you. split on symbols: "10x-10y2+100x-100k=100".split(/[-+=]/); output: ["10x", "10y2", "100x", "100k", "100"] if need use match() method suggest same approach: "10x-10y2+100x-100k=100".match(/[^-+=]+/g); output same.

javascript - Does service worker runs on background even if browser is closed? -

i see push notification facebook web in chrome when open chrome. know notification sent through service worker . wondering whether background sync goes on though browser closed or on opening chrome these service-worker sync process started , start sending push notification. first thing depends on platform. understanding of chrome is: on desktop platforms windows , mac os x browser needs have background process running service worker able run. on mac os x quite easy detect browser can have no windows open browser still has glowing dot beneath it. on mobile platforms it's easier listen events , handle them in efficient manner, in these cases platform can wake browser handle corresponding events. the above applies service worker api's. on desktop: if browser completely closed service workers can not run , not dispatch events (i.e. no push or background sync events) on mobile: events still dispatched (i.e. background sync trigger when users device comes onli...

wso2carbon - WSO2 Publisher/Store not working after installed EEM -

after installed wso2 eem (enterprise mobility manger), add device device management. couldn't open publisher/store, page jump https://localhost:9443/publisher/acs or https://localhost:9443/samlsso . should install wso2 identity server or config sso it? you don't need install identity components or configure sso explicitely. there in vanilla emm. when go https://localhost:9443/publisher , should redirected login page. https://localhost:9443/authenticationendpoint/login.do then when enter credentials should redirect in below urls. 1) https://localhost:9443/publisher/acs 2) https://localhost:9443/publisher if doesn't work you, there should exceptions in log file. please check that.

c# - Azure Offline Sync -

working azure app service offline sync .net backend. working totally fine when directly remove row server database not sync (updated) after clicking refresh button on mobile app if edit name attribute sync automatically after clicking refresh button. far know should automatically update mobile list if delete row server database updates after row edited. any help! can make work proper if row deleted database after refreshing shows new updated database list? following todoactivity.cs class public class todoactivity : activity { //mobile service client reference private mobileserviceclient client; //mobile service sync table used access data private imobileservicesynctable<todoitem> todotable; //adapter map items list view private todoitemadapter adapter; //edittext containing "new todo" text private edittext textnewtodo; const string applicationurl = @"https://my2doservice.azurewebsites.net"; const st...

deserialization - Java Serialization Caused by java.lang.IllegalArgumentException: not a primitive field -

i getting below exception trace. can please suggest. doing objectinputstream.readobject(). creating problem. exception: java.lang.runtimeexception: error occured while executing doinbackground() @ android.os.asynctask$3.done(asynctask.java:300) @ java.util.concurrent.futuretask.finishcompletion(futuretask.java:355) @ java.util.concurrent.futuretask.setexception(futuretask.java:222) @ java.util.concurrent.futuretask.run(futuretask.java:242) @ android.os.asynctask$serialexecutor$1.run(asynctask.java:231) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1112) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:587) @ java.lang.thread.run(thread.java:841) caused java.lang.illegalargumentexception: not primitive field @ java.lang.reflect.field.setffield(field.java) @ java.lang.reflect.field.setfloat(field.java:746) @ java.io.objectinputstream.readfieldvalues...

java - Drag and Drop event JavaFX -

i trying create drag , drop solution between treetableview , rectangles in interface. able drag row treetableview , when drag on rectangle, color of rectangle change. notified when drag not on anymore, can change color on rectangle. not able see event doing this. for drag target have 4 different properties: ondragenteredproperty : called when drag gesture enters node ondragoverproperty : called when drag gesture progresses within node ondragexitedproperty : called when drag gesture exits node ondragdroppedproperty : called when mouse button released on node during drag , drop gesture you can use properties define behaviour of target node , like: rectangle rect = new rectangle(); rect.setondragentered(value -> { // set drag-over color here }); rect.setondragexited(value -> { // reset original color here }); rect.setondragdropped(value -> { // reset original color here });

javascript - How to add an input field to specific select field with ng-options AngularJS? -

i making polling app using angular , node/express/mongo , add custom input field add option, when select "i add custom option". i'm using ng-options generate voting options. the html of poll looks now: (poll retrieved database , added $scope.poll.options: <div class="container"> <div class="panel panel-default"> <div class="panel-body"> <div class="row"> <div class="col-md-6"> <h2> {{poll.title}} </h2> <h5> created by: {{poll.displayname}} </h5> <form> <div class="form-group"> <label for="vote">i vote for:</label> <select class="form-control" id="vote" ng-model="poll.vote" ng-options="item.option item.option item in poll.options"> ...

java - adding pictures to .JAR file -

i tried add 3 pictures program, when add pictures, created .jar file cannot start. when try clean , build without pictures .jar file works well. the pictures path: d:\desktop\password\src\resources final public imageicon picture = new imageicon(getclass().getresource("./resources/picture.png")); final public imageicon picture1 = new imageicon(getclass().getresource("./resources/picture1.jpg")); final public imageicon picture2 = new imageicon(getclass().getresource("./resources/picture2.jpg")); from netbeans icons visible, , program works correctly. what did wrong?

ios - watchOS3 handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) on device be called -

i found method called on simulator, on real watch device, never called. both apple's simple code , test. i want know mistakes or apple's. my code - class interfacecontroller: wkinterfacecontroller, wkextensiondelegate { @iboutlet var textlbl: wkinterfacelabel! override func awake(withcontext context: any?) { super.awake(withcontext: context) wkextension.shared().delegate = self // configure interface objects here. } func handle(_ backgroundtasks: set<wkrefreshbackgroundtask>) { task : wkrefreshbackgroundtask in backgroundtasks { if task wksnapshotrefreshbackgroundtask { textlbl.settext("hahahah"); task.settaskcompleted() } } } } i managed find workaround pointing scheduledcompletion attribute "real" function rather closure e.g. wkextension.shared().schedulebackgroundrefresh( withpreferreddate: ...

api - WSO2: passing the caller's IP address to the backend -

say instance of wso2's api manager receives api calls external client, possible pass caller's ip address backend (in header example, other solutions welcome too)? if yes how? http header way it. can create sequence , attach api. <?xml version="1.0" encoding="utf-8"?> <sequence xmlns="http://ws.apache.org/ns/synapse" name="sample"> <property name="client_ip" expression="get-property('axis2', 'remote_addr')" scope="transport"/> </sequence> if have proxy before api manager, may not able identify real client using remote_addr . ip of proxy. in such cases can use x-forwarded-for http header.

query sql server 2012 change to sql server 2008 -

select produksi.thntanam, tanggal (select datepart(d,individualdate) tanggal, datepart(m,individualdate) bulan daterange('d', '$tanggalawal', '$tanggalakhir') ) daftartgl inner join (select b.thn_tanam thntanam, datepart(d,a.tgl_panen) tgl, datepart(m,a.tgl_panen) bln dbo.tp_produksi_pemanen left join tr_blok b on a.id_blok = b.id_blok a.nama_pemanen='" . $row['namapem'] . "' , isnumeric(a.nik_pemanen ) = 1 , a.id_satuan_unit_afd ='" . $id_afd . "' group b.thn_tanam, datepart(d,a.tgl_panen), datepart(m,a.tgl_panen) ) produksi on daftartgl.tanggal = produksi.tgl , daftartgl.bulan = produksi.bln"; this question in sql server 2012 , want use code in sql server 2008 but not...

regex - perl $ anchor failed to match end of line -

example: my $pattern = "mkdir &" as can see, patterns commands , want pattern match "&+eol" distinguish whether command runs on background or not. i tried /&$/ , /&\$/ failed. what wrong? suggestion pattern match? 45: if ($command =~ /&$/) { db<2> p $command mkdir & db<3> s 54: print $_;print "\n"; your pattern works fine use strict; use warnings 'all'; use feature 'say'; $pattern = 'mkdir &'; $pattern =~ /&$/ ? 'match' : 'no match'; output match it impossible tell question, have whitespace @ end of string trying match. perhaps have space or linefeed there, or perhaps processing file has originated on windows , have removed lf, leaving terminating cr. you can fix adding optional whitespace @ end of regex pattern, this say $pattern =~ /&\s*$/ ? 'match' : 'no match'; you can see string c...

sql server - while scheduling SSIS package in sql 2012 64 bit i am getting this error -

executed user: asiapacific\nshanm. microsoft (r) sql server execute package utility version 10.0.1600.22 64-bit copyright (c) microsoft corp 1984-2005. rights reserved. started: 2:45:01 pm error: 2016-08-29 14:45:01.18 code: 0xc001700a source: description: version number in package not valid. version number cannot greater current version number. end error error: 2016-08-29 14:45:01.21 code: 0xc0016020 source: description: package migration version 6 version 3 failed error 0xc001700a "the version number in package not valid. version number cannot greater current version number.". end error error: 2016-08-29 14:45:01.21 code: 0xc0010018 source: description: error loading value "6" node "dts:property". end error not load package "c:\ssis\fileupload\fileupload\package.dtsx" because of error 0xc0010014. description: package failed load due error 0xc0010014 "one or more e...

amazon web services - How set up secondary VPN connection -

how can set secondary vpn connection in [this| http://docs.aws.amazon.com/amazonvpc/latest/userguide/vpc_vpn.html#vpnconnections] diagram? if set customer gateway secondary (public) ip , vpn connection secondary customer gateway (static - no bgp available) obtain 2 more tunnels, in diagram (linked above) tunnels same of primary vpn connection (crossed in customer configuration). i don't found reference in doc. thanks.

Can stored procedure use created Index over a table in oracle -

i have stored procedure takes 3.5 second execute. sp in below: create or replace procedure proctest (columnnumber in varchar2, tg out varchar2) stmt varchar2 (1000); begin tg := 't' || to_char (sysdate, 'yyyymmddhh24miss') || columnnumber; stmt := 'create global temporary table ' || tg || ' on commit preserve rows (select * user1.tbl chargingparty=' || columnnumber || ')'; execute immediate stmt; end; i execute part (create global temporary table ' || tg || ' on commit preserve rows (select * user1.tbl chargingparty=' || columnnumber || ')' ) in sql developer, , takes 0.2s, when execute sp, takes 3.2. i created index on table(user1.tbl), when run create table query in sql developer before creating index, took 3.2s. my question is: sp uses indexes? or how can force sp use index??? in general indexes used o...

ios - Image change in UITableViewCell using Segmented control in another View -

how change iboutlet image set in uitableviewcell using segmented control in view controller using swift? uitableviewcell.swift : class usercell: uitableviewcell { @iboutlet var imagedisplayicon: uiimageview! viewcontroller: @ibaction func btnclicked(sender: anyobject) { if txtsex.selectedsegmentindex == 0{ var imagepicview: usercell = usercell() imagepicview.imagedisplayicon.image = uiimage(named: "boyicon.png") //imagedisplay.image = uiimage(named: "boyicon.png") print("male") } if txtsex.selectedsegmentindex == 1{ var imagepicview: usercell = usercell() imagepicview.imagedisplayicon.image = uiimage(named: "girlicon1.png") //imagedisplay.image = uiimage(named: "girlicon1.png") print("female") } i error saying "fatal error: unexpectedly found nil while unwrapping optional value." what do?? i s...

javascript - Cordova/Touch onclick events issues -

i use lot of onclick events on buttons in html pages normally, following pattern : <button onclick="myfunction(this)"></button> some work, somedon't, , can't explain why. these work : <div> <button class="static" onclick="myfunction('add');" style="">zzzzzzzzzzz</button> <button class="static" onclick="myfunction('res');" style="">zzzzzzzzzzz</button> <button class="static" onclick="myfunction('set');" style="">zzzzzzzzzzz</button> </div> these don't : <center> <button onclick="newedit(this)" class="pop_opt" style="height: 35px;">edit</button> <hr/> <button onclick="newconfirm(this);" class="pop_opt" style="height: 35px;">delete</button> <hr/> ...

c# - CheckedListBox, Change state without selecting the item -

i'm facing problem, i'm using checkedlistbox , clicking on checkbox results in automatic selection of item. behaviour wrong me. there dosen of solutions of problems may seem similar, suggesting use checkonclick not solving problem @ all. the user present list of 50~ items, , clicking on item (thus selecting it) results in operation a , when user changes state of checkbox, operation b should performed. so, currently, due way works, a , b performed not , stresses application. is there way handle mouse click in such way selects item when user clicks name portion, , changes check box state when user clicks checkbox?

android - java.lang.NoClassDefFoundError: org.apache.commons.net.ftp.FTPClient -

i'm trying upload image ftp server using asynctask: import android.content.context; import android.os.asynctask; import org.apache.commons.net.ftp.ftp; import org.apache.commons.net.ftp.ftpclient; import org.apache.commons.net.ftp.ftpreply; import java.io.fileinputstream; public class my_ftp_uploader extends asynctask<string, void, string> { public string file_name; private context context; public ftpclient mftpclient = null; public my_ftp_uploader(context context) { this.context = context; } protected void onpreexecute() { } @override protected string doinbackground(string... arg0) { string filestouploadpath = arg0[0]; file_name = arg0[1]; try { mftpclient = new ftpclient(); mftpclient.connect("my_domain", 21); if (ftpreply.ispositivecompletion(mftpclient.getreplycode())) { boolean status = mftpclient.login("my_domain", "my_password"); mftpclient.setfiletype(ftp.bina...

c# - Exclude items during deserialization if a specific attribute doesn't exist -

i have json string can contain multiple students , teachers. example shown below. want deserialize json separate lists based on whether contains particular attribute. [ { "school": "st.xavier" }, { "teacherid": 1, "name": "prof.xavier", "position": "professor", "class": "elite" }, { "studentid": 1, "name": "quicksilver", "ability": "rush", "class": "elite" } ] for example: list<teacher> teacherlist = jsonconvert.deserialize<teacher>(json); list<student> studentlist = jsonconvert.deserialize<student>(json); during deserialization, school info ignored, , each list contain items attributes matching according class. teacherlist contain teacher info, , studentlist contain student info. public class teacher { [jsonproperty("teacherid...

python - List of Structure subclass returns wrong values when casting to numpy array -

i've built simple structure subclass 2 fields, holding void pointer array, , array length. however, when try create list of these using input lists of same length, value of returned void pointer same last array used create instance: from ctypes import pointer, c_double, c_size_t, c_void_p, structure, cast import numpy np class external(structure): _fields_ = [("data", c_void_p), ("length", c_size_t)] @classmethod def from_param(cls, seq): return seq if isinstance(seq, cls) else cls(seq) def __init__(self, seq): self.ptr = cast( np.array(seq, dtype=np.float64).ctypes.data_as(pointer(c_double)), c_void_p ) self.data = self.ptr self.length = len(seq) # recreate array void pointer # shows correct values shape = self.length, 2 ptr = cast(self.data, pointer(c_double)) array = np.ctypeslib.as_array(ptr, shape) print ...