instruction
stringlengths
0
30k
I get "Bad PCD format" error. I would like to know what's wrong with PCD file. This is the header to the PCD file: header = "# .PCD v.7 - Point Cloud Data file format VERSION .7 FIELDS x y z data SIZE 4 4 4 TYPE F F F COUNT 1 1 1 WIDTH 0 HEIGHT 1 VIEWPOINT 0 0 0 1 0 ...
step 1: delete the 'node_modules' folder step 2: yarn (or npm) install I couldn't get the Node Modules folder back after 'yarn' and I needed to add a file.yarnrc.yml containing " nodeLinker: node-modules " After that again yarn (or npm) install That worked for me.
I'm trying to fetch apis and combine the json objects into a single variable array that I can loop through. using .push my variable array ends up as.. ``` [ [ {"a","1"} ], [ {"b","2"} ] ] ``` when i want this.. ``` [ {"a","1"} {"b","2"} ] ``` Here's my trimm...
With JS, it's a known problem that `\b` does not work well with strings containing special chars (JS engine believes chars like `ç` are word bondaries). So I have this code: "aaa aabb cc ccc abba".replace(/\b((.)\2+)\b|(.)\3+/g,"$1$3"); It correctly returns `aaa ab cc ccc aba`. However, if the input string...
`Backward slash + b` does not work as expected on regex
|javascript|regex|
This is considered as anti pattern in modern React ecosystem. **According to single responsibility principle.** Keep your business logic in a simple way with custom hooks (Use prototype inheritance in it, if required), To store API calls use Tanstack Query and to store global data use Jotai (Atoms). This libraries ...
Namespace error while doing R CMD check --as-cran with "foreach" package functions
|r|foreach|namespaces|
null
In Visual Studio Code, how can you automatically add `const` when you press (<kbd>Ctrl</kbd> + <kbd>S</kbd>)?
i am trying to get application context for showToast but not able to get it here is my code, always getting error :- lateinit property appContext has not been initialized, kindly help ``` package com.coding.APPNAVIGATION.MenuAndNavigationDrawer import android.app.Application import android.content.Context ...
`template<> inline bool _Sp_counted_base<_S_atomic>:: _M_add_ref_lock_nothrow() noexcept { // Perform lock-free add-if-not-zero operation. _Atomic_word __count = _M_get_use_count(); do { if (__count == 0) return false; // Replace the current counter value with th...
Is it possible for this loop function to enter an infinite loop in c++11 source code?
|c++11|
null
How can I auto add 'const' in Flutter in Visual Studio Code?
if(tid\<n) { gain = in_degree[neigh]*out_degree[tid] + out_degree[neighbour]*in_degree[tid]/total_weight //here let say node 0 moves to 2 atomicExch(&node_community[0, node_community[2] // because node 0 is in node 2 now atomicAdd(&in_degree[2],in_degree[0] // because no...
I did a comparison of the messages generated by Service Bus Explorer and those generated by my code. Service Bus Explorer wrapped the subject in double quotes where my code did not. Updating the correlation rule to subject/label equals jobCosts instead of "jobCosts" did the trick and the subscription started pickin...
1. Please refer to a similar case, it answers admin access is required. [Cannot install mongoose using npm install][1] The diagnostic output displayed in your own case has some useful hints as well. 2. **Try it with admin account** : npm ERR! If you believe this might be a permissions issue, please double-check...
I have some python code: ``` class Meta(type): def __new__(cls, name, base, attrs): attrs.update({'name': '', 'email': ''}) return super().__new__(cls, name, base, attrs) def __init__(cls, name, base, attrs): super().__init__(name, base, attrs) cls.__init__ = Meta.fun...
You should add **overflow: hidden;** or remove **max-height** from parent. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css --> .parent { margin: 5px; max-width: 400px; max-height: 100px; background: pink; } .details {...
**Sample Input:** > var sampleInput={ > name: { > firstName: "sangram", > midddleName: "shivaji", > lastName: "Desai", > }, > address: { > street: "Naradawe Road", > line1: "near railway station", > line2: "behin...
1. delete the 'node_modules' folder 2. yarn (or npm) install I couldn't get the Node Modules folder back after 'yarn' and I needed to add a file.yarnrc.yml containing " nodeLinker: node-modules " After that again yarn (or npm) install That worked for me.
I get "Bad PCD format" error. I would like to know what's wrong with the PCD file. This is the header to the PCD file: header = "# .PCD v.7 - Point Cloud Data file format VERSION .7 FIELDS x y z data SIZE 4 4 4 TYPE F F F COUNT 1 1 1 WIDTH 0 HEIGHT 1 VIEWPOINT 0 0 0 ...
1. delete the 'node_modules' folder 2. yarn (or npm) install I couldn't get the Node Modules folder back after 'yarn' and I needed to add a file .yarnrc.yml containing " nodeLinker: node-modules " After that again yarn (or npm) install That worked for me.
Maybe try this it would work. function validateEmail(email) { const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; return emailPattern.test(email); }
I started to learn WireMock. My first experience is not very positive. Here's a failing MRE: ```java import com.github.tomakehurst.wiremock.WireMockServer; import org.junit.jupiter.api.Test; public class GenericTest { @Test void test() { new WireMockServer(8090); } } ``` ```xml <dependency> ...
importing React solved my problem import React from 'react';
I have a large dataset that is difficult to investigate without analysis tools. It's general form is this, but with 16 "ItemType0" columns and 16 "ItemType1", "ItemType2", etc columns. It represents the properties (many of them) of up to 16 different items recorded at a single timestep, then properties of that times...
I have a react native app with an android native java module that accesses my local Google Fit healthstore using the Java Google Fit API: DataReadRequest readRequest = new DataReadRequest.Builder() .enableServerQueries() .aggregate(DataType.AGGREGATE_STEP_COUNT_DELTA) ...
|arrays|matlab|genetic-algorithm|optim|
In my case, simply restarting the application wasn't enough to access the environment variables. What worked for me was: 1. Stopping the application (using Ctrl+C in the terminal) 2. Rebuilding it with **npm run build** 3. Starting it again with **npm start** After this env vars were successfully loaded.
|android|android-jetpack-compose|google-signin|credentials|android-credential-manager|
I've a OpenID connection in place who was working yesterday and today i'm unable to connect when i'm on my local server i've also the same openID online and it works perfectly fine. it throw me the error 'You must have either https wrappers or curl enabled.' when I click on the login button I've saw on another post ...
My openID Authentication return 'You must have either https wrappers or curl enabled.'
|php|authentication|openid|steam|
null
I have an existing map in Firebase that I'm trying to update with Flutter. Executing the code 'await documentReference.update()' causes the simulator to lose connection. Network connectivity is good. Rules are good.[![The map/list that I'm trying to update the existing map/list with.][1]][1] '''await documentRe...
Updating existing document in Firebase using Flutter causes Lost Of Connection to the Simulator
|flutter|firebase|google-cloud-firestore|
I im needing to detect a pc or/and get bytes from USB, i was testing and nor my own application in kotlin or play store apps can detect my pc, there is a way to make this work? The connection i meant is PC:Host - Cellphone:Client (PC sends data to an Android phone, and the phone retrieves it) USB: Type-C 2...
Going with the code you provided (and with defining the CSS variables which were not defined in your code), you can do it like this. The comments are within the code (CSS), an they begin with `this is new`. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css --> /* thi...
As mentioned in the comments, you can use the `excluded` parameter of [`np.vectorize`][1]: ```python3 import numpy as np def f(x, y): assert np.shape(x) == () assert np.shape(y) != () return x*len(y) f2 = np.vectorize(f, excluded=[1, 'y']) x = np.arange(3) y = ['a', 'b', 'c'] f2(x, y) # arr...
> My question was not about browser requests (i know how to handle them) but about requsts maded from server side, for example if you put some import in the first code block of your answer. In general you can use [`inotify`](https://man7.org/linux/man-pages/man7/inotify.7.html). If the file exists you can use [...
Same issue for me. Try to use return navigateTo("/sign-in", { external: true }); instead return navigateTo("/sign-in");
I have a Javafx program that I'm trying to connect to a SQL Database through Windows Authentication mode. I have put the mssql-jdbc_auth-12.6.1.x64.dll file in the - C:\Program Files\Java\jdk-17\bin. I have set the -Djava.library.path="C:\Program Files\Java\jdk-17\bin" within Intellij run configurations. The connecti...
Google Fit SDK API gets stuck executing historyClient.readData
|android|react-native|google-fit|google-fit-sdk|google-fitness-api|
For some reason I've made some change either in whitespace somewhere, that it makes it fail. ``` public function test() { $multiLineSring = <<<EOD this awesome person has become something else entirely EOD; } ``` I get the following error: `PHP Parse error: syntax error, unexpected ''...
In which bizarre scenario can multiline strings fail to work?
|php|
I am trying to adopt [Swift Charts][1] but after adding it to my project and importing it in the file, I am still seeing warning messages in Xcode. I've read [other threads][2] and tried suggestions routes like clearing the cache, resetting Xcode, removing/re-adding the framework, etc. Nothing works. import UIKi...
Swift Charts not importing into project correctly
I'm trying to create a test to check the correct behaviout of my service object, ```ruby def api_call_post(connection, message, url) pp message response = connection.post do |conn| conn.url url conn.body = message conn.headers = @headers end check_response(response) end .....
I have created a Python script to deploy in Google Cloud Functions, in order to manage the creation of new documents on my Firestore database (Firestore triggers). I am deploying the function in the Google Cloud console, not locally. The functions is implemented correctly without any error. However, when I create a new...
Nonsense error using a Python Google Cloud Function
|python|google-cloud-platform|google-cloud-firestore|google-cloud-functions|
'use client' import { useEffect, useState, useRef } from 'react' type CredentialRequestOptions = { otp: OTPOptions signal: AbortSignal } type OTPOptions = { transport: string[] } const InputConfirmCode = () => { const [value, setValue] = useState<str...
I have the following problem: I have the URL to a picture 'HTTP://WWW.ROLANDSCHWAIGER.AT/DURCHBLICK.JPG' saved in my database. I think you see the problem here: The URL is in uppercase. Now I want to display the picture in the SAP GUI, but for that, I have to convert it to lowercase. I have the following code fro...
I am creating an operating system and I created a child process using c with this code: ``` #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <windows.h> int main() { FILE *fptr; // Open a file in read mode fptr = fopen("filename.txt...
Is there a function to end a child process?
|c|operating-system|
i am trying to get application context for showToast but not able to get it here is my code, always getting error :- lateinit property appContext has not been initialized, kindly help ``` package com.coding.APPNAVIGATION.MenuAndNavigationDrawer import android.app.Application import android.content.Context ...
I am trying to create a directory and a file inside it in Java (spring) and it working fine when I execute it on Windows, but after deploying the war file on Wildfly on linux it's throwing the error: **code snippet:** ``` String filePath = "reports/"; File f = new File(filePath); if (!f.exists()) { boolean b=f...
How can I remove a kernel from Jupyter Notebook? I have an R kernel on my Jupyter Notebook. Recently, the kernel always dies right after I open a new notebook.
Remove the kernel on a Jupyter Notebook
I cant show a pdf document save it in a database table direcly to a WebBrowser using a MemoryStream. I have a DataBase with pfd documents saved in a table filed, and I want to show the pdf document saved in a table field over a WebBrowser. I have this code: ``` <WebBrowser x:Name="pdfWebViewer" Grid.Row="1" Ma...
WPF How to show a MemoryStream PDF document to a WebBrowser
null
Change this line of code chain = cl.user_session.set("chain") to chain = cl.user_session.get("chain") Because we are already setting the chain variable above, here we have to get that
How to create a logic that when I logged in as a seller, each of them have different set of products. NOTE: I temporarily hardcoded "2" for the parameters to add seller id in the Database.GetProductDetails() and Database.AddProduct(). ``` **FROM THE DATABASE.CS** //Initializing for Seller Accounts Database ...
How to make that each seller has its own different set of products using sqlite and uwp
|c#|sqlite|uwp|
null
i am trying to make a uart code for nuvorton m0516LAN but i am facing this issue RTE/Device/M0516LAN/retarget.c(337): error: call to undeclared function 'asm'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] here is the handler function void HardFault_Hand...
(V8 developer here.) It's not the hashing (or lack thereof), it's the flattening (or lack thereof) of strings that have been built up with thousands of `+= 'x'` single-character concatenations. With a couple of exceptions, V8 usually handles string concatenations by creating a "cons string" (sometimes also called...
|swift|swiftcharts|
I'm implementing a drag&drop in JS, it works but the detection of my file is quite bad (when the file is drag over the dropzone it isn't always detected). Also i would like to click anywhere in the dropzone to activate my input it doesn't work either. Here is my code and a link to my codePen to test it: https://co...
Using the `keyboard` module, we can block every key on the keyboard: import keyboard for key in range(150): #150 should be enough for all the keys on the keyboard keyboard.block_key(key) #block the key until unblocked #do stuff for key in range(150): keyboard.unblock_key(ke...
How to Silent Login with NextAuth?
I have the following tables that are connect via "NBR": ```` Process ```` [![Process table][1]][1] ```` Service ```` [![Service table][2]][2] [1]: https://i.stack.imgur.com/RZzIn.png [2]: https://i.stack.imgur.com/fBNAS.png ```` create table service( DIV CHAR(4 BYTE), PAID CHAR(2 BYTE), NBR CHAR(...
> So each `a[n]` is a `int*` type variable. No. The type of `a[n]` is `int [3]`, which is an array of 3 `int`. `int *` is a pointer to three `int`. These are different things. In memory, an array of 3 `int` has bytes for 3 `int` objects, and those bytes contain the values of the `int`. In memory, an `int *` ha...
This can be handled in Angular on the component side instead of the html by using this routine. - The reference to the collection is made - A subscription to that reference is created. - we then check each document to see if the field we are looking for is empty - Once the empty field is found, we store that docum...
{"Voters":[{"Id":472495,"DisplayName":"halfer"},{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":354577,"DisplayName":"Chris"}],"SiteSpecificCloseReasonIds":[18]}
You can use Docker [Volumes](https://docs.docker.com/storage/volumes/) > Volumes can be more safely shared among multiple containers. You can define Volumes on `dockerfile`, `docker-compose` file or on `cli` But to share volumes, you should define named volumes. You can do so using `cli` or `docker-compose`...
Given a graph G with V nodes and V different colors, I would like to assign colors to these nodes such that the color assigned to a node is as visually distinct as it can get from all of its neighbors. All V colors must be assigned to the n V nodes. I have tried using a greedy approach in the CIELAB color space to ...
|android|save-image|
I want the command to run every minute after 9pm. What should I do? -------------------------------------------------- For testing, below schedule is not working. 1) not working */1 21 * * * date >> /opt/cron.log 2>&1 2) working */1 * * * * daet >> /opt/cron.log 2>&1 I want the command to run every minute a...
crontab run every minute after 9pm
|cron|
null
Given a graph G with V nodes and V different colors, I would like to assign colors to these nodes such that the color assigned to a node is as visually distinct as it can get from all of its neighbors. All V colors must be assigned to the V nodes. I have tried using a greedy approach in the CIELAB color space to ca...
Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path
|sql-authentication|javafx-17|
I'm trying to figure out how to configure Firefox such that all `console.log()` calls by visited websites are written to Firefox's `stdout` or `stderr`. I already achieved this for Chrome using the CLI flags `--enable-logging`, `--v=1` and `--log-level=0`. According to [Firefox documentation][1], the environment va...
How to write `console.log()` calls to Firefox's `stdout` or `stderr`?
|logging|firefox|browser|
You're looking at implementation details, and then summarizing them. You left out one critical detail: for small sets, the hash table size is multiplied by 4. https://stackoverflow.com/questions/75291343/what-is-the-internal-load-factor-of-a-sets-in-python Note that this is all subject to change. As the linked que...
You can use a flag, a rookie mistake is to exit a single loop, remember the double break, another practice that is not recommended but necessary in very high performance processes is to use goto and my favorite, a function with a return. #include <iostream> // Dont clone vars, use references, for perf...