Posts

Showing posts from July, 2013

python - TensorFlow CNN on multiple GPUs -

i trying parallelize code have tensorflow model run on multiple gpus. reason, code wrote parallelize training works standard deep neural net, throws errors when using convolutional neural net. here code compute average gradients: def average_gradients(tower_grads): average_grads = [] grad_and_vars in zip(*tower_grads): # note each grad_and_vars looks following: # ((grad0_gpu0, var0_gpu0), ... , (grad0_gpun, var0_gpun)) grads = [] g, _ in grad_and_vars: # add 0 dimension gradients represent tower. expanded_g = tf.expand_dims(g, 0) # append on 'tower' dimension average on below. grads.append(expanded_g) # average on 'tower' dimension. grad = tf.concat(axis=0, values=grads) grad = tf.reduce_mean(grad, 0) # keep in mind variables redundant because shared # across towers. .. return first tower's pointer # variable. v = grad_and_vars[0][1] grad_and_var = (grad, v) average_grads.a

Javascript Regex to match standalone S without matching apostrophe S -

i trying match stand alone s ignoring case. not want match s preceded apostrophe. current regex /\b[s]\b/ig , test string , s on lines 2 , 3 should matches. men's s s things somethings regexr: http://regexr.com/3geo2 after short experimentation have came following regex (?:\s|^)s(?:\s|$) demo

jquery - Event for change input type color JavaScript -

