Posts

Showing posts from April, 2010

windows - Calling a .bat file from Java in a restricted (Citrix) Environment -

i'm not familiar programming windows desktop , i'm trying figure out how handle calling .bat files java. i'm trying make desktop java program using maven run jar file execute bash script in citrix virtualization environment. the original initial problems unc paths causing batch file not found, i've modified paths , i'm able find batch file, cmd.exe disabled in citrix account i'm using, , worried there's nothing can do. here's how works: 1) user launches program via program.jar file user checks updates 2) if updates found, new jar file called program_update.jar downloaded, , batch file called run_update.bat copied main program directory. 3) within java program, following command called: runtime.getruntime().exec("cmd /c pushd " + filename.installation + " && start run_update.bat && popd"); where filename.installation property has been previous set indicating home installation directory. run_

sql - MySQL ranking query is not giving expected value -

i have following situation: there table relates wallets , divisions. have rank users in same division. sql code using working, when try put row numbers gives strange results. tried lot of different strategies nothing worked me. select * , @currow := @currow + 1 row_number division_user, wallet join (select @currow := 0) r division_user.division_id in (select division_user.division_id division_user division_user.wallet_id in (select wallet.id wallet wallet.user_id = 1 )) , division_user.wallet_id = wallet.id group wallet.id order wallet.weekly_profit_value desc the output of query is: 1,3 2,5 3,1 desired result 1,1 2,2 3,3 variables , group by don't work together. also, never use commas in from clause. always use proper, explicit join syntax. select duw.*, (@currow := @currow + 1) row_number (select du.*,

reactjs - AJAX posting issue in React JS -

i have been doing react js while, front-end. spice external data. tried axios / fetch unfortunatelly both of them produced miserable result. here challenge: fetch("http://localhost:8080/backend/datatest/src.json", { method: 'post', headers: { 'content-type': 'application/json' }, body: json.stringify({ name: 'hubot', login: 'hubot', }) }) fetch('http://localhost:8080/backend/datatest/src.json') .then(function(response) { return response.json() }).then(function(json) { console.log(json) }) its basicly copy-paste github of fetch, assuring nothing go badly. "get" function works perfectly, got problems post-ing. keep getting same error mesage post http://localhost:8080/backend/datatest/src.json 404 (not found) however! works perfectly. i using react js, redux, node js. json file didnt installed @ server. in opinion next step. regards, koppany

android - Desktop and mobile game in Unity -

my question is: possible make in unity desktop windows gui can control objects in mobile game, in real time. new in games development, if possible can answering question? thank you, quick google search "unity use phone controller" turns this , , plenty of other results. i'm sure it's possible can't beyond that. wiki

Open HTML Content of PHP file in browser for Website Debug -

whenever have test design change on html page that's written within php file, have make effort of first uploading webpage , viewing through browser. normally, if html file, you'd update browser , see changes locally. of course, it's not possible execute php on browser unless use xampp or whatever, consider simple debug. isn't there way open php file html, ignoring php code debugging purposes? if not, i'll xampp. in advance. php has built-in webserver, can utilize guess. php -s localhost:8080 if script not require http stack (which doubt), do: php index.php > index.html update: after executed command above (php -s), type same url in browsers address bar. wiki

javascript - Datatable not giving proper search result -

working on html table using data tables , in 1 column have input button wrapped in div for column search option not working please let me know doing wrong html code <table id="pointsonrole" class="display" cellspacing="0"> <thead> <tr> <th>name</th> <th>email</th> <th>role</th> </tr> </thead> <tbody> {% emp in emps %} <tr> <td>{{emp.employee.user.first_name}} {{emp.employee.user.last_name}}</td> <td>{{emp.employee.user.email}}</td> <td> <div class="flipswitch"> {% if emp.role == 'admin' %} <input type="checkbox" data-csrf="{{ csrf_token }}" data-role="admin" data-first="{{emp.employee.user.first_name}}"

similarity - How to find best resemblance between 1 row and the rest of dataframe in R? -

how can find best resemblance between 1 particular row , rest of rows in dataframe? i try explain mean. take @ dataframe: df <- structure(list(person = 1:5, var1 = c(1l, 5l, 2l, 2l, 5l), var2 = c(4l, 4l, 3l, 2l, 2l), var3 = c(5l, 4l, 4l, 3l, 1l)), .names = c("person", "var1", "var2", "var3"), class = "data.frame", row.names = c(na, -5l)) how can find best resemblance between person 1 (row 1) , rest of rows (persons) in data frame. output should like: person 1 still in row 1 , rest of rows in order of best resemblance. simmilarity algorithm want use cosine or pearson. tried solve problem functions arules package , didn't match needs. any ideas someone? another idea define cosine function manually, , apply on data frame, i.e. f1 <- function(x, y){ crossprod(x, y)/sqrt(crossprod(x) * crossprod(y)) } df[c(1, order(sapply(2:nrow(df), function(i) f1(unlist(df[1,-1]), unli

