on-internet

android 9PKQ1.180904.001 means which of android it is?

I have made system update on my Redmi Note 5. Before system update it has Android version 7.2. Now after I do system update it is showing MIUI version 11.0.5.0 and Android Version 9PKQ1.180904.001. I do not understand what is this android version indicates, is it android version 7 or 8 or 9 or 10? I did not understand. Now I want to update my android version on RedMi Note 5 to Android 10, is it possible?

Join the discussion →

convert ed25519 private ssh key to RSA private key

I'm looking to convert an ed25519 private key to an rsa private key using ssh-keygen. I found this helpful guide but I am having trouble figuring out how to specify that the input format is ed25519 and the export format should be rsa. I've tried a bunch of different ways trying to match the synopsis and the description of flags, but every time I try, I get "Too many arguments" error from ssh-keygen. I'd also like to find the command to generate a public key from a ed25519 private key to verify that it works.

Join the discussion →

Turn streamlit application into a pyinstaller executable

I am building an application in streamlit that, for several reasons, cannot be hosted on a server. The most blocking reason is that it should also work without internet access. Therefore, I would like to turn my application in some sort of executable that users can run on their own laptop and the app is hosted on localhost. I have the following code: import streamlit.cli as stcli import sys def streamlit_run(): sys.argv = ["streamlit", "run", "main.py", "--global.developmentMode=false"] sys.exit(stcli.main()) if __name__ == '__main__': streamlit_run() main.py is for now a simple hello-world ap

Join the discussion →

