Posts

Showing posts from June, 2010

osgi - Using apache directory ldap in Servicemix -

i have osgi application running on servicemix 6. added code uses apache directory ldap lookups (org.apache.directory.api.ldap). i got error when deploying app in servicemix: unresolved constraint... (osgi.wiring.package=org.apache.directory.api.ldap.model.cursor) can use apache lib in servicemix? how can import it? or, should use other lib? i ran command, think wraps dependency osgi-compatible. bundle:install -s wrap:mvn:org.apache.directory.api/api-all/1.0.0-m33

sql server - IF statement in MS SQL when function return empty string -

i need check when function in ms sql return empty string ('') in insert table , handle condition. don't know how. use syntax: insert [db].[dbo].[tablesnames] (name) values (case when [dbo].function(@id, @externalname, @level) '' @name else [dbo].function(@id, @externalname, @level)) how correct syntax in case? thx advance. i more inclined write as: insert [db].[dbo].[tablesnames](name) select (case when x = '' @name else x end) (select [dbo].function(@id, @externalname, @level) val) x; functions incur overhead when called. formulation gives sql server opportunity evaluate function once. a couple more things: i don't recognize is . might mean is null ? if looking @ blank values (empty strings) want consider null values?

qt - Cannot display a dot in the application start taskbar tooltip -

i developing qt application , encountered problem. i want application shortcut start taskbar display tooltip: "myapp v1.10" display "myapp v1". problem not display dot , follows it. the tooltip text same filedescription. can set in rc file. there way fix this?

Python - Tkinter - Label Not Updating -

any ideas why leftresult_label label not update? function seems work label not update. have looked everywhere , can't find answer. 'left' value gets set label not change. from tkinter import * root = tk(classname="page calculator") read = intvar() total = intvar() left = intvar() read.set(1) total.set(1) left.set(1) read_label = label(root,text="pages read:") read_label.grid(column=1, row=1) total_label = label(root,text="total pages:") total_label.grid(column=1, row=2) read_entry = entry(root,textvariable=read) read_entry.grid(column=2, row=1) total_entry = entry(root,textvariable=total) total_entry.grid(column=2, row=2) def func1(): left.set(total.get() - read.get()) print(left.get()) calculate_button = button(root,text="calculate",command= func1) calculate_button.grid(column=2, row=3) percenet_label = label(root,text="percent finished:") percenet_label.grid(column=1, row=4) left_label = label(

c# - Jquery toggle individual item in repeater -

hope question understandable. i have repeater several rows database, , each row has picture , button like this: <asp:repeater runat="server" datasourceid="sqldatasource1" id="repeater1"> <itemtemplate> <div class="col-lg-2 col-md-2 col-sm-4 col-xs-6" style="height: 200px;"> <div class="thumbnail text-center sletbox"> <img class="img-responsive" src='../fotos/<%# eval("url") %>' alt=""></a> <div class="slet"> <a href='delete_picture.aspx?id=<%# eval("pic_id") %>&a=<%# eval("album") %>&n=<%# eval("url") %>' onclick="return confirm('vil du slette dette billed?')">

connect android app to gmail server using asyntask -

