Posts

Showing posts from September, 2013

c# - unity-networking: bullet prefabs not spawning on client side -

i making simple 2d shooting game. movements appear on both sides of server fine, shooting (and making bullet prefab) works on host side - bullets appear on both sides. client side makes bullets, static , cannot been seen host. host works client doesn't, not understand why problem occurs , how works, appreciate explaination

java - JPQL not working with dates -

i'm not able data database using dates in query... i'm working on web application using spring data jpa , oracle database. using @repositoryrestresource annotation in interface declaring query methods named parameters using @param , @query annotations. today needed add new entity dates. in database both columns type of date , used in query. have other 1 type of timestamp , maybe need use in future. , below java representation of 2 columns only, of course setters , getters, has more fields adding this: @temporal(temporaltype.timestamp) @column(name = "init_date") private calendar initdate; @temporal(temporaltype.timestamp) @column(name = "agg_date") private calendar aggdate; i created new interface case, same way always: @repositoryrestresource(collectionresourcerel = "customer", path = "customer") public interface icustomerrepository extends pagingandsortingrepository<customer, long> { @query("select c cu

authentication - How to use Google Oauth2 for both signing in users and creating new user accounts in a rails app? -

i'm working on google authentication rails app. using omniauth-google-oauth2 gem implement google auth. i've managed have users sign in using google. however, i'd users able sign using google. problem i've matched google callback url particular controller action (sessions#create). possible choose between 2 redirect uris based on whether users signing in or signing up? currently, idea create new google client credentials used sign up, hope there better way. you don't need have 2 redirect uris, need more work when receiving callback. instance: class sessionscontroller < applicationcontroller ... def create email = auth_hash['info']['email'] # assuming omniauth hash auth_hash , you're requiring email scope @user = user.find_by(email: email) if !email.blank? # assuming user model user if @user login_user(@user) # use login method elsif !email.blank? @user = user.new(name: auth_hash['info']

python - savWriter writerows with Dataframe -

i trying use savreaderwriter library python. have dataframe read in via df = pd.read_csv . using following piece of code won't seem write rows file. with savreaderwriter.savwriter(savfilename, *args) writer: writer.writerows(df) i getting following error typeerror: 'str' object not support item assignment.any appreciated. this sample on https://pythonhosted.org/savreaderwriter/ savfilename = 'somefile.sav' records = [[b'test1', 1, 1], [b'test2', 2, 1]] varnames = ['var1', 'v2', 'v3'] vartypes = {'var1': 5, 'v2': 0, 'v3': 0} savreaderwriter.savwriter(savfilename, varnames, vartypes) writer: record in records: writer.writerow(record) i think can divide dataframe 3 fields(records, varnames, vartypes) way, can use method in pandas write data file. import pandas pd sensor_values = pd.dataframe([[1,'aaa','bbb'],[2,'ppp','xxx']], columns=[&#

datastax enterprise - Error while trying huge gremlin Queries in Data Stax Graph -

all of run in datastax studio. i have gremlin query needs addition of 10 vertices , many edges. have written gremlin query , runs successfully. then copied same query twice changing values. again ran then tried same query different values in different cell in datastax studio , got following error: java.util.concurrent.completionexception:org.apache.tinkerpop.gremlin.driver.exception.responseexception

windows - no certificate available when enrolling on behalf -

Image
i have 1 winserver 2008 domain controller , ca server on it. log in administrator account , want request certificate "on behalf" of user of dc. for doing that, @ first duplicated these certificate templates: smart login smart user enrolment agent i changed configuration , permission new templates administrator account can read, write , enrol these templates. after creating these new templates , assigning permissions , configuration, mmc , certificate snap-in, user account certificates, , " personal " section, requested new certificate administrator account make enrollment agent shown below: then generated no problem , want request certificate on behalf of user new certificate. but, in "select enrolment agent certificate" , when click on "browse" button, have problem because there no certificate select, shown below: there no certificate available choose i read lot of documents online did not find reason solve problem!

tsql - Microsoft SQL Server Differential Backup -

i creating differential backups of database every 4h 1 file. today wanted restore latest backup, doesn't work. if try restore in sql management studio, doesn't recognize full backup. when browse restore point 81 (out of 150), recognizes full backup , able restore it. when choose point after 81, stuck in loop. i checked headers of backup file , found odd. backups 1-81 have same differentialbaselsn , differentialbaseguid, after 81, changed new lsn , gui. is problem, why doesn't recognize after 81? can change lsn , guid manually? thanks!

r - How to make sure text title is inside the polygon object? -

Image
i making map plot, want put small text label inside every state. current problem text goes outside state limits , doesn't nice: i tried using mean, median, centroids , on. what want every text inside or outside polygon , here: (image http://www.businessinsider.com/map-what-100-is-actually-worth-in-your-state-2015-7?ir=t ) i use following code generate picture: library(maps) library(dplyr) library(ggplot2) #data mapbase <- map_data("state.vbm") data(state.vbm.center) df <- state.vbm.center %>% as.data.frame() %>% mutate(region = unique(mapbase$region) ) %>% full_join(mapbase) #actual plotting cnames <- aggregate(cbind(long, lat) ~ region, data=df, fun=median) gmap<- ggplot()+ geom_polygon( data=df2, aes(long, lat, group = region, fill = somevalue,alpha=0.3)) + coord_fixed() + theme_void() + geom_text(data=cnames, aes( fontface=2 ,cnames$long, cnames$lat , label = "text" ), c

Script to import from Pipedrive to google sheets for last 20 days -

i have script importing pipedrive google sheets works great. pull matches last 20 days instead of specific date. clear rows each time , ass them in fresh rather add them next empty row. function getpipedrivedeals() { var ss = spreadsheetapp.openbyid('sheet name'); var sheet = ss.getsheetbyname("sheet1"); var url = "https://api.pipedrive.com/v1/activities?user_id=0&start=0&limit=500&start_date=2017-06-01&api_token=xxxxxxxxxxxxxxxxxxxx"; var response = urlfetchapp.fetch(url); var dataset = json.parse(response.getcontenttext()); var data; (var = 0; < dataset.data.length; i++) { data = dataset.data[i]; sheet.appendrow([data.user_id, data.type, data.add_time, data.note, data.org_name]); } } any appreciated, thank in advance. you can use start_date & end_date parameter fetch last 20 days records , sheet.clear() clear contents of sheet. refer below code. hope helps! function getpipedrivede

flowtype - Typing conditional properties with union -

i have following method defined on custom component es6 class takes object component property. if property instance of component assigns ref else creates new instance el , opts properties : setref({ id, component, el, opts = {}, props = {} }: refconstructortype | refinstancetype): promise<component> { let ref: component; if (component instanceof component) { ref = component } else { ref = new component(el, opts); } } my type definitions refconstructortype , refinstancetype are: type refinstancetype = {| component: component, id: string, props?: {} |}; type refconstructortype = {| component: typeof component, id: string, el: element, opts ?: {[option_ke: string]: string}, props ?: {} |}; anyway flowtype complaining: 86: setref({ id, component, el, opts = {}, props = {} }: refconstructortype | refinstancetype): promise<component> { ^^^^^^^^^ component. type

php - Should I use Firebase for my Android APP if I know server coding? -

should use firebase ? have read firebase , new me. know sql , php server side coding.i want create android app provide users interact each other , contain follow each other, send image , chatting each other should use hostgator (my hosting) or better use firebase in case ? paying $13 per month hosting answer should contain followings: 1)firebase or hostgator better in case? 2)why?(explain details if possible) 3)which 1 cost less 4)will able change 1 (from hostgator firebase , reverse) ? 1) firebase , regular sql (like hostgator) aren't same. firebase provides realtime database. means if change value of entry, change on every devices connected. also, suppose hostgator using rdbms (relation database management system), in case, need create structure stock data (datatables, columns ...) don't need in firebase (and other nosql dbms). 2) there not obvious better option. depends on want. shoud @ firebase documentation : https://firebase.google.com/docs/databa

