on-internet

Pysnow module (Python for Servicenow) - how to create requested items?

I recently start using pysnow-module for automating my work at Servicedesk. My problem is that i don't know how to create Requested Items. I have managed to create new incidents and new requests, also update them. I have also succeeded in modifying Requested Items, but i'm stuck at not knowing how to turn Requests into Requested Items. I've tried following pieces of code, all starting with this s = pysnow.Client(instance='Secret domain', user='Secret-user', password='Secret') Then continuing with following tries: def new_ritm(): result = s.insert(table='sc_req_item', payload={'field1': 'value1

Join the discussion →

Get-winEvent to XML, now how to get the values out

I'm relatively new to powershell, far more comfortable with SQL. I need to get some data out of the event logs. I've managed to establish so far that I need to use Get-WinEvent and use the xml element to get the actual info I want. So far I've got: $filterxml = " *[System[(EventID='4624')]] and ( *[EventData[Data[@Name='LogonType'] and (Data='10')]] or *[EventData[Data[@Name='LogonType'] and (Data='2')]] ) " $Events = Get-WinEvent -maxEvents 1 -Filterxml $filterXml # Get out the event message data ForEach ($Event in $Events) { # Convert the event to XML $eventXML = [xml]$Event.ToXml() #Now wha

Join the discussion →

Jenkins git fetch returned status code 143

I'm facing the problem with Jenkins with fetching git repo on Linux. I attach the stack trace. I have SSH gitlab connection configured with a private key and a passphrase. The configuration is made in Credentials/System/Global credentials (unrestricted). The path to the private key is /home/jenkins/.jenkins/secrets/my_private_key.pub. Owner and a group: jenkins:jenkins, where jenkins is the user making the installation. Permissions: 600. The private key has been checked with the passphrase using ssh from the command line. The git fetch command used by jenkins has also been checked with command

Join the discussion →

Webpack, require is not a function

Getting an error when running my webpack-built React app - the error is as follows: webpack-internal:///1495:3 var crypto = require('crypto'); ^ TypeError: require is not a function at eval (webpack-internal:///1495:3:14) at Object.<anonymous> (/path/to/project/build/main.js:9739:1) at __webpack_require__ (/path/to/project/build/main.js:21:30) at eval (webpack-internal:///1494:1:20) at Object.<anonymous> (/path/to/project/build/main.js:9733:1) at __webpack_require__ (/path/to/project/build/main.js:21:30) at eval (webpack-internal:///692:8:18) at Object.<anonymous> (/path/to/project/build/main.

Join the discussion →

spring scheduling a job with fixed delay and initial delay