Changing Purple (#7266f0) color of Ferdi to Yellow (#edd75a)

I'm building the messaging browser Ferdi on my Windows pc. I'm following this codebase: https://github.com/getferdi/ferdi. After replacing Purple (#7266f0) with Yellow (#edd75a) everywhere in the codebase, the purple color is still showing everywhere. What to do to make this Yellow color appear everywhere in the application?

Join the discussion →

Valgrind trying to read user files for debug information

I'm running code that mmap() a file using Valgrind, and it is giving me an error: --23254-- WARNING: Serious error when reading debug info --23254-- When reading debug info from /tmp/db/test.txt: --23254-- can't read file to inspect ELF header The code in question is about as simple as you can get it to be: #define _GNU_SOURCE /* See feature_test_macros(7) */ #include <fcntl.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <sys/mman.h> int main() { int fd = open("test.txt", O_RDWR|O_CREAT|O_TRUNC|O_DSYNC|O_DIRECT|O_CLOEXEC, S_IR

Join the discussion →

What's the meaning of the error code (60)?

Given the following client error message: Error: Can't connect to MySQL server on 'server' (60) What's the meaning of error code 60? MySQL v5.6 and v5.7 do not provide any info about it in docs, on the other hand v8.0 just says: Error number: 60; Symbol: EE_SSL_ERROR; Message: SSL error: %s. It seems to be related to SSL, but the same applies to previous versions of MySQL? Update: The connection problem I was having was solved. See https://stackoverflow.com/a/68965594/7771926 Anyway the meaning of 60 still an unknown to me

Join the discussion →

HTTP Error 500.31 - Failed to load ASP.NET Core runtime

I'm having issues deploying .NET Core applications to IIS on a Windows 10 machine. When I deploy to IIS and navigate to the site I recieve the message: "HTTP Error 500.31 - Failed to load ASP.NET Core runtime Common solutions to this issue: The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found. Troubleshooting steps: Check the system event log for error messages Enable logging the application process' stdout messages Attach a debugger to the application process and inspect For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526 In my event

Join the discussion →

Firewall rule through group policy not detected

I created a firewall rule to block inbound port 138 using the local group policy editor (image 1 and image 2). When I run the Get-NetFirewallRule -DisplayName "" powershell command, I am not able to get the rule details though (Image 3). But when I try to query a rule that I did created using the windows firewall console, it works properly. Is there any reason why the rule created through the Group policy was not detected whereas the one created through the windows firewall settings console was being detected?

Join the discussion →

Highlighting Excel duplicate values more than 15 characters long

In an Excel spreadsheet, I have the following values in a column. When I apply the "duplicate values" function, the following are highlighted (cells marked here in bold). Product Numer 31570010000000009213 31570010000000041126 31570010000000043842 31570010000000101363 31570020000000000274 95980020140005167173 95980020140005198310 95980020140005273582 95980020140005273776 95980020140005273873 95980020140005388333 95980020140005400000 95980020140005728027 95980020140005728221 95980020140005728415 95980020140005934443 097900BEMQ0000006410 097900BGMG0000058204 These values are not duplicates. I tr

Join the discussion →

Postgres docker error: FATAL: password authentication failed for user

I created a Postgres container with docker sudo docker run -d \ --name dev-postgres \ -e POSTGRES_PASSWORD=test \ -e POSTGRES_USER=test \ -v ${HOME}/someplace/:/var/lib/postgresql/data \ -p 666:5432 \ postgres I give the Postgres instance test as a username and password as specified in the doc. The Postgres port (5432) inside the container is linked to my 666 port on the host. Now I want to try this out using psql psql --host=localhost --port=666 --username=test I'm prompted to enter the password for user test and after entering test, I get psql: error: FATAL: password authentication failed fo

Join the discussion →

Updated Xcode to 12.2 / React Native 0.63.2 Build Fails

I've tried Updating Xcode Command Line, Updated CocoaPods, updated Location, and Build Location (tried Xcode Default and Legacy). This is the Error Log: react-native run-ios info Found Xcode workspace "iPlayuListen.xcworkspace" info Building (using "xcodebuild -workspace iPlayuListen.xcworkspace -configuration Debug -scheme iPlayuListen -destination id=70107D6F-22AC-4326-A24C-EE0F879B7DE6") ............................................................................ error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, con

Join the discussion →

Terminate ros2 nodes in bash

I currently have a bash script which launches my ros2 nodes.This works perfectly fine. I now tried to start the script as a background task and write the output into a file. When doing so, I am unable to terminate the nodes at a later point. Previously I terminated it by hitting Ctrl + C in the terminal and all nodes stopped. I tried to do same by saving the PID when starting the script and then killing it afterwards, however the nodes keep running. Is there any possibility to stop all nodes started by the script? Stopping all ros2 nodes is not possible because I launch multiple in parallel. S

Join the discussion →

Using Zenject to inject an implementation with interfaces

I'm trying to use Zenject in Unity. I have an interface and several implementations of it. I want to inject with ID but also that the implementation will have the tick interface since it's not a MonoBehaviour. So I have an IAttacker interface and a MeleeAttackImpl implementation. Container.Bind<IAttacker>().WithId(AttackerTypeEnum.MELEEE).To<MeleeAttackImpl>().AsTransient(); I want to add Container.BindInterfacesTo<MeleeAttackImpl>().AsTransient(); But it creates 2 different objects instead of instances that have the Tick interface and bind them to IAttacker.

Join the discussion →

Is there a way in Python to delete several rows in a CSV file?

I'm currently working on the download of the form.idx file from sec.gov for the first quarter of 2016. Since I'm only interested in the 10-Ks, I wanted to download the file as a .csv file and delete the useless rows. I tried to filter by the form type but that didn't work out. My code so far is the following: import requests import os years = [2016] quarters = ['QTR1'] base_path = '/Users/xyz/Desktop' current_dirs = os.listdir(path=base_path) for yr in years: if str(yr) not in current_dirs: os.mkdir('/'.join([base_path, str(yr)])) current_files = os.listdir('/'.join([base_path, str(yr)])) for

Join the discussion →

Understanding Typescript Record type with React's useContext

I'm having some issues understanding the record type in a generator function I'm developing for React contexts. Here's my generator function: import * as React from 'react' export type State = Record<string, unknown> export type Action = { type: string; payload?: unknown } // eslint-disable-next-line @typescript-eslint/ban-types export type Actions = Record<string, Function> export type AppContext = { state: State; actions: Actions } export type Reducer = (state: State, action: Action) => State type ProviderProps = Record<string, unknown> type FullContext = { Context: React.Context<AppContext>

Join the discussion →

How to embed external urls in angular?

I'm trying to embed an external url inside my angular app using iframe. This is what I'm getting. and the error says that: Following is the template in which I'm trying to embed an external url <iframe height="500" width="100%" [src]="url | safe" frameborder="0"></iframe> // url = `https://fonts.google.com/`; // this is a dummy url. this url will be replaced by a page on my another website (owned by myself but different domain) Following is the pipe used to bypass security risk: @Pipe({ name: 'safe', }) export class SafePipe implements PipeTransform { constructor(private sanitizer: DomSanitize

Join the discussion →

should be true keyword in Robot Framework

Want to validate 10 arguments using Should Be True keyword. should be true ${M1}==${M2}==${M3}==${M4}==${M5}==${M6}==${M7}==${M8}==${M9}==${M10} PROFSU_LC_RES_START_DEINIT_PersDataAndFS is ${M1} ... \nFSLC fs_lc_priv_deinit_fat32 : ### Unmount second Reliance Edge ..Data-resrc-rw is ${M2}\nFSLC fs_lc_priv_deinit_fat32 : ### Unmount third Reliance Edge partition Logistic ..Data-resrc-rw2 is ${M3} ... \nPROFSU_PERS_EMMC_UNMOUNTED is ${M4} ... \nPROFSU_LC_RES_END_DEINIT_PersDataAndFS is ${M5}\nPROFSU_LC_RES_START_INIT_PersDataAndFS is ${M6} ... \nFSLC fs_lc_priv_init_redfs2 : .* ..Data-resrc-rw i

Join the discussion →

How to not get a black screen when processing c++

Whenever I run my code a command prompt window appears and says "process returned 32762 (0x7FFA) execution time .009 seconds press any key to continue." I looked on google and couldnt find a solution. I expect it to print "hello world" here is my code // my first C++ program #include <iostream> int main() { std::cout << "Hello, World"; return 0; }

Join the discussion →

Why do Clang and MSVC not like a member typedef declaration with a redundant set of parentheses?

Consider using foo = int; struct A { typedef A (foo)(); }; GCC and ICC accept the snippet, while Clang and MSVC reject it. Clang's error message is <source>:4:15: error: function cannot return function type 'void ()' typedef A (foo)(); ^ <source>:4:13: error: typedef name must be an identifier typedef A (foo)(); ^ 2 errors generated. And MSVC says <source>(4,15): error C2091: function returns function typedef A (foo)(); ^ (live demo) Why do Clang and MSVC produce this error? Which compilers are correct? (I'm specifically looking for quotation from the standard or any defect report.)