i want new color on input type=color, if use jquery it's working $(document).ready(function() { var colorpicker = $('.input-color'); colorpicker.on("change", function watchcolorpicker() { var val = $(this).val(); $(".title").each(function() { $(this).css({'color' : val}); }); }); }); but don't know, how write on native js. error .change or .on not function window.onload = function(){ var colorpicker = document.getelementsbyclassname('input-color'); var text = document.getelementsbyclassname('title'); function colorchange(color) { for(var j =0; j < color.length; j++) { color[j].addeventlistener('change', function () { var newcolor = this.value; for(var =0; < text.length; i++) { text[i].style.color = newcolor; } })

Error Connecting to Cloudera Kerberized Hadoop Cluster from Unix CLI -

i trying connect kerberos secured cloudera hadoop devbox unix cli , running issue. below command trying run , gives me following error ./bin/hadoop fs -ls hdfs://devhost02:8020 warn util.nativecodeloader: unable load native-hadoop library platform... using builtin-java classes applicable warn security.usergroupinformation: priviledgedactionexception as:abc (auth:kerberos) cause:javax.security.sasl.saslexception: gss initiate failed [caused gssexception: no valid credentials provided (mechanism level: failed find kerberos tgt)] warn ipc.client: exception encountered while connecting server : javax.security.sasl.saslexception: gss initiate failed [caused gssexception: no valid credentials provided (mechanism level: failed find kerberos tgt)] warn security.usergroupinformation: priviledgedactionexception as:abc (auth:kerberos) cause:java.io.ioexception: javax.security.sasl.saslexception: gss initiate failed [caused gssexception: no valid credentials provided (mechanism level: f

java - intellij with Android SDK : lambda expressions are not supported in -source 1.7 -

Image
good day all i know there various questions on issue, , have visited quite number of them, not provide "solution". the general answer set language level 8 (allowing lambdas) have done 2 modules built grade, see below and i confirm have java 8 install java -version java version "1.8.0_141" java(tm) se runtime environment (build 1.8.0_141-b15) java hotspot(tm) 64-bit server vm (build 25.141-b15, mixed mode) when setting language level, resolves issue has in ide,but when building project run on devvice, error: information:gradle tasks [:app:assembledebug] /home/cybex/documents/university/year 5/semester 2/wrap302 - advanced programming 2/assignments/assignment1/task1_sos2/app/src/main/java/wrap302/nmu/task1_sos/sosbutton.java error:(15, 25) error: lambda expressions not supported in -source 1.7 (use -source 8 or higher enable lambda expressions) /home/cybex/documents/university/year 5/semester 2/wrap302 - advanced programming 2/assignments/assignm

c++ - Use static_cast on non-pointer POD instead of c style cast -

this question has answer here: why use static_cast<int>(x) instead of (int)x? 9 answers is there reason using static_cast on non pointer pod data types, int, float, double? float v = 100; int x = (int) v vs int x = static_cast<int>v is there reason/advantage on using that, saw several answers covers pointers, plain pod data not find explicit answers non-pointers. the best reason i've heard because can grep static_cast , know find casts whereas (int) less specific what's going on in expression. also, c-style casts can remove or add const or volatile , change types without warnings. if try static_cast const pointer/reference type non- const pointer/reference type, compile error.

javascript - After Changes to Google Analytics Tracking Code - Returning Users Considered New Users? -

i need change piece of code in universal analytics snippet from: ga("create", "ua-######-#", {"cookiedomain":".ourdomainname.com"}); to: ga("create", "ua-######-#", {"cookiedomain":"auto"}); my question - once make change, returning users (about 1/3 of traffic) considered brand new first-time visitors , whole new analytics cookie? or other problems or inconsistencies data , tracking visitors before change vs. after? little info out there online ...

Logging With NLog In Azure WebJobs -

i've got nlog configuration works fine web app (asp.net core). i'm trying add nlog webjobs, can't figure out how it. in program.cs within webjob project, need somehow inject ihostingenvironment , iloggerfactory (both of inject startup constructor of web app). once know how that, should able finish off configuration. if that's not possible, alternatives have? i'm not keen use textwriter class passed webjob methods, imagine difficult extract logs , route them want go. following steps of using nlog in webjob. step 1, install nlog.config package webjob. install-package nlog.config step 2, add rules , targets nlog.config files. following sample of writing logs file. <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/nlog.xsd" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <targets> <target name="logfile" xsi:type=&quo

Excel VBA want Userform to keep active workbook active -

i have userform attached workbook. when different workbook active, , button trigger userform pressed on quick access toolbar, shows userform , activates other workbook userform attached to. i want active workbook (and sheet), whatever is, stay active when userform triggered via qat button. this seems simple haven't been able find solutions. thanks!

What is this python syntax trying to do? -

i'm wondering trying happen in following line. forgive me i'm new python syntax, help! handlers[type(dbw_msg)](dbw_msg) where handlers = secondary: self.secondary_manage.handle.message and dbw_msg = py_from_can(can_msg) where py_from can defined as def py_from_can(can_msg): try: if can_msg.id in py_can_types: return py_can_types[can_msg.id].py_from_can(can_msg) except notimplementederror: pass return none so, without other context, can is: handlers[type(dbw_msg)](dbw_msg) handlers gets subscripted (i.e. square-brackets) type(db_msg) . can assume sort of mapping (a dict ) keys type objects. finally, value returned subcription operation get's called, i.e. () parens. so, handlers mapping type objects callable (e.g. functions). so, example: >>> handlers = {int: lambda x: x**2, str: str.upper} >>> = 8 >>> b = 'foo' >>> handlers[type(a)](a) 64 >>> handlers[type(b)](b)

javascript - Changing the page of an embeded .pdf using a link -

i can use "#page=[pagenumber]" after src ensure pdf opens respective page, don't understand how use variable in place of [pagenumber] , change variable when tab/button pressed. what recommend looping on each of links document.getelementsbytagname('a') , , attaching click handler each of links. can target clicked link's target splitting on href this.href.split("=")[1] . in following example, i'm assigning this.href.split("=")[1] variable clicked , can reference whenever want know last link clicked. var clicked; var links = document.getelementsbytagname('a'); (var = 0; < links.length; i++) { links[i].onclick = function(e) { e.preventdefault(); clicked = this.href.split("=")[1]; console.log("you clicked link: " + clicked); } } <a href="?page=1">page 1</a> <a href="?page=2">page 2</a> <a href="?page=3"&

reactjs - How to make React Flexbox stretch to full screen height -

i'm trying create react app optimized mobile , doing of layout using flexbox. i'm having trouble forcing main container of app automatically expand full device height. what rules can apply, html container <div id="react-app"></div> , main app container <app></app> stretch full screen height, when children wouldn't force them so? you can use height:100vh for app component, can looks not perfect on ios safari. can set html, body, #reactapp, .app { height: 100%; } .app { display: flex; }

python - My function isnt getting defined for some reason? -

i tried write function returns true if there integer in string. however, function apparently not defined. when try run code get traceback (most recent call last): file "<pyshell#10>", line 1, in <module> integer(5) nameerror: name 'integer' not defined here code: def integer(s): z = '' z = z + in s: if s == int: return true welcome python in case :) in python white space , indentation essential. function needs indented correctly, so: def integer(s): z = '' z = z + in s: if s == int: return true now, function isn't quite doing want to. if s == int: isn't quite right syntax. you'd want more if s in "0123456789": because s string if it's between 0-9, , make sure @ end of function return false if function never found digit. so: def integer(s): in s: if s in "0123456789": return true return false to m

r - Still struggling with handling large data set -

i have been reading around on website , haven't been able find exact answer. if exists, apologize repost. i working data sets extremely large (600 million rows, 64 columns on computer 32 gb of ram). need smaller subsets of data, struggling perform functions besides importing 1 data set in fread, , selecting 5 columns need. after that, try overwrite dataset specific conditions need, hit ram cap , message "error: cannot allocate vector size of 4.5 gb. looked @ ff , bigmemory packages alternatives, seems can't subset before importing in packages? there solution problem besides upgrading ram on computer? tasks trying perform: >sampletable<-fread("my.csv", header = t, sep = ",", select=c("column1", "column2", "column7", "column12", "column15")) >sampletable2<-sampletable[sampletable[,column1=="6" & column7=="1"]] at point, hit memory cap. better try , use packa

xslt - Stop Wrapping From Adding Space on New Line (XSL-FO) -

i'm using following allow text wrap within cell (fop-1.0). fo:table-cell wrap-option="wrap" keep-together.within-column="always" this working when text wrapped next line, space added @ beginning of text on each subsequent line. i'd text start in same position. for example currently: line 1 begins here..... line 2 begins here..... line 3 begins here..... for example prefer: line 1 begins here..... line 2 begins here..... line 3 begins here..... any suggestions appreciated! thanks, rita

How can I get devise to add a username with rails 5 -

there previous posts discussing how add username devise model. unfortunately, these posts not discuss how setup views. mainly, i'm interested in updating devise/registrations/edit.html.erb file. in it, have added following lines <div class="field"> <%= f.label :username %><br /> <%= f.text_field :username %> </div> to allow users update username. unfortunately, when save form, username not update. why happening? i checked comment above, if want update user can use user controller (not device registration) , below code user controller class userscontroller < applicationcontroller def edit @user = user.find(params[:id]) end def update # devise if params[:user][:password].blank? params[:user].delete(:password) params[:user].delete(:password_confirmation) end @user = user.find(params[:id]) if @user.update_attributes(user_params) flash[:success] = 'user changed'

Tensorflow model (.pb) has device information? -

i'm running tf application inference given models. however, it's not running on gpu, on cpu although tensorflow library built cuda enabled. have insight in tf models, tensorflow model (.pb) has device information tf.device(/cpu:0) or tf.device(/gpu:0) ??? from docs (emphasis mine): sometimes exported meta graph training environment importer doesn't have. example, model might have been trained on gpus, or in distributed environment replicas. when importing such models, it's useful able clear device settings in graph can run on locally available devices. this can achieved calling import_meta_graph clear_devices option set true . with tf.session() sess: new_saver = tf.train.import_meta_graph('my-save-dir/my-model-10000.meta', clear_devices=true) new_saver.restore(sess, 'my-save-dir/my-model-10000')

R: Warning: get NA when I try to use my function -

i brand new programming , trying write function in r calculates mean of pollutant (nitrate or sulfate) across specified list of monitors (each monitor has own .csv file in folder "specdata"). have constructed following function: pollutantmean <- function(directory="specdata", pollutant="sulfate", id=1:332) { files_f<-list.files(directory,full.names=true) d <- data.frame() for(i in 1:332){ d <- rbind(d,read.csv(files_f[i])) } if(pollutant=="sulfate"){ mean(d$sulfate[which(d$id==id)], na.rm=true) } else{ mean(d$nitrate[which(d$id==id)], na.rm=true) } } and tried test function with: pollutantmean(directory="specdata",pollutant="sulfate", id=1:10) i following error: [1] na warning messages: 1: in d$id == id : longer object length not multiple of shorter object length 2: in mean.default(d$sulfate[which(d$id == id)], na.rm = true) : argument n

php - Adding Custom Meta Data from Products to Orders items in Woocommerce -

i'm trying custom meta data of woocommerce products order columns in woocommerce admin code wont work on function.php in wordpress theme. // order meta pd number add_action('woocommerce_add_order_item_meta','adding_custom_data_in_order_items_meta', 1, 3 ); function adding_custom_data_in_order_items_meta( $post_id, $cart_item_key ) { // corresponding product id item: $product_id = $post_id[ 'product_id' ]; //$pd_number = $post_id['_pd_number']; //$pd_number = $_post['_pd_number']; $pd_number = get_post_meta( $post_id[ 'product_id' ], '_pd_number', true ); if ( !empty($pd_number) ) wc_add_order_item_meta($post_id, '_pd_number', $pd_number, true); } thanks there errors in code. try instead: // add the product custom field item meta data in order add_action( 'woocommerce_add_order_item_meta', 'pd_number_order_meta_data', 10, 3 ); function pd_number_order

c# - How to parse form data using Azure Functions -

i trying form data within azure function. public static async task<httpresponsemessage> run(httprequestmessage req, tracewriter log) { log.info("c# http trigger function processed request."); namevaluecollection col = req.content.readasformdataasync().result; return req.createresponse(httpstatuscode.ok, "ok"); } i getting following error: exception while executing function: system.net.http.formatting: no mediatypeformatter available read object of type 'formdatacollection' content media type 'multipart/form-data'. i trying parse inbound emails via sendgrid described here. https://sendgrid.com/docs/classroom/basics/inbound_parse_webhook/setting_up_the_inbound_parse_webhook.html the incoming request looks correct. --xyzzy content-disposition: form-data; name="attachments" 0 --xyzzy content-disposition: form-data; name="text" hello world --xyzzy content-disposition: form-data; name="

caching - Internal Gemfire Error While querying Gemfire using JAVA API -

i trying query java in gemfire. able put data , regions using java api in gemfire. whenever try query regions, internalgemfireerror . i start locators , servers in gfsh gfsh>start locator --name=locator --log-level=debug gfsh>configure pdx --read-serialized=true gfsh>start server --name=server1 --log-level=debug create region --name=account --type=partition i have created client project using java api put , fetch data client.java public static void main(string[] args) throws functiondomainexception, typemismatchexception, nameresolutionexception, queryinvocationtargetexception { clientcache cache = new clientcachefactory().set("cache-xml-file", "cacheclient.xml") .create(); region<integer, account> accountregion = cache.getregion("account"); list<account> accounts = testdata.createaccountdata(); for(account : accounts) { accountregion.put(a.getaccountnumber(), a

xamarin - How can I lay out a grid to space out labels to the left and right? -

here code have: <viewcell x:name="noa"> <grid verticaloptions="centerandexpand" padding="20, 0"> <grid.columndefinitions> <columndefinition width="*" /> <columndefinition width="*" /> <columndefinition width="auto" /> </grid.columndefinitions> <local:labelbodyrendererclass text="hide card after" horizontaloptions="startandexpand" /> <picker x:name="noapicker" isvisible="false" selectedindexchanged="noapickerselectedindexchanged" itemssource="{binding points}"></picker> <label x:name="noalabel" horizontaloptions="end"/> <label text="{x:static local:fontawesome.faangleright}" fontfamily="fontawesome" horizontaloptions="end" /> </grid> </viewcell> what achieve thi

Scala Dependency Injection and testing -

i looking @ alternatives(constructor params, di, etc) in following scenario. have integration test begins simple database entries, , tests etl pipeline transform entries. db connections needed within etl class tree, per actual program, in integration test class input original data. ive tried provide separate db access test class , etl lock errors. struggling best way go this a quick unit test looks this: class mytest extends testlibrary dbtestsupport { db.find("foo")... } trait dbtestsuport { //setup val db = externallibrary.database(port=800).open } but want full integration test mock/test db , have contend kinds of inheritance. class myfunctionaltest extends testlibrary { //somehow access db def addsometestdata = db.add(it: list[foo]) val items = list(foo(1), foo(2)) addsometestdata(items) //now lets test etl pipeline def transform = new transform().methodthatdoesthings...// transform.testmethodtoexpectthings// } where db access needed way

r - Can I create multiple columns from a single group by mutate? -

i group dataframe on column , apply function grouped data returns multiple columns. means of example, consider following names = append(rep('mark',10),rep('joe',10)) spend = rnorm(length(names),50,0.5) df <- data.frame( names, spend ) get.mm <- function(data){ return(list(median(data),mean(data))) } here, get.mm returns list of 2 numbers. apply get.mm df %>% group_by(names) , have result have 2 columns, 1 fo each output of function. the desired result should be names median mean <fctr> <dbl> <dbl> 1 joe 49.89284 49.9504 2 mark 50.17244 50.0735 i've simplified function here means of demonstration, know df %>% group_by(names) %>% summarise(median = median(spend), mean = mean(spend)) if rewrite get.mm returns data frame, can use group_by %>% do : get.mm <- function(data){ data.frame(median = median(data), mean = mean(data)) } df %>% group_by(names) %>% do(g

python - Lightning Server Won't Run -

installed lightning via: npm install -g lightning-server tried start server via: lightning-server caught following error: events.js:160 throw er; // unhandled 'error' event ^ error: spawn c:\program enoent @ exports._errnoexception (util.js:1018:11) @ process.childprocess._handle.onexit (internal/child_process.js:193:32) @ onerrornt (internal/child_process.js:367:16) @ _combinedtickcallback (internal/process/next_tick.js:80:11) @ process._tickcallback (internal/process/next_tick.js:104:9) @ module.runmain (module.js:606:11) @ run (bootstrap_node.js:389:7) @ startup (bootstrap_node.js:149:9) @ bootstrap_node.js:504:3 what's deal? using: windows 10 pro, node v6.11.1

reactjs - GraphQL query does not update on react router v4 history push -

i implement basic filtering option in react web app. have 3 components videolist -------------------------- filter result -------- ---------------- category the filter component , result component both children of videolist component. in filter component when user clicks on category, pushing new url, this.props.history.push( /videos/${category.name} ) . seems react-router settings works correctly , videolist component gets new category name , passes result component. <route exact path="/videos" component={videolist}/>, <route exact path="/videos/:category" render={props => <videolist {...props} />} />, in videolist component <result category={category} /> the result component makes usage of new category name in own graphql query follow: export default compose( graphql(videos_query, { options: props => { return { variables: { filterbycategory: props.category ? props.category

kubernetes - kube-dns remains in "ContainerCreating" -

i manually installed k8s-1.6.6 , deployed calico-2.3(uses etcd-3.0.17 kube-apiserver) , kube-dns on baremetal(ubuntu 16.04). it dosen't have problems without rbac. but, after applying rbac adding "--authorization-mode=rbac" kube-apiserver. couldn't apply kube-dns status remains in "containercreating". i checked "kubectl describe pod kube-dns.." events: firstseen lastseen count subobjectpath type reason message --------- -------- ----- ---- ------------- -------- ------ ------- 10m 10m 1 default-scheduler normal scheduled assigned kube-dns-1759312207-t35t3 work01 9m 9m 1 kubelet, work01 warning failedsync error syncing pod, skipping: rpc error: code = 2 desc = error: no such container: 8c2585b1b3170f220247a6abffb1a431af58060f2bcc715fe29e7c2144d19074 8m 8m 1 kubelet, work01 warning fai

Hive query error java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException -

hello executing hive query : create table temp_session_orgid select sorgid.property_num, sorgid.visitid, sorgid.fullvisitorid, sorgid.adate, sorgid.hits_customvariables_customvarvalue orgid ( select *, row_number() on (partition property_num, visitid, fullvisitorid, adate order hitsid) rn bt_hits_custom_vars hits_customvariables_customvarname = 'orgid' ) sorgid sorgid.rn = 1 ; hive:2.1.1 emr:5.3.1 where getting following error: caused by: org.apache.hadoop.hive.ql.metadata.hiveexception: java.nio.channels.closedchannelexception @ org.apache.hadoop.hive.ql.exec.filesinkoperator.process(filesinkoperator.java:785) @ org.apache.hadoop.hive.ql.exec.operator.forward(operator.java:879) @ org.apache.hadoop.hive.ql.exec.selectoperator.process(selectoperator.java:95) @ org.apache.hadoop.hive.ql.exec.operator.forward(operator.java:879) @ org.apache.hadoop.hive.ql.exec.

python - Trying to Render Link From Model Into Img Tag HTML -

models.py: class product(models.model): product_name = models.charfield(max_length=100) price = models.floatfield() weight = models.floatfield() image_link = models.urlfield(max_length=500, default="http://polyureashop.studio.crasman.fi/pub/web/img/no-image.jpg") description = models.charfield(max_length=500) seller = models.foreignkey('login_app.user') reviews = models.manytomanyfield('login_app.user', related_name="reviews") cart = models.manytomanyfield('login_app.user', related_name="carted") created_at = models.datetimefield(auto_now_add=true) updated_at = models.datetimefield(auto_now=true) objects = productmanager() views.py: def productdetails(request, product_id): try: request.session['user_id'] except keyerror: return redirect("/") product = product.objects.get(id = product_id) print product #users = user.objects.fil

How to create window next to current one in GNU screen? -

i want change new window c-a n . how create window next current 1 in gnu screen? if gnu screen can not that, there alternative recommended? gnu screen can this: c-a :split -v see section of documentation more details: https://www.gnu.org/software/screen/manual/screen.html#regions

javascript - not able to delete all the children of an element with specific class -

so, trying delete children of element lets wrapper has aurl class, , wrote code document.addeventlistener("domcontentloaded", function (){ document.getelementbyid("reload").addeventlistener("click", function (){ var w = document.getelementbyid("wrapper"); for(var i=0; i<w.children.length; i++){ if(w.children[i].classlist.contains("aurl")){ w.removechild(w.children[i]); } } }); }); <div id="wrapper"> <div id="reload"> <span>reload</span> </div> <div class="aurl" id="one"> one </div> <div class="aurl" id="two"> two </div> <div class="aurl" id="three"> three </div> <div class="aurl" id="four"> four </div> <div class="aurl" id="five">

postgresql - sql support for []time.Time? -

i have postgres table as: create table public.foo ( id uuid not null default gen_random_uuid(), foo timestamp time zone[], bar timestamp time zone ) i'm querying table , scanning result values as: var res []myresstruct rows, err := db.query(`sql goes here`, &params) if err != nil { log.printf("err querying: %v\n", err) panic(err) } defer rows.close() rows.next() { var ( id uuid.uuid foo []uint8 bar time.time ) if err := rows.scan(&id, &foo, &bar); err != nil { log.printf("err scanning: %v\n", err) panic(err) } // note: hate this, golang's sql driver doesn't support \ // arrays of timestamps? s := string(foo) s = strings.replace(s, "{", "", -1) s = strings.replace(s, "}", "", -1) s = strings.replace(s, "\"", "", -1) z := strings.split(s, ",")

running sqlplus from within Julia -

i'm beginner julia user use of projects. many of projects require me make quick connection oracle id number of other data. can running sqlplus other programs shell or tcl, i've tried syntax in julia documentation, 1 error or another. in tcl looks this exec sqlplus -s user/pass@dbname << " set pagesize 0 feedback off verify off heading off echo off select id table1 name='abc'; exit; " from julia, i'm trying use run command this run(`sqlplus -s user/pass@dbname << " set pagesize 0 feedback off verify off heading off echo off select id table1 name='abc'; exit; " `) but various errors julia like stacktrace: [1] depwarn(::string, ::symbol) @ ./deprecated.jl:70 [2] warn_shell_special(::string) @ ./shell.jl:8 [3] #shell_parse#236(::string, ::function, ::string, ::bool) @ ./shell.jl:103 [4] (::base.#kw##shell_parse)(::array{any,1}, ::base.#shell_parse, :

java - Spring boot dev tools not working in Net beans -

i have read spring boot dev tools , want try it, add following pom <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-devtools</artifactid> <optional>true</optional> </dependency> and turn on devtools restart manual trigger in net beans options. run use following option org.springframework.boot:spring-boot-maven-plugin:1.3.2.release:run in run project-> execute goals when change smth in code , project isn't rerun. did miss? click under project properties -> build -> compile checkbox "compile on save" ticked. verified works modifying .java file , checking timestamps in /target/classes. also changing execute goals in run project action in netbeans project properties following: process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec configuring explicit resource directory location (in case src/main/resources) pom.xm

c# - Cannot apply indexing with [] to an expression of type 'BusSeatManagementSystem.OracleDataReader' -

enter image description here how solve problem??? to read data columns of current row in datareader, can use getvalues(), , extract values array - objects, of database types. object[] values; int numcolumns = thisreader.getvalues(values); //after "reading" row (int = 0; < numcolumns; i++) { //read values[i] } please upvote answer if works

tensorflow.python.framework.errors_impl.AlreadyExistsError -

Image
i using tensorflow object_detection models. https://github.com/tensorflow/models/tree/master/object_detection in training process, after 270000's iterations. error occured. , restart training checkpoints. happened again @ 290000's iteration. detailed log following: before, i've use api train model , worked. have no idea what's problem. has same problem? my system environment: red hat 4.8.5-4 tf version: '1.0.1' cuda & cudnn: cuda 8.0/cudnn 5.1 gpu: tesla p40

javascript - CSS : Justify dynamically created divs with variable width inside parent -

i dynamically generating child divs , appending them parent.each child div has different width. .parent{ width:250px; border: 1px solid #ddd; display: flex; flex-direction: row; flex-wrap: wrap; } .child{ margin: 2px; float : left; } <div class="parent"> <div class="child" style="width:50px">1.2345</div> <div class="child" style="width:60px">1:234235</div> <div class="child" style="width:60px">1:234245</div> <div class="child" style="width:70px">1:23426565</div> <div class="child" style="width:30px">1:25</div> <div class="child" style="width:40px">1345</div> <div class="child" style="width:50px">1:23045</div> <div class="child" style=&qu

ionic2 - ionic 2 Prompts alert -

Image
how insert radio button , text input inside prompts alert in ionic 2. it's work text input or radio button. want add radio button group radio buttons select 1 option , text input in 1 alert prompt. my coding let prompt = this.alertctrl.create({ title: 'add course', message: "enter course detailes", inputs: [ { name: 'id', placeholder: 'course id' }, { name: 'img', placeholder: 'image url' }, { name: 'title', placeholder: 'title' }, { name: 'details', placeholder: 'details' }, { type:'radio', label:'something1', value:'something1' }, { type:'radio', label:'something2', value:'something2' } ], buttons : [ { text: "cancel", handler: data => { console.log("

Fragment overlapping one on another in android -

i fetching data in list view using fragment mysql , here button on upper side when used click on button doesn't replace fragment overlaps in 1 before , after clicking on button. here code fetching data in list view format , on click button open new fragment overelapping. public class playquiz extends fragment{ public string subject; string myjson; private static final string tag_results = "result"; private static final string tag_name = "subname"; string selcsub; button b1; jsonarray peoples = null; arraylist<hashmap<string, string>> personlist; listview list; textview ss,name; inputstream = null; string res = null; string line = null; @override public view oncreateview(layoutinflater inflater, @nullable viewgroup container, @nullable bundle savedinstancestate) { // todo auto-generated method stub view rootview = inflater.inflate(r.layout.play_quiz, container, false); list = (listview) rootview.findviewbyid(r.i