Posts

Showing posts from August, 2011

android - Hide Snackbar automatically when Internet Connection available -

i've added snackbar when there no internet connection available.but want hide snackbar when connection becomes available.snackbar should automatically show , hide whenever connection lost. consideration. here code if(mobile == networkinfo.state.connected || mobile == networkinfo.state.connecting){ }else if(wifi == networkinfo.state.connected || wifi == networkinfo.state.connecting){ }else{ snackbar snackbar = snackbar.make(view, "can't connect! check whether you're online or not", snackbar.length_indefinite); snackbar.show(); } thanks in advance!!

java - How can I use a String in a different method? -

so i've got problem, i've got 4 methods, first method opens 2 files using scanner. second method reads 2 files using while loop on both files in order me make strings out of files content, while doing format strings have read file. third method meant match 2 strings first , second file don't know how strings third method. i've tried using instance variable won't work have strings in while loop , there more 1 string in each file well. sort of appreciated! i'll add problem match method. my code: public void read() { while (sta.hasnext()) { string ab = sta.next(); string bb = sta.next(); string cb = sta.next(); string a1 = ab.replace(",", " ").trim(); string b1 = bb.replace(",", " ").trim(); string c1 = cb.replace(",", " ").trim(); system.out.printf("%s\n%s\n%s\n", a1, b1, c1); } while (wr.hasnext()) { stri

Odds ratio plot on log scale in R -

Image
i have had difficulties plotting results glm logit models show odds ratios on log scale. want obtain estimates different models , plot results on 1 graph shown here ( https://www.ctspedia.org/do/view/cts...clinaegraph001 ). have insight? i making similar plots week , found worked best produce them confidence intervals running vertically @ first, use coord_flip() @ end convert horizontal: library(tidyverse) library(ggplot2) library(broom) set.seed(1234) # using builtin titanic dataset example data glm tdf = as.data.frame(titanic) m1 = glm(survived == "yes" ~ class + sex, data = tdf, family = "binomial", weights = freq) m1_preds = tidy(m1, conf.int = true, exponentiate = true) %>% mutate(model = "m1") # create modified data mixing frequencies - doesn't meaningful, # way different coefficients tdf$freqscrambled = sample(tdf$freq) m2 = glm(survived == "yes" ~ class + sex, data = tdf, family = "binomial&q

python - Training ResNetv1 From Scratch using Tensorflow Slim -

although stated in slim model train_image_classifier.py can used train models scratch, found hard in practice. in case, trying train resnet scratch on local machine 6xk80s. used this: dataset_dir=/nv/hmart1/ashaban6/scratch/data/imagenet_rf_record train_dir=/nv/hmart1/ashaban6/scratch/train_dir depth=50 num_clones=8 cuda_visible_devices="0,1,2,3,4,5,6,7,8" python train_image_classifier.py --train_dir=${train_dir} --dataset_name=imagenet --model_name=resnet_v1_${depth} --max_number_of_steps=100000000 --batch_size=32 --learning_rate=0.1 --learning_rate_decay_type=exponential --dataset_split_name=train --dataset_dir=${dataset_dir} --optimizer=momentum --momentum=0.9 --learning_rate_decay_factor=0.1 --num_epochs_per_decay=30 --weight_decay=0.0001 --num_readers=12 --num_clones=$num_clones i followed same settings suggested in paper. using 8 gpus on local machine batch_size 32 effective batch size 32x8=256. learning rate set 0.1 , decayed 10 every 30 epochs. after 70k ste

Correct Use of Matcher Groups in Java Regex when using logical OR -

i have parse string contains latitude & longitude values. strings can in 1 of 2 formats: lat: 33.1234 lon: -110.1234 lat, lon: 33.1234 -110.1234 i'm using pattern & matcher in java. following regex matches either string correctly: lat, long:\s*([-\d\.]+)[\,\s]+([-\d\.]+)|lat:\s*([-\d\.]+)\s*lon[g]?:\s*([-\d\.]+) however...the matcher has 4 groups. either first 2 groups or second 2 groups have lat/lon values , other 2 null. i realize can test null ... curious if there's way have matcher return 2 groups containing lat & lon values regardless of string format given? this regex matches 2 sample cases. lat(?:,\s+long?)?:\s*([-\d\.]+)(?:\s+|\s*,\s*)(?:long?:\s+)?([-\d\.]+) https://regex101.com/r/d3abpx/1 lat # lat label (?: , \s+ long? )? # optional , long label : # colon \s* # optional space ( [-\d\.]+ ) # (1), lat value (?: \s

Gentellela Admin login from docker of driven_admin -

Image
i'm using gentellela admin docker. https://hub.docker.com/r/driven/driven_admin/ the installation successful. after boot server. couldn't see main dashboard on there. because when refresh every time (f5). page redirected login page. could me figure out is? e.g. login page

c# - OData subset based on user -

i have odata source in form of sql server database access via entity framework. additionally have database table maps entities users, specific user can access specific entities. public class product { [key] public int id { get; set; } public string name { get; set; } public decimal price { get; set; } } public class usermapping { [key] public int entityid { get; set; } [key] public int userid { get; set; } is possible add sql join in entity framework dbcontext in way when user asks products receive ones have access to?

ios - User Control Width of UITextView -

i have uitextview subview of uiview . frame of uiview can never change. i added uipinchgesturerecognizer , uirotategesturerecognizer uitextview user scale , rotate uitextview . however, realized pinching scale not work right now, because doesn't allow user increase width of uitextview if necessary. example, if user pinch scale uitextview smaller size, width of uitextview should increase more input until width reaches trailing edge of uiview . how achieved? i think can add uitextfield in uiview, , make border or triangle @ bottom right corner of uiview. can add gesturerecognizer on triangle, when pan triangle, uiview's scale changed, , suit uitextfield uiview(father view)

javascript - Use Ruby Sinatra erb template to access jQuery Mobile (jqm) multipage html -

i have standard jquery-mobile multipage html file need access sinatra application erb templates. don't see how access bookmark or anchor within file. my code simple: get '/login' erb :'admin.html#login_page' end but, is: no such file or directory @ rb_sysopen - .../views/admin.html#login_page.erb: the file trying access admin.html.erb with bookmark of login_page. the portion of html template trying access follows, though other pages included. <div data-theme="b" data-role="page" id="login_page"> <%= partial :'main-header.html', locals: {page: 'management console login'} %> <div class="ui-content"> <a href="#login" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all ui-icon-check ui-btn-icon-left">admin login</a> <div data-role="popup" data-history="false" id="login"

import - XML Schema: how to reference a type from a no namespace XSD -

so have xsd has no namespace specified. i import schema (b.xsd) has namespace specified "targetnamespace='my-name-space'" <import schemalocation="a.xsd"/> after want create element in b.xsd <element name="authenticationrequest" type="authenticationrequest"/> this fails validation saying type authenticationrequest no found. type defined in a.xsd. how reference type a.xsd in b.xsd?? the idea type attribute qname, meaning sensitive prefix bindings. if imported schema has no namespace, seems case here, value of type attribute should unprefixed. however, since in schema snippet seems default namespace defined , identical xml schema namespace ( http://www.w3.org/2001/xmlschema ), engine attempts looking type called authenticationrequest in xml schema namespace. can solved binding xml schema namespace prefix, xs or xsd , rather making default. <xs:schema xmlns:xs="http://www.w3.org/2001/xmls

iOS App incremental release -

is possible release new version of ios app in incremental way app store. release new version 10% users , based on feedback decide roll or push new version everyone. app store has phased release concept that. while app in phased release, can choose pause release total of 30 days, regardless of number of pauses. if remove app sale, current phased release stop , not available version again. for more information, please visit link

XSL - Modify XML Export to Excel to add Bold Style Dynamically -

i'm trying modify xml file using xsl file create excel spreadsheet - i've got basics of working need customise bit. 6th column in xml file contains 1 records , modify output apply bold style rows flagbold field/6th col equals 1. here's current xml: <?xml version="1.0" encoding="utf-8"?> <fmpxmlresult xmlns="http://www.filemaker.com/fmpxmlresult"> <errorcode>0</errorcode> <product build="06-06-2017" name="filemaker" version="proadvanced 16.0.2"/> <metadata> <field emptyok="yes" maxrepeat="1" name="columna" type="text"/> <field emptyok="yes" maxrepeat="1" name="columnb" type="text"/> <field emptyok="yes" maxrepeat="1" name="columnc" type="text"/> <field emptyok="yes" maxrepeat="

css - Apply text to hover based on condition in AngularJS -

how can select specific text appear in hover based on logic using angularjs? example, have value , if class equals 'warning' want specific hover message, if class equals 'success' want different hover message appear. my logic write function says if color = success hover = this, if color = warning hover = that, if color = error hover = else. advice? getcolor = function() { var data = 88; if(data < 75){ return "losses-success"; }else if(data >=75 && data < 90){ return "losses-warning"; }else if(data > 90){ return "losses-error"; } }; .losses-success{ display: inline-block!important; width: 8px; height: 20px; background-color: green; } .losses-warning{ display: inline-block!important; width: 8px; height: 20px;

python - I got error message while input string into selenium webdriver -

i have no idea why webdriver doesn't take string argument. from selenium import webdriver driver = webdriver.firefox() name = "andre silva" headline = "football player , ceo" url = "https://www.linkedin.com/search/results/index/?keywords=" + name + " " + headline + "&origin=global_search_header" driver.get(url) then got error message: file "/users/jiajiefan/data_mining/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 268, in self.execute(command.get, {'url': url}) file "/users/jiajiefan/data_mining/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute self.error_handler.check_response(response) file "/users/jiajiefan/data_mining/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exception

recursion - Error when using Requests with python 3.5 recursively (GooglePlaces API) -

i have been having problem try send request , if there next page token in result take link , execute request recursively until there no next page token in result. first request works fine when there next page token in response , tries execute new request result invalid response if take link given result , use in postman or on browser fine. i'm assuming has requests running on different threads @ same time. the second response request using python: {'html_attributions': [], 'status': 'invalid_request', 'results': []} here have: import requests def getplaces(location,radius,type, apikey): url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location="+location+"&radius="+radius+"&type="+type+"&key="+apikey print('getting results type ' + type + '...') r = requests.get(url) response = r.json() results = [] if response['statu

python - InvalidArgumentError In Tensorflow Placeholder -

trying create simple perceptron 2 hidden layers learns function defined f. problem i'm having (besides not having clue i'm doing) i'm getting long stack trace (at bottom) think originating @ line y_ defined. final part of error is: invalidargumenterror (see above traceback): must feed value placeholder tensor 'placeholder_1' dtype float code: import tensorflow tf import numpy np def f(x): y1 = 2.41*x[0] + 0.09 + np.random.normal() y2 = 3.84*x[1] + 5.3 + np.random.normal() y3 = 0.79*x[2] + 13.0 + np.random.normal() return [y1, y2, y3] x = tf.placeholder(tf.float32, shape = ([none, 3])) y_ = tf.placeholder(tf.float32, shape = ([none, 3])) w1 = tf.variable(tf.zeros([3, 10])) b = tf.variable(tf.zeros([10])) x_med = tf.matmul(x, w1) + b w2 = tf.variable(tf.zeros([10, 3])) y = tf.matmul(x_med, w2) dif = tf.subtract(y_, y) sqrd = tf.reduce_mean(tf.multiply(dif, dif)) / 3 #loss = tf.reduce_sum( tf.matmul(np.array(y_ - y), np.array(y_ - y

android - Placing icons over VrPanoramaView based on touch location -

i working on android app want mark objects in panoramic image. not going able share of code, should able talk through it. record, i'm pretty new android development it's possible have overlooked simple issue having. please keep in mind when answering. i have vrpanoramaview displaying selected image , want place icon @ location of screen touch while viewing it. have been trying place icons on imageview transparent background placed on vrpanoramaview, have not been able 1 show up. share example of how might work? my plan use dimensions of screen, touch coords, , coords getheadrotation() find place icon on image, place icons in imageview when location on screen while moving accelorometer. can't part before can icons 1 screen. also if knows easier way this, please feel free ignore rest of question , share that.

Bug in MS Word's VBA Document Collection, not sure why this workaround crashes -

ms word 2010 has bug in ability correctly maintain (of things) documents collection ( link earliest report found - social.msdn.microsoft.com ). as far can tell bug impacts word 2010. although documents collection not maintained, turns out application.windows collection is. hence, word 2010 following code based on original reporters investigation (see below) , this question on answers.microsoft.com seem provide alternative buggy documents collection: ' purpose: ' return document collection, work-around word 2010 bug public function doccollection() vba.collection dim indexofavailableappwindows long dim resultdoc vba.collection dim founddoc word.document set resultdoc = new collection indexofavailableappwindows = 1 application.windows.count if application.windows(indexofavailableappwindows).document.type = wdtypedocument set founddoc = application.windows(indexofavailableappwindows).document resultdoc.add founddoc, fo

visual studio - Is there a way to select current suggestion without leaving the main keyboard area visualstudio -

Image
i wonder if there way select current suggestion without leaving main keyboard area (ie, without moving hand up/down/left/right area of keyboard) tab not working, though should :-(

javascript - Ojbc invoke js error: Can't find variable require -

i'm totally new js. i'm developing on ios , need use web3js in our program. it's ok call js function in obj-c. however, use 'require' import web3js modules, throws 'referenceerror: can't find variable: require'. happens? did miss anything? can help?? many thanks. update: if 'require' not usable, how use other modules js invoked obj-c? here code. obj-c code: nsstring* path = [[nsbundle mainbundle] pathforresource:@"bridge/src/index" oftype:@"js"]; jsfunc = [nsstring stringwithcontentsoffile:path encoding:nsutf8stringencoding error:nil]; jscontext* jscontext = [[jscontext alloc] init]; [jscontext evaluatescript:jsfunc]; jsvalue* func = jscontext[@"getaddress"]; jsvalue* = [func2 callwitharguments:@[@"0x8730f6ad1c0d387644590966bdbfedba44fe250118df0f97f11190ad5727b312"]]; js: function getaddress(prvkey) { try{ var web3 = require('../../3rd_party/web3.js-1.0.0');

mysql - What kind of consistency guarantee does a multi-master-master innodb cluster gurantee? -

assume have multi-master innodb cluster (with 2 data nodes) clients make requests through mysql routers. suppose specific row on table in database updated on both nodes 2 clients @ same time. both nodes having different data in same row. how these kinds of conflicts reconciled in multi-master innodb cluster?

sql server - convert SQL full text index statement originally in double qoutes for vb, with c# -

i have inherited sql statement written vbscript need convert use in c#. written full text index search in vbscript , classic asp. the problem believe double quotes. here original statement... select * ejn_expandeddescriptions ft_tbl inner join containstable(ejn_expandeddescriptions, searchindex, '""" & txtformdesc & "*""', 50) key_tbl on ft_tbl.id = key_tbl.[key] att10='current' order key_tbl.rank desc notice use of double qoutes in section... '""" & txtformdesc & "*""' i need convert string c# , pass parameter, @txtformdesc, string must include asterisk. here sample code understand should way fix (from https://docs.microsoft.com/en-us/sql/t-sql/queries/contains-transact-sql.. .) use adventureworks2012; go select name production.product contains(name, '"chain*" or "full*"'); go from code assuming there needs double quotes in statem

php - aftersave() and beforesave() with dirty attributes -

i'm new yii2. i'm stuck in point of triggering changed attributes in update. need changed attributes , save table record changed new value. please 1 me solve before save, after save , dirty attributes? use getattributes() , getoldattributes methods in yii\db\activerecord. ie: public actionupdate($id) { $model = $this->findmodel($id); if ($model->load(yii::$app->request->post())) { $changed_attributes = array_diff_assoc($model->getoldattributes(), $model->getattributes()); if($model->save()) { //save changed values in other table //$changed_attributes contains attribute_name=>value pairs of changed(old) attributes. , $model contains new values. } } }

php - How to get all tax rates from Magento2 through rest api? -

i want fetch tax rates magento2, tried http://magento2url/rest/default/v1/taxrates/2 ", here gives tax rate information of perticular id want all. i tried following url: http://magento2url/index.php/rest/v1/taxrates?searchcriteria[currentpage] here response : stdclass object ( [message] => request not match route. ) the same url, if give products http://magento2url/index.php/rest/v1/products?searchcriteria[currentpage] working fine. please suggest if 1 know answer or give suggestion how can proceed here ? give url follows tax rates http://magentourl/index.php/rest/v1/taxrates/search?searchcriteria[currentpage] this same customers also.just rename taxrates customers customers of current page.

python how to reset the url when i define the url in the loop -

there question when want open url url urllib2 , cookielib . fine when define url alone, when define in loop, doesn’t work , gets error couldn't find url. there code. want solution reset url or way solve question. i did work getting cookie in front of code password. think cause problem. should wipe cache or reset url ? import urllib2 import os cookielib import cookiejar htmlparser import htmlparser class myhtmlparser(htmlparser): def __init__(self): htmlparser.__init__(self) self.inlink = false self.datalist = [] self.directory = '/' self.indexcol = ';' self.counter = 0 def handle_starttag(self, tag, attrs): self.inlink = false if tag == 'table': self.counter += 1 if tag == 'a': name, value in attrs: if name == 'href': if self.directory in value or self.indexcol in value:

button - Jump to another page after press add buton django add form -

i wan jump page after press button insert table of form {% extends "index.html" %} {% block title %} <title>add banner</title> {% endblock %} {% block content %} <div class = "container"; align="center"> <h3 >add banner</h3> <form method="post" action="" enctype="multipart/form-data"> {% csrf_token %} {{ form.as_p }} <button type="submit"; onclick="location.href='/banner_list'"; value="insert">add</button> </form> <button style="height:50px;width:100px"; onclick="location.href='/banner_list';" type="button">back</button> </div> {% endblock %} this template. modifiy template button onclick , things nothing works ,

Access blob file using time stamp in Azure -

Image
i want access blob file getting generated out of azure ml web service along ilearner , csv file. problem file getting generated automatically guid name, , no response mentioning existence of file. know file getting generated can access through azure portal. automatically access file , possibility can see using time stamp of other file created @ same instance. there api or method available access blobs created @ particular instance using time stamp instead of file name? according description, guess used export data module. requirements, highly recommended replace export data execute python script in azure machine learning allows customize blob file name. for introduction execute python script , refer official documentation here . please refer following steps implement: step 1 : please use python virtualenv create python independent running environment, specific steps please refer https://virtualenv.pypa.io/en/stable/userguide/ , use pip install command download azu

mysql - Select columns which are different between 2 table versions -

let's have following table structure: table1 fixedcolumn1 fixedcolumn2 changingcolumn1 changingcolumn2 test1 test11 1 3 test2 test22 2 5 same table1 updated , saved in table same structure sametable1updated fixedcolumn1 fixedcolumn2 changingcolumn1 changingcolumn2 test1 test11 77 23 test2 test22 22 5 test3 test33 5 null now, have following table in want save modified data: differencestable fixedcolumn1 fixedcolumn2 change columnname newvalue oldvalue test1 test11 modified changingcolumn1 77 1 test1 test11 modified changingcolumn2 23 3 test2 test22 modified changingcolumn1 22 2 test3 test33 added changingcolumn1 5 null the combination of fixedcolumn1

python - How to avoid pie chart labels overlapping in MatPlotLib ver.2.0.2? -

Image
there lot of questions posted regarding labels overlap pie chart plotting. however, couldn't find automated solution except converting them legend. solution doesn't work me have lot of values (around 60), , conversion legend make plot messy , unclear. question, if want label pie wedges around pie, automated solution matplotlib version 2.0.2 enables labels have spacing (no overlapping) ? solution found manually annotation() . please see below script dummy values. possible connect wedge of pie related label arrow? i use python 2.7 , matplotlib 2.0.2 thanks, example 1 (overlapping labels) example 2 (manually corrected) import pylab import matplotlib.pyplot plt fig, ax = plt.subplots() l = ax.pie([1,0.2, 0.3,0.1,0.4,7,50,35,5,2],#[0, 0.1, 0, 0.1,0,0.1,0,0.1,0,0.1], #labels=("one","two","three made sentences","four ther","five becomes sentence","six is","seven long", "eight long

linux - How to run a shell script at startup for Red Hat 7.3 -

i want run script when rhel 7.3 machine boots up. script restarts docker service , restarts container. the script: #!/bin/bash sudo service docker start sleep 10s docker restart free how script run every time red hat machine powered on. one of easiest way add script file /etc/rc.local

mysql - Balance Trend Analysis -

i looking running percentage change each month of balances product. month field representative of last business day of each month. i have tried using common table expression below: declare @tab table ( date datetime, balance decimal (38,8), pdct_type_c varchar (5), excl_c varchar (1) ) insert @tab select date, sum(balance), pdct_type_c, rc_excl_c eric..rc_xpos rc_excl_c null , pdct_type_c = 'hln' group xpos_d,pdct_type_c,rc_excl_c ; cte ( select row_number() on (order pdct_type_c,date) rn, date, balance, pdct_type_c @tab ) select date, balance, (((select balance cte cte.rn=1))-(select balance cte cte.rn=t1.rn+1)) 'ead mom difference', (((select balance cte cte.rn=1))/(select balance cte cte.rn=t1.rn+1)) 'ead mom % difference', pdct_type_c cte t1 this works fine if there 1 product, problem though if there many products calculates percentage change on row before- might different product when there multiple product types. do

go - VS Code keyboard shortcut to show online API document for golang? -

Image
i'ms using vscode , "go visual studio code" , vim emulation plugin set golang ide (keyboard using vim style) when mouse hover api, online api document can displayed. there keyboard shortcut can trigger api document display? you looking editor.action.showhover shortcut: default key is: ctrl+k ctrl+i not works vim enabled, may change e.g.: ctrl+k ctrl+k , works me: you can open editor going menu under file > preferences > keyboard shortcuts. (code > preferences > keyboard shortcuts on mac) search show hover (or hover) , change shortcut editor.action.showhover , see: see:

mysql - What does this sql mean with not exists? -

a table this int char int int id name a_id b_id select count(*) tbl t1 b_id = 12 , not exists(select * tbl t2 t2.a_id = t1.b_id , t2.b_id = t1.a_id) i think @ least equals select count(*) tbl t1 b_id = 12 , not exists(select * tbl t2 t2.a_id = 12 , t2.b_id = t1.a_id) then mean? for example, select a_id tbl t1 b_id = 12 gives 1,2,3,4 then following: select * tbl t2 t2.a_id = 12 , t2.b_id = 1 # null select * tbl t2 t2.a_id = 12 , t2.b_id = 2 # exists select * tbl t2 t2.a_id = 12 , t2.b_id = 3 # exists select * tbl t2 t2.a_id = 12 , t2.b_id = 4 # null so count(*) 2? this 1 interesting because finds "symmetries" in a_id , b_id number 12,so counts number of rows in table b_id=12 except ones have symmetric pair, this: | a_id | b_id | --------------- | 12 | 12 | | 12 | 2 | | 2 | 12 | or more speaking, query skips counting rows have a_id=x b_id=12 , there exists row a_id=12 , b_12=x. so not exists there skip counting rows have symm

CSS and HTML nav bar menu item -

i having problem getting menu items reappear in css , html. first 2 line of css code below, "display none", hides menu items, in want. however, second code not make menu items appear again when mouse hovering on menu. on appreciated. ul li ul li ul li{ display:none; } ul li ul li:hover { background: #696630; display:block; !important; } the item want reappear li's nested further down, ensure hover on parent, element style correct child. ul li ul li ul li { display: none; } ul li ul li:hover ul li { display: block; }

java - Android: Fetch user inputs from one activity and display them on another activity -

this question has answer here: how send string 1 activity another? 6 answers i building android app in which, on mainactivity user enters his/her details name, phone number, etc., in several edittext fields. should data, pass them secondactivity , display them on textviews. transition mainactivity second activity done via onclick event. edit text xml <edittext android:hint="@string/teacher_name_hint" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="10" android:id="@+id/teacher_name" android:digits="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz,., " android:inputtype="textpersonname" android:maxlength="42" android:maxlines="2" android:minlines="1" android:textcol

How can you get an Azure Function to run in an App Service, rather than Consumption mode?, i.e. what are the missing WebJobs attributes? -

how can azure function run in app service, rather consumption mode?, i.e. missing webjobs attributes? i have existing function app works fine, want run in app service, rather consumption plan tried deploying new app service ... the 2 functions endpoints worked fine but post endpoint throws 500 error ... can't invoked azure webjobs sdk. missing azure webjobs sdk attributes? { "id": "5887571d-c993-4e0e-a275-c5ebf34242f8", "requestid": "2e9378e4-ceac-491f-8dd7-dd08acb94324", "statuscode": 500, "errorcode": 0, "message": "'checkurl' can't invoked azure webjobs sdk. missing azure webjobs sdk attributes?" } there no fundamental differences between two, other billing , how long processes stay alive. suspect whatever issue encountering not directly related running in app service plan. try deploying identical bits both fresh new consumption , app ser

javascript - Why can't '\b\w+(?=ing)\b' match "I'm singing while you're dancing" -

i have following regex var reg = /\b\w+(?=ing)\b/g; var str = "i'm singing while you're dancing"; str.match(reg) // ==>null but if regex /\b\w+(?=ing\b)/g str can match 'sing,danc' why mach previous example doesn't? you need remove \b @ end since part want match not end on boundary . danc , sing batch \b\w+\b dancing , singing not \b\w+(?=ing) check demo here \b\w+(?=ing\b) would make sure ing @ boundary , not \w+ part

osx - Debugging git network issues -

is there way see what’s going on @ network level when git push ? prefer kind of command line utility see what's happening. protocol ssh . using git_trace=1 doesn't give me info to check network traffic suggest running wireshark, or tshark. add filter see want, in case tcp.dstport==22 now can see ssh traffic

node.js - Error: Can't set headers after they are sent in node js MVC approach -

i getting following error ... events.js:160 throw er; // unhandled 'error' event ^ error: can't set headers after sent. @ serverresponse.outgoingmessage.setheader (_http_outgoing.js:357:11) @ serverresponse.header (c:\level3proj\node_modules\express\lib\response.js:730:10) .. when execute following code var mongoose = require('mongoose'); var express = require('express'); // express router used define routes var userrouter= express.router(); var usermodel = mongoose.model('user'); var allusers = []; var fs = require('fs'); module.exports.controller = function(app) { userrouter.get('/all',function(req,res) { res.send("this route information on particular "); usermodel.find({},function(err,allusers) { if(err) { res.send(err); } else { res.send(allusers); } }); // end

bash - File not found in Docker Container using GitLab-CI -

using gitlab-ci, attempting echo secret variable file inside docker container. file exists , user has permissions write file yet no such file or directory error. $ /usr/bin/docker exec -t $ci_project_name ls -la /opt/application/conf/kubeadminaccount.yml -rw-rw-r-- 1 nodeuser nodeuser 420 aug 18 07:19 /opt/application/conf/kubeadminaccount.yml $ /usr/bin/docker exec -t $ci_project_name whoami nodeuser $ /usr/bin/docker exec -t $ci_project_name echo $kube_admin_account > /opt/application/conf/kubeadminaccount.yml bash: line 69: /opt/application/conf/kubeadminaccount.yml: no such file or directory your redirection operator working on host , not inside container. change below $ /usr/bin/docker exec -t $ci_project_name echo $kube_admin_account > /opt/application/conf/kubeadminaccount.yml to $ /usr/bin/docker exec -t $ci_project_name bash -c "echo $kube_admin_account > /opt/application/conf/kubeadminaccount.yml"

python - When used django_tables2, it told me TemplateDoesNotExist -

urls.py urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', views.people), ] views.py def people(request): return render(request, 'people.html', {'people': models.person.objects.all()}) models.py class person(models.model): name = charfield(verbose_name="full name", max_length=10) people.html {% load render_table django_tables2 %} {% load static %} {% render_table people %} when run it, told me templatedoesnotexist @ /django_tables2/table.html , don't understand why. first, make sure django_tables2 included in installed_apps setting. then, make sure have app_dirs set true in templates setting. templates = [ { 'backend': 'django.template.backends.django.djangotemplates', 'dirs': [...], 'app_dirs': true, ... }, ]

Anchor tag acts as a form submit button? -

anchor tag acts form submit button? <form method="get" action="<?php bloginfo('url'); ?>/"> <div class="field-search"> <input type="text" class="form-control input-lg" placeholder="search for..." value="<?php the_search_query(); ?>"> <a href="#" class="btn-search"><i class="fa fa-search font-16"></i></a> </div> <form action="test.aspx" type="post"> <label> <span>username</span> <input type="text" name="username" id="username" class="input-text required" /> </label> <label> <span>password</span> <input type="password" name="password" id="password" class="input-text required" /> </label>

java - Error Trying to install NatTable Core in Eclipse Indigo -

eclipse version: indigo service release 2 trying use download site " http://download.eclipse.org/nattable/releases/1.5.0/repository/ " to install "nattable core features" error: an error occurred while collecting items installed session context was:(profile=epp.package.rcp, phase=org.eclipse.equinox.internal.p2.engine.phases.collect, operand=, action=). problems downloading artifact: osgi.bundle,org.eclipse.nebula.widgets.nattable.core,1.5.0.201703192131. error reading signed content:c:\users\glen\appdata\local\temp\signaturefile1629518335572249543.jar error occurred while processing signatures file: c:\users\glen\appdata\local\temp\signaturefile1629518335572249543.jar problems downloading artifact: org.eclipse.update.feature,org.eclipse.nebula.widgets.nattable.core.feature,1.5.0.201703192131. error reading signed content:c:\users\glen\appdata\local\temp\signaturefile8522004777182375322.jar error occurred while processing sig

vba - How to open Excel if not already open -

i'm trying find way open excel using outlook vba, if it's not open. managed find code on internet opens excel, changes , closes it, doesn't behave nicely if excel workbook open(it apply changes, no longer closes excel workbook, , leaves grey interior; also, doesn't show in explorer anymore , have close task manager). appreciate if explain of code does. public xlapp object public xlwb object public xlsheet object sub exporttoexcel() dim enviro string dim strpath string 'get excel set enviro = cstr(environ("userprofile")) 'the path of workbook strpath = enviro & "\documents\test2.xlsx" on error resume next set xlapp = getobject(, "excel.application") if err <> 0 application.statusbar = "please wait while excel source opened ... " set xlapp = createobject("excel.application") bxstarted = true end if on error goto 0 'open workb

java - How to show a popup menu when clicked on a menu item in android -

i trying show popup menu when clicked on menu item. i'm getting error "menupopuphelper cannot used without anchor". can .i know i'm missing something.i searched in internet solve error nothing helped. my menu_main.xml file <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:title="screen1" android:id="@+id/scr1"/> <item android:title="screen2" android:id="@+id/scr2"/> <item android:title="screen3" android:id="@+id/scr3" /> <item android:title="change sound" android:id="@+id/changesound" /> </menu> popup_menu.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">

Spring Boot + google kubernetes + Google SQL Cloud not working -

i trying push spring boot application in google kubernetes(google container engine). i have performed step given in below link. https://codelabs.developers.google.com/codelabs/cloud-springboot-kubernetes/index.html?index=..%2f..%2findex#0 when trying perform step 9 http://:8080 in browser not reachable. yes got external ip address. i able ping ip address let me know if other information require. in logging not able connect database error: com.mysql.jdbc.exceptions.jdbc4.mysqlnontransientconnectionexception: not create connection database server. i hope have created cluster in google container engine follow first 5 step given in link https://cloud.google.com/sql/docs/mysql/connect-container-engine change database configuration in application hostname: 127.0.0.1 port: 3306 or mysql port username: proxyuser should same link step - 3 mvn package -dmaven.test.skip=true create file name "dockerfile" , below content from openjdk:8 copy