sininen

1

votes
1

answer
33

views

Protractor test suite run all tests that are not in a folder

It is possible to create a test suite in Protractor by adding the following to a config file: suites: { test1: 'folder1/**/*.spec.js', test2: 'folder2/**/*.spec.js' } Where the test suite test1 will run all tests that are inside folder1. How can I create a test suite that will run all tests that are...
sininen
1

votes
0

answer
275

views

Phaser shows a blank screen on mobile device

I am trying to create a game with Phaser and Phonegap, but when I start the app the screen is blank on an android device, but it should show a star sprite in the upper left corner of the screen instead. What's wrong with my code? I think it is a problem with the width and height of the screen. When...
sininen
1

votes
1

answer
0

views

Sharing the same Selenium WebDriver in several step definition files

My question is basically the same as this one. But I am writing my tests in JavaScript. I want to have several step definition files. I tried creating a file with exported driver like this var webdriver = require('selenium-webdriver'); var driver = new webdriver.Builder().forBrowser('chrome').build(...
sininen
1

votes
1

answer
30

views

Evaluate two-dimensional function in octave

How can I evaluate a two-dimensional function in octave? When I have a function which looks like this in WolframAlpha notation: f(x, y) = {{x^2-y^2}, {x^2-y}} (Matrix with one column and two rows) I would like to evaluate it at any point like this: f(1, 0) which should give me the result {{1}, {1}}
sininen
1

votes
2

answer
311

views

Error when loading FastText's french pre-trained model with gensim

I am trying to use the FastText's french pre-trained binary model (downloaded from the official FastText's github page). I need the .bin model and not the .vec word-vectors so as to approximate misspelled and out-of-vocabulary words. However when I try to load said model, using: from gensim.models i...
Clara-sininen
3

votes
2

answer
390

views

How to get out of iterate loop when a condition is met?

I want to iterate over a function g with iterate. When I run my code the loop runs infinitely. Is there any possibility to get out of the loop when a condition is met? Something like if g x > 100 then stop. My code: f x = iterate g x g x = 2 * x
sininen
1

votes
3

answer
97

views

How to properly print file content to the command line in C?

I want to print the contents of a .txt file to the command line like this: main() { int fd; char buffer[1000]; fd = open('testfile.txt', O_RDONLY); read(fd, buffer, strlen(buffer)); printf('%s\n', buffer); close(fd); } The file testfile.txt looks like this: line1 line2 line3 line4 The function print...
sininen
8

votes
3

answer
1.6k

views

Deriving an ECDSA uncompressed public key from a compressed one

I am currently trying to derive a Bitcoin uncompressed ECDSA public key from a compressed one. According to this link on the Bitcoin wiki, it is possible to do so... But how? To give you more details: as of now I have compressed keys (33-bytes-long) gathered on the bitcoin network. They are of the f...
Clara-sininen
1

votes
1

answer
50

views

How to prevent onClick if another button was clicked before

I have 4 buttons which change the direction (Up, Right, Down, Left) of movement of a View. The movement is called like this: handler.postDelayed(new Runnable() { @Override public void run() { move(); handler.postDelayed(this, delay); } }, delay); I want to prevent the user to change direction if the...
sininen