i developing android app. connect gmail server , read inbox emails. implement connection , email reading code, problem when app. getting connecting gmail server app. hangs , when reads email gmail server become stop working while , runs. want put connect , read email code in background using asyntask. please tell how implement connect , read email code using asyntask in android app. not hang or crash or stop? public void readgmail(string host, string storetype, string user, string password, sqlitedatabase database) { try { properties properties = new properties(); properties.put("mail.pop3.host", host); properties.put("mail.pop3.port", "995"); properties.put("mail.pop3.starttls.enable", "true"); session emailsession = session.getdefaultinstance(properties); store = emailsession.getstore("pop3s"); store.connect(host, user, password); folder emailfolder =

mysql - How can I prevent SQL injection in PHP? -

if user input inserted without modification sql query, application becomes vulnerable sql injection , in following example: $unsafe_variable = $_post['user_input']; mysql_query("insert `table` (`column`) values ('$unsafe_variable')"); that's because user can input value'); drop table table;-- , , query becomes: insert `table` (`column`) values('value'); drop table table;--') what can done prevent happening? use prepared statements , parameterized queries. these sql statements sent , parsed database server separately parameters. way impossible attacker inject malicious sql. you have 2 options achieve this: using pdo (for supported database driver): $stmt = $pdo->prepare('select * employees name = :name'); $stmt->execute(array('name' => $name)); foreach ($stmt $row) { // $row } using mysqli (for mysql): $stmt = $dbconnection->prepare('select * employees name = ?');

javascript - How to read data from a table and form an array and post it? -

i want data , display on table modify "availability" , again post server forming array of object. right way doing able data not coming modification . <!doctype html> <html> <head> <link rel="stylesheet" href="style.css"> <script src="script.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script> </head> <body ng-app="valueexample" ng-controller="examplecontroller"> <script> angular.module('valueexample', []) .controller('examplecontroller', ['$scope', function($scope) { $scope.routedetails = [ { "employee":"employee 1", "date":"2016-09-25", "availablity":"yes" }, { "employee":"employe

android - Google Play Service out of date error -

i've got problem google-play-service. i'm using google-api oauth2 authentication , calendar/gmail information. yesterday worked fine, today tells me need newer version of google play service. android studio had updated packages morning. here error-line logcat if start contact googleapi: 09-22 11:59:01.692: w/googleplayservicesutil(2819): google play services out of date. requires 9683000 found 9452480 here grade.build: apply plugin: 'com.android.application' android { signingconfigs { config { keyalias xxxxx keypassword xxxx storefile file(xxxx) storepassword xxxxx } } compilesdkversion 23 buildtoolsversion '22.0.1' defaultconfig { applicationid xxxx minsdkversion 14 targetsdkversion 22 signingconfig signingconfigs.config vectordrawables.usesupportlibrary = true } buildtypes { release { minifyenabled

dictionary - What happens when I loop a dict in python -

i know python return key list when put dict in for...in... syntax. but what happens dict? when use help(dict) , can not see __next()__ method in method list. if want make derived class based on dict : class mydict(dict) def __init__(self, *args, **kwargs): super(mydict, self).__init__(*args, **kwargs) and return value list for...in... d = mydict({'a': 1, 'b': 2}) value in d: what should do? naively, if want iteration on instance of myclass yield values instead of keys, in myclass define: def __iter__(self): return self.itervalues() in python 3: def __iter__(self): return iter(self.values()) but beware! doing class no longer implements contract of collections.mutablemapping , though issubclass(myclass, collections.mutablemapping) true. might better off not subclassing dict , if behaviour want, instead have attribute of type dict hold data, , implement functions , operators need.

java - Closed Resultset: next error in jsp page, after upgrading to ojdbc7.jar from ojdbc14.jar via myEclipse -

creating 2 result sets in java class below & when return jsp page, access below such & loop through result sets put data on page fields. was working fine ojdbc14.jar, upgraded ojdbc7.jar (for oracle 12c) via myeclipse project. getting closed resultset: next error in jsp page when access first result set. any ideas or suggestions please upgrade being done? i know can use collections, etc., trying keep code same returned cursors result sets accessed in jsp page. assistance. jsp page: <% bcsdata vbcs = (bcsdata)session.getattribute("com.sherwin.barcodeshipping.bcsdata"); %> <table class="data" > <tr class="header"> <td class="datatxt"> order number </td> <td class="datatxt"> rex </td> <td class="datatxt"> size code </td> <td class="datatxt"> loc </td> <td class="datanbr&qu

javascript - Issue inside for..in loop -

i'm creating function checks whether 2 arrays identical or not , i'm stuck @ checking whether 2 objects (that inside array) identical. to explain code little bit, have variable named eq that's returned when function on , should contain either true each element of first array exists in second array or undefined if element doesn't. also, use recursive iife check if object has sub-objects , sub-objects identical. check whether array element object literal use el.constructor === object . without being 100% certain, believe i've done wrong inside for..in loops. code: function equals(a, b) { return (a === b && !== null) || (a.length === b.length && (function(a, b) { var eq = []; a.foreach(function(el1, index) { b.foreach(function(el2) { if (el1 === el2) eq[index] = true; else if (el1.constructor === el2.constructor && el1.constructor === object) { /* -> object of first arr

command line - Deploy the directories to remote windows server -

am using teamcity ci, after checking out repo github need deploy files , directories 1 of remote windows machine note: both teamcity agent , remote machine having windows os please me achieve same command line or of plugins. you can use teamcity deployer plugin gather artifacts , deploy them network share or ftp. create new network share on target windows machine , configure correct write permissions share , ntfs folder. use network share address in teamcity build configuration. machine running teamcity agent must have access network share.

What is the difference between kibana and opentsdb -

as know kibana , opentsdb both can used in conjunction elastic logstash kibana (elk) stack. opentsdb offers built-in, simple user interface selecting 1 or more metrics , tags generate graph image. alternatively http api available tie opentsdb external systems such monitoring frameworks, dashboards, statistics packages or automation tools. each (time series daemon)tsd uses open source database hbase store , retrieve time-series data. kibana can used plotting metrics access logs , custom logs, how opentsdb helps in system? opentsdb time-series database. use opentsdb alongside elasticsearch, metrics component. use elasticsearch text (logs perhaps) , opentsdb metrics. if using logstash, there output can export metrics logs opentsdb. kibana visualization tool elasticsearch queries. assists searching , viewing data stored in elasticsearch. used elasticsearch. if unified front-end elasticsearch , opentsdb, consider grafana, has support both elasticsearch , opentsdb ,

javascript - How to call controller function from html? -

hi new angularjs , html, javascript , css please try explain answers dummys. so, reason function "updatefilterterm" not called. variable "filterterm" remains same initialized. like see in code page calling function 1 page displaying content of variable "filterterm" have same controller "batchmonitorctrl". do wrong or can guide me solution problem? here part of controller.js: ... function batchmonitorctrl($scope, batchmonitor, batchmonitorconfig, configservice, $localstorage, $timeout, flash, $routeparams) { $scope.filterterm = '2312ab78-1e3c-48c5-82af-e38b42d704eb'; $scope.updatefilterterm = function(filterterm) { $scope.filterterm = filterterm; }; } ... and here part of bm.html: ... <span ng-switch-default class="label label-primary {{types[charge.type].css}}" style="cursor:pointer;padding:8px;" onclick="$(this).popover('toggle')" data-html=&#

oracle - SQL select all distinct rows from first column with random values from other columns -

i have this: id email email2 id_2 ------------------------------------------ 1 james@ james2@ 11 1 james@ james2@ 11 1 james@ - 11 1 james@ - 11 2 declan@ dylan2@ 22 2 declan@ dylan2@ 44 3 john@ - 33 3 john@ - 33 4 vito@ vito2@ 55 so need select values distinct id, if email2 not empty should choose 1 not empty email2, if there empty email2, choose one. example: id email email2 id_2 ------------------------------------------ 1 james@ james2@ 11 2 declan@ dylan2@ 22 3 john@ - 33 4 vito@ vito2@ 55 there isn't more conditions don't know do. use partiotion or group by.. please , me.

vba - Access Form Will Not Close -

i have access form supposed close predecessor - if currentproject.allforms("fmfilecheck").isloaded docmd.close acform, "fmfilecheck", acsaveno else end if the if statement works fine (i have injected message box test) form doesn't close. no error message or anything, sits there , tants me, squirrel taunts cat. edit: the form opens on "current" event of predecessor , code above executes on "current" - if code open second form called via button on first works fine - issue guess somewhere in there? a possibility form named frmfilecheck , not fmfilecheck? double check spelling on name of form. you can debug program see if condition true , command being executed. i think don't need nest close command in if loaded statement. execute command , if loaded, close it. positive not error closing form not loaded.

Selenium Webdriver sendkeys: clears down fields after text is entered -

i'm encountering particularly frustrating issue webdriver's sendkeys method. witnessing fields being filled, focus removed, fields cleared. source code snippet: <div class="search-row__departure"> <div class="search-label"> <label onclick="$(this).parent().parent().find('.airport-input-row:first input, select').focus();">departure</label> </div> <div class="search-input__text"> <span id="id23"> <span id="idc"> <div class="airport-input-row"> <span class="inputcontainer"> <input id="id11" class="departurepoint" name="airport_selection_panel:departurepoint:departureairportpanel:listview:0:selector:airportfragment:departurepoint" value="" autocomplete="off" onblur="var wcall=wicketajaxpost('./?0-ibehaviorlistener.4-brix~page~2-brix~journey~4-brix~packag

android - Why does the ProgressBar animation misbehave when adding it after the parent view has been laid out? -

Image
i have activity button , linearlayout . every time button clicked, newly inflated view added linearlayout via addview() . added view single progressbar . when adding new views after linearlayout has been laid out, progressbar animation behaves weirdly, doing part of spin. however, when adding new views before linearlayout has been laid out (in activity 's oncreate() ), of them behave normally. why happen? there way fix problem? problem seems appear on android 5.x, works expected in newer versions. maybe it's platform bug, think rather simple use case, , provided there no info on internet, maybe it's doing wrong. it? here code: mainactivity.java public class mainactivity extends appcompatactivity { linearlayout mainlayout; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); mainlayout = (linearlayout) findviewbyid(r.id.main_layout)

java - JSONs format logs are not translated into Cyrillic -

this appender jsonl logging logback.xml file <?xml version="1.0" encoding="utf-8"?> <appender name="jsonl_log" class="ch.qos.logback.core.rolling.rollingfileappender"> <file>logs/card_gate_json.jsonl</file> <encoder class="net.logstash.logback.encoder.logstashencoder"/> <rollingpolicy class="ch.qos.logback.core.rolling.timebasedrollingpolicy"> <filenamepattern>logs/card_gate.%d{yyyy-mm-dd}.%i.log.zip</filenamepattern> <timebasedfilenamingandtriggeringpolicy class="ch.qos.logback.core.rolling.sizeandtimebasedfnatp"> <maxfilesize>50mb</maxfilesize> </timebasedfilenamingandtriggeringpolicy> <minindex>1</minindex> <maxindex>50</maxindex> </rollingpolicy> </appender> this example log, note, cyrillic text

How to set up tabs with view pager in android? -

i have followed following instructions in order sliding tabs view pager. here oncreate method: mviewpager.setadapter(new navigationpageradapter(getsupportfragmentmanager())); mtablayout.setupwithviewpager(mviewpager); here navigation pager adapter: public static class navigationpageradapter extends fragmentpageradapter { private static final int num_items = 3; public navigationpageradapter(fragmentmanager fragmentmanager) { super(fragmentmanager); } // returns total number of pages @override public int getcount() { return num_items; } // returns fragment display page @override public fragment getitem(int position) { switch (position) { case 0: // fragment # 0 - show firstfragment return new feedfragment(); default: return null; } } // returns page title top indicator @override public charsequence getpagetitle(int position) {

cron task - I want to send the following web page request using a cronjob with raspberry pi -

can point me in right direction? want send following webpage request using cron job raspberry pi, http://10.0.1.224/socket1on thanks install curl using aptitude install curl , crontab -e and... 0 * * * * curl http://10.0.1.224/socket1on >/dev/null (this runs once on each full hour - adjust necessary of course.) this throws away answer; if need it, can save file, or course. errors mailed whatever mail account let mails forwarded to, cron.

Logstash query elasticsearch geohash data -

i aggregating location data using geohash, works on chrome sense plugin, once try query through logstash input plugin of elasticsearch, not working... sense query: post/_search { "query": { "match_all": {} }, "aggs": { "my_area": { "geohash_grid": { "field": "location", "precision": 6 } } } } my logstash configuration file: input { elasticsearch { hosts => "localhost:9200" index => "devices" query => '{"query": { "aggs": { "my_area": { "geohash_grid": { "field": "location", "precision": 6 } } } } }' }}} my logstash exception: ←[31ma plugin had unrecoverable error. restart plugin. plugin: <logstash::inputs::elasticsearch hosts=>["localhost:9200"], index=>"de vices", query=>"{\"query\&

views - How can I change taxonomy term id to name in Drupal 7 -

using view option in admin side have changed website url www.123.com/plans/1 www.123.com/plans/my-plan . after entire view (page browser) showing articles (associated my-plans) heading , content read more option. need customized page layout, getting correct layout www.123.com/plans/1/my-plan but it's not working www.123.com/plans/my-plan . if right understood problem, need install pathauto module , set pattern taxonomy vocabulary (path settings admin/config/search/path/patterns).

How to get all the values from the deleted row into a column in sql server 2008 -

tbl_employee id name source 1 sanders outsource tbl_audit name columnnames columnvalues on delete of employee tbl_employee, trying insert info tbl_audit. i hard coding values tblname , columnnames, cannot figure out how values deleted row columnvalues column (comma delimited). any guidance appreciated. example : employee 1 deleted create trigger trigger_delete on tbl_employee delete insert tbl_audit (tblname, columnnames, columnvalues) values ( 'tbl_employee', 'id, name, source', select stuff(select ',' + tbl_employee.id, tbl_employee.name, tbl_employee.source deleted tbl_employee.id in(select deleted.id deleted)) ) tbl_employee.id in(select deleted.id deleted) you can use sys.columns system view fetch columns of database table on sql server select name sys.columns object_id = object_id('tblname') my solution changed data (updated or deleted) once used custom history tables logging in sql

c++ - uniform initialization with variadic templates -

i have pod chparam , it's parameter in variadic template function set . i'd pass function arguments(constructor parameters) in curly braces p.set({ param::d, 1000.f }, { param::p, 2000.f }) . , thought constructor called implicitly , chparam objects created. it's impossible, should explicitly create object a.set(chparam{ param::d, 1000.f }, chparam{ param::p, 2000.f }); is possible somehow use variant p.set({ param::d, 1000.f }, { param::p, 2000.f }) ? #include <iostream> using namespace std; using float = float; enum class param : size_t { d = 0, p }; struct chparam { param tag_; float value_; }; class pipecalcparams { private: float d_, p_; public: pipecalcparams() : d_(0), p_(0) {} pipecalcparams& set_d(float d) { d_ = d; return *this; } pipecalcparams& set_p(float p) { p_ = p; return *this; } template <typename... args> pipecalcparams& set(const chparam& p, args&&... args) {

html - Python Urllib2 doesn't return the whole file -

i'm trying make script can know when page has modifications (it can't done "last-modified" because server replace file identical after days). trying use urllib2.urlopen() , .read() method string contains code, this: try: file= open(filedir, 'w+') web = urllib2.urlopen(url) file.write(web.read()) except error e: print "some error %s" % e archivo.close() works fine, when try downloading same page, same without headers: reference file: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html lang="es" xmlns="http://www.w3.org/1999/xhtml" xml:lang="es"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/>... but when comes new download, get: <meta http-equiv="content-type" content="text/html; charset=utf-8"/>...

html - Changing horizontal design on a long scrollable table -

Image
i have long table showcase on blog looks clunky if try put in single space wrote small css make table horizontally scrollable, this: .table-scroll { margin-bottom: 0; overflow: hidden; overflow-x: scroll; display: block; white-space: nowrap; } now problem horizontal scroll looking bad on pcs, this: but want this: normally way scrollbar shows on mobile devices. can me out how can make happen? you can achieve (for chrome , safari) using -webkit-scrollbar , -webkit-scrollbar-thumb : .table-scroll::-webkit-scrollbar { height: 8px; } .table-scroll::-webkit-scrollbar-thumb { background: rgba(180, 180, 180, 0.7); } fiddle: https://jsfiddle.net/ng3fb0gh/1/

html - How to display a table that changes number of columns based on if mobile -

i have table example | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | and on mobile want display important columns like: | 1 | 2 | 3 | 4 | i've tried looking @ responsive design re-order whole table rather showing part of table. i'm using ionic uses angular , haven't seen example on stackoverflow. you use media queries max-width value , hide table cells class of hide-mobile; .hide-mobile { background: silver; } @media (max-width: 600px) { .hide-mobile { display: none; } } div { margin-top: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid red; width: 600px; } <div>if window smaller width of red line cells gray background disappear</div> <table> <tr> <td class="hide-mobile">lorem ipsum dolor sit amet, consectetur.</td> <td>lorem ipsum dolor.</td> <td>corrupti, ipsum eligendi.</td> <td>nobis

modelica - Optimal control of a boiler: using Fluid Library w. the DynamicPipe component using JModelica -

im interested in using jmodelica model have constructed in dymola . specifically, have model of boiler using dynamicpipe component, , transfer heat pipe warm water inside it, , employ pump component control pressure difference on entire boiler. model compiles fine fmu using jmodelica , able simulate without problems. however, wan't find optimal control sequence bring boiler operating point , here things stop working. i have written .mop file optimization problem, when call transfer_optimization_problem , following error: warning: ignored enumeration typed variable: eval parameter modelica.fluid.types.modelstructure boiler.boilerfmu.boiler.pipe.modelstructure = modelica.fluid.types.modelstructure.av_b "determines whether flow or volume models present @ ports" /* modelica.fluid.types.modelstructure.av_b */ java error occurred: exception in thread "main" java.lang.unsupportedoperationexception: cannot convert expression mx: size(a, 1) @ org.jmodelic

xml - Android - FATAL EXCEPTION: Error inflating class abLayout - Custom Style Does Not Resolve -

i'm getting fatal error stating: binary xml file line #9: binary xml file line #9: error inflating class all research i've done points creating custom style resolve issue: got error inflating class android.support.design.widget.tablayout error inflating class android.support.design.widget.tablayout or perhaps supportlibrary - or adding missing background: android.view.inflateexception binary xml file line #1 error inflating class android.widget.relativelayout however none of solutions seem resolve force close issue , i'm not sure how can resolved. any suggestions appreciated. chatfrag.java public class chatfrag extends fragment { ... public chatviewpageradapter adapter; private viewpager viewpager; private tablayout alltabs; ... @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { super.oncreate(savedinstancestate); context = get

encoding - laravel-dompdf thai language(utf8) not working -

i'm trying create pdf correct characters, there "?" characters there thai language. can configure show thai language? i added <meta http-equiv="content-type" content="text/html; charset=utf-8"/> it still doesn't work. thank help.

python - can't define a udf inside pyspark project -

i have python project uses pyspark , trying define udf function inside spark project (not in python project) in spark\python\pyspark\ml\tuning.py pickling problems. can't load udf. code: from pyspark.sql.functions import udf, log test_udf = udf(lambda x : -x[1], returntype=floattype()) d = data.withcolumn("new_col", test_udf(data["x"])) d.show() when try d.show() getting exception of unknown attribute test_udf in python project defined many udf , worked fine. add following code. isn't recognizing datatype. from pyspark.sql.types import * let me know if helps. thanks.

neo4j - Cypher Query fail while defining the relationship count -

neo4j version: 3.0.4 objective of below query eliminate duplicate bus service , bustop in path, work fine if didn't provide relationship count -[r:connectswith]-> if relationship count defined -[r:connectswith*..3]-> ,then throwing key not found: r working: optional match p=(o:port{name:"busstop1"})-[r:connectswith]->(d:port{name:"busstop2"}) all(r1 in rels(p) 1 = size(filter(r2 in rels(p) (r1.service = r2.service)))) , all(n in nodes(p) 1 = size(filter(m in nodes(p) id(m) = id(n)))) return p limit 10 not working: optional match p=(o:port{name:"busstop1"})-[r:connectswith*..3]->(d:port{name:"busstop2"}) all(r1 in rels(p) 1 = size(filter(r2 in rels(p) (r1.service = r2.service)))) , all(n in nodes(p) 1 = size(filter(m in nodes(p) id(m) = id(n)))) return p limit 10 work around solution: optional match p=(o:port{name:"busstop1"})-[r:connectswith*..3]->(d:port{name:"bussto

How to allow specific website/url using c# windows application program -

i have make application parental control can allow website or url access. rest of url must not access user until unless program has been stopped. i have tried group policy , can group policy. want fixed issue programmatically. @ least if done command line better me implement.

docker - dashDB local MPP deployment issue - cannot connect to database -

i facing huge problem @ deploying dashdb local cluster. after successful deployment following error comes in case of trying create single table or launch query. furthermore webserver not working in previous smp deployment. cannot connect database "bludb" on node "20" because difference between system time on catalog node , virtual timestamp on node greater max_time_diff database manager configuration parameter.. sqlcode=-1472, sqlstate=08004, driver=4.18.60 i followed official deployment guide, followings doublechecked: each physical machines' , docker containers' /etc/hosts file contains ips, qualified , simple hostnames there nfs preconfigured , mounted /mnt/clusterfs on every single server none of servers signed error @ phase "docker logs --follow dashdb" command nodes config file located in /mnt/clusterfs directory after starting dashdb following command: docker exec -it dashdb start it looks should (see below),

android - ACCESS_FINE_LOCATION permissions update with uses-feature in Ionic mobile application -

i received notification google asking update way declare use of native geolocation in-app. in ionic (v1), cordova-plugin-geolocation 2.3.0 "geolocation" installed. line declared in androidmanifest.xml : <uses-permission android:name="android.permission.access_fine_location" /> google telling use instead : <uses-permission android:name="android.permission.access_fine_location" /> <uses-feature android:name="android.hardware.location.gps" android:required="false"> is there clean way insert androidmanifest.xml ? should hook ? should wait cordova-plugin-geolocation update plugin in order satisfy google recommandations ? you can specify android manifest properties config.xml file this: <platform name="android"> <config-file target="androidmanifest.xml"> <uses-permission android:name="android.permission.access_fine_location" /> <uses-feature and

Spring Boot with maven war dependancy -

i have spring boot web project dependency maven overlay war file spring web project. war included in pom.xml. how can deploy war along spring boot application can use rest endpoints belong war file. i'm trying start application sts running java application. while application starting, can see urls belong spring boot project, urls belong war file missing. i believe spring boot not support that. see issue here try building war , deploying container.

mysql - "where in" in trigger after insert -

i must insert new row in table, text column contains reference table's ids. eg: insert table1 (reference, date) values('23,24,25','2016-09-22'); my trigger should update table2.status table2.id 1 of table1.reference values. it's this: delimiter ;; create trigger `rim_ai` after insert on `table1` each row update table2 set status = 11 id in (new.reference);; delimiter ; but... found status value changed on first row (eg. 1 id 23). if broken in trigger should update nothing @ all! should convert reference field else 'text'? in advance. it's not trigger broken, table design. should not store series of values within single field separated comma (or other separator). should store each individual reference - date pair in own record. instead of reference | date 23,24,25 |2016-09-22 have reference | date 23 |2016-09-22 24 |2016-09-22 25 |2016-09-22 in instance trigger work expected. although, rewrite where

ios - How i can display a image -

how can display image automatically 5 seconds after open page , move ? i have piece of code, image display automatically 5 seconds after open page not move why. class yourviewcontroller: uiviewcontroller{ @iboutlet weak var moveobj: uiimageview! override func viewdidload(){ super.viewdidload() moveobj.hidden = true moveobj.alpha = 0 nstimer.scheduledtimerwithtimeinterval(5, target: self, selector: #selector(uiviewcontroller.showmybtn), userinfo: nil, repeats: false) } func showmybtn(){ uiview.animatewithduration(1, animations: { self.moveobj.hidden = false self.moveobj.alpha = 1 }) } } override func viewdidappear(animated: bool) { super.viewdidappear(animated) let orbit = cakeyframeanimation(keypath: "position") var affinetransform = cgaffinetransformmakerotation(0.0) affinetransform = cgaffinetransformrotate(affinetransform, cgfloat(m_pi)) let circlepa

r - Why doesn't `[<-` work to reorder data frame columns? -

why doesn't work? df <- data.frame(x=1:2, y = 3:4, z = 5:6) df[] <- df[c("z", "y", "x")] df #> x y z #> 1 5 3 1 #> 2 6 4 2 notice names in original order, data has changed order. this works fine df <- data.frame(x=1:2, y = 3:4, z = 5:6) df[c("z", "y", "x")] #> z y x #> 1 5 3 1 #> 2 6 4 2 when extraction completed values in index replaced not names. example, replacing first item below not affect name of element: x <- c(a=1, b=2) x[1] <- 3 x b 3 2 in data frame replaced values in same way. values changed names stayed constant. reorder data frame avoid extraction framework. df <- df[c("z", "y", "x")]

angularjs - Trigger of function not happening when combo box selected -

i have created tree using bento component. trying have combo box wherein select value , tree nodes matching value selected. function associated combo box change event not getting triggered. angular js code var app = angular.module('bentouiapp', ['bento.modern', 'wj', 'bento.d3', 'aa.formextensions', 'aa.notify']); angular.module('bentouiapp').controller('dbconnectionctrl', [ '$scope', '$timeout', function ($scope, $timeout) { 'use strict'; $scope.dbconnections = []; $scope.filteritems = [ {id: '1', title: 'devwatch_w_b'}, {id: '2', title: 'none'} ]; $scope.selectoption = function(selectedval,item) { dbitems = []; alert("function selected"); $scope.dbconnections = []; if(selectedval == 1){ $scope.tree.foreach(function(parent) {

javascript - Get SVG text element's width -

Image
i have following svg text element: <text data-model-id=​"k10673" x=​"584" y=​"266" fill-opacity=​"1" style=​"font:​ 12px arial,helvetica,sans-serif;​ " fill=​"#a5d16f">​bu yil sonu​</text>​ it's approximately in middle of screen. , can inspect follows: i need width of text. on chrome debugger, can see text has width of 83.941 however, cannot width javascript page. method related width returns zero, although it's correctly displayed chrome debugger. i element follows: var x = document.queryselector("#k11489 > g:nth-child(27) > text:nth-child(1)") then, following javascript functions return 0 or undefined: x.getcomputedtextlength() x.getbbox().width x.style.width also i've tried following jquery functions after getting jquery object, however, none of them returns width either: x.width() //returns function x.innerwidth() //returns null x.outerwidth() //returns n

python 3.x - Pandas Label Duplicates -

given following data frame: import pandas pd d=pd.dataframe({'label':[1,2,2,2,3,4,4], 'values':[3,5,7,2,5,8,3]}) d label values 0 1 3 1 2 5 2 2 7 3 2 2 4 3 5 5 4 8 6 4 3 i know how count unique values this: d['dup']=d.groupby('label')['label'].transform('count') which results in: label values dup 0 1 3 1 1 2 5 3 2 2 7 3 3 2 2 3 4 3 5 1 5 4 8 2 6 4 3 2 but column have following values: 1 if there 1 unique row per label column, 2 if there duplicates , row in question first of such, , 0 if row duplicate of original. this: label values dup status 0 1 3 1 1 1 2 5 3 2 2 2 7 3 0 3 2 2 3 0 4 3 5 1 1 5 4 8 2 2 6