c# - Update textblock to value of variable in WPF -

edit: want update value of textblock value of random variable generated periodically on class. my implementation blocking other features in app (buttons). suggestion? public partial class mainwindow : window { taskviewmodel viewmodel = new taskviewmodel(); public mainwindow() { this.datacontext = viewmodel; initializecomponent(); server_v2.asyncservice.runmain(); displayav(); } //display availability private async void displayav() { while (true) { //availabilityfield.text = server_v2.av.tostring(); viewmodel.availability = server_v2.av.tostring(); await task.delay(500); } } public class taskviewmodel : inotifypropertychanged { private string availabilty = "0"; public string availability { { return availabilty; } set { availabilty = value; onstaticpropertychanged();} } public event

php - preg_match_all: changing the string $match -

so far: i'm doing preg_match_all search , output is: donald, daisy, huey, dewey , louie code this: $duckburg = array(); preg_match_all($pattern,$subject,$match); $duckburg['residents'] = $match[1]; print_r($duckburg['residents']); output: array ( [residents] => array ( [0] => donald [1] => daisy [2] => huey [3] => dewey [4] => louie ) my question: add every string " duck" using help-string: $lastname = " duck" the output should be: array ( [residents] => array ( [0] => donald duck [1] => daisy duck [2] => huey duck [3] => dewey duck [4] => louie duck ) i tried (but it's not working): preg_match_all($pattern,$subject,$match); $matchy = $match.$lastname; $duckburg['residents'] = $matchy[1]; print_r($duckburg['residents']); is possible change matching string before goes array? thank help! array_map tool such manipulation: $match = array

