on-internet

Jenkins to List count of build for jenkins job

I wanted to create a jenkins job which can list me all jenkins job with it is count of number of builds it has executed. Jenkins API or Groovy may work. Below API provide me list of all build ids for particular job but I'm looking for count for build executed for that job. http://[jenkins_server]/job/[jobname]/api/xml?tree=builds[id] Also I'm refering this : https://stackoverflow.com/a/28039134/12897205 Let me know if I can go for any plugin

Join the discussion →

Polylang disable translation for posts

I'm using polylang on my wordpress page. I want to translate the pages, but keep the blog in only one language. I've used this hook: function turn_blogposts_translation_off( $post_types, $is_settings ) { unset( $post_types['post'] ); return $post_types; } add_filter( 'pll_get_post_types', 'turn_blogposts_translation_off', 10, 2 ); which does disable translations for posts, but if I am viewing my page in the second language, no blog posts are shown, since there are none in that language. How can I show English posts (main language) while viewing the site in other languages?

Join the discussion →

Oracle cannot use LOB locators selected from remote tables

As per below, I want to create a record into another database remotely which will work when I changed c1 to some string in insert query but when I use c1 object it will through error as per the title. Please note: it's working fine on same remote without @, and using c1 object, tried other solution but no avail, can someone help me with a script for this dbms_lob. And its remote to another remote db insert set define off; Declare c1 clob default ' '; begin dbms_lob.append(c1,chr(10));dbms_lob.append(c1,q'[DOCTYPE]'); Insert into SYSTEM_CONFIG@rtfqa (CONFIG_ID,NAME,VALUE_OLD,TYPE,SUB_TYPE,FROM_

Join the discussion →

Error while connecting my azure vm through azure bastion

So , i created an azure bastion named "test" under the virtual network "RemoteAccess-Bastion-VN".Under this virtual network i also created a subnet "AzureBastionSubnet" with "/27" range.And when i try to connect my VM through bastion i dont see my bastion , i am asked once again to create a new bastion.I dont know where i am wrong.I think i followed the steps correctly and now i am stuck. I have attached the pic showing how it looks when i try to connect through bastion , it should show the login credentials page but instead it is asking me to create a new bastion. Thank You

Join the discussion →

504 Gateway Timeout on apache tomcat 9

I'm running tomcat 9 server. My request fails with 502 Gateway Timeout after 15mins of my request.any one know how to increase default time out in apache tomcat 9? or anyother reason behind this?

Join the discussion →

View Docker entrypoint output

I'm configuring an entrypoint to be executed after the container is started: COPY entrypoint.sh /entrypoint.sh RUN ["chmod", "+x", "/entrypoint.sh"] ENTRYPOINT exec /entrypoint.sh However, I'm not able to see the output of entrypoint.sh execution when issuing docker-compose up. The only output is: service exited with code 2 The container is killed so I cannot do docker logs <container_id>. I've tried with the docker events command but I don't see any logs related to entrypoint.sh. I know the entrypoint file has an error, but I'd like to see the output of the execution. Any ideas?

Join the discussion →

How to convert a base64 String to a ZPL label for print on a Zebra ZQ630 printer

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

Join the discussion →

Installing packages in spacemacs

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

Join the discussion →

net::ERR_FAILED zone-evergreen.js:2952

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

Join the discussion →

Simple Firebase authentication problem in Xamarin Forms

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

Join the discussion →

How do I fix SSL_verify_failed without bypass (verify=False)?

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

Join the discussion →

Multiplying a 3D numpy array by a 2D numpy array

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.

Join the discussion →

How to solve "TypeError: fn is not a function"?

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

Join the discussion →

How to Identify values from characteristic data for Walk Run Stride bluetooth sensor

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.

Join the discussion →

Upgrading a Spring Boot project from JDK 8 to JDK 11

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

Join the discussion →

Create a mutlple email field input in react.js

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

Join the discussion →

dotnet interactive jupyter install command not found

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.

Join the discussion →

Very slow loading of records with datatables plugin, how can I do faster?

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

Join the discussion →

How to change refresh rate by adb command

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?

Join the discussion →

System Error:An Overrun of a stack-based buffer in windows system file explorer.exe

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

Join the discussion →

io.cucumber.core.exception.CucumberException: Couldn't load plugin class: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter

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

Join the discussion →

How to hide blanks in a matrix visualization with hierarchical rows

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

Join the discussion →

How to store the machine learning model pickle to azure blob and retrieve it/

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

Join the discussion →

RSpec Mock - class does not implement the instance method: jql. Perhaps you meant to use `class_double` instead?

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

Join the discussion →

Native messaging host in Edge browser

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

Join the discussion →

Using withEnv in a declarative pipeline

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

Join the discussion →

Spring: How to add XSS protection to @RequestBody in a RESTful service?

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

Join the discussion →

Changing the C# version in Visual Studio 2019

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

Join the discussion →

PostgreSQL SSL Configuration

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

Join the discussion →
Older stories