Join the discussion →

Builtin for checking if vec contains specified element

Let's say, I have a vec<int> containing a list of integers that may be non-continuous (due to element being removed from database). Example: $occupiedNumbers = vec[1, 2, 3, 5, 6, 8, 10, 11, 12, 13, 15, 16]; Now what I need is to check if this vec contains a given number, and if yes, increase it by 1 and repeat checking. $newItemNumber = count($occupiedNumbers); while (/* check if $occupiedNumbers contains $newItemNumber */) { $a++; } In vanilla PHP there is in_array() for this, but would that work for a vec? Also, there is a builtin HH\Vector::linearSearch() but it's meant to be used with vec'

Join the discussion →

Why will tesseract not detect this letter?

I am trying to detect this letter but it doesn't seem to recognize it. import cv2 import pytesseract as tess img = cv2.imread("letter.jpg") imggray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) print(tess.image_to_string(imggray)) this is the image in question:

Join the discussion →

Python Edgar package - get CIK number

I am reading S-1 filings from the SEC's EDGAR filings. I get my initial data from Bloomberg. Through the company name I can look for the matching CIK number using the term get_cik_by_company_name(company_name: str). I should be able to get the CIK number which I than want to save in a list -> cik_list. However it is not working; I get an error: Invalid Syntax for str BloombergList is the Excel Bloomberg created with all the relevant company names. In column 4 I got the names which I import as a list, than get the matching CIK and than export the CIK list in the right order back to the Bloomber

Join the discussion →

Using puppeteer-core instead of puppeteer

