instruction
stringlengths
0
30k
βŒ€
|assembly|x86|expression|division|
I will offer my own option for `docker run`. The problem of passing multi-line variables in a .env file was discussed here. https://github.com/moby/moby/issues/12997 . The developers suggest solving the problem using sh/bash How to solve the problem using sh 1. putting multi-line data into a file and import to ...
this is my code: ``` import { Button, FlatList, NativeSyntheticEvent, Text, TextInput, TextInputFocusEventData, View, } from "react-native"; import { MissionStoreType } from "../../types/Missions.types"; import { globalStyles } from "../../styles/globals.styles"; import { useAppDispatch...
MbedTLS: Does mbedtls_rsa_rsaes_oaep_encrypt/decrypt support in-place en-/decryption? (It should, but it doesn't seem to work?)
|c|cryptography|embedded|rsa|mbedtls|
null
I don't know if you are using Application Insights to also log requests and telemetry in general, but that is definitely what we would check in our projects when we have scenarios like this. Eventually, you will be able to see exactly what are the requests causing a 404 and compare to your http trigger endpoint. Mic...
Pojos are often used as Models/DTOs for inserting/updating data into a database. They need to by validated (with a Validator) to make sure they only contain the expected fields for the use-case: - insert (all fields must be validated and inserted) - update (only changed/modified fields must be validated and updat...
Java Pojos - Modified Fields and Change Detection
|java|validation|dto|pojo|
I'm currently confused about windows and states. Suppose I have a program that counts user access data every minute and needs to do sum statistics in each window. Assume that at this time, I configure checkpoint for the fault tolerance of the program. The checkpoint configuration is to trigger every 30 seconds. Then wh...
Try this option without window functions. ``` SELECT *, ( SELECT score FROM scores sp WHERE sp.id < s.id AND sp.score <> 30 ORDER BY sp.id desc LIMIT 1 ) _prev_element FROM scores s ``` [fiddle](https://dbfiddle.uk/iESmWbju)
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors The class is loaded from /Users/subashkhatri/.gradle/caches/transforms-3/0be4579c3b0d57b8d268f0bc967fbf72/transformed/jetified-kotlin-stdlib-1.9.23.jar!/kotlin/Unit.class...
How to avoid being struct column name written to a json file? While writing the df to the json file? Using databricks pyspark write method. ```Df.write.option("header", "false").mode("overwrite).json(path)``` Tried option("header", "false") Sample json file: ```{"struct_col_name":{"actual_struct_data_col":...
Symfony/Messenger no retry when critical exception from a web service
|php|symfony|symfony-messenger|
I would like to move the labels from the center to the beginning of each wedge in my pie chart: import matplotlib.pyplot as plt # Setting labels for items in Chart Employee = ['A', 'B', 'C', 'D', 'E'] # Setting size in Chart based on # given values Salary ...
Move labels to the beginning of the wedge in matplotlib pie chart
|python|matplotlib|
After installing pygraphviz via conda, and trying to create graph: # graph: nx.DiGraph pos = nx.nx_agraph.graphviz_layout(graph, prog='dot', ...) # pos[node] ... positions are calculated normally, but the next warning is shown: > agraph.py:1405: RuntimeWarning: Warning: Could not load "*\Library\bi...
when XCode Cloud is building my app, this error appear: /Downloads/friendship.json: No such file or directory My my Copy Bundle Resources the file is located in downloads, I put it in a group in Xcode. Is there a way to remove the downloads section and put it in Xcode directly? The build is working fine when I...
Xcode Cloud Error: No such file or directory
|xcode|xcode-cloud|
Tests shows that Python's `math.gcd` is one order faster than naive Euclidean algorithm implementation: ``` import math from timeit import default_timer as timer def gcd(a,b): while b != 0: a, b = b, a % b return a def main(): a = 28871271685163 b = 17461204...
What is the algorithm behind math.gcd and why it is faster Euclidean algorithm?
|python-3.x|algorithm|math|euclidean-algorithm|
Finally, I've found a solution to this problem without utilizing the redirect and refreshListenable properties of GoRouter. The concept involves creating a custom redirection component. Essentially, authStateChanges are globbally listened, and upon any change in AuthenticationState, we navigate to our redirection co...
{"Voters":[{"Id":4850040,"DisplayName":"Toby Speight"},{"Id":874188,"DisplayName":"tripleee"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[18]}
null
{"Voters":[{"Id":23528,"DisplayName":"Daniel A. White"},{"Id":8565438,"DisplayName":"zabop"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[13]}
class Solution { public String minWindow(String s, String t) { int n = s.length(); int m = t.length(); HashMap<Character, Integer> map = new HashMap<>(); int count = 0; int start = -1; int min = Integer.MAX_VALUE; int l = 0; int r = 0; for (int i ...
I try to read the file with specific extension .compressed. I created it using Fano encoding: ```c++ std::ofstream out; out.open(file_name + ".compressed", std::ios::out | std::ios::binary); in.open(file_name, std::ios::in | std::ios::binary); in >> std::noskipws; if (!out) { out.close(); in.close...
run RTK dispatch on gesture start with React Native
|react-native|redux-toolkit|gesture|
null
{"OriginalQuestionIds":[72790215],"Voters":[{"Id":2144390,"DisplayName":"Gord Thompson","BindingReason":{"GoldTagBadge":"python"}}]}
I'm struggling with sessions and need some help. The following is my processing.php file which starts the session and assigns session variables for a user. If the user is a participant, then they are assigned usertype='Participant' and upon login, they are redirected to a different webpage: participant.php. ``` <?php...
window.location.href redirects but is causing problems on the webpage
|php|jquery|mysql|ajax|phpmyadmin|
You could use the `request()->is('route-name*')` method. This will also work for all sub-routes of your route. 'blog/view/{id}' 'blog/edit/{id}' <li class="nav-item {{ request()->is('blog*') ? 'active' : ''}}"> <a class="nav-link " href="{{ url('blog') }}">{{ __('sentence.Blog') }} </a> ...
{"Voters":[{"Id":573032,"DisplayName":"Roman C"},{"Id":3795036,"DisplayName":"K.Nicholas"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"}]}
No programming is required. Create a shortcut to your program on the desktop. Right-click it, Properties, Layout tab. Adjust the Width property of the screen buffer and window size. But you can do it programmatically too, those Windows API functions you found are wrapped by the Console class as well. You first h...
To answer your original question: Importing a docker image worked for me. And because it took me a while to gather the necessary steps, I'll list them here. As a note, I ran the docker commands from within another Linux distro in WSL, simply because I found it easier to handle there than on Windows. I don't believe thi...
Disabling Flash 3.x logging messages
Hi everyone i just enccounter a weird reactJS error while building my project alert error message prom after adding "child_process": false into falback of webpack.config.js to fix the error child_process undefined: [enter image description here](https://i.stack.imgur.com/kLNAi.png) and another error [enter ima...
null
I'm having an issue updating empty cells in an Excel spreadsheet using the Microsoft Access 2016 OLE DB driver, which I invoke from MSADO/C++. Updating the field causes a "Type Mismatch" exception. My understanding of the issue was that the Access OLE DB driver determines the datatype of a column by scanning a numb...
Excel column datatype issues using MSADO and Access 2016 Engine driver
|excel|ms-access|visual-c++|ado|
My `useGetProductsQuery` is not being recognized for some reason. productsApiSlice.js import { PRODUCTS_URL } from "../constants"; import { apiSlice } from "./apiSlice"; export const productsApiSlice = apiSlice.injectEndpoints({ endpoints: (builder) => ({ getProducts: bu...
Can't read the file using std::wifstream C++
|c++|file|std|wifstream|
null
|python|list|distribute|
null
Is there a way to distribute more similarly than the method below? I'm also curious about how to distribute it from more than one list. The list can contain only five numbers. ``` intList = [] for i in range(10): intList.append(random.randint(10,200)) listX = [] listY = [] intList.sort(reverse=True...
How to distribute the sum of several numbers similarly?
{"Voters":[{"Id":4369919,"DisplayName":"N69S"},{"Id":11854986,"DisplayName":"Ken Lee"},{"Id":839601,"DisplayName":"gnat"}]}
--Remove Duplciates[SKR] --Option A: select * --delete t from( select rowNumber=row_number() over (partition by SomeKey order by SomeKey), SomeKey from YourTable m )t where rowNumber > 1 --Option B: with cte as ( select rowNumber=row_number() over (partition by SomeKey order by SomeKey), Som...
how to use custom function ? I use both the standard search function and the custom one, but as a result I get an empty array custom function in composable ``` // composable/custom-search-content.ts export default async function customSearchContent(search: Ref<string>) { const runtimeConfig = useRuntimeCo...
There are 8 Linux namespaces which isolates PIDs, Network, Users, etc. https://man7.org/linux/man-pages/man7/namespaces.7.html It allows a namespaced process to have independent PIDs, network devices, users, etc. They are kernel resources but only visible within one specific namespace. They are guaranteed to no...
``` function sendDataToServer( firstName, lastName, phoneNumber, address, birthday, age, idNumber, gender, degree, intake, semester, course ) { console.log("sending date" + birthday); console.log("sending nic" + idNumber); console.log("sending phone" + phoneNumber); c...
The problem was effectively the libbox2d.a, I built box2d on windows and my code compiled well with the new libbox2d.a.
I have the following reusable react component: "use client"; import { useState } from "react"; import { ColumnDef, flexRender, ColumnFiltersState, getFilteredRowModel, getCoreRowModel, getPaginationRowModel, useReactTable, } from "@tan...
Calling functions from Main Component while using tanstack table
|javascript|next.js|tanstack-table|
I have a class, Word, that has a String representing a word and an Enum representing the difficulty of the word. Then I have another class, Vocab, that has an ArrayList of Word-objects. I want to sort my ArrayList by either difficulty or by the alphabetical order of the word. I figured I should use a Comparator, and...
_slices_productsApiSlice__WEBPACK_IMPORTED_MODULE_1__.useGetProductsQuery) is not a function
|rtk-query|
I need to show posts from a certain Instagram account in my app. Since dev API(https://developers.facebook.com/docs/instagram) requires users to log in, am I allowed to directly use graphql API like this https://www.instagram.com/graphql/query/?doc_id=17991233890457762&variables={"id":"173560420","first":12} ?
Instagram API: Fetching user posts
|app-store|instagram|instagram-api|
null
DuckDB has upsert support, see the docs: <https://duckdb.org/docs/sql/statements/insert#on-conflict-clause>
{"OriginalQuestionIds":[14596599],"Voters":[{"Id":721855,"DisplayName":"aled"},{"Id":139985,"DisplayName":"Stephen C","BindingReason":{"GoldTagBadge":"java"}}]}
I'm currently trying to setup an AWS Cognito User Pool. I have already verified my domain through SES but I can't enter an e-mail address from my verified domain. Only specific verified email addresses are allowed to select from the dropdown. Can someone explain how I can change this?
AWS Cognito SES FROM E-mail address only verified e-mail address allowed no verified domains
|amazon-web-services|amazon-cognito|amazon-ses|
For the issue of mapping `<C-S-m>` in windows terminal with Nvim, you need to bind `<C-S-m>` by using the `sendInput` command in Windows Terminal's `settings.json`. It will send a specific escape sequence when `<C-S-m>` is pressed. I prefer you to see this github [issue](https://github.com/microsoft/terminal/issues/406...
I have a bunch of German texts, but lost all whitespaces. Now I need to perform some kind of word boundary detection to get from "NamensΓ€nderungimNamenderIntegration" to ["NamensΓ€nderung", "im", "Namen", "der", "Integration"]. I found the python package wordsegment and it works okay, but not ideally. I also found t...
Automatic Word Boundary Detection for German
|python|nlp|linguistics|word-boundary|
null
We can use `csv.reader` to load the data in order. Let's say we this data in a csv file: ``` import csv, io raw_data = '''File name,Date,Time,ID,Type report.csv,27.03.2024,11:15,12345,Thing No.,Device,Version,Readout date,Readout time,Value 1,Value 2,Value 3 1,2345678,10,26.03.2024,10:00,463,470,482 2,...
Undefined split in index.js and throw error in webpack bootstrap
|javascript|reactjs|node.js|webpack|
null
> My expectation would be that creating the instance `Base` with the specified type `str` it is used for `V` which should be compatible in the `test()` return value as it converts to `Test[str](t)` Your `b = Base[str]()` line has no retroactive effect on the definition of `class Base(Generic[V]):` whatsoever - the ...
--Remove Duplciates[SKR] --Option A: select * --delete t from( select rowNumber=row_number() over (partition by SomeKey order by SomeKey), SomeKey from YourTable m )t where rowNumber > 1; --Option B: with cte as ( select rowNumber=row_number() over (partition by SomeKey order by SomeKey), ...
Time to come back and answer it. Django uses a different set of command line options, so you need something like ``` xml <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler"...
--Remove Duplciates[SKR] --Option A: select * --delete t from( select rowNumber=row_number() over (partition by SomeKey order by SomeKey), SomeKey from YourTable m )t where rowNumber > 1; --Option B: with cte as ( select rowNumber=row_number() over (partition by SomeKey order by SomeKey), ...
My journey through creating a PDF form (upgrading old Zend PDF library to be able to do it) continues. I am struggling with checkbox and radio buttons, trying to get them displayed consistently. I did follow several guides and tips here and still there are differences in getting the button displayed in Chrome, Mozil...
You can remove by using the following command: ``` pnpm remove @types/mime ```
Try this and check out the documentation here: - https://vega.github.io/vega/docs/expressions/#pluck - https://vega.github.io/vega/docs/expressions/#extent - https://vega.github.io/vega/docs/expressions/#data ``` { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": { "values": [ ...
before anything, you might see my language isn't really good in english, and i'm sorry about that. i want by clicking a button in WPF .net 8, to make a new instance of another window that i made to enter values and then use these values later, anyway, the problem here is that when i want to make an instance of tha...
Can't open new instance of another window of my app, in WPF .net 8
|c#|wpf|xaml|ado.net|instance|
null
You can set this property in your Style: <ListView.Resources> <Style TargetType="ListView"> <Setter Property="SeparatorVisibility" Value="None"/> </Style> </ListView.Resources>
When I deploy `Angular` project to `gcloud`, all the pages can be loaded normally, but when I refresh the page, I will get the error as the title, or if I access it directly by typing the URL, it will be wrong, and I can only access it from the homepage to not make the later pages wrong, this problem has been bothering...