on-internet

Wide data format as input to a Shiny mapview app - reactive wrapper(s) needed?

I'm having trouble using columns from data originating in wide format as dynamic inputs to a Shiny map app. In the app I'm hoping to be able to: Select a parameter of point data (sample data below: 16 locations, 6 parameters) in a drop down type menu and adjust the symbol size to represent the selected parameter's absolute values with a slider (to help visualize positive and negative differences from zero) With any parameter selected, retain ability to see all parameters (the columns) in mapview's popup feature (mapview turns the columns into rows for the popup). It seems a filtered long forma

Join the discussion →

HTTP 400 for graph /sites endpoint - Error authenticating with resource

I'm getting an HTTP 400 on a request for https://graph.microsoft.com/v1.0/sites?search=* but expected response is an HTTP 200 w/ data. It works successfully in multiple client environments (i.e. 100s of environments), but it doesn't work for one of our clients. The application does successfully return calls for /groups, /domains, and other endpoints prior to hitting this HTTP 400. The error is: Error authenticating with resource Response from remote side is: { "code": "AuthenticationError", "message": "Error authenticating with resource", "innerError": { "request-id": "1d68c066-dba8-487e-b3a8-

Join the discussion →

Exit status 255 when trying to do npm start

When I try to run npm start I am facing this issue again and again with status code 255. Things I have tried till now: Uninstalled,removed node modules and package.json file and reinstalled still same issue. Changed the package.json file Removed webpack-dev-server and reinstalled There is no application running on port 3000 I have included screenshots of log file and errors below:

Join the discussion →

CucumberException: Failed to instantiate class stepDefinitions When run tests

Please help. I think that there is a mistake when initializing the page public class AuthStepDefinitions { private final AuthPage authPage = new AuthPage(); @When("^user on Auth Page$") public void onAuthPage() { AuthPage.getStartPage(); } etc. public class AuthPage extends TestBase { private String loginPassrod = "[email protected]"; @FindBy(id = "USER_LOGIN") private WebElement loginInput; @FindBy(id = "USER_PASSWORD") private WebElement userPassword; @FindBy(className = "btn") private WebElement btnEntrance; @FindBy(css = "table.dataTable") private WebElement table; @FindBy(css = "a.button-new

Join the discussion →

Why are the matrices in BERT called Query, Key, and Value?

Within the transformer units of BERT, there are modules called Query, Key, and Value, or simply Q,K,V. Based on the BERT paper and code (particularly in modeling.py), my pseudocode understanding of the forward-pass of an attention module (using Q,K,V) with a single attention-head is as follows: q_param = a matrix of learned parameters k_param = a matrix of learned parameters v_param = a matrix of learned parameters d = one of the matrix dimensions (scalar value) def attention(to_tensor, from_tensor, attention_mask): q = from_tensor * q_param k = to_tensor * k_param v = to_tensor * v_param atte

Join the discussion →

how can I parse an HTML response text of an XMLHttpRequest using JS?

here is my code : const http = new XMLHttpRequest(); const url = 'http://page/'; http.open('get', url, false); http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); http.onreadystatechange = function () { if(http.readyState === 4) { if(http.status === 200 || http.status == 0) { let str = (http.responseText); results = document.getElementById('test').value; alert(results) } } } http.send(); How can I sort the str into html so I can get the value using document.getElementById? I have tried var doc = document.implementation.createHTMLDocument("example"); doc.documentElement.

Join the discussion →

How To Merge Feature Branch Into New Feature Branch (Git)

I want to merge a feature branch into a newly created feature branch. My new branch was created off of the master branch and now I want to merge the changes from another feature branch into that new feature branch like this: git merge feature/my-new-feature However this did not work and I cannot find an answer that works. How can I do this?

Join the discussion →

Exclude certain paths for bootsnap loading

https://github.com/Shopify/bootsnap would load all ruby files at launch. However I have certain need to not load a specific directory. Is there a configuration for doing that? Or is there a simple monkey patch to achieve the same thing?

Join the discussion →

nagios check_http HTTP CRITICAL - Unable to open TCP socket, works fine from command line

I have the following service definition: define service{ use my-service ; Name of service template to use host_name dra service_description https://www.example.com check_command check_http!-I my.ip.address --ssl -H www.example.com notifications_enabled 1 retry_check_interval 2 normal_check_interval 5 contact_groups myadmins } The service check keeps failing with Name or service not known HTTP CRITICAL - Unable to open TCP socket However, if I run http_check from the command line, I get a 200 OK result: /usr/lib/nagios/plugins/check_http -I my.ip.address --ssl -H www.example.com -v ..... HTTP O

Join the discussion →

Replicating fixed-point math in Python

I am attempting to replicate a DSP algorithm in Python that was originally written in C. The trick is I also need to retain the same behavior of the 32 bit fixed point variables from the C version, including any numerical errors that the limited precision would introduce. The current options I think are available are: I know the Python Decimal type can be used for fixed-point arithmetic, however from what I can tell there is no way to adjust the size of a Decimal variable. To my knowledge numpy does not support doing fixed point operations. I did a quick experiment to see how fiddling with the

Join the discussion →

Replicating C Fixed-Point Math in Python

I am attempting to replicate a DSP algorithm in Python that was originally written in C. The trick is I also need to retain the same behavior of the 32 bit fixed point variables from the C version, including any numerical errors that the limited precision would introduce. The current options I think are available are: I know the python Decimal type can be used for fixed-point arithmetic, however from what I can tell there is no way to adjust the size of a Decimal variable. To my knowledge numpy does not support doing fixed point operations. I did a quick experiment to see how fiddling with the

Join the discussion →

How to use host network for docker compose?

I want to use docker compose with the host network. I have a docker container that access a local REST api. Usually I run docker run --net=host -p 18080:8080 -t -i containera which can access the host REST api which runs at http://127.0.0.1:8080. Since I want to scale the container containera I found docker compose to scale the container. But the docker compose file from the documentation does not work. The docker container does not query the REST API. I tried the following compose file: version: "3" services: web: image: conatinera:latest network_mode: "host" deploy: replicas: 1 resources: li

Join the discussion →

How to map oneToMany using ModelMapper

I am using springBoot, I want to map OneToMany relationship from parent to child. Directly using entity with eager fetching I get recursive records, therefore, trying using ModelMapper for DTO mapping to Entity but I am not able to figure out how to do it. Please assume getters and setters. Parent.java @Entity public class Parent { @Id private int parentId; private String a; @OneToMany(mappedBy = "parent") private Set<Child> child; Child.java @Entity public class Child { @Id private int childId; private String c; @ManyToOne @JoinColumn(name = "b") private Parent parent; I have working reposito

Join the discussion →

Explanation of % in SQL

Could someone explain the difference between % in SQL? I understand that % is a wildcard that allows you to query results with LIKE results, i.e. a% for words starting with a, but I am confused why the wildcard can be used as % 2 = 0 to query for even numbers? I saw an explanation that said % can be used as divide but I thought / was divide.

Join the discussion →

How to LOCK TABLE ... do stuff ... UNLOCK TABLE with Spring Boot?

The idea is basically to extend some Repositories with custom functionality. So I got this setup, which DOES work! @MappedSuperclass abstract class MyBaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) var id: Int = 0 var eid: Int = 0 } interface MyRepository<T : MyBaseEntity> { @Transactional fun saveInsert(entity: T): Optional<T> } open class MyRepositoryImpl<T : MyBaseEntity> : MyRepository<T> { @Autowired private lateinit var entityManager: EntityManager @Transactional override fun saveInsert(entity: T): Optional<T> { // lock table entityManager.createNativeQuery("LOCK TAB

Join the discussion →

Using Jest even after doing fetch.mockResponse actual fetch is getting called

I am new to react and trying to writing my first test case using Jest. I have to mock a fetch response. I am using jest-fetch-mock. But the call is going to actual fetch and data returned is undefined. package.json : "jest-fetch-mock": "^2.1.2" setupTest.js file global.fetch = require('jest-fetch-mock'); Actual api call method: static fetchUserInfo(){ return dispatch => { fetch('https://localhost:55001/api/userInfo') .then(this.httpResponseHandler.handleHttpResponse) .then ((resp) => resp.json()) .then(data => dispatch(this.onUserInfoGetSuccess(data))) .catch( error => { dispatch(this.onFetchF

Join the discussion →

Specs satisfying the `Firebase/Functions` dependency were found, but they required a higher minimum deployment target

I was trying to install pod 'Firebase/Functions' but failed with the following error: `[!] CocoaPods could not find compatible versions for pod "Firebase/Functions": In Podfile: Firebase/Functions Specs satisfying the Firebase/Functions dependency were found, but they required a higher minimum deployment target.` Here is my pod file # Uncomment the next line to define a global platform for your project # platform :ios, '11.0' target 'MyApp' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for MyApp pod 'Firebase/Core' pod 'Fir

Join the discussion →

Does PCA give us the ordered list from features from the most important to less?

I have a general question about principal component analysis (PCA): I know PCA give us a direction that data have the most variation in that direction. Can PCA give us an order for features from the most important one to the least? For example, if I have 8 features, f1, ..., f8, it gives me f5 is the most important, then f3, then f8, then f4, etc. If yes, what function should I call in R?

Join the discussion →

Caching Maven dependencies in Gitlab-CI correctly

I have configured and working following setup gitlab-ci, which uses docker-machine runner and uploads cache to S3 maven build with configured caching caching correctly loads and uploads on each job But the problem is, that every time I run mvn install, something in the local maven repository changes (I assume it updates pom metadata) and gitlab runner keeps uploading new versions of the cache, on every single build. It is still faster and more reliable to use this "busted" cache, than to download the deps from internet every time, but the upload can take a long time and I would like to shave o

Join the discussion →

GoogleAuth: ModuleNotFoundError: No module named 'google.colab'

I want to import data from google drive to a data frame. But my code breaks down at the 'from google.colab import auth' step. It says google.colab module not found. Tried suggestions at How to resolve: ModuleNotFoundError: No module named 'google.colab' from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from google.colab import auth auth.authenticate_user() import gspread from oauth2client.client import GoogleCredentials gc = gspread.authorize(GoogleCredentials.get_application_default()) Error message: ModuleNotFoundError: No module named 'google.colab'

Join the discussion →

Why does CPython not cache integer values outside the range [-5, 256]?

I was experimenting with variable initialization in Python and I came across a scenario where the id(integers) in a certain range would be the same and the id(integers) greater than 256, Python creates a new reference. Ex: >>>> a = 2 >>>> b = 2 >>>> id(a) == id(b) True >>>> a = 257 >>>> b = 257 >>>> id(a) == id(b) False Reading through the documentation, it is clear that Python caches small integer values during initialization. https://hg.python.org/cpython/file/tip/Objects/longobject.c#l5343 Why does Python internally cache only integer values in the range [-5, 257) During initialization? Als

Join the discussion →

Why does Python not cache integer values outside the range [-5, 256]?

I was experimenting with variable initialization in Python and I came across a scenario where the id(integers) in a certain range would be the same and the id(integers) greater than 256, Python creates a new reference. Ex: >>>> a = 2 >>>> b = 2 >>>> id(a) == id(b) True >>>> a = 257 >>>> b = 257 >>>> id(a) == id(b) False Reading through the documentation, it is clear that Python caches small integer values during initialization. https://hg.python.org/cpython/file/tip/Objects/longobject.c#l5343 Why does Python internally cache only integer values in the range [-5, 257) During initialization? Als

Join the discussion →

Virtualenv with pyenv gives wrong python version

I have pyenv installed on an up to date debian testing distribution, and have python 2.7.1 in it. I create a virtualenv for a project with this version, but when activated it gives me the python system version (3.7). Here is what I did: $ pyenv virtualenv 2.7.16 my_project-2.7 Requirement already satisfied: virtualenv in /home/user/.local/lib/python2.7/site-packages (15.1.0) You are using pip version 18.1, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Using base prefix '/usr' New python executable in /home/user/.pyenv/versions/2

Join the discussion →

How to run Powershell on a list of computers (get-wmiobject SoftwareLicensingProduct)

I'm trying to run a remote command on a list of computers that available in plain text file (1 computer per line) in a file named 1.txt available under c:\1\1.txt. What I run the powershell script the variable $comp is being run as $comp instead of being changed to the computer name $computers = Get-Content c:\1\1.txt foreach ($comp in $computers){ $LicenseInfo = Get-WmiObject SoftwareLicensingProduct -ComputerName $comp | Where-Object { $_.partialProductKey -and $_.ApplicationID -eq "55c92734-d682-4d71-983e-d6ec3f16059f" } | Select-Object PartialProductKey, Description, ProductKeyChannel, @{

Join the discussion →

My controller returns ModelAndView but it doesn't load jsp

I'm studying the restful API. In this project, I wanna log-in using restful API. So, I made two projects. The one is spring MVC. It just shows the web page. Another is the restful API. And It worked well but when I call the web page, it doesn't work. I found several solutions, but those not for me. The one checks import org.springframework.web.servlet.ModelAndView. I already used it. Another used String as the return type in the controller instead of ModelAndView. This is my Controller. @Controller public class LoginController { @RequestMapping(value = "/login", method = RequestMethod.GET) pub

Join the discussion →

Unable to start debugging : The value of miDebuggerPath is invalid

I recently started working on vscode. I wanted to debug my C code. But the moment I am launching the debugger getting Error : Unable to start debugging. The value of miDebuggerPath is invalid. I have my gdb installed on wsl . It's path is /usr/bin/gdb. I have copied same path to launch.json in miDebuggerPath. Here is my launch.json : { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "type":

Join the discussion →

VarHandle get/setOpaque

I keep fighting to understand what VarHandle::setOpaque and VarHandle::getOpaque are really doing. It has not been easy so far - there are some things I think I get (but will not present them in the question itself, not to muddy the waters), but overall this is miss-leading at best for me. The documentation: Returns the value of a variable, accessed in program order... Well in my understanding if I have: int xx = x; // read x int yy = y; // read y These reads can be re-ordered. On the other had if I have: // simplified code, does not compile, but reads happen on the same "this" for example int

Join the discussion →

Access Google Trends Data without a wrapper, or with the API: Python

I am trying to write a Python program to gather data from Google Trends (GT)- specifically, I want to automatically open URLs and access the specific values that are displayed in the line graphs: I would be happy with downloading the CSV files, or with web-scraping the values (based on my reading of Inspect Element, cleaning the data would only require a simple split or two). I have many searches I want to conduct (many different keywords) I am creating many URLs to gather data from Google Trends. I used the actual URL from a test search. Example of a URL: https://trends.google.com/trends/expl

Join the discussion →
Older stories