Posts

Showing posts from January, 2012

az application insights - Unable to find assembly System.Diagnostics.DiagnosticSource when using Remoting -

after adding application insights asp.net application (standard asp.net using .net 4.5.2) i've found exception when using .net remoting. exception is: unable find assembly 'system.diagnostics.diagnosticsource, version=4.0.2.1, culture=neutral, publickeytoken=cc7b13ffcd2ddd51' i don't understand what's going on here (it seems tracing crossing application domain boundaries), if add system.diagnostics.diagnosticsource nuget package remote service, error goes away. unfortunately, found i'm getting error when trying use sqldependency trigger cache refresh. there way disable tracing when using remoting, if that's what's going on, or there way resolve issue? server stack trace: @ system.runtime.serialization.formatters.binary.binaryassemblyinfo.getassembly() @ system.runtime.serialization.formatters.binary.objectreader.gettype(binaryassemblyinfo assemblyinfo, string name) @ system.runtime.serialization.formatters.binary.objectmap..ctor(str

Ansible vars_prompt value in menu -

i have playbook - hosts: "{{ host }}" connection: paramiko gather_facts: no serial: 1 user: administrator vars_prompt: - name: host prompt: "select router change default route?\n1- test01\n2- test02\n" default: 1 private: no tasks: - debug: msg="{{ host }}" inventory: [1] 192.168.10.100 [2] 192.168.10.102 but need inventory: [test01] 192.168.10.100 [test02] 192.168.10.102 if enter eg 1, host variable contains 1, , need test01 looks requirement simple string concatenation: - debug: msg="{{ 'test0' + host }}"

web applications - Use two mouse pointers in web app -

i'm building web app controlled using hand gestures. given have 2 points (representing each hand) interact browser on multi touch screen. hover events possible too. firstly possible? secondly, should implement pointer outside browser or in in javascript itself? if matters, it's electron app on linux machine only

reference architecture using r3 corda network -

looking success stories r3 corda implementation in production or reference architecture financial client including how on board parties in network(adding new node). how kyc done? corda in not on production yet, 1.0 version coming out soon, have wait bit :p

haskell - Associated data families and overlapping instances -

i'd 'generic' map data structure can efficiently specialized providing custom instances, in the ghc manual section on type families . {-# language flexibleinstances #-} {-# language typefamilies #-} {-# language undecidableinstances #-} module mapkey import data.map.strict (map) import qualified data.map.strict map class mapkey k data mmap k :: * -> * instance {-# overlapping #-} mapkey () newtype mmap () v = unitmap (maybe v) instance {-# overlappable #-} ord k => mapkey k newtype mmap k v = ordmap (map k v) sadly, doesn't work. ghc (8.2.1) complains: conflicting family instance declarations: mmap () = unitmap (maybe v) mmap = ordmap (map k v) | 14 | newtype mmap () v = unitmap (maybe v) | is there language extension allows this? otherwise there way make easy users define 'default' instance ord ? one solution relinquishes overlapping instances use default associated injecti

jenkins - How to pass docker container arguments when running the image in a Jenkinsfile -

i have dockerfile ends with entrypoint ["node", "index.js"] cmd ["--help"] the index.js can take couple different arguments , need expose port container if run manually like: docker run -p 3000:3000 my_container:latest --arg1 somearg --arg2 anotherarg how do in jenkinsfile? test communicate container needs running before run test. use withrun() running before test runs don't see how specify --arg1 somearg --arg2 anotherarg stage('testmicroservice') { // // how specify '--arg1 somearg --arg2 anotherarg'? // docker.image("my_container:latest").withrun('-p 3000:3000') { sh 'npm run test-microservice' } } you can use second argument of withrun .withrun('-p 3000:3000', '--arg1 somearg --arg2 anotherarg')

javascript - How Do I loop this arrays to extract only the orderTotal? -

how loop array , add ordertotal field inside item object? (0) ordertotal $100 (1) ordertotal $220 var sum = 320; save sum of both ordertotal field variable my goal sum of order total fields [ { "itemid": "c619d69c-970d-11e7-afd4-e44bb50029cc", "itemtype": "job", "item": { "jobcolor": "18, 2, 218", "jobtype": "work", "employeeids": [ "af879a7d-1aec-e111-834a-002590274606" ], "note": "", "jobstatus": "scheduled", "actualdatetimestart": "9/13/2017 11:00 am", "ordertotal**": 100, "orderrefnumber": "", "ordernumber": 8375, "ordertype": "estimate", "siteid": "56f6f468-957c-11e7-b464-b4bf180545bb"

python - summing values by rank in pandas -

i trying multi-year financial forecast. need calculate spending based on rank year , re-rank , calculate spending next year. my data frame has car parts , cost fix/replace constrained budget (400 dollars) once budget spent can no longer fix else year re prioritized following year. in year 1, budget covers transmission, in year 2 transmission fine , ranked lowest. how can run cumulative sum based on rank until budget limit? df part rank(year 1) cost(y1) spend(y1) rank(y2) spend(y2) transmission 1 400 400 4 0 tires 2 400 0 1 400 windshield 3 100 0 2 0 wipers 4 20 0 3 0 also want add: val in df['spend']: if val.cumsum() >= budget_var: val = 0 this how right need sum in order of rank. sorted_df = d

c# - OpenXML/SpreadsheetLight: File contains corrupted data for xlsx - Only happens on server -

i'm having strange problem. trying use openxml/spreadsheetlight library process data of user uploaded excel file (only .xlsx not .xls), getting error when trying run code on live server. i tested code on local machine , on staging server instance, in both cases uploaded .xlsx file , code able process correctly. when testing on our live server, , using exact same .xlsx file, code spits out error: file contains corrupted data. what have tried far: i checked file uploaded temp directory on server. i checked iis user has permissions access file in temp directory. i checked uploaded file not corrupted , opened excel. clean build , re-deploy code (ensuring exact same code on staging server made live server). redeployed documentformat.openxml.dll , spreadsheetlight.dll server. at point i'm not sure else check or issue be, suggestions on possibly welcome. here error message/stack trace: file contains corrupted data. : @ ms.internal.io.zip.zipioextrafieldzip64eleme

html - Make Google Maps grayed out -

i watching 2 other threads: how grey out box in css is there way make embedded google maps static non clickable image? but none tackling issue im having. the idea grey out map, make non-interactive. tried make overlay, 1st thread it's graying div , map on top of div. <div class="col-md-6"> <div id="mapregistration"></div> </div> is there method, function in map object accomplish this?

Entypo in Angular -

entypo svg icon set requires javascript added page: const entypo = require('entypo') document.body.insertbefore(entypo.getnode(), document.body.firstchild) is there way can add angular application in sort of global file can use entypo glyphs in application?

ethernet - TCP/IPv4 Properties changed static IP radio button on accident -

recently on 1 of our work stations changed radio button within tcp/ipv4 properties our static ip settings 'obtain ip address automatically'. need initial ip/subnet, etc. settings cannot figure out if possible. please suggestions have other machines connect software on workstation , cannot anymore since ip address has changed.

At.js with summernote not formatting properly after i post on laravel -

i'm using summer note wysiwyg editor on laravel, php framework, seems work , post fine trick when post "hi @julian" no follow text after name or if post name "@julian" alone starts looking funny or rendered post after refresh. works when put text on both sides of name "hi @julian friend". noticed when fails posts query string. example image when issue example image when don't issue

How to apply a 'moving window' to analyse chunks of text sequentially in Python? -

i calculate simple moving window average type/ token ratio (ttr) of text sample. know how calculate ttr of whole text, or select first 50 words , calculate ttr that. think need create loop iterates on 50 words @ time, start moving +1 each time window moves through text, appending resulting ttr each window in list can average. it's looping/ chunking/ +1 part i'm stuck on. this (think) want in loop. text has been lowered etc.: window = text[0:50] wordcount = collections.counter(window) uniquewords = list(wordcount.keys()) ttr = (len(uniquewords))/(len(window)) windowsttr.append(ttr) i have read other answers here, documentation enumerate , itertools.islice, still can't seem solve problem. gratefully receieved, i'm new python. parametrize loop body according start position. iterate through possible start positions. window_width = 50 last_index = len(text) - window_width start in range (last_index): window = text[start:start+window_width] wor

How can I add labels to markers and set timeout for mouseover on a map using the JavaScript API? -

i'm working on project in want add labels (text) below markers. have created each , set timeout mouseover in order access link in infowindow , how can that? have tried many options none of them seem work out. below code. i want set labels , set timeout mouseover event. <script> function initmap() { //map options var options = { zoom: 9, center: { lat: 5.9670337, lng: -1.7945481 }, } //new map var map = new google.maps.map(document.getelementbyid('map'), options) var markers = [ { coords: { lat: 5.533038, lng: -1.277233 }, iconimage: 'https://developer.google.com/maps/documentation/javascript/examples/full/images/beachflag.png', content: '<strong>swedru</strong>' }, { coords: { lat: 5.9670337, lng: -1.7945481 }, content: '<strong>dunkwa </strong>' }, { coords:

c# - Microsoft.Web.Administration: Value does not fall within the expected range -

when adding binding iis using microsoft.web.administration code this: var newbinding = site.bindings.createelement(); newbinding.bindinginformation = bindinginformation; var existingssl = // code finds existing ssl binding copy off var sslflags = sslflags.sni; if (existingssl != null) { newbinding.protocol = existingssl.protocol; newbinding.certificatehash = existingssl.certificatehash; newbinding.certificatestorename = existingssl.certificatestorename; } site.bindings.add(newbinding.bindinginformation, newbinding.certificatehash, newbinding.certificatestorename, sslflags); i exception system.argumentexception: value not fall within expected range. @ microsoft.web.administration.interop.iapphostmethodinstance.execute() @ microsoft.web.administration.configurationmethodinstance.execute() @ microsoft.web.administration.binding.addsslcertificate(byte[] certificatehash, string certificatestorename) @ microsoft.web.administration.bindingmanager.bindingtra

sql - How to refresh a form using c# -

i collecting data database , im using c# winform after accepting , checking answer. increment score , post new question. go on depending on number of items entered. @ end post summary of score. even giving right term do. im not sure if refreshing right term question. try this, this.refresh(); this.invalidate(); https://social.msdn.microsoft.com/forums/windows/en-us/f13c9d08-00a4-402c-9beb-6a77b99ee221/how-do-i-refresh-my-form?forum=winforms

hadoop - Run wordcount from command line as java process -

can please me run wordcount program command line java process? i able run using "hadoop jar hadoop-count-example-1.0-snapshot.jar hadoop.invokeworkcount". but when try run "java -cp mypackage.invokeworkcount" invoking standalone java process. never use resoucemanager/yarn. read file hdfs never uses resource manager. may missing configuration? i in process of migrating code 0.20.0 2.7.4 , old program use java process using -fs , -jt option. trying keep same way. appreciate help/thought.

angular - How to speed up Ng4 apps in AWS EC2? -

i deployed angular4 apps aws ec2 ubuntu server, cannot build in production mode using ssh. how fix this? you can built ng app on local. , can deploy server. think building of ng app not needed on server.

python 3.x - scrapy.Request(url, recall), the recall can not be successfully called -

Image
i wrote small scrapy project, problems occur when ran project using scrapy crawl command. shown in picture: first print can print url means scrapy.request(url,self.parse_dir_content) should executed. second print sentence did not print screen.that weird. can help? thank you.

MATLAB: Output a fixed-length vector from a random-length vector? -

say have randomly-length vector: a = [1 2 3 4 5 6 7 8 9 91 1 3 2 4 2 7 6 9 12 313 32 57 327 2 13] b = [1 9 3 8 5 6 7 8 9 91 1 3 2 4 2 7 6 9 12 313 32 57 327 2 13 1 1 1 1 1 1 0 0 0 0 0] i want output vector of length 10, evenly spaced element (including first , last element). know have use interpolation if original vector not of length multiples of 10. how can it? if understand question correctly want use interpolation produce vector of 10 elements input vector. following code should work. b = [1 9 3 8 5 6 7 8 9 91 1 3 2 4 2 7 6 9 12 313 32 57 327 2 13 1 1 1 1 1 1 0 0 0 0 0] interp1(linspace(1,10,length(b)),b,1:10) output: ans = 1.0000 5.3333 8.7778 2.3333 6.4444 188.1111 5.6667 1.0000 0 00 0 basically, define b values defined on range of 1 10 , resample on 10 element vector 1:10 . if need integers instead of doubles can use round . b = [1 9 3 8 5 6 7 8 9 91 1 3 2 4 2 7 6 9 12 313 32 57 327 2 13 1 1 1 1 1 1 0 0

Azure search or full text index? -

data in sql azure, have existing webapi expose data odata. issue client want make call filters substring query on few columns, making performance slow. debating @ point whether use full text search index or use azure search service, thoughts please? some of considerations , tradeoffs between hosting search in azure search vs. using sql server fts captured here . as pointed out above, azure search can index in-database data - see connecting azure sql database azure search using indexers .

php - Ghost post_title from my WP LOOP script -

the code below displaying title in black text before displays blue title hyperlink under it. i want link appear. if ( $query2->have_posts() ) { // 2nd loop while ( $query2->have_posts() ) { $query2->the_post(); if ($post->id == $do_not_duplicate) continue; $permalink = get_the_permalink($query2->post->id); $id = $post->id; $titleatribute = the_title_attribute(); $title = get_the_title(); echo '<h2 id="post-' .$id.' "> <a href="'.$permalink.'" rel="bookmark" title="permanent link '.$permalink.' "> '.$title.'</a></h2>'; } // restore original post data wp_reset_postdata(); } for example, on website: http://skkelti.cz/ , following text appears in black above link same text: -martin daví

SalesForce Connected Apps callback hanging on blank page -

i have set salesforce connected app in salesforce side. setup callback url in app , pointing application. my issue when send request salesforce access_token, after login, hanging on blank page forever. side there no response come back. i confirm there no firewall/whitelist in side. does facing issues before? or there firewall/ip ranges setting on salesforce side? or it's because of user permission?

angular - Why we apply [formGroup] directive to forms under square-brackets while for form-fields we apply formControlName directive without square-brackets? -

i following angular 4 tutorial reactive form. while aplying formgroup , formcontrol directives finding inconsistency - <form [formgroup]="formobj"> <div class="form-group"> <input formcontrolname="username"> it applying [formgroup] directive under square-brackets while formcontrolname directive without square-brackets. what missing here? if have directive mydir input mydir : @directive(...) export class mydir { @input() mydir; it can used or without brackets: <span mydir="exp">...</span> <span [mydir]="exp">...</span> in first case value of mydir binding string exp : export class mydir { @input() mydir; ngoninit() { console.log(this.mydir); // "exp" in second case expression evaluated whatever exp on parent component contains: @component(template: `<span mydir="exp"`) class parent { exp = 'hello'; export class

r - Error with na.rm = TRUE -

i running code this: quintiles.df %>% mutate(quintile = cut(zscore, breaks = unique(quantile(zscore, probs = seq(0, 1, = 1 / number.of.quantiles)), na.rm = true), labels = false, include.lowest = true)) error in mutate_impl(.data, dots) : evaluation error: missing values , nan's not allowed if 'na.rm' false. i know data have na observation , have added na.rm = true quantile function, however, still error: missing values , nan's not allowed if 'na.rm' false. i wonder if please me solve problem?

html - option tag css styling issue on Safari -

Image
i trying style <option> tags. it's working in chrome , firefox need work on safari too. can see first image chrome , second image safari. appreciated. chrome: safari: .wrap select { margin-bottom: 0; width: 100%; min-height: 400px; } .wrap select option { background-color: #f9f9f9; margin-bottom: 2px; padding: 12px 15px; } .wrap select option:checked, .wrap select option:focus, .wrap select option:active { background-color: #f8981d; background: -webkit-gradient(linear, left top, left bottom, from(#f8981d), to(#f8981d)); background: -webkit-linear-gradient(#f8981d, #f8981d); background: -o-linear-gradient(#f8981d, #f8981d); background: linear-gradient(#f8981d, #f8981d); font-weight: 600; } .wrap select option:hover { background-color: #aab3c3; color: #f9f9f9; } <div class="wrap span5"> <label>teams</label> <select class='list filterse

How can I make this image grid responsive in html/css? -

sorry, i'm kind of noob stuff tri... can view site @ http://acute.design.s3-website-us-east-1.amazonaws.com . i'm trying make image grid portfolio. looks great @ 1080p below it's jumble of trash. awesome :)

javascript - Passing Variable to the next page without form or URL extension -

i have link go examplea.php, want have variable pass link. of course condition not using url extensions or form submitting.i search around , people suggest ajax, me not passing variable of file want handle variable when @ examplea.php page. in examplea.php have code example if(isset($_post['type'])){ $type=$_post['type']; } with ajax not able handle post variable when reach examplea.php page. in case maybe wrong code. <a class="example_anchor" href="testb.php/" data-type="activity">m</a> <script> $(".example_anchor").on("click", function (e) { e.preventdefault(); var type = $(this).data(); var link = $(this).attr('href'); $.ajax({ url: link, type: "post", datatype: "text", data: { type:type }, error: function (msg) {

php - Can not update the data -

Image
route route::resource('/mediafile', 'mediacontroller'); mediacontroller public function update(request $request, $id) { $media = media::findorfail($id); if($request->hasfile('userfile')) { $image = $request->file('userfile'); $filename = $image->getclientoriginalname(); image::make($image)->resize(300, 300)->save(public_path('media/' . $filename)); $media->mediapath = $filename; $media->medianame = $filename; $media->description = $request->description ? $request->description : ''; $media->save(); } return response()->json($media); } view <form class="form-horizontal" id="media-form" enctype="multipart/form-data"> {{ csrf_field() }} <div class="form-group"> <div class="col-xs-6 col-sm-6 col-md-6"> <label f

How can I define the minimum and maximum version of Android to publishing the app in Cordova using Visual Studio 2015 -

i have developed app in cordova. going publish on play store. before publishing, want know how can define minimum , maximum version of android while building apk file in cordova using visual studio. or there setting minimum , maximum version of android on play store? any suggestion appreciable. thank you!! <uses-sdk android:minsdkversion="integer" android:targetsdkversion="integer" android:maxsdkversion="integer" /> documentation here related info here

R Shiny app. loop display word clouds and their labels -

following example https://gist.github.com/wch/5436415/ , this discussion , shiny gallery of wordcloud , managed make ui display multiple word cloud plots. each of word cloud needs own title/label user knows each word cloud plot for. i'm not sure how achieve that. result ui rendered this: label 1 label 2 label 3 world cloud 1 word cloud 2 word cloud 3 what want achieve having label displayed on top of corresponding word cloud; , display them adjacently. is: label 1 | label 2 | label 3 plot 1 | plot 2 | plot 3 is there way iterate uioutput("plabels") , uioutput("plots") manipulate when display element? thank in advance. below code in server.r: shinyserver(function(input, output, session) { observe({ if (user$logged == true) { output$obs <- renderui({ fixedpage( fixedrow( sliderinput("max", "slider", min = 1, max = 100, value =

swift - Accessing a `var` passed as `inout` is undefined behavior? -

from documentation inout parameters : in-out parameters passed follows: when function called, value of argument copied. in body of function, copy modified. when function returns, copy’s value assigned original argument. from description, assume modification of variable passed inout parameter, within scope in passed inout , meaningless, since original variable guaranteed overwritten after call returns. contrived example: var x: int = 5 ({ (inoutx: inout int) in inoutx = 7 x = 6 })(&x) print(x) // expecting "7" the original variable x accessible through mutating capture, can still assigned to. expected printout "7", since value of inoutx @ end of function call. if run in swift 4 repl, "6"! the documentation sheds light on behavior: as optimization, when argument value stored @ physical address in memory, same memory location used both inside , outside function body. but follows statement inaccurat

tcl - how to enable randr on centos7 with nvidia -

i want enable randr option on centos7 64-bit system. on googling issue seems nvidia supports randr1.1 , randr 1.2 centos7 default has randr 1.4 installed. relevant details below: [root@box1 ~]# nvidia-smi -l gpu 0: geforce gt 710 (uuid: gpu-999ed32f-aef2-0d96-57a5-c91f21c6a15a) [root@box1 ~]# cat /var/log/xorg.0.log | grep -i randr [ 368.340] (**) extension "randr" enabled [ 368.874] (--) randr disabled [root@box1 ~]# xrandr -v xrandr program version 1.4. my /etc/x11/xorg.con file below: [root@box1 ~]# cat /etc/x11/xorg.conf # nvidia-settings: x configuration file generated nvidia-settings # nvidia-settings: version 384.69 (buildmeister@swio-display-x86-rhel47-06) wed aug 16 20:54:53 pdt 2017 # nvidia-xconfig: x configuration file generated nvidia-xconfig # nvidia-xconfig: version 384.69 (buildmeister@swio-display-x86-rhel47-06) wed aug 16 20:57:01 pdt 2017 section "serverlayout" identifier "layout0" screen

gunicorn - How to change the stdout and stderr log location of processes started by supervisor? -

so in system, supervisor captures stderr , stdout these files: root@3a1a895598f8:/var/log/supervisor# ls -l total 24 -rw------- 1 root root 18136 sep 14 03:35 gunicorn-stderr---supervisor-vvvsl1.log -rw------- 1 root root 0 sep 14 03:35 gunicorn-stdout---supervisor-lllimw.log -rw------- 1 root root 0 sep 14 03:35 nginx-stderr---supervisor-hnipia.log -rw------- 1 root root 0 sep 14 03:35 nginx-stdout---supervisor-2jdn7t.log -rw-r--r-- 1 root root 1256 sep 14 03:35 supervisord.log but change gunicorn's stdout , stderr log files 'location /var/log/gunicorn , fixed file names monitoring purpose. this have done in config file: [program:gunicorn] stdout_capture_maxbytes=50mb stderr_capture_maxbytes=50mb stdout = /var/log/gunicorn/gunicorn-stdout.log stderr = /var/log/gunicorn/gunicorn-stderr.log command=/usr/bin/gunicorn -w 2 server:app however not take effect @ all. did miss in configuration?

Azure Data Factory Copy Activity to Copy to Azure Data Lake Table -

i need copy data incrementally on-prem sql server table in azure data lake store. but when creating copy activity using azure portal, in destination see folders(no option tables). how can scheduled on-prem table data lake table syncs? data lake store not have notion of tables. file storage system (like hdfs). can use capabilities such hive or data lake analytics on top of data stored in data lake store conform data schema. in hive, can using external tables , while in data lake analytics can run simple extract script . i hope helps!

Google Tag Manager Custom JavaScript Parse Error -

i'm trying create custom javascript gtm variable. but keeps telling me have parse error... error @ line 4, character 53: parse error. ')' expected but can't see problem. ideas whats wrong? function() { var clickclasses = "{{click classes}}"; if (clickclasses.includes("download-color-wheel") { return "downloaded color wheel"; } if (clickclasses.includes("lp-10%-coupon") { return "claimed 10pct coupon on landing page"; } if (clickclasses.includes("exit-popup-10%-coupon") { return "claimed 10pct coupon on exit popup"; } if (clickclasses.includes("video-testimonial-submitted") { return "video testimonial submitted"; } return "clicked"; } closing brackets if statements missing. updated code: function() { var clickclasses = "{{click classes}}"; if (clickclasses.includes("dow

jdialog - How to force a dialog to front? -

i display modal jdialog on standing dialogs when invoked (say) function key. way want display status of application regardless of pile of dialogs , pop-up's 'on air'. tried have dialog in question 'owned' mainframe , (frame)null without success. method 'this.tofront()' before 'this.setvisible(true)'is without effect. doing wrong? reading. ;joop!

node.js - Nodemailer + SendPulse Authorization -

i'm trying use nodemailer sendpulse service i'm getting stuck working through authorization code. i've tried using nodemailer oauth2/3 code samples i'm not sure how access token use future calls... (if understand right). transporter = nodemailer.createtransport({ service: 'sendpulse', host: 'smtp-pulse.com', port: 465, secure: true, auth: { type: 'oauth2', clientid: 'xxxxx', clientsecret: 'xxxxx' } }); transporter.sendmail({ from: 'xxx@xxx.ca', to: 'xxx.xxx@xxx.ca', subject: 'message', text: 'i hope message gets through!', auth: { user: 'xxx@xxx.ca', refreshtoken: '1/xxxxxsss-xxxxxxxxxxxx0xxxxxxxx0x00xxx', accesstoken: 'ya29.xx_xx0xxxxx-xx0x0xxxxxxxxxxxx0x', expires: 1484314697598 } }); how refreshtoken/accesstoken require

Split string type list into Sub list in Scala -

i have create string list follow list("[msc050,176484]", "[msc050,176486]") i try convert list sub list following code. think way achieve task. input.map(_.substring(5,13)) then got list follow list(50,17648, 50,17648) i want list follow list(50176484, 50176486) can 1 on this? one way remove commas substring. input.map(_.substring(5,13).replaceall(",","")) // res0: list[string] = list(5017648, 5017648)

How to measure active user for "click event" in real time google analytics -

Image
i've added "click event" on google analytics, when click, popup window shows. on "real time > event" shows increment on active user. need know if user close popup active user decrements ? want know how measure active user ? thanks! from moment there activity user counted active. for example if thing measure on page event , no pageviews, user show active moment event triggered. that said, user inactive when has not performed measured actions (pageviews/events/..) on website specific amount of time , can configured in admin section.

How to write exception and does not consider when it meet specific element using selenium in java -

i tried extract webpage. got xpath following. /html/body/form/div[2]/div[2]/div/div[3]/div[1]/div[11]/div[1]/table /html/body/form/div[2]/div[2]/div/div[3]/div[1]/div[11]/div[2]/table /html/body/form/div[2]/div[2]/div/div[3]/div[1]/div[11]/div[4]/table. i tried code. for(int k=1;k<=4;k++){ webelement e=driver.findelement(by.xpath("/html/body/form/div[2]/div[2]/div/div[3]/div[1]/div[11]/div["+k+"]")); for(int i=1;i<=4;i++){ webelement e1=e.findelement(by.xpath("/html/body/form/div[2]/div[2]/div/div[3]/div[1]/div[11]/div["+k+"]/table/tbody/tr/td/table/tbody/tr["+i+"]")); for(int j=1;j<=2;j++){ webelement e2=e.findelement(by.xpath("/html/body/form/div[2]/div[2]/div/div[3]/div[1]/div[11]/div["+k+"]/table/tbody/tr/td/table/tbody/tr["+i+"]")); } } } it shows errors following. could not find element /html/body/form/div[2]/div[2]/div/div[3]/div[1]/div[11

computational geometry - Algorithm for calculating the most 'even' orientation for edges for tessellated triangles? -

Image
i've inherited legacy code rotates edges between triangles improved topology distribution, algorithm works quite computationally intensive. the psudo-code given quad made of 2 triangles share edge is: /* split 0-2 */ score_02 = (area(v0, v1, v2) / perimeter(v0, v1, v2)) + (area(v0, v2, v3) / perimeter(v0, v2, v3)); /* split 1-3 */ score_13 = (area(v1, v2, v3) / perimeter(v1, v2, v3)) + (area(v0, v1, v3) / perimeter(v0, v1, v3)); /* negative number when (0-2) improved state */ result = score_13 - score_02; this works , can give nice tessellation on 2d triangulated regions (see example). my main concern not efficient (perimeter calculations involve 6 square-root calls). are there other/better methods calculate relaxed state before (above) , after relaxation (below) , eg: failing use method may: cause 1 of triangles have 0 area (depending on output used for, may have cascading effects - faces 0 area normals example aren't handled wh

ssl - Error in Stunnel -

i trying pass https request mirth engine client server. free version of mirth doesn't support https connection, have used stunnel complete me. however, request failed , getting 0 byte response. i have checked log file , observed connection between stunnel , mirth successful (7th line). however, connection getting closed , getting below error: connection closed: 12261 byte(s) sent tls, 0 byte(s) sent socket (line no.79) please note have installed client given certificates (2 .pem , 1 .cer) in ca-certs.pem file. great if assist me on this. below ip details, stunnel config , debug file: ip details: my system ip: 10.219.207.238 target client ip: 4.59.159.120 sending servername: dilhn003.dil.aegis.net stunnel configuration details: [mirth] client = yes accept = 127.0.0.1:9000 connect = dilhn003.dil.aegis.net:443 cafile = ca-certs.pem log file: 2017.09.13 17:34:35 log7[8]: service [nhinpatientdiscovery] started 2017.09.13 17:34:35 log7[8]: option tcp_nodelay set on

amazon web services - Domain redirection based on Geo - AWS -

i have 2 hosted zones **.com , **.co.in. incoming traffic india , if user browses .com should automatically redirect co.in . how in aws . read http://docs.aws.amazon.com/route53/latest/developerguide/resource-record-sets-values-geo.html#rrsets-values-geo-location , implemented in co.in hosted zone not seem work. think there should domain redirection set in .com cant find can in route53 regards raghav to simplify solution, i'm going refer these domains example.com , example.co.in . here's how i'd solve this: s3 bucket example.com : static website hosting: redirect requests: target bucket or domain: example.co.in note region bucket created in, such us-east-1 , we'll need later route 53 record set example.com india : type: cname value: example.co.in.s3-static-website-[region].amazonaws.com routing policy: geolocation location: india set id: india redirect route 53 record set example.com not india : you'd set type , value nor

regression - Can we obtain weights or coefficients of Decision Trees? -

i performing regression analysis, interest obtain coefficients of independent variables used in regression modelling. can please suggest list of models can provide coefficients of independent variables? understand linear,regularized linear,step-wise regression , svm(linear) can provide independent variable coefficients. there other models can apply regression provides independent variable coefficients.

import - Can not resolve symbol in Android Studio -

Image
when open old android project based on blue-tooth errors on "bluetoothadapter.java" cannot resolve symbol import packages: cannot resolve symbol sdkconstant:

update sqlite db from push notification, app is closed and not running in background iOS -

i trying update local sqlite database when notification received , app closed/killed user. works fine when app background or active mode. reference : reference stack link 1 reference stack link 2 here code trying: -(void)application:(uiapplication )application didreceiveremotenotification:(nsdictionary )userinfo fetchcompletionhandler:(nonnull void (^)(uibackgroundfetchresult))completionhandler{ nslog(@"app background :%@",userinfo); if(application.applicationstate == uiapplicationstateinactive) { nslog(@"inactive"); //show view content of push [self backgrouncall:userinfo]; completionhandler(uibackgroundfetchresultnewdata); } else if (application.applicationstate == uiapplicationstatebackground) { nslog(@"background"); //refresh local model [self backgrouncall:userinfo]; completionhandler(uibackgroundfetchresultnewdata); } else { nslog(@"active"); //show in-app banner

Sitefinity multilingual site image (not translated) even after uploaded image separately for each translationissue -

Image
sitefinity multilingual site image (not translated) added each language separately- issue i working on sitefinity multilingual (english & hindi) web application getting strange issue regarding related media upload. in image gallery, have custom field upload image. when adding hindi content image hindi translation, image showing (not translated) message , image not showing in hindi site after publish.

postgresql - Pass Database values to a view in Spring MVC -

Image
i working on spring tool suite mvc project. dealing postgresql db i've created using pg admin 4 v1. have view called veditor.jsp toolbox , canvas/container. when user drags , drops first tool/element onto container properties pane display form set element related properties in form. have created form in separate view called tableselectform.jsp , calling via ajax call , displaying within veditor.jsp 's properties div . in tableselectform , there combobox needs list tables postgres database. tables stored in table called tables , hence field values need retrieved table , populated in combo-box user can select table he/she wishes represent using dropped element toolbox. but issue here is, have created model , dao class represent tables , retrieve tables postgresql db. when try pass values tableselectform view, view not rendered. view - veditor.jsp when table element dragged , dropped, properties pane needs open form shown below tables db. homecontroller.java