instruction
stringlengths
0
30k
|reactjs|typescript|next.js|zustand|
null
``` public int SetSerialization(ref _CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION pcpcs) { // Convert IntPtr to byte[] if (pcpcs.rgbSerialization == IntPtr.Zero) { byte[] serializedData = new byte[pcpcs.cbSerialization]; Marshal.Copy(pcpcs.rgbSerialization, serializedData, 0, (in...
How to convert Kivymd file to APk file
|python|kivymd|
My script add fields to a pointlayer. This happens while iterating a polygon layer. For each feature I look for the closest point from a dataset. This point gets written to the : ``` ## D.4 Write LAWIS snowprofile layer lawislayer = QgsVectorLayer('Point?crs = epsg:4326', 'lawisprofiles', 'memory') lawislayer_path...
PyQgis: Attribute field does not get added
|attributes|gis|updating|pyqgis|
null
I've used with success this in one of the `CMakeLists.txt` file: list(APPEND CMAKE_PREFIX_PATH C:\\ThePath)
You can turn JDBC escape processing off. Statement statement = connection.createStatement(); statement.setEscapedProcessing(false); statement.executeQuery("select REGEXP_REPLACE(Title, '([0-9]{4})$') from mytable"); The `statement.setEscapedProcessing(false)` has no effect on a `PreparedStatement`.
{"Voters":[{"Id":2802040,"DisplayName":"Paulie_D"},{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":1169519,"DisplayName":"Teemu"}]}
The page contains a list of products and a list of filters. I get query params from url from which I request a list of products. In addition, FilterList also requests a list of attributes of products in this category to create filters, which should change the query string in the url and, using a button, request a new ...
I am unable to build a apllication. Here is my docker file FROM docker.io/node:16-alpine AS builder WORKDIR /usr/app COPY ./ /usr/app RUN npm install RUN npm run build Error message npm ERR! path /usr/app npm ERR! command failed npm ERR! signal SIGKILL npm ERR! comma...
{"OriginalQuestionIds":[20002503],"Voters":[{"Id":494134,"DisplayName":"John Gordon","BindingReason":{"GoldTagBadge":"python"}}]}
because the `while()` it produce high CPU usage, how I can run async method but wait until CTRL+C pressed before the program exit? class Program { public static bool isRunning = true; static void Main(string[] args) { Console.CancelKeyPress += new ConsoleCancelEvent...
C# Console app do not exit until CTRL+C pressed without while loop
|c#|async-await|console-application|
In Laravel, UUIDs can be automatically generated for models using the `HasUuids` trait. However, for intermediate tables without a model, you would need to manually generate the UUID when creating an entry. One way to do this is using Laravel's built-in `Str::uuid()` method when inserting data into the table. ```ph...
Sure, it's as easy as: ```haskell if has('gui_running') imap <M-BS> <C-W> cnoremap <M-BS> <C-W> else imap <Esc><BS> <C-W> cnoremap <Esc><BS> <C-W> endif ``` The trick here is to know, given a hypothetical <kbd>foo</kbd> key, that after pressing a <kbd>Alt</kbd>+<kbd>foo</kbd> combi...
I am currently running Fail2Ban version 0.11.2 on my host machine to monitor and manage access to an Nginx service that is operating within a Docker container. The Nginx logs are bind-mounted from the container to a directory on the host machine, and Fail2Ban is configured to observe this bound directory for any malici...
Windows Credential Provider - How to retrieve the username from _CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION pcpcs
|c#|rdp|
null
I have a workoing multithreaded mandelbrot implementation. It breaks the workload up into between 1 and 64 threads. No mutex's are required. Here is the worker thread... ``` // Worker thread for processing the Mandelbrot algorithm DWORD WINAPI MandelbrotWorkerThread(LPVOID lpParam) { // This is a copy of the...
I have patrol running fine when performing the tests on debug: ``` # this comes from a makefile command I wrote: patrol test --target integration_test/$(test_path) --dart-define="MODE=test" --dart-define="ENV=local" --dart-define="SUPABASE_ADMIN_TEST_PASSWORD=$(SUPABASE_ADMIN_LOCAL_TEST_PASSWORD)" --verbose -d ...
patrol does not run the tests when using --release flag
|flutter|flutter-patrol|
{"Voters":[{"Id":14853083,"DisplayName":"Tangentially Perpendicular"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":4902099,"DisplayName":"hcheung"}]}
I'm pretty new to Blazor myself, but this was one of the first questions that occurred to me and I think I have a better solution. The `IServiceProvider` automagically knows how to provide the [`IHostApplicationLifetime`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting.ihostapplicationlifet...
When I have opened my Unreal Engine project in CLion, it warns me: "Project is not configurated". [![][1]][1] I suppose it is why autocompletes does not work. All toolchains is my IDE seems to be set up properly: [![enter image description here][2]][2] [![enter image description here][3]][3] [![enter...
How to solve "Project is not configured" problem when opening the Unreal Engine project in CLion?
|c++|clion|unreal-engine4|
I'm programming a simple 'game' that is just a block that can jump around. I placed a wall, but now the character phases through when moving to the right, but the collision works when going to the right. Every other part of this is fine. the willImpactMovingLeft function works just fine and should be a mirror of willI...
You do not see the list of elements because you are not using the naming correctly for the CarModelVariant model list. By default, the variable that stores this list is **object_list**. That is, if you want to iterate over the CarModelVariant list, you should use the following construction ``` {% for variant in...
I have written two blocks of R-code. I believe that they should both do exactly the same thing - except that one uses a for-loop approach and one uses the sapply function. However, they produce slightly different results. Does anyone know what is causing the slight differences here? Interestingly, both methods produce ...
Another way is to avoid script misusing I've made a query from the question unscripted and keep its functionality Mapping PUT /authors_last_names { "mappings": { "properties": { "author": { "type": "text", "fields": { "uppercased": { "analyze...
|javascript|css|trigonometry|
i'm currently using JPA buddy in my spring boot application to generate JPA Entities from my sakila database. But when i use this feature JPA buddy alway listed all of database tables and views including system tables and views (here is what on my JPA buddy reverse engineering show https://i.stack.imgur.com/mmAQq.png)...
I have a socket.io server which listens to sockets: io.on('connection', (socket) => { socket.on('myEvent', function(data){ socket.emit('eventReceived', { status: 1 }); }); }); I know that Node.js and Socket.IO is not working in multithreading, so I wonder how to effectively...
I am making a website with the option to change languages. Every time when you refresh the page though, the language you selected returns to the original language. The code below shows the html and JavaScript code for how this function works: <!-- begin snippet: js hide: false console: true babel: false --> <!--...
You need to extend the `dayjs` class with the `utc` and `timezone` classes/plugins: ```javascript const dayjs = require('dayjs'); const utc = require('dayjs/plugin/utc'); const timezone = require('dayjs/plugin/timezone'); dayjs.extend(utc); dayjs.extend(timezone); ``` Refer to docs for more details: https:/...
``` from celery import Celery app = Celery("tasks", broker="pyamqp://guest@localhost//") @app.task def add(x: int, y: int) -> int: return x + y ``` > tasks.py:6: error: Untyped decorator makes function "add" untyped [misc] Why?
Untyped decorator makes function "add" untyped [misc] (celery & mypy)
|python|celery|mypy|
I would like for screen readers (Narrator, JAWS, NVDA) to read aloud the text of certain labels on my XAML-based windows, so that the sight-impaired user can know the context of the window that they have in the foreground. I would rather not make these controls a tab stop, since most people will not be using a scree...
WinRT + WinUI3 accessibility: How can I get the screen reader to read controls that are not tab stops (e.g. static labels)?
|accessibility|winrt-xaml|
null
null
null
null
null
You're redefining the "cities" column in your `mutate()` call instead of creating a new "region" column. Try: ``` df1 <- df %>% mutate(region = fct_collapse( cities, "1" = c("1", "2", "3", "4","5","8"), "2" = c("10", "24"), "3" = c("6", "7", "15", "16"), "4" = c("20", "21", "22", "2...
I have a regular ASP.NET app, which uses routes and etc. I also want to add WebSockets with database connections to the app, and have come to the conclusion middleware is the best way to do this, but I can not get it to work with the database. This is currently my `WebSocketMiddleware` class: ``` public class WebSo...
I found a solution for this problem via a custom Inflector. The regular `Rails::Autoloader::Inflector#camelize` ignores its second argument, but incorporating the absolute filepath into the camelization enables me to use both `Gem1::Api` and `Gem2::API`. ``` # config/initializers/autoloaders.rb class PathnameSuffi...
|c#|entity-framework-core|
The `__str__` method should return a string representation of the object. In your case, it returns a tuple, which is incorrect. You need to format the output as a string: class Card: def __init__(self, color, number): self.color = color self.number = number ...
Suppose the calculation time of a process is 200 cpu cycles. Meanwhile, the I/O operation is in progress for another process through dma, and after 100 cpu cycles, the end of the I/O operation is notified to the system by an interrupt. If we assume that the execution time of isr is 10 cpu cycles, how much system time d...
I'm trying to create a bot to automatically invest on Brazilian Certificate of Deposits (CD). These are offered by a specific stock broker but they don't last even 4 seconds. The code below refers to the automatic steps after manually typing login, password and token. When I run the program, when I type the login, befo...
Storing selected language in localStorage
|javascript|html|jquery|css|
hey i want to start programming an Arduino esp32 board with micropython so i installed pymakr extension on vscod but then when i wanted to create a project i see this error: > Error running command pymakr.createProjectPrompt: command 'pymakr.createProjectPrompt' not found. This is likely caused by the extension that...
trouble with creating a project for Pymakr in vscode
|visual-studio-code|vscode-extensions|esp32|micropython|arduino-esp32|
null
I have created a new project with IntelliJ IDEA Ultimate version 2024.1. This version supports the new Java 22 (openjdk-22) version. But when I reload my Gradle project, it shows this error: ```´ Unsupported Gradle JVM. Your build is currently configured to use Java 22 and Gradle 8.7. Possible solutions: - Use...
Gradle cannot find installed JDK 22 in IntelliJ
null
I'm trying to make a bot with Discord.py and i cant use discord-slash, i tried to install the pip, i will add pics (https://i.stack.imgur.com/6ygwM.png)(https://i.stack.imgur.com/6sBMO.png)(https://i.stack.imgur.com/ci4WB.png) dont ask about the bot name, it was a discord bot for a Minecraft server originally... ...
null
Within the function `sumAtBis` int sumAtBis(tree a, int n, int i){ if(i==n){ if(isEmpty(a)) return 0; else return root(a); } return sumAtBis(left(a),n,i+1)+sumAtBis(right(a),n,i+1); } there is no check whethe...
What's wrong with this HSQLDB syntax: ``` REGEXP_REPLACE(Title, '([0-9]{4})$') ``` The regular expression is intended to remove 4 digits in parentheses at the end of a string. Thanks for taking a look. I tried various escaping with no success. Apparently the curly braces are being intercepted by JDBC as an es...
JDBC escape processing and HSQLDB regular expression syntax
Have you added names on the urls on your project? urlpatterns = [ path('', views.home, name="home"), path('room/<str:pk>/', views.room, name="room") ] Please, ensure that your URLs project on the route room have a reference name. Check this documentation https://docs.djangoproject.com/e...
I am using node.js and I have a task that runs every second like so: let queue = ["Sample Data 1", "Sample Data 2"] const job = schedule.scheduleJob('*/1 * * * * *', function () { console.log("Checking the queue...") if (queue.length > 0) { wss.broadcast(JSON.stringify({ ...
How can I schedule a task every second but wait with setTimeout() before continuing to the next task?
|javascript|node.js|schedule|
The transposition table uses keys from the position of player 0 and player 1 from bitboards and includes the player turn at the end, I did that to guarantee unique keys for all states. But this seems to be slow because of fmt.Sprintf. I have two functions where I store and retrieve, and in each of them I build the k...
Wavesurfer v6.6.4 invalid progress bar
|javascript|wavesurfer.js|
null
So i'm having a quite simple problem which doesnt seem to be trivial to solve. I found LibVLCSharp for controlling my videos from my c# program, which is exactly what i wanted. But i find the documentation to be quite complicated or non-existant. I want to accomplish playing up to 4 different videos on 4 installed M...
playing multiple videos with libvlcsharp on multiple monitors
|c#|video|vlc|libvlcsharp|
Can the background remain consistent with the buttons as their number reduces from three to two to one? I want the background to resize to fit the new width when three columns become two and then one, now it just stays fixed with three columns. I want the background to stay with the buttons. When the buttons g...
You can curate the input to json_normalise yourself by using a list comprehension like this: ```pd.json_normalize([v['Conversion'] for k, v in input['data'].items()])```
I want to have ticker like non stop animation without any gap from right to left in my app i could not get such animation after trying too much, kindly anyone guide me what is the problem in my code I tried to get ticker like non stop animation but could not get such animation ``` const windowWidth = D...
|operating-system|cpu|interrupt|dma|
{"OriginalQuestionIds":[12933964],"Voters":[{"Id":550094,"DisplayName":"Thierry Lathuille","BindingReason":{"GoldTagBadge":"python"}}]}
You set variables in `base.less` and include `main.less`... Also, if you are using `vite`, and want the `less` varables to be awailables in all components, set this in `vite.config.ts`: ``` // https://vitejs.dev/config/ export default defineConfig({ css: { preprocessorOptions: { less: { ad...
``` login.components.ts: import {Component, OnInit} from '@angular/core'; import {FormBuilder, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms"; import {AuthService} from "../../service/auth.service"; import {TokenStorageService} from "../../service/token-storage.service"; import {Router, Ro...
When I navigate to the URL'http://localhost:4200/', it redirects me back
|angular|angular-material|angular-ui-router|
null
I made a client-server side app using React.js and Expres.js. I also used a local database made on mysql workbench. I want to deploy my app to app-engine on google cloud, for this purpose I exported my db and now it is on the cloud. The problem arises when I want ot deploy the app. The client sode shows, but w...
Interest is supposed to be Percentages. Your formula expressed it as a decimal value. Change the line below to: // Convert annual interest rate percentage to decimal and then into monthly interest rate. double monthlyInterestRate = (annualInterestRate / 100) / 12.0;
I'm struggling to get the correct keyboard to show and be able to insert numbers and the decimal symbol but I'm faced with a strange situation. This is what i got with Android Studio using Java code: [![enter image description here][1]][1] Here the xml code to show this keypad: <EditText an...
C# Visual Studio Android App Showing a wrong not working Keypad on Entry text
|c#|xamarin|syncfusion|