As per the documentation https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#puppeteer-vs-puppeteer-core, I am trying to use puppeteer-core library instead of puppeteer so that I can install headless-shell instead of default chromium lib that comes with puppeteer. I download the content-shell.zip for mac from this location https://chromium.cypress.io/mac/canary/89.0.4342.2 and used the below code, const browser = await puppeteer.launch({executablePath: 'content-shell' }); it fails with the below error, Error: Failed to launch the browser process! spawn content-shell ENOENT TROUBLESHOO

Join the discussion →

SwiftUI: How-to append view to ending of multiline text?

Current I have something like the following: Short text with badge: It's done simple with HStack atm: HStack { Text("Lorem ipsum dolor sit amet.") .font(.title2) Text("foo") .font(.system(size: 14, weight: .bold)) .foregroundColor(.white) .padding(.horizontal, 4) .padding(.vertical, 2) .background(Color.red) .cornerRadius(5) } My Problem is that the main text is multiline and if it wraps, it looks like this: Larger multiline text with badge: Goal But my goal is that the foo badge is always displayed after the last word of the main text, which should look like this: Goal: Solution like Text + T

Join the discussion →

Problem with an Oracle connection with 64bit Client

I'm currently setting up a new server on which to run SSIS jobs in the future, the data source is an Oracle database. This is my set up: SQL Server 2019 Integration Services 2019 Oracle Client 12c 64bit Version For development I use Visual Studio 2019 and I develop and debug on the same machine where the jobs are to run. In the project settings in Visual Studio the usage of a 64bit environment is set to True. We have installed the Oracle client components in 64bit to use Oracle sources in a 64bit runtime environment. This works fine for an ODBC connection, but not at all for an OLE DB connecti

Join the discussion →

Compare dataframe columns: TypeError: Cannot interpret 'StringDtype' as a data type

I am trying to compare two dataframes' columns and types to check for equality; the rows are expected to be different. I am using pandas version 1.1.2 pd.__version__ '1.1.2' if (df1.columns.difference(df2.columns).empty) and (df1.dtypes == df2.dtypes).all() But this line errors: (df1.dtypes == df2.dtypes).all() Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/vfrank/dev-working/venv/lib/python3.7/site-packages/pandas/core/ops/common.py", line 65, in new_method return method(self, other) File "/Users/vfrank/dev-working/venv/lib/python3.7/site-packages/pandas/

Join the discussion →

Display PlantUML in Confluence from BitBucket

Confluence supports displaying PlantUML diagrams using for example PlantUML for Confluence macro. Basically, one copy-pastes a source code of the UML diagram and it's correctly rendered in a page. Macro usage and render: Question: My goal is to keep the diagrams up to date with the current version of code. Is there a way to import the source code of the diagram from a repository into Confluence and display the diagram (let's say from the master branch)? Since BitBucket and Confluence are products of Atlassian and probably work well together, I am looking for such integration. If there is a way

Join the discussion →

lag while playing video while using opencv?

so i am using opencv for motion detection, when i use webcam for motion detection the program runs flawlessly but when i use some other video by giving path in Videocapture() function the output lags too much. I know that waitkey() is somewhat responsible for framerate but it doesn't seem to be the case this time .what should i do to solve this issue? this is my code: import cv2 import time import os import time video = cv2.VideoCapture("videofile.mp4") _,frame0 = video.read() frame0 = cv2.cvtColor(frame0,cv2.COLOR_BGR2GRAY) frame0 = cv2.GaussianBlur(frame0,(3,3),1) while video.isOpened(): che

Join the discussion →

iterm2 use bash as well as zsh

I'm trying to set up iterm2 to use bash (as well as zsh). When I open iterm2 it defaults to zsh. I am happy with zsh but I would like to add a "bash" iterm2 profile to allow me to open a new tab in bash if so desired. Is this possible?

Join the discussion →

Error: WHERE parameter "id" has invalid "undefined" value

I'm making an API with Express.js and Sequelize for an appointment scheduling app. So far I have two models, User and Salon, with an N:M relationship. (So an user might manage many salons, for a franchise for example, or a salon may be managed by many employees) I have stumbled upon a problem in the PUT /salons route. My intention is that the user can fill out a form to input the details of the salon, and then the logged in user will be associated with this salon. The code for the route looks like this: router.put('/', checkLoggedIn, (req, res, next) => { const user = User.findOne({ where: { i

Join the discussion →
Older stories