Posts

Showing posts from May, 2012

excel - Navigation between web-elements in Java Selenium Automation testing using Eclipse -

i have issue navigating between different web-element. excel sheet has different test cases having different pages , it's methods. using these inputs, eclipse run test case. while doing when click on web-element, sub web-elements appear , disappear within 4 seconds, not able navigate 1 web-element sub web-element continue further steps (selenium java automation testing). i have tried this public boolean isiebrowser(){ capabilities cap = ((remotewebdriver) _seldriverlocal).getcapabilities(); if(cap.getbrowsername().equalsignorecase("internet explorer") && integer.parseint(cap.getversion())>=11) return true; else return false; } if(isiebrowser()) //not able enter if condition { actions builder = new actions(_seldriverlocal); builder.movetoelement(workspace).build().perform(); workspace.click(); } else { workspace.click(); } i not able resolve can suggest solution this.

android - RecyclerView smoothScrollToPosition(0) dont work correctly -

i have recyclerview in fragment . when call smoothscrolltoposition(0) , first cell height larger phone height, recyclerview sometimes: show top of first cell in phone view show bottom of first cell (that means it's not top of recyclerview how can solve problem? want show top of first cell. this recyclerview in fragment : <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.recyclerview xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/feed_recycler_view" android:background="@color/colorlightgray" android:layout_width="match_parent" android:layout_height="wrap_content" /> and code scrolling top cell recyclerview feedrecycler = (recyclerview)myview.findviewbyid(r.id.feed_recycler_view); feedrecycler.smoothscrolltoposition(0); when call smoothscrolltoposition(0) , if top of first cell on screen, g

javascript - jquery pass parameters on mutual functions -

i have 2 functions in jquery change div textarea on click , making div on blur. need save id of div , use in function nested. how can pass id between these 2 functions? code, detects th id event function divclicked(id) { console.log("click"); var divhtml = $(this).html(); var editabletext = $("<textarea />"); editabletext.val(divhtml); $(this).replacewith(editabletext); editabletext.focus(); // setup blur event new textarea var iden = $(this).attr("id"); editabletext.blur(id, editabletextblurred); } function editabletextblurred(id) { console.log("blur"); var html = $(this).val(); var viewabletext = $("<div>"); viewabletext.html(html); $(this).replacewith(viewabletext); var descr = viewabletext.html(); // setup click event new div cool_function(id, descr); $(viewabletext).click(id, divclicked); } a much better approach use delegated event handlers switch element bet

javascript - Ng-repeat rendering entire list from the beginnning after appending items to it -

i implementing infinite-scrolling using angular. when user reaches end of scroll, new data fetched using ajax call, , appended existing list. here relevant code: function gets called on successful completion of ajax call: function successcallback(data){ var scope = angular.element($("#splistroot")).scope(); scope.$apply(function(){ if(scope.providerslist === null) { scope.providerslist = []; /* init if null */ } array.prototype.push.apply(scope.providerslist, json.parse(data.serviceproviderlist)); scope.servicename = data.category; scope.limit += search_limit; viewtobedisplayed(list_view); }) setevents(); if (a.onscreen(listenddiv,10)) { getmoredataend(); } } html part: <div id="spn-service-provider-list"> <div ng-repeat="providerslist in ( filteredproducts = ( providerslist | filter:{ providername: spsearch } | filter:{ citiesservicing:

html - How would I make it so that a border only spans a certain length, on one side? -

how make border spans length, on 1 side? tried <ul id = 'list'> <li class = 'list-item'>example1</li> <li class = 'list-item'>example2</li> <li class = 'list-item'>example3</li> </ul> and css: <style> #list{ list-style-type:none; display:inline; } .list-item{ float:left; border-left:solid 5px red; } </style> the way have border take part of width or height of element make use of two elements - parent , child (or element absolutely-positioned). vertical borders should specified on element smaller height , , horizontal borders should specified on element smaller width . this can seen in following example: #div1 { height: 200px; width: 100px; border-top: 5px solid red; } #div2 { height: 100px; width: 200px; padding-left: 5px; border-left: solid 5px red; } <div id="div1"> <div id="div2">l

python - Pandas conditional creating columns issues -

i have sample data set, import pandas pd df = { 'columa':['1a','ws rank','rank','ws rank','rank','drank'], 'value': [ 1, 12, 34, 50, 3,2] } df = pd.dataframe(df) 1. want create column 'hp', columna rows 'ws rank' , 'rank' , 'drank', if value 1 hp 25, if value 2 hp 24...etc. first created smaller dataset contain rows because real data set big. concatenate dataset , original dataset include 'hp' column. when concatenated datasets there duplicated rows. there must easier way. my code: dfrank=df[df["columa"].str.contains('ws rank|rank')] dfrank['value'] = dfrank['value'].astype(int) dfrank.loc[dfrank.value == 1, 'hp'] = 25 dfrank.loc[dfrank.value == 2, 'hp'] = 24 dfrank.loc[dfrank.value == 3, 'hp'] = 23 dfrank.loc[dfrank.value == 4, 'hp'] = 22 dfrank.loc[dfrank.value == 5, 'hp'] = 21 dfrank.loc

I am using BigINT in MySQL and I want to retrieve it in android using Shared Preferences so how to do it? -

i using mobile number in big int mysql , want retrieve in shared preferences there no datatype big int in editor. you can this public static void loadi() { = new biginteger(prefs.getstring("i", "0")); } public static void savei() { sharedpreferences.editor editor = prefs.edit(); editor.putstring("i", i.tostring()); editor.apply(); } wiki

postgresql - Grafana Postgres Datasource Error -

Image
i'm using postgresql database on grafana want visualize. thanks plugin can set postgres db datasource on grafana. the problem while making query: i following error: wiki

osx - Install Ruby on old Mac OS 10.7.5 -

i don't use mac, it's old computer got try , publish app ios. need @ least ruby 2 , have 1.8. i know possible because of guy here asking how upgrade 2.2 . doing following failed: -rbenv install 2.1.0 result: ruby-build: use libyaml homebrew ruby-build: use openssl homebrew downloading ruby-2.1.0.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.bz2 error: failed download ruby-2.1.0.tar.bz2 build failed: (os x 10.7.5 using ruby-build 20170726) please me, don't have idea how work out through this. wiki

python - Py.test fixture: Use function fixture in scope fixture -

i facing small issue pytest fixtures, appreciate help. i have few function fixtures mentioned below. simplicity have not show implementation. @pytest.fixture() def get_driver(): pass @pytest.fixture() def login(get_driver): pass @pytest.fixture() def settings(login): pass the problem need 1 more ( session level ) fixture setup before run first test case. (actually start testing). i.e. go settings page , create few settings. (after login) now problem can't using session level fixture , can't use function level fixture in session level. or can i? @pytest.fixture(scope="session") def setup(settings): settings.create_settings() pass you need use workaround. action needs done in function scoped fixture autouse set true . you need initialize variable in session based fixture, check if settings have been done or not. if not done, settings , change flag false below working example import pytest @pytest.fixture(scope=&qu

ios - How to create a smooth trail between points that fades away with distance from camera? -

i'm looking advice on how tackle problem. have algorithm creating smooth bezier path between points. i'm not proficient scenekit though. best approach? should singular node? know how gradually fade away nodes distance camera in case of trail want fade part that's on edge, not whole node. wiki

python - Read the end of an IP Adress -

i last part of ip address , save it. think it's simple don't know how to. so, can read ip address of variable ip_adrr . example, if print in code : print ip_adrr i 192.168.1.25 want 25 , how possible it? ip_adrr.split('.')[-1] if ip_adrr not string cast string str(ip_adrr) wiki

Error: deployer must have access to this group with deployer AppMaker app -

Image
a user reported error. first time happens him , first see kind of errors. i restrict app google groups, use groups define roles. note we've checked google admin console , user_email belongs group_email . note user_email not deployer of app, @ :) he's simple user. do know produce ? thanks wiki

Neo4J Cluster - Bolt + Routing -

neo4j document says can use bolt + routing when using cluster mode/setup. able use single node bolt connection without issue if use cluster mode/setup gives me following error. caused by: org.neo4j.driver.v1.exceptions.clientexception: 'bolt+routing' not supported transport (in 'bolt+routing://username:password@server.com:7687', available transports are: [bolt]. in cluster mode if use bolt+routing://username:password@server.com:7687 getting notaleader error below config.neo4jconfiguration: intercepted exception exception in thread "main" org.neo4j.ogm.exception.cypherexception: error executing cypher: neo.clienterror.cluster.notaleader @ org.neo4j.ogm.drivers.bolt.transaction.bolttransaction.commit(bolttransaction.java:75) note: using spring data neo4j application the document says, "the address in uri must of core server." can set cluster member core configuration in neo4j.conf: dbms.mode=core and in browser can che

oracle - cmake not finding library needed for linking -

i converting make file cmake. make: oracle = -l${oracle_home}/lib/ -lclntsh \ -i${oracle_home}/rdbms/public cmake: include_directories(${oracle_dir}/include) link_directories(${oracle_dir}/lib) project(db_i) add_executable(db_i db_i.c) target_link_libraries(db_i link_public ${project_link_libs} -lclntsh) install(targets db_i destination ${open_fox_bin_dir}) error: [ 53%] linking c executable db_i /usr/bin/ld: cannot find -lclntsh collect2: error: ld returned 1 exit status i have oracle_home pointing directory files exist. compiler finding oci.h file needs. directory structure... oracle_home include oci.h lib libclntsh.so i have tried moving libraries same directory source. copied clntsh /usr/bin. what missing? thanks you don't need leading -l in target_link_libraries target_link_libraries(db_i link_public ${project_link_libs} clntsh) wiki

python - Parse logs in sparkSql -

i have log files logs of defined format. has lines not in required format. need design python spark program identify such unusual lines. also, need print/dump 'n' lines above , below line ( grep , printing n lines above , below n user defined). how buffer n lines in spark program? wiki

turtle graphics - How to nest a function inside a function in Python -

i have test code working on learning python , wondering how nest function inside function in python (if possible). here code working with. import turtle my_turtle = turtle.turtle() def square(length, angle): my_turtle.forward(length) my_turtle.left(angle) my_turtle.forward(length) my_turtle.left(angle) my_turtle.forward(length) my_turtle.left(angle) my_turtle.forward(length) def repeat(length, angle): square(length, angle) my_turtle.left(angle) square(length, angle) repeat(50, 45) first - indentation wrong. second - in square, not choose angle (it's kind of done deal). third - for loops thing: def square(length): in range(4): my_turtle.forward(length) my_turtle.left(90) then can use function like def three_squares(): in range(20, 80, 20): # gives [20, 40, 60] square(i) my_turtle.left(10) python lets pass functions functions, like def multi(times, inter_angle, action,

php - sum method on query multiple columns based on id -

i working on sports team app , trying sum (total) goals scored each player throughout season. have query follows: $gmc = db::table('matchcards')->where('grade_id', $gradeid)->select('id')->get(); foreach($gmc $object) { $arrays[] = (array) $object; } $gmcx = collect($arrays)->flatten(); foreach ($gmcx $mc) { //loop 1 - list of matchcards grade $im = db::table('matchcards')->distinct()->select('capt', 'gk', 'player3', 'player4', 'player5', 'player6', 'player7', 'player8' , 'player9', 'player10', 'player11', 'player12', 'player13', 'player14', 'player15', 'player16')->where('id', $mc)->get(); foreach ($im $object2) { $arrays2[] = (array)$object2; } $imx = collect($arrays2)->flatt

PREPARE SQL plan for Postgresql - with bind varible list -

i have sql-command want use prepare statment googling found syntax : prepare sqlplan (bigint) select * employees employee id in ($1); execute usrrptplan2(123); i have 2 question : how can use list/array (size unknown) in bind variable part? this sqls works - want can use "prepare plan if not exists ?" since running second time get: error: prepared statement "sqlplan" exists https://www.postgresql.org/docs/current/static/sql-prepare.html prepare if not exists not work - have https://www.postgresql.org/docs/current/static/sql-deallocate.html deallocate first. regarding array in argument, eg: t=# prepare a(text[]) select * pg_class relname = any($1); prepare t=# execute ('{pg_tables,pg_indexes}'); relname | relnamespace | reltype | reloftype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | relallvisible | reltoastrelid | reltoastidxid | relhasindex | relisshared | relpersistence | relkind | relnatts

c++ - Qt::Popup and shortcuts -

i need set setwindowflags(qt::popup); but @ same time on linux not work system shortcuts when window(qwidget) active(visible). can combine these 2 things together? example: #include <qapplication> #include <qwidget> int main(int argc, char *argv[]) { qapplication a(argc, argv); qwidget widget; widget.setwindowflags(qt::popup); widget.setgeometry(0, 0, 100, 100); widget.show(); return a.exec(); } when widget visible can't example take screenshot print key. can test on linux. wiki

octobercms - How to create dynamic submenu in October CMS using Static Pages? -

there's lot of static pages , subpages in project. couldn't find how create dynamic submenu in october cms using static pages plugin. site/menu-items.htm <ul class="{{ class }}"> {% item in items %} <li class="{{ item.isactive or item.ischildactive ? 'active' : '' }} {{ item.items ? 'dropdown' : '' }}" > <a {% if item.items %}class="dropdown-toggle" data-toggle="dropdown"{% endif %} href="{{ item.url }}" > {{ item.title }} {% if item.items %}<span class="caret"></span>{% endif %} </a> {% if item.items %} {% partial 'site/menu-items' items=item.items class='dropdown-menu' %} {% endif %} </li> {% endfor %} layout {% partial 'site/menu-items' items=staticmenu.menuitems class='n

sorting - Change row names in R, sort by date -

Image
this question has answer here: how reset row names? 1 answer i have dataframe of first column date object (used lubridate) , other columns show number of items sold. i'm having issues row names (numbers). is, row names not in order of dates: i tried using rownames, can't figure out how sort row names date, july 28 becomes '2', july 29 becomes '3', etc. have way achieve this? if additional information needed, please let me know. in advance! you can use built-in order function: newdata <- df[order(df$date),] if rownames persist out of order, can reset them: rownames(newdata) <- null wiki

SQL Server how to fetch single record from multiple resultset per condition -

i have table has multiple records per year. pick latest record current year. if there not record current year, pick record has latest value year field. can help? i have below query in sql server 2008 v2. declare @currentyear int set @currentyear = year(getdate()) select account, column2, column3, year_c year_c = @currentyear if there multiple records in table current year 2017, query return records. select latest record list. also, need select 1 record combination of account & year_c. this query return latest record per account: declare @currentyear int set @currentyear = year(getdate()) select * ( select row_number() on (partition account order year_c desc) rn, account, column2, column3, year_c year_c <= @currentyear ) results rn = 1 the trick select records , assign them row-index per each account (partition), sorted year descending. select ones row-index of 1 latest per account.

jquery - Weather API error {"cod":"400","message":"{vlat} is not a float"} -

i trying api coordinates local weather app project , link open weather map http://api.openweathermap.org/data/2.5/weather?lat='+lat+'&lon='+long+'&appid=7cc72055cf03c02e9bf988f2a7b7b7e2 i error message every time try open link. {"cod":"400","message":"{vlat} not float"} also prevents console pulling location. here link code. https://codepen.io/andreacarr/pen/eememr?editors=1111 please , let me know seems error the issue because geolocation.getcurrentposition call asynchronous, hence you're trying use lat , long both before defined , out of scope. to fix need put $.getjson call within callback of geolocation logic, this: $(document).ready(function() { var long; var lat; if (navigator.geolocation) { navigator.geolocation.getcurrentposition(function(position) { long = position.coords.longitude; lat = position.coords.latitude; $("#data").html("

javascript - Ng-table select filtering issue -

i trying filter ng-table data select drop down, issue select dropdown values not populating , ofcos filtering doesn't work, using ng-table 2.1.0 version. tried changing $scope.names object hardcoded object i.e., $scope.names=[{title:'moroni'},{title:'enos'},{title:'jacob'}]; values populating in select dropdown assuming there must property 'title' every object, still filtering doesn't work either, there missing here? plunker here any appreciated. as can see expression in ngoptions attribute: ng-options="data.id data.title data in $selectdata" the format of option should {id: ..., title: ...} . think can change angular.foreach block this: var titles = data.map(function(obj) { return obj.title; }); $scope.names = titles.filter(function(title, i) { return titles.indexof(title) === i; }) .map(function(title) { return {title: title, id: title}; }); this not fastest method generate array (a

'git status' shows incorrect commit count from origin/master -

in local repo, ran following commnands: git checkout -b localbranch origin/master < created new branch track remote branch 'master' git status < says up-to-date git reset --hard head~30 < facing build issues. build doesnt fail. other developer has checked in issues seems. git status < now, says i'm behind 36 commits origin/master i expecting show i'm behind 30 commits says 36 commits. why that? count commits merged branches or missing else here? note: there multiple other branches in remote , few got merged master branch. by running git reset --hard head~30 , reverted 30-th parent of head . if used branching, there may more 30 commits between head , head~30 . for example: * 501fe6f (origin/master) merge branch 'master' head |\ | * 24c80b0 foo * | 69d4fad foo |/ * 93d4461 (head -> master) foo * 566ba14 foo * 97f38e0 old the local master origin/master~2 , there 3 commits between them. , git status shows 3

node.js - using mysql in Electron -

im trying use mysql in electron i'm running error typeerror: invalid data, chunk must string or buffer, not object @ socket.write (net.js:667) @ protocol.<anonymous> (connection.js:100) with code var mysql = require('mysql'); var con = mysql.createconnection({ host: 'host address', user: 'username', password: 'pw', database: 'db name', }); con.connect(err => { if(err) throw err }) con.query('select * books', (err2, result) => { if(err2) { throw err2; } console.log(result); }) if paste test.js file , run node runs 100% fine without errors, im not sure im going wrong here so turns issue had fact running angular on electron. if put code inside angular code error out if put in index.html run fine. made little proxy function in index.html connecting db , making queries, i'd jsut call inside angular app without problem window.mysqlquery(querystring)

ios - UITabBarControllerDelegate's method is not called -

i create programmatically uitabbarcontroller more 5 tabs (exactly 8 child view controllers). my purpose custom transition animation tab changing. setup delegate uitabbarcontroller , implement method: - (nullable id <uiviewcontrolleranimatedtransitioning>)tabbarcontroller:(uitabbarcontroller *)tabbarcontroller animationcontrollerfortransitionfromviewcontroller:(uiviewcontroller *)fromvc toviewcontroller:(uiviewcontroller *)tovc when select tab sending: [tabbarcontroller setselectedindex: 6]; delegate's method not called. delegate's method called when send [tabbarcontroller setselectedindex: 3]; for example, i.e. visible tab. one more remark: if selected view controller in visible range 0..3 , next view out of visible range 0..3 delegate's method still called. in case when selected view controller out of visible range 0..3 , next view out of visible range 0..3 delegate's method not

java - Trying to make a treasure hunter game, but having issues with the surview script -

the general idea app allows user click on field , find items. item definitions come excel file. items scatter across field in random positions. when user click on screen create holes. items found display in list when pressing inventory button. having trouble drawsurface script. xml: <android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:id="@+id/mfield" /> <linearlayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="50dp"> <button android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="0.5" android:text="view inventory" android:id="@+id/btninventory"/> <button android:layout_width="fill_parent" android:layout_height="fill_parent&qu

python - How to run Pytorch model in normal non-parallel way? -

i going through this script , , there code block takes 2 options account, dataparallel , distributeddataparallel here: if not args.distributed: if args.arch.startswith('alexnet') or args.arch.startswith('vgg'): model.features = torch.nn.dataparallel(model.features) model.cuda() else: model = torch.nn.dataparallel(model).cuda() else: model.cuda() model = torch.nn.parallel.distributeddataparallel(model) what if don't want either of these options, , i want run without dataparallel . how do it? how define model runs plain nn , not parallelizing anything? dataparallel wrapper object parallelize computation on multiple gpus of same machine, see here . distributeddataparallel wrapper object lets distribute data on multiple devices, see here . if don't want it, can remove wrapper , use model is: if not args.distributed: if args.arch.startswith('alexnet') or args.arch.startswith('vgg&#

python - Different SHA1 but same SHA256 -

Image
this question has answer here: why can't call read() twice on open file? 7 answers i iterating through folder containing binary files , trying compute each file's hash values, sha1 , sha256. on runs, weirdly same sha256 values files, sha1 values different (thus correct). below screenshot of output file shows sha1 hashing done correctly. sha256 isn't. (sorry filenames of each binary file sha1) is there wrong process? relevant code in python. not seeing something. sorry. out.write("filename,sha1,sha256\n") root, dirs, files in os.walk(input_path): ffile in files: myfile = os.path.join(root, ffile) nice = os.path.join(os.getcwd(), myfile) fo = open(nice, "rb") = hashlib.sha1(fo.read()) b = hashlib.sha256(fo.read()) paylname = os.path.basename(myfile) mysha1 = str(a.hexdi

symfony - Field's Name Table -

this question has answer here: getting column names in doctrine2 entity 1 answer i trying display field name database used in table header displayed in twig admin section propose! i have database 1 id | gram | height | kilos | 1 | 27.1 | 126 cm | 29 kg | and want field name "gram, height etc" , make table header, going make translation english japanese , on, "the problem how data field name , display text advice on", thank in advance! code controller /** * @route("/ingredients/header-translation", name = "z_recipe_header_translation") * @template("nutritionmainbundle:admin\create\recipe\ingredients:translate-headers.html.twig") */ public function headertranslationaction(request $request) { $em = $this->getdoctrine()->getmanager(); $nutrients = $em->getreposi

c# - Report Viewer multiple values -

i want display report query this select * vw_selectsalesbyarticle brandname in (@brandname) order sku, seqname so parameter input, try set string this string strbrand = "asd','bca','qwe"; but not show value. this.datatable1tableadapter.fill(this.dataset1.datatable1, strbrand); this.reportviewer1.refreshreport(); i try type of string well: string strbrand = "'asd','bca','qwe'"; string strbrand = "asd','bca','qwe"; string strbrand = "asd,bca,qwe"; but none of them work - idea? wiki

php - bootstrap.min.css Failed to load resource: net::ERR_CONNECTION_REFUSED -

i struggling linking files : css, javascript, bootstrap, images etc... on local server works fine. when upload web server got error...and know because of path have. searches on local. , using codeigniter framework, have no idea path should when put online. example : <link rel="stylesheet" type="text/css" href="<?php echo css_folder_url('reset.css'); ?>" media="screen"/> <link href="<?php echo base_url() ?>web/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> this how need link in framework maybe should change in host file : andreaportfolio.local ::1 andreaportfolio.local --> maybe should .com instead of local photo error message this error means specific file not found. either path wrong or file not present want be. try access entering source address in browser check if exists there. browse directories on server ensure path correct. may copy

php - WordPress: Dash instead of slash on subcategory permalink -

in wordpress, need change permalink of subcategories (not posts) follows: instead of: mywebsite.com/supercategory1/supercategory2/category i need have: mywebsite.com/supercategory1-supercategory2-category a solution of replacing slash dash work (as long doesn't influence post's permalinks) other acceptable solution not having parent categories shown @ (because can write subcategory's slug "supercategory1-supercategory2-category" ) any ideas on how can that? wiki

cordova - Android Webview looks and performance -

i want show shopping websites in webview. has normal android app.i tried web view. performance slow , can't achieve same view in web view. sugg pls.or have achieve idea?.some of website having domain com , in.how can change automatically based on location of user? wiki

How Char(13) results in a new line in SQL Server? -

what science behind char(13) resulting in new line in sql server? wondered how works. too long comment, elaborate little bit on comments... if @ ascii table, see decimal , character values each. can check / view these in sql using ascii , char functions. select ascii_decimal_value = ascii('!') ,ascii_character = char(33) the snippet above shows decimal , character values exclamation point. knowing this, should understand why 13 , 10 used carriage return , new line, respectively, , how use it. example... if run code below in ssms output results text , can see carriage return. select 'this on first line' + char(13) + 'and on second' wiki

amazon web services - Compare Linux application file system between 2 AWS EC2 instances -

we have java based application running in linux ec2 instances. have different components running in different ec2 instances. every month go ami upgrade creating new instances, deploying code , killing old instances. facing challenge in making sure components deployed in instances. are there tools snapshot of application file system old instance before ami upgrade , compare snapshot taken new instance after code deployment? if make our work easier. have tool of 8 instances running application. wiki

compiler errors - Make fail during RSEM install -

i following instruction install rsem on mac os x (el capitan). below error get: g++ -std=gnu++98 -wall -i. -i. -isamtools-1.3/htslib-1.3 -o3 -c -o extractref.o extractref.cpp in file included extractref.cpp:13: in file included ./utils.h:10: in file included /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/../include/c++/v1/cassert:21: in file included /usr/local/include/assert.h:5: /usr/local/include/except.h:15:32: error: typedef redefinition different types ('struct except_frame_t *' vs 'except_frame_t') typedef struct except_frame_t *except_frame_t; ^ /usr/local/include/except.h:15:16: note: previous definition here typedef struct except_frame_t *except_frame_t; ^ /usr/local/include/except.h:17:18: error: field has incomplete type 'except_frame_t' except_frame_t prev; ^ /usr/local/include/except.h:16:8: note: definition of 'except_

android - Recyclerview automatically scroll up (a little) when update -

i have recyclerview in coordinatorlayout in fragment , there problem recyclerview in situations, when reload fragment or calling notifydatasetchanged() , recyclerview automatically scroll little (about 1 cm)!!!! , because of this, scrolling on appbarlayout doe's not work! it's on android 4.2.2 . googled , cant find this! deepak rathore answer worked me. adding android:descendantfocusability="blocksdescendants" coordiante layout fixed problem. wiki

osx - Bash adding a string to file name -

i need add word "hallo" @ end of each filename before extension in given directory. code produces no output. echo statements give no output , file names not changed count="" dot="." file in $ls echo $file count="" f in $file echo $f if [ $f -eq $dot ]; count=$count"hallo" fi count=$count+$f done mv $file $count done with bash can done simplier like: for f in *;do echo "$f" "${f%.*}hallo.${f##*.}" done example: $ ls -all -rw-r--r-- 1 29847 29847 0 aug 21 14:33 file1.txt -rw-r--r-- 1 29847 29847 0 aug 21 14:33 file2.txt -rw-r--r-- 1 29847 29847 0 aug 21 14:33 file3.txt -rw-r--r-- 1 29847 29847 0 aug 21 14:33 file4.txt -rw-r--r-- 1 29847 29847 0 aug 21 14:33 file5.txt $ f in *;do mv -v "$f" "${f%.*}hallo.${f##*.}";done 'file1.txt' -> 'file1hallo.txt' 'file2.txt' -> 

mysql - How to save HH:MM:SS only in sql time type field using node.js -

actually getting "start_time": "02:05:02" in json front-end string type.i using waterline , database in mysql , have field in database of time type not accepting start_time getting in request. new in node js.i need direction how save hh:mm:ss format using node js? any appreciated. wiki

java - "failed to lazily initialize a collection of role" in Hibernate -

i've seen question asked lot , know why happens, i'm having issues trying solve in specific case. i'm converting project i'm working on using xml files map classes database tables hibernate, using hibernate annotations. going fine long i'm using basic java types (primitives or class versions of primitives, e.g. int or integer). when comes class having member class of mine, things go south. one type of issue when have onetomany relationship. in xml file foo says this: <set inverse="true" name="barlist"> <key> <column name="foo_id"/> </key> <one-to-many class="com.me.model.dao.bar" /> </set> in converting annotation, end this: @onetomany @jointable(name = "bar", inversejoincolumns = @joincolumn(name = "foo_id")) public set<bar> getbarlist() { return barlist; } i've tried other variations of (including have joincolumn), , k

Does Bing News Search API v7 support advanced operators? -

based on bing news api v7 documentation support advanced operators . for example searching for: "dan bilzerian" , (women or money or "something wrong") returns lots of results in google news nothing in bing news. whereas "dan bilzerian" , (women or money) return results in both same thing google news. could suggest? results returned based on relevance. your use of or makes "dan bilzerian" , "something wrong" least relevant source of results. dropping condition results in same using first 2 or conditions. wiki

c# - How may I access the the signature pad points using MVVM pattern? -

using xamarin.forms signaturepad control within xamarin.forms project using mvvm pattern, how may bind or should bind to, allow me access signature points? i have following: view: <?xml version="1.0" encoding="utf-8" ?> <contentpage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:signature="clr-namespace:signaturepad.forms;assembly=signaturepad.forms" xmlns:local="clr-namespace:app12.viewmodels;assembly=app12" x:class="app12.views.signaturexamlview" bindingcontext="{staticresource viewmodel}"> <contentpage.resources> <resourcedictionary> <local:signaturexamlviewmodel x:key="viewmodel"/> </resourcedictionary> </contentpage.resources> <stacklayout> <signature:signatur

Issue Populating the details view grid with selectedindex gridview - ASP.NET , C# -

on asp.net page have dropdown list - contains table names db. on selecting 1 table list, gridview below populated information found in table. some of tables have plenty of columns , making impossible view, l included details view me view columns. on selecting row in gridview, details view populated rows data. each table has different column names , numbers, facing problem detailsview not populated , when l click 'edit' or 'delete'. gives error events not handled. pointers/help appreciated. should able ot edit information, update in gridview , in turn updating in table. here code populating detailsview protected void gridview1_selectedindexchanged(object sender, eventargs e) { dtvinformation.datasource = gridview1.selectedrow.tostring(); dtvinformation.databind(); } below code populating gridview protected void dropdownlist1_selectedindexchanged (object sender, eventargs e) { sqldataadapter da = new sqldataadapter(string.

c# - create query that uses IN returning wrong values -

the query select * positiontable position in (51000785,52012986) returns 2 records position column '51000785' in first record , '52012986' in second. using c# want return same results..i have tried string allpositions = "51000785,52012986"; list<positiontable> position = new list<positiontable>(); position = dbcontext.positiontablelist .where<positiontable>(p => p.position == allpositions) .tolist(); this result returns nothing, how can change ==allpositions 'in (allpositions)' possible? thanks try this:- var allpositions = new string[] { "51000785", "52012986" }; var x = p in dbcontext.positiontablelist allpositions.contains(p.position) select p; wiki

asp.net - Fileupload1 ID tag is not recognizable -

i know there lot of solutions in case nothing working. trying fileupload tag id in asp.net server caught in error .it works fine in 1 page when move code in page .here comes error "the name fileupload not exists in current context" have placed fileupload in bootstrap modal . <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title " style="text-align:center">email customer</h4> </div> <div class="modal-body"> <form id="form1" runat="server"> <div class="controls controls-to"> <label class="control-label">to:</label> <asp:textbox

jGit rev-parse with groovy -

i'm trying same value rev-parse using jgit library , groovy script. found in documentation jgit link , straight java, how rebuild code groovy ? tips ! @grapes( @grab(group='org.eclipse.jgit', module='org.eclipse.jgit', version='4.8.0.201706111038-r') ) import org.eclipse.jgit.api.*; import org.eclipse.jgit.lib.*; import java.io.ioexception; class revcommit { static void main(string[] args) { git git = git.open( new file( ".git" ) ); objectid head = git.resolve(constants.head); iterable<revcommit> commits = git.log().add(head).setmaxcount(1).call(); } } the code sample have shown searches last commit. if want achieve same thing using groovy script have put body of java main method directly groovy script - not need class main method executed. have fix git.resolve(constants.head) - trying call method not exist. method exists in repository class. below can find example of groovy script similar

REST API - should I request the whole list afetr updating a single entity? -

i have web app, client , server communicate via rest api. on server have urls like get /api/items/list - return list of items post /api/items - insert new item etc there no pagination, items displayed on client @ once. the question - after client inserts new item, should request whole list server or add entity local collection? why yes: if items sorted, adding new item breaks sorting. it's easier updated list server, sort on client. the list might have been updated else. yet, refreshing list after modification alleviates situation bit, not solves it. why no: two requests per 1 user action means user should wait twice longer, can problem if internet connection slow. i believe, can done 1 request should done 1 request. missing something? as things in software, depends, on user requirements are, if of them conflicting , if so, 1 takes priority. the first thing wonder "/api/items/list" endpoint retrieving different hitting "/api/

foreign keys - Auto add data to postgresql database -

i have postgresql database 3 tables. 1 of these store id other 2 tables foreign keys. using table make connection between other 2 tables. problem don't know how add id's data table other. you can use postgresql triggers automatic insertion of data here little example of how create or replace function insert_id() returns trigger $example_table$ begin insert table_name(id) values (new.id); return new; end; $example_table$ language plpgsql; now can call same procedure using triggers functionality in postgres create trigger example_trigger after insert on table_name each row execute procedure insert_id(); wiki

RingCentral API Need Help Finding QUEUE ACTIVITY data -

i don't know report contains queue activity data on web portal. want pull information own use. instance find "time till answered". it's not in call-log report far can see. i work ringcentral. while ringcentral live reports queue activity report has average time answer dashboard item, api doesn't have information yet. we @ adding information call-log api data. let know if data other way, e.g. average time answer per queue event data. wiki

Bluetooth Low Energy not working as expected on Android -

i'm working on distributed system uses bluetooth low energy locate users in building. far, using android phones peripheral devices advertise different information in different meeting rooms. everything seems working fine found issue samsung s5 (sm-g900m) finding our advertisements (we using scanfilters detect peripheral devices) scanrecord comes empty or null values. same code working fine on pixel , samsung s7. this our advertisement code: private advertisedata createfmpadvertisedata() { advertisedata.builder builder = new advertisedata.builder(); builder.addserviceuuid(new parceluuid(uuid.fromstring("d0acdb90-745a-42a9-8e4d-9de4fb9342dc"))); return builder.build(); } private static advertisesettings createadvsettings(boolean connectable, int timeoutmillis) { advertisesettings.builder builder = new advertisesettings.builder(); builder.setadvertisemode(advertisesettings.advertise_mode_balanced); // connectable true builder.setconnec

html - How to pass a value with $_POST[...] which contains dots and spaces to PHP page? -

i'm writing php program reads data mysql database , show records on html page. it's dynamic. added different functions, among edit record. when click on edit button, program loads page name of columns , value. click on submit button , load php page values $_post[...]. it's pity if column name contains dots or spaces, value of variable has been valorized $_post blank. if try edit record using phpmyadmin works perfectly. how phpmyadmin able this? how can solve problem? thanks. here code of 2 pages. first, "edit.php" collects data needed modify record. second, "changerow.php", updates database. edit.php: <?php $rowid = $_get['id']; $host = "localhost"; $user = "inventory"; $pass = "1234"; $db_name = "inventory"; //create connection $connection = mysqli_connect($host, $user, $pass, $db_name); mysqli_set_charset( $connection, 'utf8mb4'); //test if connection failed if(mysqli_co