For context, our application is an Android WebView that loads a url (web app written in React) with a print feature. The flow of the app is that once the print button is clicked, it triggers a print method on the Android side through an @Javascript Interface bringing with it a payload - A base 64 String, that we convert in the Android side of code to print. Note -- ( The printer is connected to the android device ) Issue is that the conversion is coming out like instead of like . To further complicate the issue, on base64decode.net using google chrome, the conversion presents no issues, but if
What's the best way to install packages in spacemacs? 1. Using M-x package-install 2. Include the packages to be installed in dotspacemacs-additional-packages 3. (use-package ) I couldn't find a definite answer anywhere. Using the package-install to install packages modified the package-selected-packages automatically. Shall I remove all the packages there and include them in dotspacemacs-additional-packages? I want to keep my .emacs synchronised between my local mac and my home directory in a linux server. So, I was wondering about removing this automatically modified package-selected-package
Using Angular 7 as front-end and Nodejs as back-end. I deployed a website at Amazon-web-service using IIS and when I am doing API requests to the server everything works just fine. But when a client from China is trying to use the same website and sends the same API he gets a No 'Access-Control-Allow-Origin' header is presented on the requested resource other than that error, he receives another error: POST http:... net::ERR_FAILED zone-evergreen.js:2952 what is the zone-evergreen.js and how does it affect the cors policy? P.S. when the client is browsing his mobile smartphone the API is succe
I'm only starting with Xamarin forms for cross platform app development and I'm having a problem at something that should be very simple. Have created a basic cross platform app and installed and referenced all of the required packages for Firebase authentication. I've also created a project in the Firebase console, configured it for email and password authentication and I've registered a user, etc. So, I've written a basic method in the Android project to check if the current user is logged in. public async Task<string> GetCurrentUser() { string userID = null; if (FirebaseAuth != null) { try
I am trying to get a cookie (and rest of the page) from a web site with cookie verification using requests library, but it fails on SSL certificate verification: HTTPSConnectionPool(host='***host***', port=443): Max retries exceeded with url: ***url*** (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))) I can bypass it using verify=False, but that is unsecure. I can parse certificates but this is overkill. pip install certifi is not doing anything. How do I fix this? My code: impor
I need to multiply a 3D numpy array by a 2D numpy array. Let's say the 3D array A has shape (3, 100, 500) and the 2D array B has shape (3, 100). I need element wise multiplication for each of those 500 axes in the 3D array by the 2D array and then I need to sum along the first axis of the resultant array yielding an array of size (100, 500). I can get there with a couple of for loops, but surely there must be a numpy function which will achieve this in 1 line? I have had a look at np.tensordot, np.dot, np.matmul, np.prod and np.sum, but none of these functions will do exactly that.
I'm trying to implement Passport.JS and JWT functionality into my nodejs application and receive the following error TypeError: fn is not a function in this code block of my application const utils = require('./utils') const strategies = require('./strategies') const pipe = (...functions) => args => functions.reduce((arg, fn) => fn(arg), args) const initialiseAuthentication = app => { utils.setup() pipe(strategies.JWTStrategy)(app) } module.exports = { utils, initialiseAuthentication, strategies } Would be awesome if someone could guide me in the right direction, as I am stuck here. Thank you
I am developing a workout app with sensor connectivity and able to read and get data for Heart rate sensor but for stride sensors (walk/Run) facing problem to map the values given by sensor characteristic. How will I get Speed, cadence, steps per mints , Distance.? I searched on google didn't get for this. I am pretty much sure getting data but difficulty in mapping index and values for different parameters. Check attached code snapshot for data output.
I am building a MEVN stack CRUD app (Vue, Node, Express, MongoDB). I am attempting to set up the following Express route for my app... postRoutes.post('/update/:id', async(req, res)=> { const collection = await loadPostsCollection(); let id = req.params.id; let result = await collection.findOne(req.params.id) if (!result) { res.status(404).send("data is not found"); } else { result.title = req.body.title; result.body = req.body.body; result.updateOne(); } }); ..in order to update specific data based on the id of that data. After clicking the update button on the front end and triggering an upd
I'm trying to upgrading a Spring boot application from JDK 8 to JDK 11 and I made the following changes: 1.Use java.version in pom.xml <properties> <java.version>11</java.version> </properties> 2.Add dependencies for modules removed: <!--1.JAF(java.activation)--> <dependency> <groupId>com.sun.activation</groupId> <artifactId>javax.activation</artifactId> </dependency> <!--2.JTA(java.transaction)--> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> </dependency> <!--3.JAXB(java.xml.bind)--> <!--API--> <dependency> <groupId>jakarta.xml.bind</groupId> <artifactId>ja
I am new to react and would like to create an entry field where a user can enter multiple email address So far, I have an email field <TextValidator id="email" aria-label="email" label="Email address used to register" required name="email" value={this.state.email ? this.state.email : ""} onChange={this.handleChange({ name: "email", index: 0 }).bind(this)} autoComplete="email" margin="normal" variant="outlined" fullWidth validators={["required", "isEmail"]} errorMessages={[ "this field is required", "email is not valid" ]} /> I would like either a way to enter multiple emails in the single fiel
I'm struggling to run a program with CLion on Windows 10. It was working fine a couple weeks ago and the only thing I could think of that might have broken things is installing git. As you can see from the below picture, the run button is greyed out and the run configuration says "Nothing to run on", which I'm guessing refers to the target. What I've done So Far I tried going through the steps outlined in the accepted answer of this question: How do I set up CLion to compile and run? I installed MinGW in C:\MinGW Added C:\MinGWand C:\MinGW\bin to the path I've configured paths to my Environmen
Trying to follow the install instructions from here: https://www.hanselman.com/blog/AnnouncingNETInteractiveTryNETIncludesNETNotebooksAndMore.aspx I get to the step where it tries to tell jupyter cli that .net interactive exists: dotnet interactive jupyter install I get a response: Could not execute because the specified command or file was not found. from the Anaconda prompt. jupyter kernelspec list shows that phyton3 is available, and I can launch notebooks using 'jupyter notebook' Not sure what do to next to resolve? Thanks.
I have been trying to load the content of a single query for days, I have tried both from the server side and server client directly and both do not work take the same. Currently the charging time can be approximately one minute. I have incorporated the scroller plugin but it takes the same. I use php and codeigniter 3. JS var table = $('#datatabletransaction').DataTable({ "deferRender": true, "scrollY": 500, "scroller": true, "responsive": true, "processing": true, "fixedHeader": true, "serverSide":true, "lengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "Todos"]], "ajax": { "url": mostrarco
I got information about device resolution, refresh rate and other info by adb command - adb shell dumpsys display After entering above command info retrieved is - mDisplayInfos= PhysicalDisplayInfo{720 x 1280, 57.0 fps, density 1.5, 309.966 x 312.615 dpi, secure true, appVsyncOffset 1000000, bufferDeadline 17543860} I wanted to change refresh rate to 60 fps which is recommended. How do I change it from adb shell command?
I'm trying to come up with this scenario in a sort of "medieval fantasy" setting. There are two towns. One, Caertydin is a large city with all the appropriate tropes, while the smaller town, Siege is a sort of satellite town. The reason Siege exists, is that hundreds (or however long ago it has to be) of years ago, a foreign power from a far away land actually laid siege to Caertydin. But the siege was never officially lifted and it developed into an actual town, so there is a noticeable mix of cultures between the two towns. The people of Siege are mostly made of descendants of the actual sol
I'm having an issue with windows. when I opened it, the screen is getting black every time and refreshes it. I opened it in safe mode and the error is showing that An Overrun of a stack-based buffer in Explorer.exe. Please Help me to fix it. The complete Error is: The system detected an overrun of a stack-based buffer in this application (explorer.exe).This overrun could potentially allow a malicious user to gain control of this application
I'm developing a test automation program in Java using jdk-11 with Cucumber + Extent Reports. When I try to run my Runner class with JUnit, I got this error message: io.cucumber.core.exception.CucumberException: Couldn't load plugin class: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter at io.cucumber.core.options.PluginOption.loadClass(PluginOption.java:117) at io.cucumber.core.options.PluginOption.parsePluginName(PluginOption.java:102) at io.cucumber.core.options.PluginOption.parse(PluginOption.java:86) at io.cucumber.core.options.RuntimeOptionsBuilder$ParsedPluginData.ad
I'm using leafletjs for the map feature of my app. Installed, wrote some simple codes, lo and behold a map. Although the tiles aren't rendering properly even I drag to another place, it's still have patches of tiles missing. Here's my code HTML <div #map style="width:100%; height:100%;" leaflet (leafletMapReady)="onMapReady($event)" [leafletOptions]="options"> </div> TS import { Component, OnInit } from '@angular/core'; import { latLng, MapOptions, tileLayer } from 'leaflet'; @Component({ selector: 'app-map', templateUrl: './map.component.html', styleUrls: ['./map.component.scss'] }) export cl
I've built a table of data following this helpful guide: https://www.daxpatterns.com/parent-child-hierarchies/ I'm following it exactly but I'll still explain things here so you don't have to go through the whole article if you don't want to. I have a table of Names with corresponding keys, and ParentKeys forming hierarchies. I added a column for the path, columns for each level of the path, depth of hierarchy and an IsLeaf column: If I want to make a matrix and include City (from another table), all hierarchies will expand to the maximum length, and blanks are filled in with the "parent's" na
I'm currently creating a grid-layout in Vuetify, but I got stuck. I'm making a card-layout containing images. Here is the example: I've tried it with the following code, but then small cards on the right are not aligned due to the margins. <v-container> <v-row class="justify-center"> <v-col cols="6"> <v-hover v-slot:default="{ hover }"> <v-card to="/pools" :elevation="hover ? 12 : 2" :class="{ 'on-hover': hover , 'overwrite-hover' : $vuetify.breakpoint.xsOnly}" > <v-img class="white--text" :src="images[0]"> <v-card-title class="white--text align-end fill-height headline">My Pools</v-card-title
I have created a pickle from my machine learning model and it is getting saved in local. I want to push it to azure blob storage and want to retrieve it later. How can I do it using python 3. Please help. ''' #model X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.3, random_state = 100) regressor = LinearRegression() regressor.fit(X_train, Y_train) #Creating the pickle file finalized_model.sav on my local mypickle = 'finalized_model.sav' pickle.dump(regressor, open(mupickle, 'wb')) ''' I tried following for .csv importing and pushing from azure, but don't know how to do
I want to mock method which use Jira-Ruby gem with jql lib def call client = JIRA::Client.new(options) client.Issue.jql( "project = #{project_key} AND status != Done AND status != Closed AND status != Cancelled AND status != Followup", query_options ) end my mock: let(:jql_options) do [ "project = TSW-123 AND status != Done AND status != Closed AND status != Cancelled AND status != Followup", query_options ] end let(:query_options) do { start_at: 0, max_results: 1000 } end let(:jira_client) { instance_double(JIRA::Client) } let(:issue) { instance_double(JIRA::Resource::Issue) } let(:issue_fact
I used the source code from iDempiere. Running mvn validate is successful. Run mvn verify successfully. Import source into eclipse is successfully. Run file install.app is successfully. When run file server.app it will be fail. Run url http://localhost:8080/webui/ failed. Please guide how to fix the problem.
The new Microsoft Edge program is now open to accept chromium-based extensions for the new Microsoft Edge (ver. 77 or above). I have tested my chrome extension on Edge browser and it gets installed in Edge browser. I am trying to reuse the native host in Edge browser which is developed for Chrome browser. But somehow it is not working. Does anyone has any idea about how to support the chrome native host in Edge browser? or do I need to implement the native host by using UWP? I have tried communicationg with native host from my edge extension but getting the "Unchecked runtime.lastError: Specif
I'm trying to run docker command in my declarative pipeline, to install docker env on my slave machine i'm trying to use docker commons plugin "https://plugins.jenkins.io/docker-commons/", but no success. Further research i have got below link mentioning how to use this plugin. https://automatingguy.com/2017/11/06/jenkins-pipelines-simple-delivery-flow/ I have configured docker in manage jenkins -> global tool configuration, but dont find how to use below section in my declarative pipeline of jenkins, i think below structure/syntax will work for scripted jenkins pipeline def dockerTool = tool
I'm trying to set up my machine to run Tensorflow 2. I've never used Tensorflow and just downloaded Python 3.7. I'm not sure if this is a problem with my machine or not. I followed the installation directions listed on TensorFlow's website. I followed the installation instructions and everything seemed to be working. MacOS 10.15.3 Python 3.7 Tensorflow 2 I created a small program just to test stuff out. This is what I have: import io import matplotlib.pyplot as plt import tensorflow as tf from tensorflow import keras import numpy as np data = keras.datasets.fashion_mnist (train_images, train_l
I am trying to add custom XSS protection by creating a RequestWrapper extending HttpServletRequestWrapper in an XSS filter. The below code provides XSS protection to: 1. Request Params 2. Payload. public class XssRequestWrapper extends HttpServletRequestWrapper { XssRequestWrapper(HttpServletRequest request) { super(request); } @Override public String getQueryString() { /* Custom XSS logic */ } @Override public String getParameterMap() { /* Custom XSS logic */ } @Override public String getParameterValues() { /* Custom XSS logic */ } } But when I configure my REST Api with @RequestBody Annotati
I'm using visual studio 2019 and I'm trying to change my C# version. The reason I am doing this is that the build servers I use use an older version of VS / MSBuild to build and deploy code (this is outside my control). Therefore I need to use C# 5. On previous versions of visual studio, you could do this from the menu in [Project] -> Properties -> Build -> Advanced. For VS2019 Microsoft, in their infinite wisdom, has decided to make this harder. Apparently you need to edit the project file manually and add: <PropertyGroup> <LangVersion>[some version here]</LangVersion> </PropertyGroup> To you
I have tried a lot but did't get exact knowledge to copy which files to client side Getting error " Valid authentication certificate required" Below is postgres DB server directory total 80 skipping unwanted directory -rw-------. 1 postgres postgres 1285 Feb 13 20:16 rootCA.crt -rw-------. 1 postgres postgres 1168 Feb 13 20:16 server.crt -rw-------. 1 postgres postgres 1679 Feb 13 20:17 server.key Below is postgresql.conf file content related to SSL configuration. [postgres@munmvs2951 raj]$ cat postgresql.conf | grep ssl ssl = on # (change requires restart) ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aN