on-internet

Angular 9 PrimeNg how to style p-table border color?

How can i change the border color of p-table? I was able to change table header border color of the table but i don't know how to change the color of the body of the p-table. body .ui-table .ui-table-tbody > tr > td { padding: 0.571em 0.857em; border: #e3e3e3; } I have tried this in theme.css at resources/rhea/theme.css in primeng but its still no use help.

Join the discussion →

Get Job title, Department and Manager ID from Azure AD in Claims

I am using Azure AD application with Azure B2c. As per the official Microsoft document, we can get additional claims using Azure AD policy. https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-claims-mapping I managed to get JobTitle using this approach, however, the department and mobilePhone fields are always empty. Below is the PowerShell script that I use to create AD claim mapping policy. $claimsMappingPolicy = [ordered]@{ "ClaimsMappingPolicy" = [ordered]@{ "Version" = 1 "IncludeBasicClaimSet" = $true "ClaimsSchema" = @( [ordered]@{ "Source" = "user" "ID" = "

Join the discussion →

Spring Boot - Jwts.builder Cannot resolve method 'signWith()’

I’ve been following this spring boot + angular tutorial on YouTube that uses spring security and JSON web tokens (JWT) for authenticating a user. However I’ve came to a point in the video where I have an error in my jwtUtil2 class. For some reason whenever I try to run my spring application I get this error: Error:(41, 17) java: no suitable method found for signWith(java.security.PrivateKey) method io.jsonwebtoken.JwtBuilder.signWith(io.jsonwebtoken.SignatureAlgorithm,byte[]) is not applicable (actual and formal argument lists differ in length) method io.jsonwebtoken.JwtBuilder.signWith(io.jso

Join the discussion →

How to use spyk

I need to verify that a method has been called on an object. So I make a spy of this object: obj = spyk(obj) And then I verify that a method has been called: verify(exactly = 1) { obj.f(3) } The test fails with the following error message: java.lang.AssertionError: Verification failed: call 1 of 1: obj(#2).f(eq(3))) was not called. However I can clearly see the method f being called: I can break in that method in debug mode I print out hello world from f() in that method and see it being printed. How do I use spies correctly in mockk? P.S. I tried doing val obj = spyk(obj()) but I get lateinit

Join the discussion →

using Jmeter to test Documentum D2 Application

i am doing performence tests using Jmeter on Documentum's d2 application I've recorded a login and logout using blaze meter All the requests are in green but i get an error in the response body "Missing context(s) from session, re-connection required" , Anyone know whats happening? If there are any special params that needs to be passed

Join the discussion →

Typescript ESLint declaration files

I've googled around a bit but I can't find anything regarding this, might be because I'm not exactly sure what causing the issue. I wanted to set a global value on the node.js global object. Just a simple string global.appRoot = path.resolve(__dirname) Since I'm using Typescript, my editor (Visual Studio Code) warned me that the property did not exist on type Global which makes sense. I went ahead and created a global.d.ts in my root folder with declare namespace NodeJS { export interface Global { appRoot: string; } } This worked perfectly and the editor tells me it's fine, but still breaks on

Join the discussion →

error to install chronium : packages contain unsatisfied dependencies: libc6-dev: Break: libgcc-8-dev (<8.4.0-2 ~) but 8.3.0-6 must be installed

i have look on this website how to install chronium: i have follow the instruction on this site https://raspi-tutorials.com/google-chrome-for-raspberry-pi/ but there is an error when i do this line sudo apt-get install chromium-browser --yes the original text of the error Les paquets suivants contiennent des dépendances non satisfaites : libc6-dev : Casse: libgcc-8-dev (< 8.4.0-2~) mais 8.3.0-6 devra être installé E: Erreur, pkgProblem::Resolve a généré des ruptures, ce qui a pu être causé par les paquets devant être gardés en l'état. the text with traduction of the error The following package

Join the discussion →

The difference between do_action() and add_action() in Wordpress

After reading multiple online posts about do_action()/add_action(), I would like to brief my understanding about them. Here I would only talk about action hooks, not about the filters. do_action() : Registers an action hook add_action() : adds a callback function to the registered hook. Now the questions are : 1> About add_action()/do_action() for existing hook : add_action( 'admin_enqueue_scripts', 'my_func'); In the above example the callback function my_func() is registered with the hook 'admin_enqueue_scripts'. Now whenever do_action('admin_enqueue_scripts') is called somewhere inside the

Join the discussion →

How to find which DLL failed in "ImportError: DLL load failed while importing" in python?

Context Are there commands to enhance the error message that is received such that python displays which .dll file it cannot find? For error: python test_cv2.py Traceback (most recent call last): File "test_cv2.py", line 1, in <module> import cv2 File "E:\Anaconda3\envs\py38\lib\site-packages\cv2\__init__.py", line 5, in <module> from .cv2 import * ImportError: DLL load failed while importing cv2: The specified module could not be found. (py38) E:\somepath> I would like to determine which .dll file is actually not being found. To do so, I downloaded and run DependenciesGui.exe from this reposi

Join the discussion →

Data seems to be missing in Bigquery SEC Filing Dataset

I was pleased recently to discover that Bigquery hosts a dataset of SEC filings. I am unable to find the actual text of the filings in the dataset however! This seems so obvious I must be missing something. As an example, the 2018 Microsoft 10-K filing on the SEC website itself can be seen to have the 10-K text in which Item 7 includes the phrase "Management’s Discussion and Analysis of Financial Condition and Results". I searched for this phrase in the Dataset. First, the following query should pull all the text from this filing: SELECT * FROM `bigquery-public-data.sec_quarterly_financials.tx

Join the discussion →

How to use write() or fwrite() for writing data to terminal (stdout)?

I am trying to speed up my C program to spit out data faster. Currently I am using printf() to give some data to the outside world. It is a continuous stream of data, therefore I am unable to use return(data). How can I use write() or fwrite() to give the data out to the console instead of file? Overall my setup consist of program written in C and its output goes to the python script, where the data is processed further. I form a pipe: ./program_in_c | script_in_python This gives additional benefit on Raspberry Pi by using more of processor's cores.

Join the discussion →

Why is the macro name not excluded from expansion ("painted blue")?

Say I have the following two macro definitions: #define foo(X) 1 bar #define bar(X) 2 foo Why does foo(X)(Y)(Z) expand to 1 2 1 bar? According to the C99 standard 6.10.3.4 Rescanning and further replacement If the name of the macro being replaced is found during this scan of the replacement list (not including the rest of the source file’s preprocessing tokens), it is not replaced. Furthermore, if any nested replacements encounter the name of the macro being replaced, it is not replaced. These nonreplaced macro name preprocessing tokens are no longer available for further replacement even if t

Join the discussion →

Why is the macro-name not painted blue?

Say I have the following two macro definitions: #define foo(X) 1 bar #define bar(X) 2 foo Why does foo(X)(Y)(Z) expand to 1 2 1 bar? According to the C99 standard 6.10.3.4 Rescanning and further replacement If the name of the macro being replaced is found during this scan of the replacement list (not including the rest of the source file’s preprocessing tokens), it is not replaced. Furthermore, if any nested replacements encounter the name of the macro being replaced, it is not replaced. These nonreplaced macro name preprocessing tokens are no longer available for further replacement even if t

Join the discussion →

Error adding GinIndex to model in Django with Postgres

I am trying to add GinIndex to my model however, I am getting an error when migrating: django.db.utils.ProgrammingError: data type character varying has no default operator class for access method "gin" HINT: You must specify an operator class for the index or define a default operator class for the data type. This is my model: class Post(models.Model): title = models.CharField(max_length=100) guid_url = models.CharField(max_length=255,unique=True, null=True) content = models.TextField(validators=[MaxLengthValidator(1200)]) author = models.ForeignKey(Profile, on_delete=models.CASCADE) date_pos

Join the discussion →

Using CDN in React

I've installed React via NPM and I'm having difficulty using CDN. I included the CDN scripts in the ./public/index.html file but when I use it in any component, it doesn't recognize the third-party package that I'm trying to use. <script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.5/redux.min.js"></script> Tried to use Axios but it doesn't work: axios.post("https://burger-builder-c5a0d.firebaseio.com/orders.json", order) .then(response=>{ alert("You ordered successfully!"); //shows an alert indic

Join the discussion →

How protect public Laravel livewire property from manipulation?

I am mounting my component with an object $form which I need to access between requests. The data in $form is not secret, but should not be tampered with so I would like to make it a protected property. Though only public properties are preserved between requests leaving it exposed to front end. If possible, how can I prevent manipulation on this public property? I tried a check public function updating($key, $value) { if($key === 'form') return; } But I don't think that really does anything. Also, using sessions is not an alternative in my situation. Any ideas?

Join the discussion →

Get the current project directory from flutter integration test

Is there a way to get the current project directory in flutter integration test? This is a basic test setup as an example. import 'dart:io'; import 'package:flutter_driver/driver_extension.dart'; import 'package:ivori/main.dart' as app; import 'package:glob/glob.dart'; void main() { // This line enables the extension. enableFlutterDriverExtension(); print("Where the working directory? ${Directory.current}"); print("What's under the current directory? ${Glob("*").listSync()}"); // Call the `main()` function of the app, or call `runApp` with // any widget you are interested in testing. app.main(

Join the discussion →

Gitlab - format code automatically upon commit

I'm having some trouble finding info that describes how to update the code base automatically in Gitlab Scenario Let's imagine a developer working on a project commits some code, but forgets to format it before committing. The .gitlab-ci.yml can have a job that will check the formatting, and display an error/warning if found. Is it possible to update the git commit with the code formatted automatically? So the flow would be: Developer commits unformatted code to gitlab Git checks the code for formatting If an issue is found, git will run tool X to automatically format the code, and commit it w

Join the discussion →

Logstash error : Failed to publish events caused by: write tcp YY.YY.YY.YY:40912->XX.XX.XX.XX:5044: write: connection reset by peer

I am using filebeat to push my logs to elasticsearch using logstash and the set up was working fine for me before. I am getting Failed to publish events error now. filebeat | 2020-06-20T06:26:03.832969730Z 2020-06-20T06:26:03.832Z INFO log/harvester.go:254 Harvester started for file: /logs/app-service.log filebeat | 2020-06-20T06:26:04.837664519Z 2020-06-20T06:26:04.837Z ERROR logstash/async.go:256 Failed to publish events caused by: write tcp YY.YY.YY.YY:40912->XX.XX.XX.XX:5044: write: connection reset by peer filebeat | 2020-06-20T06:26:05.970506599Z 2020-06-20T06:26:05.970Z ERROR pipeline/o

Join the discussion →

How to get column names in Excel from cell coordinates (e.g. A2, B2, etc.)

I am currently working on converting an Excel table with >100 calculated columns into a DAX table with similar calculated columns. Excel formulas refer to the columns by their column coordinates, e.g. 'sum = A2+B2', whereas DAX refers the column name in the formula, e.g. 'sum = Principal +Interest' When I try to convert the Excel version of sum=A2+B2, is there any way for me to find out A=Principal and B= Interest in the spreadsheet? I am talking about a table which has >50 non calculated columns and >100 calculated columns to be converted to comparable DAX model. Every time I look into a form

Join the discussion →

Resetting offset for partition does not work

I have a topic "oranges" with 10 partitions, 2 consumers within 1 consumer group. I am using Spring Kafka. I need to re-read the data from time to time, and I need to reset the offsets. My listener implement ConsumerSeekAware and in the onPartitionsAssigned() I simply call callback#seekToBeginning. This works fine as in the log I see messages from Kafka Client API (2.3.1) saying: Resetting offset for partition oranges-X to offset 0. This happens for all partitions fine. However, effectively only the last partition is reset (9) and from time to time, if I get lucky the second one (1) too. All o

Join the discussion →

How to mock static method while using Spring Boot?

I need to mock a static method. I know of two tools to help do this: PowerMockito and JMockit, both of which require usage of the @RunWith annotation. However, I've already used @RunWith for SpringRunner to set up some @Autowired dependencies, and it seems you can't use @RunWith twice. I see that PowerMockito has a PowerMockRunnerDelegate, which looks promising. But for various reasons, I'm stuck using JMockit for now. Is there a JMockit equivalent for this? I essentially need to mock a static method and set up @Autowired dependencies for my test at the same time.

Join the discussion →

How can I use HttpFactory in Joomla?

I used curl in Joomla, curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'X-API-KEY:' . $api_key, 'X-SANDBOX:' . $sandbox, )); but now I use HttpFactory for request to api: $options = array( 'Content-Type: application/json', 'X-API-KEY:' . $api_key, 'X-SANDBOX:' . $sandbox, ); $answer = $this->http->post($url,json_encode($data,true),$options); my result body is : Unsupported request content type application/x-www-form-urlencoded" why?

Join the discussion →

How to mock fetch when testing a React app?

I would like to test a small React web app where I use the global fetch method. I tried to mock fetch in this way: global.fetch = jest.spyOn(global, 'fetch').mockImplementation(endpoint => Promise.resolve({ json: () => Promise.resolve(mockResponse) }) ); ... but the mock seems to be ignored, while the built-in fetch seems to be used: Error: connect ECONNREFUSED 127.0.0.1:80 ... looks like a failed call to the built-in fetch. I then tried to use jest.fn instead of jest.spyOn: global.fetch = jest.fn(endpoint => Promise.resolve({ json: () => Promise.resolve(mockResponse) }) ); ... and was surpris

Join the discussion →

I am facing an error while running uipath bot related to Excel [closed]

I am facing the issue while running EXCEL related bot in the UIPATH tool. The error which I am facing is given here: [20.4.1 Message: Job stopped with an unexpected exit code: 0xC0000005 Exception Type: System.Exception RemoteException wrapping System.Exception: Job stopped with an unexpected exit code: 0xC0000005] How can I resolve this issue?

Join the discussion →

i am facing error while running uipath bot related to Excel

I am facing the issue while running EXCEL related bot in the UIPATH tool. The error which I am facing is given here[20.4.1 Message: Job stopped with an unexpected exit code: 0xC0000005 Exception Type: System.Exception RemoteException wrapping System.Exception: Job stopped with an unexpected exit code: 0xC0000005] How can I resolve this issue?

Join the discussion →

Unable to set the STOP-LOSS limit order using Binance Python API

I am attempting to create a LONG TRADE that will contain a BUY ORDER and a STOP-LOSS using Python asyncio, ccxt API (which is calling the Binance API for the Binance Crypto Exchange). First I create the BUY ORDER. Afterwards, I am waiting until the order is filled. AFTER it is filled, I am attempting to create a STOP-LOSS order to go with the LONG that was created (Reason: I do not want to lose a lot of money if the trade moves against me). According to the log, the BUY ORDER is being created OK. I am getting "insufficient funds" on the STOP-LIMIT order. I do not understand why I would be gett

Join the discussion →

Can't find a referenced R File on the SEC Website?

I am attempting to understand the 2020q1 data set found here: https://www.sec.gov/dera/data/financial-statement-data-sets.html, and am using the reference documentation inside the 2020q1 folder as a “readme” file. The reference documentation specifies that within the Presentation (pre) data set, the “report” field is a numeric (integer) whose “value refers to the “R file” as posted on the EDGAR Web site.” I have found no such file after extensive search, and am left with no method of interpreting the “report” field and all associated data.

Join the discussion →
Older stories