asp.net - Azure Active Directory Reply URL redirecting to root -

i trying implement authentication using azure ad. in application setting setting reply urls https://example.com/myapp/login.aspx . when login redirects me https://example.com , not specified url https://example.com/myapp/login.aspx how can make sure redirects @ proper url? following code startup. public void configuration(iappbuilder app) { app.setdefaultsigninasauthenticationtype(cookieauthenticationdefaults.authenticationtype); app.usecookieauthentication(new cookieauthenticationoptions()); app.useopenidconnectauthentication( new openidconnectauthenticationoptions { clientid = configurationmanager.appsettings["owin:clientid"].tostring(), authority = "https://login.microsoftonline.com/yz5036e3-2951-4c11-af4d-da019fa6a57d", redirecturi = configurationmanager.appsettings["redirecturi"].tostring() }); } how trigger sign in flow? if following samples , initiating s

android - Can't automatically choose google account during login Auth0 Ionic3 Cordova -

i'm working auth0 perform sign in google. there 1 problem. if have 2 google accounts, ok. can choose 1 of them , log in. if have less two, can't. don't see choose account page. step skipped , browser freezes after. browser doesn't close. should close manually , of course i'm not authorized after. did face such problem? it's present on ios , android 5 , less. if talking android, found solution. append clearcache=yes , clearsessioncache=yes var tab = browser.open(url, '_blank'); in auth0 library code. doesn't solve problem ios, because ios using safariviewcontroller instead of inappbrowser. wiki

bash - grep multiple statements from a file -

i have shell program when runs writes logs onto log file. @ end of program , need pick few of lines (start/end/no of records processed- line in log) , push these program (java) . java program needs called once , message lines need passed array. i have java program ready not sure how grep lines log file , send java program in 1 single call. there many such programs need call java program , send these lines , hence grep content changes each of program example, 1 of shell scripts logs below onto log file.at end of shell script after main processing done the program should grep log file below 3 lines among whole log file , send java program , exit successfully. java -jar mylog.jar "job_1010" "logger1" "logger2" "logger3" [info] [myscript.sh] --- script execution start ...... [info] [myscript.sh] --- records proc : 457 ..... [info] [myscript.sh] --- script execution end how can read these log file , pass arguments java program &

python - django.db.utils.OperationalError: (1045, "Access denied for user 'someuser'@'localhost' (using password: NO)") -

