Oswald

1

votes
1

answer
254

views

prerender-spa-plugin not working on the server

I'm trying to run build on the server. But with prerendering, the following error occurs. On desktop versions of ubuntu and macOS, there is no such problem, the problem is only server-side. I tried on different servers. 95% emittingError: Failed to launch chrome!...
Clara Oswald
1

votes
0

answer
39

views

check supportsDisplay in a function instead of within an intent

I have a working skill that uses the function that checks whether the alexa device has a display so I can either build a template output or render output to a card: function supportsDisplay() { var hasDisplay = this.event.context && this.event.context.System && this.event.context.System.device && th...
Eric Oswald
1

votes
1

answer
78

views

How do you completely end and exit a skill?

I have an alexa skill that plays a sound file on request and then plays a message and stops playing it when the user says stop. I use an end session statement in the stop intent. However, after saying stop once, if you say Alexa stop again it plays the message again, telling me that the skill is sti...
Eric Oswald
1

votes
4

answer
455

views

Expected identifier before numeric constant while getting the UIScreen size

I have this code: Updated -(IBAction)editDrivers:(id)sender { selDriverBrand = driverBrand; selDriverModel = driverModel; selDriverSize = driverSize; driverParams *IView = [[driverParams alloc] initWithNibName:nil bundle:nil]; CGRect onScreenFrame = IView.view.frame; //CGRect offScreenFrame = self.v...
Ian Oswald
1

votes
1

answer
1k

views

Reading from USB using timer

I am new to using USB and am trying to figure out how to run a background timer and then when it fires, read from the USB device. Here is what I am using to start my timer and the method that fires when it expires: void myTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { //ReadUSB();...
Ian Oswald
1

votes
1

answer
169

views

Are there different types of app access tokens?

The documentation for Real-time Updates says: In all cases, you must send an OAuth Application access_token. App access tokens are obtained using your App ID and your App Secret: https://graph.facebook.com/oauth/access_token?client_id=&client_secret=&grant_type=client_credentials I have done this an...
Oswald
1

votes
1

answer
1.5k

views

appcmd set ssl certificate for site

I am trying to give an app https bindings using one of the available certificates in IIS7 but am struggling with the syntax. I think the command should look something like the following but it does not work: appcmd.exe set site 'mysite.com' /+bindings.[protocol='https',bindingInformation='*:443:www....
henry.oswald
1

votes
1

answer
73

views

Compilation fails when passing array with missing initializers as argument

When I try to compile template struct Foo { Foo(const int (&i)[dim]) {} }; int main() { Foo f = Foo((int[2]){0}); // line 9 return 0; } I get the compilation error test.cpp:9:31: error: no matching function for call to ‘Foo::Foo(int [1])’ Apparently, the argument I pass to the constructor is r...
Oswald
1

votes
2

answer
292

views

iPhone accessory, accessory protocol empty

I am working on an app that has an external accessory, the phone shows that it has been authenticated and the device shows up in the General->About menu, but when I NSlog the accessory protocols, it shows up as Null, I didn't think that should be possible if an accessory is actually authenticated....
Ian Oswald
1

votes
1

answer
307

views

export R list into Julia via JSON

suppose I have this list in R x = list(a=1:3,b=8:20) and I write this to a json file on disk with library(jsonlite) cat(toJSON(x),file='f.json') how can I use the Julia JSON package to read that? Can I? # Julia using JSON JSON.parse('/Users/florianoswald/f.json') gives a mistake - I guess it expects...
Florian Oswald
1

votes
2

answer
1.3k

views

Passing data to arduino through windows command line

Im attempting to play with sending data to my arduino and keep running into the same problem. The code on the arduino is as follows: void setup() { Serial.begin(9600); for (int i = 3; i COM3 produced the same result. If any one knows how to send data over window command line to...
James Oswald
1

votes
1

answer
247

views

How to use scale() in Interpolations.jl?

I'm interested in the fastest way to linearly interpolate a 1D function on regularly spaced data. I don't quite understand how to use the scale function in Interpolations.jl: using Interpolations v = [x^2 for x in 0:0.1:1] itp=interpolate(v,BSpline(Linear()),OnGrid()) itp[1] # 0.0 itp[11] # 1.0 scal...
Florian Oswald
1

votes
1

answer
1.3k

views

how to sync android contacts with firebase database

I am new to android programming and I am Developing an App in which the user has an account in firebase and he wants to sync his/her mobile phone contacts with the firebase database contacts. One way is to get all the firebase contacts and compare with the user phone contacts and filter out the simi...
Oswald
1

votes
1

answer
1.3k

views

Visual Studio 2017 uses own JAVA_HOME Path

I've installed the new Visual Studio 2017 with the Tools for Apache Cordova. After the installation I tried to Create a new Cordova App. In my installation, I've already have installed the Java JDK and I want to use this JDK. In my environment variables, it is setted up like this: My Visual Studio...
Oswald
1

votes
2

answer
2.3k

views

Pytesseract: FileNotFound

I have been having some problems with Pytesser using this code to test it: from PIL import Image import pytesseract img = Image.open('pic.png') img.load() text = pytesseract.image_to_string(img) print(text) Run on Python 3.4 in Windows When run I get the error originating from the Pytesseract module...
Niall Oswald
1

votes
1

answer
81

views

TFS 2017 Build Templates Property needs attention

I'm currently trying to create default build templates on Microsoft Team Foundation Server 2017. I created a template via the REST API and it's going well overall. But... One Question. If anybody creates a build with my template, I wanna show him which settings he have to set up to run the build wel...
Oswald
1

votes
2

answer
0

views

st_centroid() does not lie within polygon on Lambert-93 shapefile

I have this problem. i have a shapefile from the IGN institute. I want to aggregate the shapefile according to a feature, then i want to plot the centroids of the resulting polygons. library(sf) library(dplyr) # load a shapefile and plot sh = st_read('~/Downloads/CONTOURS-IRIS_2-1__SHP__FRA_2018-06-...
Florian Oswald
1

votes
2

answer
0

views

compute pointwise distance by group in R with sf dplyr

I have 2 dataframes. I want to compute the distance between all POINT geometries if the first frame with respect to a certain POINT in the second dataframe. The main feature of this problem is that I have a grouping variable in the first dataframe, and I would like to select the corresponding point...
Florian Oswald
1

votes
1

answer
0

views

How to test the functionality of clicking away from a dropdown menu, and it closing

I am testing the functionality of a dropdown window in cypress. Once the dropdown menu is open and tested that it is visible. How can test that clicking outside of the menu will close the dropdown? as far as i know you can only call a .click() on a clickable element else it will throw an error. it('...
Justin Oswald
1

votes
1

answer
0

views

Removing item from nested dictionary

I have this code and am trying to remove an item from a nested dictionary, then write the dictionary back out to NSUserdefaults. If I load a new driver then go back and try to remove it, the program crashes. Here is my code for removing. -(void)Remove:(id)sender { subsDict = [[[[[NSUserDefaults sta...
Ian Oswald
1

votes
1

answer
0

views

Vim - Backspace moves cursor

When in select mode (used mouse to select some text) if I delete a chunk of text with the backspace the postion of the cursor moves backwards a few places which is very annoying. I know I should probably never be using the mouse but....its annoying!
henry.oswald
1

votes
1

answer
0

views

Calling Make file in nested folder via Node.js

I have a complicated MakeFile file I want to call as part of my node.js app, the make file is a couple of directories deep from root. I know I need to spawn a 'make' chile process but moving node into the sub directory to call the make im not so sure about.
henry.oswald
1

votes
2

answer
1k

views

knife data bag from file - show what changed

When uploading a data bag to chef client is it possible to see what has changed, or what the difference is between a local file and the server?
henry.oswald
1

votes
1

answer
2.1k

views

monit : reboot server on failed health check

I am trying to get monit to reboot a server if something catastrophic happens, this is to deal with some very experimental stuff we are doing with docker. Ideally I would be able to do then exec 'reboot now' or then exec '/var/reboot_now_script' but they fail to work. Is it possible to restart the...
henry.oswald
1

votes
1

answer
34

views

Compilation error when accessing overloaded operator of managed reference property

I get the compilation error test.cpp(21) : error C2676: binary '+' : 'Manager ^' does not define this operator or a conversion to a type acceptable to the predefined operator when trying to compile the following program. public ref class Managed {}; public ref class Manager { public: Manager^ operat...
Oswald
1

votes
2

answer
1.5k

views

Why 9600 data rate is used over other rates for Serial.begin()?

I am working on Arduino and for communication purpose with the computer Serial.begin() function is being used. Now since there is a range of data rates from 300...115200. Majority uses 9600! Why is it so? What is its significance
Oswald Vinny
1

votes
1

answer
39

views

find all points in t2 within 1000m of all points in t1

I have 2 tables, t1 and t2, each with a geography type column called pts_geog, and each with a column id which is a unit identifier. I want to add a column to t1 which counts how many units from t2 are within a distance of 1000m to the any given point in t1. Both tables reasonably large, with each...
Florian Oswald
1

votes
1

answer
64

views

Better way to access individual elements in a tensor

I am trying to access the elements of a tensor a, with the indexes defined in tensor b. a=tf.constant([[1,2,3,4],[5,6,7,8]]) b=tf.constant([0,1,1,0]) I want the output to be out = [1 6 7 4] What I have tried: out=[] for i in range(a.shape[1]): out.append(a[b[i],i]) out=tf.stack(out) #[1 6 7 4] This...
Oswald
1

votes
3

answer
2.8k

views

Navigating multiple nested dictionaries in plist file

I have a .plist file that looks like this: and was wondering how I would go about navigating through the multiple dictionaries or if this is even the best way to set up the plist file. Not all elements in the dictionary will have the same years or sizes associated with them so I'm not sure if arrays...
Ian Oswald
1

votes
1

answer
607

views

Compass Scss + Blueprint : setting overflow

I am using blueprint via Compass but have no scroll bars on longer pages, it seems the default overflow is set to 'hidden'. This is the default so I am guessing there is some method/structure everyone else is using apart from me. If not how do I set 'overflow:scroll'.
henry.oswald
0

votes
0

answer
6

views

Live Unit Testing with embedded ressources

I have a test using a embedded ressource to check. If i'm executing the test manually, everything works fine. I print all available ressources on startup. Manually executed: Available Ressources: MyCompany.MyFile.json If the same test is excecuted by the live unit testing, an error appears and the...
Oswald
1

votes
2

answer
54

views

How can I access a cousin element, of an element with an identifier in Cypress

I am trying to click a check box in a list of Table rows the only way I can think to access this level is by the span tag with its corresponding name. cy.get('tr > td > span').contains('newCypressTestCore').siblings('td > input').click(); Although this would only return the siblings of the span tag...
Justin Oswald
1

votes
1

answer
253

views

Use NSPredicate to filter entries that start with non-alphabetic character

I have a UITableView that I am trying to split into sections A-Z and then # for everything else, I am trying to filter out the data from my main array into the non-alphabetic section with: NSArray *selectionArray = [nameArray filteredArrayUsingPredicate: [NSPredicate predicateWithFormat:@'NOT (SELF...
Ian Oswald
2

votes
2

answer
104

views

Decoding Http Response Content from Russian (Cyrillic)

I send a request to an API and the server sends some portion of its response in Russian. I url decode the response using code page 1251 encoding but still don't get the result I want. How can I convert the response back to plain english? What encoding do I use?
Oswald Umeh
2

votes
1

answer
1.3k

views

Gtk+: How to set the cursor of a window from a Cairo context?

I have written the following code to set the cursor of a Gtk::Window from a Cairo::Context. When I run the program and move the cursor into the window, the cursor changes to a horizontal black line at the top, followed by some undefinable white shape at the bottom. I was expecting the cursor to chan...
Oswald
17

votes
3

answer
14.2k

views

Can CloudFlare perform automatic failover to a different backend?

I am looking for an easy way to fail over to a different DC quickly, does CloudFlare offer anything special in this regards with things like health checks or is it just like a standard DNS service?
henry.oswald
5

votes
1

answer
1.2k

views

How to create SVG-based graphics with Aurelia

I've created some Angular+SVG graphics samples here: https://github.com/ocampesato/angular-graphics Where can I find a code sample that illustrates how to convert these code samples to Aurelia? A sample HTML page is here: SVG and Angular A sample JS file for the HTML page is here: window.App = angul...
Oswald Campesato
6

votes
4

answer
704

views

SSE incredibly slow

I am currently writing the communication framework for a web game, the communications map can be seen below: The code is as follows: test.php: Test function init() { var source = new EventSource('massrelay.php'); source.onmessage = function(event) { console.log('massrelay sent: ' + event.data); va...
James Oswald
6

votes
1

answer
1.2k

views

data.table 1.8.1.: “DT1 = DT2” is not the same as DT1 = copy(DT2)?

I've noticed some inconsistent (inconsistent to me) behaviour in data.table when using different assignment operators. I have to admit I never quite got the difference between '=' and copy(), so maybe we can shed some light here. If you use '=' or '
Florian Oswald
6

votes
1

answer
1.2k

views

Chef - template inside a provider not finding source

I have a little resource and provider for nginx sites which writes out a config file for a site. action :start do template '/etc/nginx/sites-enabled/my_site' do source 'nginx_site.conf.erb' notifies :reload, 'service[nginx]' end end When I use it from another cookbook the template nginx_site.con...
henry.oswald

View additional