Latest Questions

Angular Material dialog popup shows in the bottom of page instead of popupping

I'm creating Angular Material dialog popup but instead of popupping the component shows in the bottom. Component.ts constructor(public dialog: MatDialog) { } o

Random access in a 7z file

I have a 100 GB text file in a 7z archive. I can find a pattern 'hello' in it by reading it by 1 MB block (7z outputs the data to stdout): Popen("7z e -so archi

Decrypt AES 256 CBC using crypto-js

i have the following key to decrypt erUF9SRCNQZPCBezVGzYYnUVgwAKZTvXzS5Zhgw6B/4= into "54545fwfwefweffvfdv", I tried searching for similar question but the lack

Intelijj Idea move Junit tests to new class while refactoring

I have a class A with code and class ATest with tests: testcase1, testcase2... . I added new code to A and new testcaseN to ATest. During refactoring, I observe

Alexa: How to assign a slot response to a variable. (Python)

I'm not sure how to assign a slot to a variable in an Alexa skill. I've found several tutorials, but most of them are in JS (I wrote this code in Python) or out

Write to multiple worksheets

I need to write to multiple sheets with sheets name stored in a list. Below is my code for row_num, obj in enumerate(list,1): sheet = workbook.add_worksheet

Dynamic table name in Ruby sqlite query based on class name

I have a parent class that looks like this: class Record attr_accessor :id, :url, :votes, :title, :first_name, :last_name, :selfdb def initialize(args

Divide/Split an array into two arrays one with even numbers and other with odd numbers

Please see my script, and identify the issue. Trying to Split an array into two arrays by value even or odd without built-in functions in PHP <?php $array =

Converting sensor data (two's complement) to signed integer

I've seen a couple old posts that had a similar context but the answers were code snippets, not explanatory. And I can't even get the code offered in those answ

Visual Studio Code Flutter Emülatör Problem

I made a todo Hive project that I watched on Youtube. When I run the emulator, I encounter a white screen. There is no error on the code. can you help me what s

How can I fix Intellisense issues with Python's openCV on vsCode

I am somewhat new to Python and I am starting to explore openCV and numpy for object detection. It's all going well and I understand it well, however I am using

How to build static libgpiod-tools executables for arm64?

Is there a way to build the static version of libgpiod-tools executables for arm64? I need the static-linked version, because I need to pack them into a ramdisk

Adding different threshold values to in different instances using terraform

I am trying to add different threshold values to different instances ids in tf. But i am not able to find if loop in terraform. Is there any way to give differe

Regular expression to capture alphanumeric string only in shell

Trying to write the regex to capture the given alphanumeric values but its also capturing other numeric values. What should be the correct way to get the desire

Why does Tkinter image not show up if created in a function?

This code works: import tkinter root = tkinter.Tk() canvas = tkinter.Canvas(root) canvas.grid(row = 0, column = 0) photo = tkinter.PhotoImage(file = './test.g

The SDK has not been intialized. Got this error while running react native android application in debug mode

I am using react-native-fbsdk-next(version 4.6.0) in my react native project. I followed the docs accordingly but then it started giving me following error sinc

php list files to array and save array stringified to disk [duplicate]

In my web app I want to list in php the contents of a directory "archives/*-pairings.txt" So I have a php file (below) that is supposed to rea

HTML bookmarks : when clicked does not show my vertical Menu

I want to create a web site like this site https://andrewborstein.com/ But in my page when I click the Link it goes to the correct place but the the DIV ge

How to set the ContentPage Title StringFormat through boolean binding and DataTriggers in Xamarin.Forms

I have created a "Mobile App (Xamarin.Forms)" project in VS 2019: and then I chose the "Flyout" option: I modified two of the auto-generated classes: ItemDeta

Unresolved Imports - "help: a similar path exists"

I'm fairly new to Rust and am trying to set up a new project. I'd like to have code for a parser, tokens, and addressing for a little 6502 project in separate f

N-dimensional array indexing with numpy

I have imported a cube in Python and I would like to index the cube but in 'k' axis (N and M are two integer numbers), and then cross it by a plane (b) in the

How to use a capacitor plugin meant to be imported in a vanilla js app

I'm currently pulling hairs trying to figure out how to go about this. So, I'm working in a vanilla JS environment with no webpack setup served with capacitor a

How can I set the crond for docker? [duplicate]

I installed cron and FROM python:3.9.5 ENV PYTHONUNBUFFERED 1 RUN apt-get update && apt-get install -y netcat && apt-get inst

What does the error of receive end mean in Apache IoTDB Database?

What does the error of receive end mean in Apache IoTDB Database? To initialize the offset of synchronization to start synchronization again, I delete $IOTDB_H

Tkinter button background color is not working in mac os

I am trying to change the bg color of a tkinter button on my mac (catalina) but instead of getting a colored background, it is showing a blank space in the layo

Strange result when removing item from a list while iterating over it [duplicate]

I've got this piece of code: numbers = range(1, 50) for i in numbers: if i < 20: numbers.remove(i) print(numbers) but the re

Just Typing "python --version" Causes Python to Crash

In the past, I have used python3 with no issues. However, after updating to the latest version of Mac Os, I am having issues. When I type "which python3" I get

I am trying to load words from a text file into a binary search tree

I am trying to load words from a text file into a binary search tree. Each line of the file contains one word. #include <stdio.h> #include <stdlib.h>