How to set Google Cloud Storage setting "Share publicly" false and show a checkbox in front of filename -

when upload image node.js application, image uploaded publicly since public link available. want upload image privately const storage = storage({ projectid: config["googleprojectid"] }); (var key in cloud_bucket){ bucketreference[key] = storage.bucket(cloud_bucket[key]); } const gcsname = "your."+extension; if(bucketreference[tag]){ file = bucketreference[tag].file(gcsname); } this uploading image baseurl/bucket_name/your.jpeg public link available , can see pasting in url , signing in gmail. i want bring checkbox instead of public link on upload (as happens when manually upload on storage). please out in resolving ! got answer ! const stream = file.createwritestream({ metadata: { contenttype: "image/jpeg", }, predefinedacl: "bucketownerread"//shows no checkbox since project owner has reader access , no 1 accept object owner can see images predefinedacl: "bucketownerfullcontrol" /

Replacing strings in a file containing ${Some string in variable} in powershell -

i have text file contains keys of hash table in form of ${key} . need parse text file , replace ${key} it's value. below code using #$config hashtable $document = get-content sample.txt foreach ($conf in $config.keys) { [string]$match = '${' + $conf + '}' $document = $document.replace($match, $($config.$conf)) } } i have tried below alternatives $match string [string]$match = "`${" + $conf + "}" [string]$match='${' $match+=$conf $match+='}' i tried hard coding string $match='${backup_folder}' in cases nothing. have tried -match see if matches returns false. have confirmed text file contains several patterns of ${key} format , if copy output of $match , search in file can find patterns. please point out what's wrong. using powershell v5.0 sample input $config=@{"backup_dir"="_backup";"staging_dir"="_staging"} content

ZXing.Net.Mobile view does not stretch for UWP in Xamarin.Forms -

Image
i use zxing.net.mobile zxingscannerview in xamarin.forms application. test android api 21+ , windows mobile 10. while in android camera stream expands boundaries of scanner view perfectly, not true uwp. no matter emulator size or resolution. i"ve tried real windows phone device , issue still appears. i place zxingscannerview in content page similar this: <contentpage.content> <stacklayout spacing="20" padding="15"> ... <grid horizontaloptions="fillandexpand" verticaloptions="fillandexpand"> <zxing:zxingscannerview x:name="zxing" result="{binding scannerresult, mode=twoway}" isscanning="{binding scannerscanning}" isvisible="{binding scannervisible}" isanalyzing="{binding scanneranalyzing}" scanresultcommand="{

android - Realm method "Cannot Resolve Symbol" -

i'm using realm android create database app wheme go try call method realm.begintrasnaction() , tell me android studio cannot resolve symbol. here's piece of code: import io.realm.realm; public class playercreator { realm realm = realm.getdefaultinstance(); realm.begintransaction(); } and here's gradle files: project gradle: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' classpath "io.realm:realm-gradle-plugin:3.5.0" } } allprojects { repositories { jcenter() } } task clean(type: delete) { delete rootproject.builddir } module gradle: apply plugin: 'com.android.application' apply plugin: 'realm-android' android { compilesdkversion 24 buildtoolsversion "24.0.1" defaultconfig { applicationid "tfdev.avventuratestuale" minsdkversion 18 targetsdkver

python - How to import Basemap (mpl) in Azure ML (section Notebooks) -

how can import basemap (from mpl_toolkits.basemap) in azure ml (in section notebooks)? there general way import libraries in azure ml? (current version shown python 3.4.5 |anaconda custom (64-bit)| (default, jul 2 2016, 17:47:47) ipython: 5.1.0) pip installs geos package there missing dependencies (and export geos_dir) please install corresponding packages using systems software management system (e.g. debian linux do: 'apt-get install libgeos-3.3.3 libgeos-c1 libgeos-dev' and/or set environment variable geos_dir point location geos installed (for example, if geos_c.h in /usr/local/include, , libgeos_c in /usr/local/lib, set geos_dir /usr/local), or edit setup.py script manually , set variable geos_dir (right after line says "set geos_dir manually here". i tried install mpltoolkits.basemap package via command below in notebook of azure ml python3 successfully, please try it. !pip install https

python - Cannot install any packages with pip -

when try , install packages pip following error: could not find version satisfies requirement sendgrid==4.2.0 (from versions: ) for sake of example: pip search sendgrid > ... > sendgrid (4.2.0) - sendgrid library python > ... pip install sendgrid > collecting sendgrid > not find version satisfies requirement sendgrid (from versions: ) > no matching distribution found sendgrid similarly: pip search vcr >amivcrm (0.1) - simple connector amiv sugarcrm >betamax-matchers (0.4.0) - vcr imitation python-requests >betamax (0.8.0) - vcr imitation python-requests >cubicweb-vcrs (0.2.1) - vcreview statistics >cubicweb-vcreview (2.4.0) - patch review system on top of vcsfile >devcron (0.4) - cron working on projects use >crontabs. >httpsrvvcr (0.1.9) - vcr recording proxy-server usage >vcr (0.0.9) - vcr - decorator capturing , simulating network commun

Get some text with java + selenium WebDriver -

Image
i want text "invitation sent xxxxx" , not want what's inside <button class="action" data-ember-action="" data-ember-action-3995="3995"> visualizar perfil </button> i'm getting text way: string pessoapopu = driver.findelement(by.classname("artdeco-toast-message")).gettext(); system.out.println(pessoapopu); page structure: <div class="artdeco-toast-inner" data-ember-action="" data-ember-action-3994="3994"> <li-icon aria-hidden="true" type="success-pebble-icon" class="artdeco-toast-icon"><svg viewbox="0 0 24 24" width="24px" height="24px" x="0" y="0" preserveaspectratio="xminymin meet" class="artdeco-icon"><g class="large-icon" style="fill: currentcolor"> <g id="success-pebble-ico

javascript - How to change submenus of menu to the bottom of each parent -

i have menu contains 3 levels . works , show both 2 first level. not shows third level because define overflow in second level show scroll bar. question : there way keep scroll bar of without hide 3rd level. if not how can show 3rd level @ bottom of each parent when hovered? here snippet: #menuindez{width:17%;height:100%;position:fixed;z-index:999999;top:0px;height:100%;position:fixed;top:0px;right:0;z-index:1001;} #menuindez2{border-top:5px solid #d3b564;height:100%;position:relative;padding:20px 0 0;width:98%;margin:0 auto} .menuindex.hvr-bounce-to-left > a{width:270px;display:block;clear:both;text-align:center;padding:8px 0;margin:0;font-size:17px;} ul.css3menu1, ul.css3menu1 ul, ul#css3menu2, ul#css3menu2 ul, ul.css3menu1 ul ul{margin:0;list-style:none;padding:0;border-width:0;border-style:solid;font-size:17px;} ul.css3menu1 ul, ul#css3menu2 ul, ul.css3menu1 ul ul{top:0px;font-size:17px;cursor:pointer;visibility:hidden;position:absolute;right:200%;} ul.css3men

r - Revealing text in a shiny document -

in interactive document, possible use block of shiny code hide/reveal markdown? a simple example of i'd is: --- title: "example" output: html_document runtime: shiny --- $2+2$? ```{r reveal, echo=false} actionbutton("button", "reveal solution") #try (unsuccessfully) comment out rest of document renderui(html(ifelse(input$button, "", ("<!--")))) ``` answer $4$. in real use case question , answer long , both involve shared randomly generated r variables. here code should work you: --- title: "example" output: html_document runtime: shiny --- $2+2$? ```{r reveal, echo=false} library(shiny) actionbutton("button", "reveal solution") #try (unsuccessfully) comment out rest of document rendertext({if(input$button == 0) {null }else{ print("the answer 4")}}) ``` if understood correctly wanted solution of 2 + 2 after pressing actionbutton , therefore have used if...else...

html - Silent dowload using jQuery and Javascript -

how can make html page , have silent (!!) download of file path on windows machine? i want that, windows computer goes web page, automatically download file of choosing server c:\program files , example. on private network. so aim is, if have file called target on server, download c:\program files , through webpage. how can accomplish this? i have following in mind: <a href="#">download here</a> $('a').click... //some jquery download file i'd prefer html , javascript, since i'm not fluent in jquery. thanks in advance guys :)

database - Handling multiple commands as transaction -

im developing payment system performs payment , writes item bought in cloud hosted database, azure. how works is: transaction 3rd party payment system if success, new subscription row in database added user transaction history , other relevant stuff written database however, in unlikely event that: transaction success(http call payment gateway returns success) for reason, insert in database fails i end user having paid item without actual subscription item.(since row wont in our database) these 2 calls not database related (one is, 1 simple async http request) cannot treat them transaction( since cant rollback ). so question more experienced how handle situation?

asp.net - SharePoint PublishingWebControl's edit panel rendering with error -

Image
i trying create .ascx control sharepoint. have created new empty asp.net project , have added references of sharepoint dlls, microsoft.sharepoint.dll, microsoft.sharepoint.publishing.dll have registered sharepoint.publishing <%@ register assembly="microsoft.sharepoint.publishing, version=15.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c" namespace="microsoft.sharepoint.publishing.webcontrols" tagprefix="publishingwebcontrols" %> now trying add new editmode panel control below <publishingwebcontrols:editmodepanel id="editmodepanel1" runat="server" pagedisplaymode="display"></publishingwebcontrols:editmodepanel> above working fine. if add control in between or if give space between end tag , start tag as stragely giving me following error. reason behind? missing something?

jquery - Materialize CSS select: Get selected value when close -

trying selected value on materialize css select element @ close. something this: $('input.select-dropdown').on('close', function() { console.log($(this).val()); }); just doesn't work, because shows last selected value. first time shows nothing, , next time shows selected value first time. i supose because close action declared before asign selected value. anyone knows if there way selected value on "close"? thanks in advance. update i don't want select value jquery, want detect selected value (if option has been selected) when dropdown close. i'm trying implement label funcionality select text input: when select opened, label goes smaller, , when select closed, if no value selected, returns initial position. use mouse down event. $('input.select-dropdown').on('mousedown', function() { console.log($(this).val()); }); or can try change event. here: $('input.select-dropdown').on(

Scala Slick Strategies For Composing Compiled Queries of various shapes -

i using postgresql 9.6, slick 3.2 , have slick-pg wired up. i'm implementing graphql backend in scala , need implement queries resolve graphql cursors of various shapes. shapes of input enumerable. of inputs influencing query be: a user selectable ordering. various filtering criteria (full-text-search, date-ranges etc). selecting between backward or forward traversal. my current simple cursors have backward , forward hardcoded compiled queries. , both have same shape , using standard slick abstractions factor out commonality reuse (value classes ops, inheritance hierarchy "entity" tables , code generation). there still lot of boilerplate , won't scale more dynamic shapes unless list them out. here excerpt class uses pattern: private [shard] class schemaalltypecursor(shard: slickshard) extends cursorspec[typemodel] { import shard.postgresprofile.api._ private val forwardqc = compiled { (tenantidurls: rep[list[string]], low: rep[long], take: const

angularjs - Date/Time range picker for angular material -

Image
i using angular material project. i need date range picker functionalities & date-time range picker functionalities. i have searched not able find picker working functionality. i have tried smdatetimerangepicker didn't work start-date. open picker current date. doesn't have functionality of dynamic min/max date. can point me on right direction can fine range picker working start, min, max,.. functionalities. the best angular js date time picker can choose 720kb datepicker date alone, has nice ui , nice features. 720kb datepicker <datepicker date-format="mm/dd/yyyy"> <input type="text" maxlength="10" id="dtdate" ng-model="model.date" placeholder="mm/dd/yyyy"> </datepicker> the best time picker angular moment picker angular moment picker time <input show-header="false" moment-picker="@ngmodel2" format="hh:mm" today="true&qu

Nested search query in Elasticsearch with range filter and unknown names of inner fields -

i storing data in elasticsearch database , trying query it, filtered range of numbers. this minimized structure of document in database: "a": { "b": { "x": [1, 2, 3, 4], // note: x, y , z not compulsory "y": [2, 3, 4], // documents can have x or z or maybe x , z etc. "z": [5, 6] } } now want query return documents, there in of subfields of "b" @ least 1 number in range between 2 , 4. important thing here don't know names of subfields of "b". the query came is: post /i/t/_search { "query": { "query_string": { "fields": ["a.b.*"], "query": "number:[2 4]" } } } the query doesn't rise error, returns no result. not sure, kind of search query appropriate such task. used query string because 1 found join unknown field name , range. try remove n

Inserting multiple data into MongoDB using c# -

i started use mongodb , wanted ask how put multiple data 1 variable. want user registration windows forms. whenever check on internet see people creating multiple variables each data. example while can: insert users (username, password) values ('{user}', '{pass}'); execute code on mysql on mongodb need create variables every user registered. means not automatic. you've not mentioned driver using assume you're using official .net driver. to insert multiple documents mongodb use insertmanyasync method. example shown in official mongodb c# driver documentation . an example method is: public task insertusers(ienumerable<user> users) { // create client const string connectionstring = "mongodb://localhost:27017"; var client = new mongoclient(connectionstring); // database var database = client.getdatabase("mydb"); // user collection var collection = _database.getcollection<user>("users&

Take my web page focus to browser address bar using javascript / jquery -

desired behavior : when tabkey press happens on particular dom element in webpage want cursor focus go address bar. (i want via javascript. using browser extension not desired here) when press control + l shortcut in webpage, takes focus address bar. when try trigger via javascript does'not work. <div id="1" tabindex="1"></div> <div id="2" tabindex="1"></div> <div id="3" tabindex="1"></div> <script> var = $('#1'); some.on('keydown', function (e) { if (e.keycode == 9 /* tabkey */) { var e = jquery.event("keydown"); e.keycode = 76 /* lkey */; e.ctrlkey = true; $('body').trigger(e); } }); </script> each browser (and operating system) handles differently , not possible highlight address bar using javascript. if was, keep in mind people can map these com

jquery - How to resize div with tag object inside -

i'm trying similar topic how create jquery 2 div resize horizontally with difference of adding tag "object" in div, this: $("#div1").resizable() .html("<object data = 'http://www.csszengarden.com/' " + "width = " + $("#div1").width() + " height = " + $("#div1").height() + " ></object>"); $('#div1').resize(function(){ $('#div2').width($("#parent").width()-$("#div1").width()); }); but prevent me resize div. do resizing when div contain reference web page?

Git submodule raises import error once used in python project -

i'm using git-submodule in python project. the submodule project looks this: -submodule_project - __init__.py - debug_util.py - parsing_util - __init__.py - parse.py - consts.py parse.py imports debug_util.py . structure works fine submodule independent project. my project built this: -project - __init__.py - file1.py - some_dir - __init__.py - main.py so once use submodule git submodule in project, parse.py raises importerror . happens once line imports debug_util.py ran. clarify: main.py imports parse.py , imports debug_util.py can explain me i'm doing wrong, , available solutions fix this? here's .gitmodules file: [submodule "submodule_project"] path = submodule_project url = ../submodule_project.git thanks in advance of you! git submodules annoying work (at least last time played around them). i'd recommend against using submodules , using python's ow

"put binary" command is just outputting text instead of a binary file on LiveCode Server -

Image
i'm using livecode community server 8.1.2 on windows server 2016 datacenter (running apache 2.4) i use following code put header "content-disposition: attachment; filename=" & tfilename put header "content-type: application/pdf" put header "content-transfer-encoding: binary" put url("binfile:" & "../resources/documents/" & tactualfilename tbinarydata put binary tbinarydata when included in script called browser code returns data text in browser window rather pdf file can downloaded. a few months ago wrote code , worked, returned today , doesn't. i've double checked , i'm sure it's correct have no idea else have broken it. i've tested on chrome 59 on windows 8.1 pro chrome 59 on macos sierra 10.12.5 safari on ios 10.3.2 any or guidance welcome. edit: network headers chrome shown below edit: amended code remove word "binary" line 4 - generating error producing text output

angular - Ionic2 App, File does not exist -

openfile(){ console.log("openfile"); this.fileopener.open('/assets/hello', 'application/rtf') .then(() => console.log('file opened')) .catch(e => console.log('error openening file', e)); } i want open rtf file in assets folder in app. have used file opener plugin. when i'm running app got error openening file – {status: "9", message: "file not exist"} . it's impossible open files "assets/*" fileopener. fileopener needs real file path.

Webpack - cannot exclude directory -

i cannot exclude directory, web pack regex dont make sens i have folder called "ignore", tried /ignore/, /^ignore/ /ignore(.+)?$/ , many more it not help, webpack takes directory rest of project driving me nuts, checked on many other forums, given solutions either not work , or not make sens config.module = { rules: [ // support .ts files. { test: /\.ts$/, loaders: ['awesome-typescript-loader?' + atloptions, 'angular2-template-loader', '@angularclass/hmr-loader'], exclude: [istest ? /\.(e2e)\.ts$/ : /\.(spec|e2e)\.ts$/, /node_modules\/(?!(ng2-.+))/, /ignore(.+)?$/] }, it shoudl simple, can me out on ? thanks

How to resolve the Error "OS_ERROR_TIMER_OVF" in RTX -

i 'm got started coding rtos program using rtx. , encountered error "os_error_timer_ovf" . according following program,it occurred "due user timer callback queue overflow detected". so, changed os_timercbqs value 4 25. error not disappeared. void os_error (uint32_t error_code) { /* here: include optional code executed on runtime error. */ switch (error_code) { case os_error_stack_ovf: /* stack overflow detected running task. */ /* thread can identified calling svcthreadgetid(). */ tid_overstack = svcthreadgetid(); break; case os_error_fifo_ovf: /* isr fifo queue buffer overflow detected. */ break; case os_error_mbx_ovf: /* mailbox overflow detected. */ break; case os_error_timer_ovf: /* user timer callback queue overflow detected. */ break; default: break; } (;;); } how should resolve error? if know solution ,please let me know.

c# - How to change WPF control bindings at runtime -

my form allows me add , edit record (at different times). currently have save button commits changes database: <page.datacontext> <viewmodels:recordsviewmodel /> </page.datacontext> <grid> <button name="btnsave" content="save" comand="{binding addrecordcommand}" /> </grid> when click in datagrid edit record, record data fetched database , loaded form fields per allocated bindings. unfortunately, doesn't change binding on save button, i've tried in code: // datagrid edit button clicked private void btnedit_click(object sender, routedeventargs e) { btnsave.setbinding(button.commandproperty, new binding { source = this.datacontext, path = new propertypath("updaterecordcommand") }); btnsave.commandparameter = new binding("id"); glist.visibility = visibility.collapsed; gaddedit.visibility = visibility.visible; } this, unfortunately,

SAS instream upload with input statement: string truncation -

i wrote code snippet load data set in sas. data eser7.ateneo; infile datalines missover; input fac $ aa0506 aa0607 aa0708; datalines; architettura 200 200 200 economia 680 680 680 giurisprudenza - 350 400 ingegneria 470 470 600 lettere - - 150 smfn - - 180 scpolitiche - 300 300 ; run; proc print data = eser7.ateneo; run; in result viewer, noticed first variable fac has truncated string. can't solve setting fixed size fac column, best way adapt length dinamically? thanks sas columns have fixed sizes. need set longest possible size (through length statement, generally, or using informat on input) in order tell sas how space set aside column. data eser7.ateneo; infile datalines missover; length fac $20; input fac $ aa0506 aa0607 aa0708; datalines; architettura 200 200 200 economia 680 680 680 giurisprudenza - 350 400 ingegneria 470 470 600 lettere - - 150 smfn - - 180 scpolitiche - 300 300 ; run; proc prin

c# - ReportExecutionService not honoring timeout -

i using .net reportexecutionservice render ssrs reports. rendering many reports in rapid fire , randomly getting reports timeout. somewhere around 1 out of 1400 reports hang. when check hanging report in executionlog3, see report status of rssuccess, , total time of around 3s. looks report finishes response never gets seen render call, , times out after 5 minutes following exception: system.invalidoperationexception: there error in xml document (1, 2655). ---> system.net.webexception: operation has timed out. @ system.net.connectstream.read(byte[] buffer, int32 offset, int32 size) @ system.io.streamreader.readbuffer(char[] userbuffer, int32 useroffset, int32 desiredchars, boolean& readtouserbuffer) @ system.io.streamreader.read(char[] buffer, int32 index, int32 count) @ system.xml.xmltextreaderimpl.readdata() @ system.xml.xmltextreaderimpl.parsetext(int32& startpos, int32& endpos, int32& outorchars) @ system.xml.xmltextreaderimpl.parsete

validation - Cannot resolve reference in JSON Schema using AJV - CLI -

i'm trying build json schema (draft-06) existing json data file. schema has gotten big fit in single file , trying break multiple files. keep getting error can't resovle refrence sectiontableschema.txt id http://somesite/section i've made following files , placed them in same directory. these files not hosted on webserver. settingsschema.txt: { "title":"settings", "$schema":"http://json-schema.org/draft-06/schema#", "$id":"http://somesite/settingsschema.txt", "properties":{ "section":{ ... ... ... "$id":"/section", "items":{ "oneof":[ {"$ref":"#/sectiontableschema.txt"}, {"$ref":"#/sectionnontableschema.txt"} ] }, "type":"array" } }, "type":"object" } sectiontablesche

c# - How to dd alternate text for wingdings/symbols programmatically-Openxml -

i want add alternate text wingdings/symbols programmatically using openxml msword. basically, requirement programmatically(c#) create readable(tagged) pdf saved ms word document has symbols. currently, symbols created when read acrobat reader, symbols not read , need alternate text reader read text instead of symbol.

r - Spliting then plotting uneven vector lengths to a single graph -

Image
i'm using data in format shown: actual data set longer. column labels are: date | variable 1 | variable 2 | failed ? i'm sorting data date order. dates may missing, ordering function should sorting out. there, i'm trying split data sets new sets denoted far right column registering 1. i'm trying plot these sets on single graph number of days passed on x-axis. i've looked using ggplot function, seems require frames length of each vector known. tried creating matrix of length based on maximum number of days passed sets , fill spare cells nan values plotted, took ages data set quite large. wondering whether there more elegant way of plotting values against days past sets on single graph, , iterate process additional variables. appreciated. code reproducible example included here: test <-matrix(c( "01/03/1997", 0.521583294, 0.315170092, 0, "02/03/1997", 0.63946859, 0.270870821, 0, "03/03/1997", 0.698687101,

reactjs - React-router and redux manual URL enter error -

i have problem of undefined props redux store. here routehandler file function organisationsfromstore(store) { const { router, organisations } = store; return { organisations } } function organisationfromstore(store) { const { router, organisations } = store; const { organisationid } = router.params; return { organisation: organisations.get(parseint(organisationid)) } } export const organisationroutehandler = connect(organisationfromstore)(organisation); export const accountsconfigurationroutehandler = connect(organisationsfromstore)(accountsconfiguration); this hooked getroutes.jsx file handles routes: <route path="accounts" component={accountsconfigurationroutehandler}> <route path=":organisationid" component={organisationroutehandler}></route> </route> in organisation.jsx (which gets organisations prop it's parent accountsconfiguration ) component have: render() { return ( <div

VBA userform 2 commandbuttons + attribute value to variable -

i have basic vba knowledge. trying find way make user choice between 2 value "internal" or "external" depending on results run 1 part of code or part. what best way achieve this? i have started create user form, how can value type_trade sub , use if statement? private sub external_click() dim type_trade string type_trade = "external" end sub private sub internal_b2b_click() dim type_trade string type_trade = "internal_b2b" end sub private sub userform_click() end sub one way achieve follows: private type_trade string private sub external_click() type_trade = "external" end sub private sub internal_b2b_click() type_trade = "internal_b2b" end sub private sub someotherpoint() if type_trade = "internal_b2b" 'do end if end sub

hadoop - Apache Nifi and OPC integration issue (GetValue processor) -

i have integrated nifi opc ua [ https://github.com/wadesalazar/nifi-opcua] process apache knife 1.3.i following url [ https://community.hortonworks.com/articles/90355/collect-data-from-opc-ua-protocol.html] started. have installed simulation opc server press on windows. i able pull messages getnodeids processor on nifi, , splittext processor being used reading messages line line , sending getvalue processor shown in example, getvalue processor continuously throwing below error. i tried set "starting node" property in getnodeids processor, not able make out node property should set, please find below sample data simulation server. sample data received simulation opc server: nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=61 nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=85 - nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=61 - nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=2253 - - nsu=http%3a%2f%2fopcfoundation.org%2fua%2f;i=2004 - - - nsu=http%3a%2f%2fopcfoundation.org%2