I am trying to schedule a method call. I want to schedule this method call as soon as the server starts and then after every 30 seconds. Below code: @Configuration @EnableScheduling @EnableTransactionManagement public class Schedular implements SchedulingConfigurer { @Override public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { taskRegistrar.setScheduler(poolScheduler()); taskRegistrar.addTriggerTask(new Runnable() { @Override public void run() { testScheduling(); } }, new Trigger() { @Override public Date nextExecutionTime(TriggerContext triggerContext) { Calendar nextExecution

Join the discussion →

What does do?

I'm aware that its for text that runs in the opposite direction of the rest of the page, but I'm not fully understanding what it does. Does it just mark it so the browser knows its running in the opposite direction? If so why does the browser benefit from knowing this? Also what is the "surrounding text", is it literally just the text around it, its getting compared to or is it getting compared to the lang attribute? <p>this is text going from left to right <bdi>opposite running text</bdi></p>

Join the discussion →

Max post size ignored by Wildfly 10

I have a problem with uploading files larger than 10MB on Wildfly 10.0.0.Final. Here you have my standalone.xml file <subsystem xmlns="urn:jboss:domain:undertow:3.0"> <buffer-cache name="default" /> <server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https" max-post-size="31457280"/> <https-listener name="default-ssl" security-realm="SSLRealm" socket-binding="https" max-post-size="31457280"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content" /> <!-- <filter-ref name="server-header" /> --> <!-- <filter-ref n

Join the discussion →

What is the maximum payload length of AWS SNS for mobile push notifications?

On the FAQ of AWS SNS they have mentioned that: With the exception of SMS messages, Amazon SNS messages can contain up to 256 KB of text data, including XML, JSON and unformatted text. Q: How do SNS topics work with Mobile Push? SNS topics can have subscribers from any supported push notifications platform, as well as any other endpoint type such as SMS or email. When you publish a notification to a topic, SNS will send identical copies of that message to each endpoint subscribed to the topic. If you use platform-specific payloads to define the exact payload sent to each push platform, the pub

Join the discussion →

Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null

I am trying to stream a video file via socket.io to my client (currently using Chrome as client). I am only getting the first frame of the video and afterwards the Failed to appendBuffer is appears: Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null Part of JS code: if (buffer.updating || queue.length > 0) { console.log("buffer.updating = " + buffer.updating + " queue.length = " + (queue.length)); queue.push(videoData); } else { console.log("else buffer.updating = " + buffer.updating + " queue.length = " + (queue.length)); buffer.appendBuffer(v

Join the discussion →

Converting military time to Standard and Universal time in Java?

I'm currently getting the correct military time. What I'd like the program to display is something like 4:20:01 instead of 16:20:01 for standard time. I've tried using if statements, but I haven't been successful. I'm confused on Universal time. Would the Universal Time be the same as the military time? Or is it a separate thing? If so, how can I get the program to show the universal time? This is the current code I have: package readtime; import java.time.LocalDateTime; public class Time { // field data int hour; int minute; int second; public Time () { hour = 0; minute = 0; second = 0; } pub

Join the discussion →

net::ERR_NETWORK_CHANGED on Chrome on Https socket connection

I'm running a Server-sent Event (SSE) server over Ingress/Kubernetes/GoogleCloud and it works like a charm. I can run SSE clients over the web and they connect perfectly, start receiving events with no problem. But there's one ugly bug I can't get it work right, on Chrome browsers after some time I get net::ERR_NETWORK_CHANGED error. No matter how many times I run it, I always get it after a few seconds/minutes. If I run the same client over Firefox, nothing wrongs happens. If I run it using cURL over terminal, nothing wrong happens. If I decide to run if over Chrome without HTTPS, it works! I

Join the discussion →

FormControl returning empty value in Angular 2

I am using a form <form [formGroup]="form"> <input type="text" value={{userDetails.first_name}} formControlName = "firstName"> <button type="submit" data-action="save" (click)="onSubmit(form.value)"> </form> Here userDetails.first_name value is Tom. It is visible on UI inside text box ; but when I submit form form.firstName is giving me empty value.

Join the discussion →

Use login and password with rdpy RDP library

I am trying to use this RDP library: https://github.com/citronneur/rdpy. But I don't understand how can I connect to host with port, login and password. There is no login and password in this code: from rdpy.protocol.rdp import rdp from twisted.internet import reactor class MyRDPFactory(rdp.ClientFactory): def clientConnectionLost(self, connector, reason): reactor.stop() def clientConnectionFailed(self, connector, reason): reactor.stop() def buildObserver(self, controller, addr): class MyObserver(rdp.RDPClientObserver): def onReady(self): """ @summary: Call when stack is ready """ # send 'r' k

Join the discussion →

WLSTException: Error occured while performing connect : Error getting the initial context. There is no server running

Hii I am facing issue while connecting to weblogic server. The command i used to connect to it is as follows: java -Dweblogic.security.SSL.ignoreHostnameVerification=true - Djava.security.egd=file:/dev/./urandom -DUseSunHttpHandler=true - Djava.net.preferIPv4Stack=true -Djava.awt.headless=true - Dsun.jnu.encoding=ISO-8859-1 -Dfile.encoding=ISO-8859-1 weblogic.WLST <path>/weblogic_configuration_domain_update.py <path>/weblogic- domain.properties It gives following error: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://<IP>:<port>: Destination unreachable;

Join the discussion →

Multiple static IPs for Docker containers

I have a Docker host that should allow each container to have multiple static IP addresses. The application inside the container should then be able to choose from which address it will send traffic to remote hosts (e.g. ping -I <source-address> example.com). Imagine a setup like this: IP addresses 10.0.0.10 - 10.0.0.19 are assigned to ContainerA, 10.0.0.20 - 10.0.0.29 to ContainerB and so on. Any traffic to ContainerA's address range is forwarded to ContainerA, while outgoing traffic originates from an address from that range that ContainerA can chose. The same applies to ContainerB. The defa

Join the discussion →

Gradle tool in Jenkins Declarative Pipeline

I defined a Jenkins Declarative pipeline to CI/CD my project. I am using gradle as my build tool. However I don't want to use the Gradle Wrapper and check it int the VCS. So I planed on using the jenkins tools functionality as below so that I can update the version number if I need to in future. But it doesn't seem to work. pipeline { agent any tools { gradle "gradle-4.0" } stage("Compile") { steps { sh 'gradle project/build.gradle classes' } } I get the error "script.sh: gradle: not found". I tried to echo PATH and that doesn't contain the path of this autoinstalled gradle tool. Please help.

Join the discussion →

rbenv command not found on Mac OS

We are trying to run rbenv on El-Capitan 10.11.6. When we try to run rbenv command in the terminal we got the following error message: command not found We googled how to solve that issue and one possible solution is to add the "rbenv" to the system PATH, we followed the steps stated in this link. When we run the "$PATH" to check whether or not the rbenv path was added properly into the system PATH, we got the the same result: command not found The result of "$PATH" command is: qwe-Mac-mini:~ amrbakri$ rbenv -bash: rbenv: command not found qwe-Mac-mini:~ asd$ echo $PATH /Users/asd/.rbenv/bin:/

Join the discussion →

designing shape class with circle and triangle

I am trying to understand the is-a vs is-like-a relationship where I read somewhere that we must try to follow design such that we always have is-a relationship and not is-like-a. Consider the classic example of shape base class and derived triangle and circle classes. So circle is-a shape and so is triangle is-a shape. The function display area was defined in the base class. Now the below program runs fine. #include "stdafx.h" #include <cmath> #include <iostream> class shape { public: virtual void displayArea()=0; }; class circle :public shape { int radius; public: circle(int radius2) :radius

Join the discussion →

Column store error: search table error: Instantiation of calculation model failed

In HANA I built a Calculation view which executes fine. I have a calculated column. Now I changed the calculated column from case when "Anzahl" > 1000000 then 'SUSPECT: Too high?' when "Anzahl" < 1000 then 'SUSPECT: Too low?' else 'OK' end to case when "Anzahl" > $$IP_UPPER_LIMIT$$ then 'SUSPECT: Too high?' when "Anzahl" < $$IP_LOWER_LIMIT$$ then 'SUSPECT: Too low?' else 'OK' end Then I get this error: Error: SAP DBTech JDBC: [2048]: column store error: search table error: [34023] Instantiation of calculation model failed;exception 306002: An internal error occurred

Join the discussion →

Tint VectorDrawable inside Drawable Resource xml

i've had a drawable resource for a selectable Button/ImageView like this: <selector> <item android:state_selected="true"> <layer-list> <item> <shape android:shape="oval"> <solid android:color="@color/blue"/> </shape> </item> <item> <bitmap android:src="@drawable/ic_icon" android:tint="@color/white"/> </item> </layer-list> </item> <item> <layer-list> <item> <shape android:shape="oval"> <solid android:color="@color/background_unselected"/> </shape> </item> <item> <bitmap android:src="@drawable/ic_icon" android:tint="@color/icon_unselected"/> </item> </layer-list> </item> as i've switched to use

Join the discussion →

Does Node.js need a job queue?

Say I have a express service which sends email: app.post('/send', function(req, res) { sendEmailAsync(req.body).catch(console.error) res.send('ok') }) this works. I'd like to know what's the advantage of introducing a job queue here? like Kue.

Join the discussion →

How do I draw data on an imported JPEG? [duplicate]

I have imported a JPEG and I would like to put data over the top of it (the picture is a habitat and I have data of movement of an animal living in the area). I am hoping to create lines that correspond to where the animal has been recorded. So far, I have imported the image using 'readJPEG', and have visualized my data this way (img = my imported JPEG): plot(1, type="n", xlim=c(100, 150), ylim=c(300, 350)) rasterImage(img,100, 300, 150, 350, interpolate = TRUE) Any help on how to plot data on top of this photo? I am hoping to simply use the coordinates already in place when I visualize the da

Join the discussion →

Bootstrap Validator validate number range

How to set validation for the range for two numbers. I want to set max value of the first number to value of second number and min value of the second number to value of first numb. Here is my js code: min_num : { validators : { integer : { message : 'Please enter the valid number ', min : 1, max : 'max_num' }, notEmpty : { message : 'Please enter the number' } } }, max_num : { validators : { integer : { message : 'Please enter the valid number ', min : 'min_num', max : 10000 }, notEmpty : { message : 'Please enter the number' } } } And HTML: <div class="form-group"> <label class="col-md-2 con

Join the discussion →

spring.resources.static-locations not working with devtools

I have a project with the following structure (just like spring.io): ├── frontend │ ├── dist │ | ├── app.js │ | ├── vendor.js │ | ├── style.css │ | ├── index.html │ ├── node_modules │ ├── src │ ├── package.json │ ├── pom.xml ├── site │ ├── src │ ├── pom.xml frontend is a NodeJS project and site is a Spring Boot project. All files inside frontend/dist (including html) are autogenerated by webpack. In order to access them from Spring Boot app I've configured development profile. application.yml spring: profiles: development resources: static-locations: - file:../frontend/dist/ All works just fin

Join the discussion →

How to read Spark UI

I'm trying to understand the current Spark situation in this picture. What It Looks Like to Me 4 workers machine with 93.3 Gb Ram each app pyskark-shell uses 10 cores in each machine and 32 Gb RAM in each machine app backtestin2 uses 2 or 6 cores in each machine and 8 Gb in each machine (Note: I am sure about how jobs have been split among nodes.) My Expectation app pyskark-shell uses 10 cores in each machine and 32 Gb RAM in each machine FOR EACH CORE = 320 Gb used total app backtestin2 uses 16 cores split among the machine and each core require 8 Gb in each machine = total 128 Gb Does this m

Join the discussion →

Bootstrap treeview how auto expand parent nodes?

I am using bootstrap treeview which is mostly working well, however when I load a new page from the menu link I want all the parent nodes of the selected child node to expand, does anyone know how to do this? Thanks, Rob Here is some code... This is the array that is coming from my database and works fine in showing all the treeview items... If you look at id 127 in the array you will notice that 'expanded' for the child is true "state": { "checked": false, "disabled": false, "expanded": true, "selected": true } But all the parent nodes of this child are set as false by default as these are no

Join the discussion →
Older stories