i getting error when try run python manage.py migrate django.db.utils.operationalerror: (1045, "access denied user 'someuser'@'localhost' (using password: no)") this database setting inside setting.py databases = { 'default': { 'engine': 'django.db.backends.mysql', 'options': { 'read_default_file': '/config/mysql.cnf', }, } } config/mysql.cnf [client] database = dbname user = root password = passwt host = localhost default-character-set = utf8 the mysql configs can provided in settings.py file, below databases = { 'default': { 'engine': 'django.db.backends.mysql', 'name': 'db_name', 'user': 'db_user', 'password': 'db_password', 'host': 'localhost', # or ip address db hosted on 'port': '3306', 

sql - Using Google Big Query to Organise an Edgelist for Spreadsheet Use -

i'm having trouble trying reorganise large edgelist have exported .csv gephi. the structure of data is: two columns, "source" , "target". "source" contains user ids , target contains demographic information such city, country, , university. due structure of data, user may duplicated in "source" if have multiple demographic records. for example: source target user142 citya user532 countrya user352 cityc user532 citya user143 countryc user532 university1 my desired output each unique user positioned on own row, separate columns "city", "country", , "university" - this: unique user city country university user142 citya user532 citya countrya university1 user352 cityc user143 countryc i've been able separate edgelist desired output in excel using number of steps using following index, match, , array

css - Font-Weight & @Font-Face in Edge -

i did bit of searching, make long story short, i'm using @font-face code, it's bit this: @font-face { font-family: vistasansreg; src: url("vistasansreg.ttf"); /* ttf file css3 browsers */ } it displays fine on firefox & chrome, , loads in ie/edge... exception of font-weight. did searching, , i'm curious if still counts? or if has changed since. a year or 2 ago, remember using bold version of eot file in order load in ie. unfortunately, doesn't seem work anymore ie's functionality seems recognize woff, ttf, etc. i slapped font-weight tag on individual properties: #subnav a:link, #subnav a:visited { color: #ffffff; text-decoration: none; font-family: vistasansreg; font-size: 15px; font-weight: bold; } i included on a:link css: a:link, a:visited { color: #7c9ed2; text-decoration: none; font-family: verdana, arial, helvetica, sans-serif; font-size: 11px; font-weight: bold; } the "easy" solution skip font-weight class, , use b

javascript - How to check function to see if parent exists -

working on js function: how check see if parent element exists , if doesn't print out 'not found'. how check parent element classname? var findparentbyclassname = function(element, targetclass) { if (element) { var currentparent = element.parentelement; while (currentparent.classname !== targetclass && currentparent.classname !== null) { currentparent = currentparent.parentelement; } // closes loop return currentparent; } // closes if statement }; i thinking write this: if(element.parentelement !== targetclass) { console.log('parent not found'); } this can example of closest() , get() jquery functions. of course in dom has parent, check special, form class="myclass": var element = $(yourelement).closest('form.myclass'); if(element.get(0)){ //you got element } else{ console.log('not found'); } the method get([index]) needed due, selector won't return empty.

react native - OneSignal API sendTag() and setSubscription() don't work on Android device -

i put: onesignal.setsubscription(false); onesignal.sendtag('level', '19'); don't work on device ( can't see changes in dashboard ). work in simulator. push notification on both device , simulator when sent devices ( without conditions ). when tried send tag , didn't work. command: onesignal.infocusdisplaying(2); works in both simulator , device. if setsubscription , sendtag work, infocusdisplaying doesn't work. thank in advance! android version: 4.4.4 rn: 47.1 onesignal: newest wiki

How to serve raw Markdown in Jekyll/GHpages? -

i github pages website (long story) serve few unrendered markdown pages. if leave .md file, without metadata, in root level of repository, gets converted html. want stay markdown. if add .md file exclude in _config.yml , doesn't show @ in ghpages. i can work in vanilla jekyll using keep_files , suspect it's not possible ghpages see files, they're inside _site , gets ignored git. you can display plain text in markdown, 1 option wrap contents of .md file inside <pre> tags: <pre> # header paragraph, etc. </pre> or, if don't want modify markdown files: place .md file inside _includes directory, e.g. _includes/raw.md create page anywhere (and doesn't matter if extension .md or .html ), , use include , inside <pre> tags: --- --- <pre>{% include raw.md %}</pre> (the path after include relative _includes directory.) this display markdown file unrendered. wiki

rest - Can Restful web service contain functions -

i new web-services. understood restful services method achieve distributed computing. know rmi method achieve along many other technologies such soap. question is, see admiration restful web service in internet. know restful can contains states of objects. can't contain functions. not it? have got wrong? how strong achieve distributed computing. why better rmi or soap then? the basis of rest resources - not confused 'objects' - , verbs. "resource" has uri, , "post" verb explicitely meant used submit data processed, without defining "processing" consists in: the post method requests the target resource process representation enclosed in request according resource's own specific semantics https://tools.ietf.org/html/rfc7231#section-4.3.3 (emphasis mine) the rfc quite states successful post doesn't have result in creation of new resource: if 1 or more resources has been created on origin server r

progress 4gl - dynamic query for openedge -

good day: quick question, can perform dynamic query in openedge? example: def temp-table tt-num1 field f1 int field f2 int. def temp-table tt-num2 field f1 int field f2 int. def temp-table tt-num3 field f1 int field f2 int. what need this: procedure repeat-query: each 'variable contains table-name' no-lock. disp f1 f2. end. end procedure. or other ways can solve problem how proceed this? tried check dynamic query found in internet no luck. in advance. if go directly https://documentation.progress.com/#page/progdocindex%2fopenedge.html can find documentation around openedge. instance dynamic queries. i don't understand try here's example of dynamic query. define temp-table tt-num1 no-undo field f1 integer field f2 integer. define temp-table tt-num2 no-undo field f1 integer field f2 integer. define temp-table tt-num3 no-undo field f1 integer field f2 integer. create tt-num1. assign tt-num1.f1 = 1 tt-

java - The \"Dispatch\" phase is not found on the global \"InFlow\" phase of the axis2.xml file. Make sure the phase is within the axis2.xml file -

deploymentexception after upgrading axis2 1.7.6 error [org.jboss.msc.service.fail] (msc service thread 1-2) msc000001: failed start service jboss.undertow.deployment.default-server.default-host./em: org.jboss.msc.service.startexception in service jboss.undertow.deployment.default-server.default-host./em: javax.servlet.servletexception: javax.servlet.servletexception: org.apache.axis2.deployment.deploymentexception: "dispatch" phase not found on global "inflow" phase of axis2.xml file. make sure phase within axis2.xml file. at org.wildfly.extension.undertow.deployment.undertowdeploymentservice.start(undertowdeploymentservice.java:74) @ org.jboss.msc.service.servicecontrollerimpl$starttask.startservice(servicecontrollerimpl.java:1948) [jboss-msc-1.2.2.final.jar:1.2.2.final] @ org.jboss.msc.service.servicecontrollerimpl$starttask.run(servicecontrollerimpl.java:1881) [jboss-msc-1.2.2.final.jar:1.2.2.final] @ java.util.concurrent.threadpoolexecutor.runworker(u

node.js - Pass environment variable from Gitlab docker executor to image -

in test setup, use docker executor run builds. our projects run on 1 of official node images (ie node:6 ). by default, these official images come logging level set output quite abit. according official documentation, can disabled https://github.com/nodejs/docker-node/blob/master/readme.md#verbosity verbosity default node.js docker image has npm log verbosity set info instead of default warn. because of way docker isolated host operating system , not guaranteed able retrieve npm-debug.log file when npm fails. when npm fails, writes it's verbose log log file inside container. if npm fails during install when building docker image docker build command, log file become inaccessible when docker exits. docker working group have chosen overly verbose during build provide easy audit trail when install fails. if prefer npm less verbose can reset verbosity of npm using following techniques: dockerfile if create own dockerfile inherits node image can use env override n

cmusphinx - Most recent resources for sphinx4 -

is there difference between files github ( https://github.com/cmusphinx/sphinx4 ) , maven repo de.sciss ( https://mvnrepository.com/search?q=sphinx4+de.sciss ) sure, first official location, second random stuff posted third-party guys. unless not want harm security you'd better use software authorized sources. wiki

jhipster - Should xLOB attributes be in the entity toString method? -

just got surprised when did tostring on entity containing clob: entire huge string got displayed. clobs shouldn't generated in tostring . did test sorts of supported lobs: entity blobtostring { ablob blob, ananyblob anyblob, aimageblob imageblob, atextblob textblob } all these xlob content tostring (+ content type): @override public string tostring() { return "blobtostring{" + "id=" + getid() + ", ablob='" + getablob() + "'" + ", ablobcontenttype='" + ablobcontenttype + "'" + ", ananyblob='" + getananyblob() + "'" + ", ananyblobcontenttype='" + ananyblobcontenttype + "'" + ", aimageblob='" + getaimageblob() + "'" + ", aimageblobcontenttype='" + aimageblobcontenttype + "'" + ", atextblob='" + geta

amazon web services - How putdynamodb works in nifi? -

Image
i trying put value dynamodb using nifi, don't know enter new value in putdynamodb properties. inserts hash key value dynamodb. getdynamodb works fine. any appreciated. wiki

testing - Add a link to docker run -

i making test file. need have docker image , run this: docker run www.google.com everytime url changes, need pass file inside docker. possible? sure. need custom docker image possible. let's want execute command "ping -c 3" , pass parameter send in command line. you can build custom image following dockerfile : from alpine:latest copy entrypoint.sh /entrypoint.sh run chmod +x /entrypoint.sh entrypoint /entrypoint.sh the entrypoint.sh file contains following: #!/bin/sh ping -c 3 "$website" then, have build image running: docker build -t pinger . now, can run image command: docker run --rm -e website=www.google.com pinger by changing value of website env variable in latest step can requested. wiki

javascript - What is `MNaN`? -

i trying debug d3 code , in console debugger i'm getting following error returned: error: <path> attribute d: expected number, "mnan,-232.4826144…". however, don't know mnan (i'm aware of nan , surprisingly so/google aren't coming particularly helpful). also, error being triggered within d3 i'm not sure where/how fix issue. m means move to , should followed pairs of numbers. the first number in pair nan i.e. not number invalid, ua's path parser stop @ point. wiki

jquery - Why can't I get jGrowl or Sliding Message library working? -

i'm trying delayed message slide in right side of screen after delay, tried 2 different libraries without success. neither library anything. jquery sliding messages method <script type="text/javascript" src="/sites/all/libraries/jquery-sliding-message/jquery.slidingmessage.js"></script> <script type="text/javascript"> (function ($) { 'use strict'; drupal.behaviors.flyoutmessage = { attach: function(context, settings) { var options = {id: 'message_from_top', position: 'right', size: 300, backgroundcolor: 'red', delay: 1500, speed: 500, fontsize: '30px' }; $.showmessage("hello world!", options); }, }; })(jquery); </script> jgrowl method <script type="text/javascript" src="/sites

javascript - What is the difference between client-side and server-side programming? -

i have code: <script type="text/javascript"> var foo = 'bar'; <?php file_put_contents('foo.txt', ' + foo + '); ?> var baz = <?php echo 42; ?>; alert(baz); </script> why not write "bar" text file, alerts "42"? nb: earlier revisions of question explicitly php on server , javascript on client. essential nature of problem , solutions same any pair of languages when 1 running on client , other on server. please take in account when see answers talking specific languages. your code split 2 entirely separate parts, server side , client side . | ----------> http request | +--------------+ | +--------------+ | | | | | | browser | | | web server | | (javascript) | | | (php etc.) | | | | | | +--------------

java - Custom view not being inflated within FrameLayout -

after implementing framelayout within relativelayout, tried show custom view, it's not working reason. getactivity() in sketcha d1 = new sketcha(getactivity()); becomes underlined in red , returns following error: sketcha (context, attributeset) in sketcha cannot applied (fragmentactivity) public class fragmentdrawings extends android.support.v4.app.fragment { public fragmentdrawings() {} @override public view oncreateview(layoutinflater inflater, @nullable viewgroup container, @nullable bundle savedinstancestate) { return inflater.inflate(r.layout.fragment_drawings, container, false); } @override public void onactivitycreated(@nullable bundle savedinstancestate) { view v = getview(); assert v != null; framelayout framelayout = getview().findviewbyid(r.id.sketcha); layoutparams params = new layoutparams(layoutparams.match_parent, layoutparams.wrap_content); sketcha d1 = new sketcha(getactivity

ios - IAP or Authorize.net -

we going build mobile app ios , android (might build web app later) users can upload videos , friends , followers can watch them. videos can either free or tagged price. if tag video $1 when uploading it, friends , followers have first pay $1 watch, , after paying $1, can watch time after that. my question client wants use authorize.net payments. have read earlier, if buying things used inside app, should use iap. when read latest review guidelines today, not clear whether mentions condition above. https://developer.apple.com/app-store/review/guidelines/#in-app-purchase this might going under '3.1.3 “reader” apps:', says: provided agree not directly or indirectly target ios users use purchasing method other iap, , general communications other purchasing methods not designed discourage use of iap. so mean can use payment gateway authorize.net payments buying videos without using iap , without app getting rejected? you can't. if charging customers d

sql server - Select all columns when using INNER JOIN -

this question has answer here: group / aggregate function confusion in sql 3 answers i have sql code : select tb_dataproperti.*, tbl_rating.isnull(avg(rating), 0) averagerating tb_dataproperti inner join tbl_rating on tb_dataproperti.kode_properti = tbl_rating.kode_properti group tb_dataproperti.judullisting order averagerating desc i error: msg 8120, level 16, state 1, line 3 column 'tb_dataproperti.kode_properti' invalid in select list because not contained in either aggregate function or group clause. i want select data columns using * , because have many columns problem trying use aggregate function of 1 table , group on table.the rule if using aggregate function column column should use in group by.still try hope useful. select tb_dataproperti.*, isnull(avg(tbl_rating.rating), 0) o

visual studio 2017 - Dotnet core2 Intellisense broken when reference class libraries .Net Standard 2.0 in web project -

i upgraded project .netcore1.1 2 yesterday migration went realized intellisense broken in controllers references other class libraries services or models . class libraries reference other class libraries works fine, seems when reference web project. i created new dotnetcore 2 application added 2 class libraries , referenced in web project , doing same thing. is bug or wrong visual studio? running vs 2017 version 15.3.2(latest) update changed class libraries .net standard 2.0 .net standard 1.6 started working again cant use because need 2.0 and plot thickens https://developercommunity.visualstudio.com/content/problem/67061/intellisense-errors-in-net-standard-20.html so turn out resharper problem, updated resharper https://blog.jetbrains.com/dotnet/2017/08/24/resharper-ultimate-2017-2-released/ , fixed it. wiki

python - How to avoid 'cannot release an unacquired lock' error? -

i have piece of code, in single thread repeatedly acquires , releases lock. many times, hits runtimeerror "cannot release unacquired lock". earlier, lock being used follows : try : lock.acquire() <do-something> finally: lock.release() which after consulting pep 343, realized wrong way of doing it, i.e. lock.acquire() should outside of try...except block. changed code : lock = threading.lock() try: lock: <do-something> except exception e: logger.exception("failed acquire lock. %s" % str(e)) raise e so questions have : 1) correct way of using lock? correct, mean, lock gets acquired safely , released after use. times when lock doesn't acquired, error logged during such events, instead of getting runtimeerror, that's why kept with inside try..except block. 2) couldn't find handling "cannot release unacquired lock" error specifically. or even, why or when occur? far know, acquire() doe

excel - VBA Match Function & Nested For Loops Troubleshooting -

i have 2 sheets. 1 table , contains data want entered other. other looks gantt chart, names down side , dates across top (see here ). i want program run in manner specified below run is, returns: run-time error '438': object doesn't support property or method on for each row1 in resource i have attempted various fixes each time adjust 1 error, seem cause another! check table column "resource allocated" , find matching name in first column of calendar sheet. check table column "date allocated" , find matching value in first row of calendar sheet. select cell these intersect (the cell column number of "date allocated" , row number of "resource allocated"). offset column number according third table column, "time of day". fill cell rgb colour specified in code. repeat every row. option explicit sub calendarsync() sheets("log").select dim resource listcolumn dim dates listcolu

asp.net mvc - C# MVC Unit Testing: Check if View exists by name -

i have many controller actions return view. test whether actionresult not null, doesn't test whether valid view returned. i not want check name, feel fragile. want grab view name returned in actionresult , somehow check if view exists/compiles. wiki

javascript - React-Leaflet polygons are not being re-rendered -

i'm trying make dynamic polygons using react's state, leaflet polygons not being re-rendered. the target create polygon user creates clicking in map. class simpleexample extends react.component { constructor() { super(); this.state = { positions: [[51.505, -0.09]] }; } addposition = (e) => { const {positions} = this.state console.log('adding positions', positions) positions.push([e.latlng.lat, e.latlng.lng]) this.setstate({positions}) } render() { console.log('should render new positions', this.state.positions) const staticpositions = [[51.505, -0.09], [51.4958128370432, -0.10728836059570314], [51.49602657961649, -0.09956359863281251]] return ( <map center={[51.505, -0.09]} onclick={this.addposition} zoom={13} > <tilelayer attribution='&copy; <a href="http://osm.org/copyright">openstreetmap</a> contributors' url='http://{s}

Eclipse Debugging ignores Step Filter -

Image
i debugging java code. use localdate in code, part of java.time. want skip while debugging apply filter on java.* (and on java.time.*) step filter: while debugging have toggle "use step filters" activated. however, in line localdate date = localdate.parse("07.01.2017"); i message datetimeformatter in java.* have included in filter. , no error in code, appreciate hints why filter ignored. how can solve problem ? wiki

android - Fragment content not loading on BottomNavigationView FragmentTransaction -

i have application uses bottomnavigationview navigate between fragments. 1 of fragments (searchfragment) has tab view, implemented easytabs . when navigate searchfragment first time, layout loads correctly, 3 tabs populated. problem when navigate fragment , return searchfragment, layout doesn't load. tab view in top of screen, content not shown, in way need navigate between tabs make them appear 1 one. onnavigationitemselected method: @override public boolean onnavigationitemselected(@nonnull menuitem item) { switch (item.getitemid()) { case r.id.tab_search: mfragment = new searchfragment(); break; /*case r.id.tab_history: mfragment = new radiofragment(); break;*/ case r.id.tab_desc: bundle bundle = new bundle(); bundle.putboolean("fromsetup", false); mfragment = new descriptionfragment(); mfragment.setarguments(bun

c - glutBitmapCharacter() doesn't display anything? -

i trying make simple text output opengl, freeglut using glutbitmapcharacter() . problem is, not text shown. triangle works fine. guess problem not displaytext() function maybe call @ wrong place or redraw/clear text? compile gcc main.c -lgl -lglut -o filename #include <stdio.h> #include <string.h> #include <gl/freeglut.h> int windowheight = 500; int windowwidth = 500; void displaytext(float x, float y, int r, int g, int b, const char *string) { int j = strlen(string); glcolor3f(r, g, b); glrasterpos2f(x, y); (int = 0; < j; i++) { glutbitmapcharacter(glut_bitmap_helvetica_18, string[i]); } printf("lange: %i - raster: %f %f", j, x, y); } void keyboard(unsigned char key, int x, int y) { if (key == 27) exit(0); else printf("sie haben %c gedruckt.\n", key); } void display(void) { glclearcolor(1.0, 1.0, 1.0, 0); glclear(gl_color_buffer_bit); glloadidentity(); glb

visual c++ - Google Project Tango NDK undefined reference on functions -

i getting compile error: undefined reference 'tangoservice_getconfig' (moreteapotsnativeactivity.cpp) ld returned 1 exit status (collect2.exe) i working tango sdk tangosdk_ikariotikos_c.zip in visual studio 2015 using visualgdb. have replicated error in android studio isn't ide specific. i have started ndk sample project test native activity deploys correctly , reduce complexity whilst troubleshooting. have used visualgdb moreteapotsnativeactivity do. app compiles , runs on our asus zenfone ar. once include tango_client_api.h , add following code, compile error: tangocoordinateframepair* tango_framepair; tango_framepair = new tangocoordinateframepair(); tango_framepair->base = tango_coordinate_frame_start_of_service; tango_framepair->target = tango_coordinate_frame_device; tangoerrortype retval; // connect tango service. tangoconfig tango_config; tango_config = tangoservice_getconfig(tango_config_default); the tango header file has extern "c&q

lambda - simplest solution to making updates on salesforce cases with Java? -

i looking 2 basic tasks on salesforce account: 1) update checkbox (set false) inside case 2) add comment said case unfortunately soap api not available me , not have access/ability change settings on salesforce account. i extremely new @ , having trouble deciding best approach be. found similar in python, using library (simple salesforce) need utilize java in case code reside inside java lambda function. i wondering if away not using salesforce library? , making requests account - finding difficult find documentation explaining how so. to add this: have necessary credentials available. wiki

java ee - How to increase Wildfly timeout on start/stop a group of servers? -

i'm using wildfly in domain mode , our bigger groups of servers (with big ears deployed) respond our start/stop request timeout after few seconds, when command start/stop occurring success in servers. with our smallest applications (wars), start/stop return successful messages: server group started succeeded i'm trying find configuration can increase waiting time start/stop time. the time-out span hard-coded in current implementation of console. stops polling server status after 7.5 seconds.it's not harmful server instance's point of view. wiki

c# - DLL not able to access Database used internally on IIS for ASP.NET application -

while developing simple asp.net application queries parameters dll file , outputs results processed dll itself, faced challenge host on iis server. note: dll uses .mdb database internal processing. when run code on debug mode through visual studio locally, via localhost running fine. when host same piece of code iis reading dll dll not able access database. think must permissions or authorization issue, don't know can done in windows ecosystem solve this. any appreciated. add permission on database file iis_users , give full control windows explorer right click db file - security tab. wiki

Unable to diagnose MISCONF redis issue while launching celery worker server -

i use celery worker server redis broker url (for receiving tasks) result backend. broker_url = 'redis://localhost:6379/2' celery_result_backend = 'redis://localhost:6379/2' app = celery('myceleryapp', broker=broker_url,backend=celery_result_backend) i launch celery worker server using celery -a myceleryapp worker -l info -c 8 the worker processes start processing tasks redis queue until @ point, receive infamous misconf redis error , celery worker process terminates. unrecoverable error: responseerror('misconf redis configured save rdb snapshots, not able persist on disk. commands may modify data set disabled. please check redis logs details error.',) i checked redis log files in /var/log/redis , tail end of file has following 24745:c 19 aug 09:20:26.169 * rdb: 0 mb of memory used copy-on-write 1590:m 19 aug 09:20:26.247 * background saving terminated success 1590:m 19 aug 09:25:27.080 * 10 changes in 300 seconds. sa

python - Pythonv3.6.0 execution in XAMPP -

i using xampp windows 5.5.30 executing python programs,in have recieved error. had made changes in httpd.conf page , addhandler cgi-script .cgi .pl .asp .py scriptinterpretersource registry-strict and <ifmodule dir_module> directoryindex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \ default.php default.pl default.cgi default.asp default.shtml default.html default.htm \ home.php home.pl home.cgi home.asp home.shtml home.html home.htm index.py </ifmodule> the simple python code executed testing : #!c:\users\prabhu\appdata\local\programs\python\python36-32\python print ("content-type: text/html\n") print ("<html><head><title>hello world python</title></head><body>hello world python cgi script</body></html>") this error recieved : server error! the server encountered internal error , unable complete request.

powercli / powershell import csv and nested loops -

i have csv file multiple column select 2 , 3 (just ignore 1st one) goal execute command "hash" parameter each host. each host have 2+n hash options need find way execute n+1 times same command different "hash" parameter. my goal logic is: connect esx1 execute "command -option 9221" execute "command -option 53301" connect esx12 execute "command -option 55799" execute "command -option 51990" ... etc the problem have hostname in each line , results below can see loop again , again same host executing same "hash" commands csv content magic hostname hash 3 esx1.mylab.local 9221 3 esx1.mylab.local 53301 3 esx12.mylab.local 55799 3 esx12.mylab.local 51990 3 esx15.mylab.local 62157 3 esx15.mylab.local 12796 $import = import-csv c:\mycsv.csv | select hostname,hash foreach ($vmhost2 in $import.hostname){ write-host "connec

linux - Bash: Waiting on a background python process -

this question has answer here: capturing sigint using keyboardinterrupt exception works in terminal, not in script 1 answer i'm trying to: launch background process (a python script) run bash commands then send control-c shut down background process once foreground tasks finished minimal example of i've tried - python test.py : import sys try: print("running") while true: pass except keyboardinterrupt: print("escape!") bash test.sh : #!/bin/bash python3 ./test.py & pid=$! # ... here ... sleep 2 # send interrupt background process # , wait finish cleanly echo "shutdown" kill -sigint $pid wait result=$? echo $result exit $result but bash script seems hanging on wait , sigint signal not being sent python process. i'm using mac os x, , looking solution works bash on linux + mac. ed

Deployment issue using ssh with Multiple server on Hyperledger GO SDK -

i working on go sdk hyperledger permissioned blockchain . deploying multiple dns server peers , orderers . after going through yacovm github : https://github.com/yacovm/fabricdeployment/blob/master/deploy.sh we facing issue when trying ping using ssh peer ,also getting permission denied message when tried login user . we added authorized keys in our .ssh file still nothing happens . wiki

javascript - components not rendering dynamically with react router v4 -

for reason nested routes in react based application using react-router v4 not working. the dashboard component rendering 3 child components, namely header , footer & content1 . of these components render default on route /dashboard want content1 component change according url, i.e. content2 component should render on url /dashboard/content2 in place of content1 not happening , hitting url throws 404 error. highly appreciated. following code: index.js return ( <router> <div> <route exact path="/" component={login}/> <route path="/dashboard" component={dashboard} /> </div> </router> ); dashboard.js return ( <div> <header/> <footer/> <switch> <route path="/dashboard/content2" component={content2} /> // hitting route throws 404 error... <route component={content1} /> </switch> </

java - Put libraries for spring boot application in extra lib dir -

i building spring boot application fat jar. because building docker image these, have pull jar dependencies every time change of code. question is: how have change gradle files task called 'buildwithexternallibs' has dependencies in lib folder, can still started using java -jar ... long lib folder right next jar? i have done in maven project. can use same logic in gradle too. when clean install, copy jar file too. <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-install-plugin</artifactid> <executions> <execution> <phase>install</phase> <id>install-jar-lib</id> <goals> <goal>install-file</goal> </goals> <configuration> <groupid>com.***.*</groupid> <artifactid>abc-library</artifactid> <version>*.*.*</version> <

c# - How to get email address based on inbox click in outlook addin? -

Image
i creating outlook addin using visual studio 2015. i have config 2 email address in outlook 2016.now when click on specific inbox want email address of user belongs inbox. so trying figure out owner of particular store? keep in mind stores (e.g. pst) not have intrinsic user associated them - standalone pst or pst multiple pop3/smtp accounts delivering store. you can loop through application.session.accounts collection , check account.deliverystore property (compare store entry ids using namespace.compareentryids ). wiki

Hadoop Java - copy file from windows share folder server to HDFS -

i want upload multiple file windows share folder server (e.g. //server_name/folder/) hdfs using java list of methods have tried org.apache.hadoop.fs.fileutil set input path = //server_name/folder/ says java.io.filenotfoundexception: file //server_name/folder/ not exist filesystem.copyfromlocalfile (i think local hadoop server hdfs server) ioutils.copybytes same fileutil >> file not exist a simple file.renameto same fileutil >> file not exist string source_path = "\\server_name\folder\xxx.txt"; string hdfs_path = "hdfs://hadoop_server_name:port/myfile/xxx.txt"; file srcfile = new file(source_path); file dstfile = new file(hdfs_path); srcfile.renameto(dstfile); do need create ftp or how using ftpfilesystem ? or have better solution or sample code thank you filesystem has copyfromlocal method: import org.apache.hadoop.conf.configuration; import org.apache.hadoop.fs.filesystem; configuration configuration = new con

css - C# media query for specific max-width in firefox -

what trying media query triggers in firefox , until window reaches max-width of 1352px. i've tried different versions @@-moz-document url-prefix() , media screen , (max-width: 1352px) { #timetable { transform: scale(0.85) !important } or @@media screen , (max-width: 1352px) , (moz-document: url-prefix()) { #timetable { transform: scale(0.85) !important } but unfortunately both won't work. this code work @-moz-document url-prefix() { @media screen , (max-width: 1352px) { #timetable { transform: scale(0.85) !important } } } wiki

Magento - after add to cart, cart is empty -

i looked @ session id , reason new sessions getting created. -- doesn't happen on client machines. -- when delete frontend , frontend_cid cookies, works sometime , starts fail. -- once error appears, fails after that. -- use varnish full page cache. -- have cookie domain www.ourdomain.com, path /, http-only false. please help. sathish wiki

java - Jms session.recovery meaning -

i investigating jms api i misunderstand following method meaning: https://docs.oracle.com/javaee/7/api/javax/jms/session.html#recover-- void recover() throws jmsexception stops message delivery in session, , restarts message delivery oldest unacknowledged message. consumers deliver messages in serial order. acknowledging received message automatically acknowledges messages have been delivered client. restarting session causes take following actions: stop message delivery mark messages might have been delivered not acknowledged "redelivered" restart delivery sequence including unacknowledged messages had been delivered. redelivered messages not have delivered in original delivery order. throws: jmsexception - if jms provider fails stop , restart message delivery due internal error. illegalstateexception - if method called transacted session. in another doc written: if use queue or durable subscription, can use

sql - Updating third table where id didnot match from other 2 table -

i have 3 tables table a id remark 1 null 2 null 4 null table b id remark 1 null 2 null 4 null table c id 1 2 3 i want update table b remark joining table , table c records in table not exist in table c. so final output like table b id remark 1 null 2 null 4 invalid entry i have tried far below query: update tableb set remark='invalid' not exists ( select id tablea join tablec on tablea.id=tablec.id) but think there problem. can me in this. you forgot connect tableb exists update tabb set remark='invalid' tableb tabb not exists ( select 1 tablea join tablec on tablea.id=tablec.id tabb.id = tablea.id ) wiki

matlab - 'Object reference' error while using Simulink Real Time toolbox -

i want configure hardware connect 2 computers via simulink real time toolbox. during executing slrtexplr command, following error occurs: object reference not set instance of object. cannot perform runtime binding on null reference. that kind of error occurs, when use object not initialized before. found, executing desktop.xpcdesktop.getinstance, in slrtexplr.m function file throws error. another slrt commands works fine, ex. slrtbench. did meet similar issues? wiki

javascript - Read actual values of the class inside a function with object parameter passed before -

i trying set height objects of class depending on conditions inside function returned load() event. i have several images asynchronously loaded cloned divs of 1 class. goal set height parameter of shortest image whole class. the images in below snippet random -- there different photos different original heights. var h = [25,20,30,60,80,22]; var = h.length; for( ; i-- ; ){ var oc = $('div.obj').eq(0).clone(); oc.appendto($('body')); var oi = $('div.obj').eq(-1).children('img'); oi.load(oiload(oi,h[i])).attr({'src':'http://www.hughes.co.uk/showimage.php?image=hot-hv7l1451p.jpg&max_width='+h[i]+'&max_height='+h[i]+'&'+math.rand}); } function oiload(oi,hgt){ return function(){ if(oi.height() > hgt){ $('div.obj').css({'height':hgt+'px'}); console.log($('div.obj').height()); } } } div.obj { background: black;