instruction stringlengths 0 30k ⌀ |
|---|
1. Using the x509 module
openssl x509 ...
...
2 Using the ca module
openssl ca ...
...
You are missing the prelude to those commands.
This is a two-step process. First you set up your CA, and then you sign an end entity certificate (a.k.a server or user). Both of the two commands el... |
null |
Maybe this is what you are looking for. As far as I get it you want to make a map where only the counties present in your dataframe df get colored according to the `val`.
To this end you could join `mydf` to `countypop`. Doing so will automatically assign `NA` to the `val` column of non-selected counties. To color b... |
null |
Assignability error - cannot use r.x (variable of type int) as Numerator value in return statement |
I am trying to use ```mutate``` + ```ifelse``` to create a new variable in the dataset.
My example dataset is below
```
df = structure(list(id = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), resp_gender = c("female",
"male", "female", "female", "male", "female", "male", "male",
"female", "female"), hoh_gender = c("male", "m... |
Mutate based on a condition |
|r|dplyr| |
Solved it, problem was with conflicting dependencies, once i cleaned up the conda and pip env, it was fine.
```
!python -m pip uninstall diffusers -y && conda uninstall diffusers -y
!conda clean -ay
!python -m pip cache purge
```
|
I have a small React project using Typescript and ESLint. I'm making a fetch call inside useEffect to populate some results for a table that's displayed on page load. I can successfully make the call and don't receive any errors other than the ESLint error message under `fetchSsidWhitelist()` saying:
> "Promises mus... |
> You can't execute OS commands that are bytes
Of course you can. Instead of writing a shell script, you can run your commands like this:
```python
import subprocess
basic_filename = "example.txt"
with open(basic_filename, "wb") as fd:
fd.write(b"there is no \x1b[12;m escape")
out = subprocess.check_... |
I need to call SOAP web service from Oracle DB where a payload consists of a file in base64 encoding.
The problem is that I have limitations in payload size — 32 000 chars (`varchar` type). Examples, [here][1] and [here][2]. So it means that I cannot call a web service where the payload is quite huge.
How do I ma... |
|oracle|plsql|soap| |
Nginx Not Correctly Redirecting Users To Custom Page |
|nginx| |
I am currently working on integrating the M-Pesa Daraja API into my Node.js application to initiate an STK push for mobile payments. The STK push itself is working fine; however, I am encountering issues with the callback functionality.
Here is a simplified version of my code for initiating the STK push:
```
const... |
I am new to firebase cloud functions and I'm using cloud functions with express.js. I need to retrieve an access token after registering a new user. i am using the below method for that.
const { admin, db } = require("../util/admin");
exports.registerUser = (req, res) => {
const newUser = {... |
Firebase authentication sign up token |
|firebase|express|firebase-authentication|google-cloud-functions|access-token| |
I have a big problem. In Blender I reduce the number of vertices of models by going to edit mode, then mesh, then cleanup and the various options. Let's say the initial vertices count was 10000, after the cleanups it goes to 2000. When I export the model to glb and import it in Three.js the vertices count goes back to ... |
Blender mesh-cleanup reduces number of vertices but in Three.js it doesn't |
|three.js|blender| |
|excel|vba|userform| |
null |
Your method `item.getCreatedDate()` returns an `Instant`.
This means a few things:
* That's a horrible name. You really should rename that method. That, or, make it return a `LocalDate` instead, then the name is fine. dates aren't timestamps. Confusion in what kind of temporal concept is being returned is pernici... |
null |
I have tried to upgrade llama-index package like what the other posts has advised. However, i keep running into `ImportError: cannot import name 'VectorStoreIndex' from 'llama_index.core' (unknown location)` . Does anyone see the same thing?
Upgraded the package, but still doens't work! |
ImportError: cannot import name 'VectorStoreIndex' from 'llama_index.core' (unknown location) after upgrading llama-index package |
|llama-index| |
null |
I've been learning kubernetes on GKE lately.
I'm testing CronJob, and I'm having trouble with the behavior there.
Below is overview of node-pool, cron job settings.
```
node-pool: 1 node (remaining allocable memory is 1Gi)
cronjob: Simple busybox cron for test
```
So, first of all, I requested the cronjob'... |
CronJob pod repeats pending forever even after deleting it |
|kubernetes|google-kubernetes-engine|kubernetes-cronjob| |
null |
I am building a basic registration feature for a school project and keep getting an error when I try to check the username and password from a database. The idea is to have a user type in there login info and then have a function receive that information and compare it with the user info from the database. if it matche... |
So I have been trying to learn apache spark but for some reason I cannot seem to get autocomplete working for the things that I haven't already imported, I don't know it seems to be an indexing issue, how do I make sure vscode indexes all my dependencies.
[![enter image description here][1]][1]
As you can see its n... |
Autocomplete not working for apache spark in java vscode |
|java|apache-spark|visual-studio-code|indexing|autocomplete| |
IMHO, you should use neither of the solutions. Your problem is a business logic problem and should NOT be put in the database, this will cause your business logic to be scattered in multiple layers. You should handle the protection of locked columns in application level. So for every Update you perform in application, ... |
I was trying to make a page that could in a single page (ie. a single .html file) display different contents depending on which buttons the user clicked. ie. if the user clicks "about" it shows them an about section. But it's not the kind of page that you scroll down to see all contents, but rather, contents that are n... |
How to make in a single page a menu that opens other contents? |
|html|css| |
null |
What do you guys think why does not work the following code if I give dynamic value for a slicer which used as a VAR in a calculated table measure?
**UPDATE:**
It works with hard coded index (like 1.151) but doesn't if using a slicer and a dynamic measure **SelectedPowerIndex =
(SELECTEDVALUE(powerIndexes[pt_ind... |
M-Pesa Daraja API STK Push Callback Not Triggering in Node.js Application |
|node.js|callback|mpesa| |
null |
I'm working on an application designed to convert between different number systems. Its operation involves users inputting a value in one base number system, after which the remaining three text boxes will automatically display the equivalent values in the other number systems. However, I've encountered a stack overflo... |
This is my react native code for a button, which shows a list of all pdfs and on select, I want to open the pdf withing the app. I am using Document Picker, react-native-pdf. I have been trying so many options but either get an actiond_document_viewer error or this storage permissions issue
Android 13 - I know that ... |
ASP.NET Core MVC : NullReferenceException: Object reference not set to an instance of an object |
|c#|asp.net-core|razor|asp.net-core-mvc| |
Please advise how to control rows order in `flextable`.
For example, in the table inside [The Epidemiologist R Handbook](https://epirhandbook.com/en/index.html) the order of rows is arranged in the ascending way, and Other and Missing rows in the middle of the table. But I want to have these rows in the end. How to ... |
How to change the order of rows? |
|r|dplyr|flextable| |
use this tag for questions encoder–decoder architecture of RNN(Recurrent Neural Networks). Don't use this tag for converting one format of data into another. |
null |
A variable is not saved as data on a for loop in R |
I cannot figure out how to install [_Gym Retro_](https://github.com/openai/retro?tab=readme-ov-file#gym-retro). I follow the official [documentation](https://retro.readthedocs.io/en/latest/developing.html#development) but without success. I have tried to check further online sources but again no useful.
These are th... |
I have made a Button React Component:
function Button({ text, Icon, iconProps, ...buttonProps }: ButtonProps)
The props must have this structure:
- Only a `text`
- Only an `Icon`
- An `Icon` with `iconProps` (the `iconProps` can only be passed if the `Icon` is also present)
- A `text`, an `Icon`
- A `tex... |
I am trying to make my python program use c++ code but I get dependency errors.
Here is the c++ code that I converted into a dll file:
```
#include <stdio.h>
#include <algorithm>
#include <queue>
#include <vector>
using namespace std;
extern "C" {
int b_search(int* arr, int size, int v) {
au... |
I want to use createBrowserRouter from react router dom but with dynamic imports. I want to save the url and filePath in an array and i want to loop through that array in createBrowswer router.
But it is not working
When the pass the file path statically in the element in react lazy, it works, but when i pass the ... |
This is not a good use of regexes. You could probably do it with Perl regexes (only because they stopped being "regular" some time ago!), but it's still not a good idea.
This is a job for [SQL::Translator](https://metacpan.org/dist/SQL-Translator/view/script/sqlt). |
the bash script didn't work for me because I was running it in zsh. so I ran the below perl script with find:
```shell
find . -type f -print0|xargs -0 isAlias.pl
```
and here's the perl script:
```perl
#!/usr/bin/perl -w
while ( my $name = shift @ARGV ) {
#print $name;
open my $fh, "-|", ( 'mdls'... |
In 2022 ish I used to be able to close a youtube window with javascript
```
var openedWindow;
function openWindow() {
openedWindow = window.open('https://www.youtube.com/watch?
v=TC1Vfoq3PvU&ab_channel=Historyboy87','_blank', 'location=yes,height=400,width=400,scrollbars=yes,status=yes');
}
... |
Can I close a youtube window using javascript? |
|javascript|youtube-api| |
null |
Testing React components or UI in general proves to be a bit more complicated than testing back-end code. Try to keep it simple and use whatever the underlying framework has to offer.
For instance, with modern Node.js you can create a testing ground and render the components you want to test. Then, using an e2e tool... |
im using pandas and selenium to pass informations from a excel sheet to a google forms, what i am looking for is the code to click on the google forms selection box if the text on the column "TF" is "YES"
and if its "NO", simply ignore the selection box, i tried plenty of codes but aways get stuck.
```
elemento_tf... |
Can't make so that google forms selection box is clicked depending on the text value of the column |
|python|pandas|selenium-webdriver| |
null |
I have a huge list of strings (~ 15000). Each string is unique in the list.
All strings have words inside, which are separated by a dot.
An algorithm shall do the following: The middle terms shall be eliminated, as long as no duplicates appear - middle term by middle term separately.
My code works only, if I have ... |
I'm developing an iOS application that uses HealthKit and leverages HKQueryAnchor for fetching incremental updates to avoid pulling the entire dataset each time. This method works well until the app is deleted and subsequently reinstalled.
Post-reinstallation, when I restore a previously saved HKQueryAnchor and use ... |
Return the value of interest instead of updating the out parameter `head_dest`. The current implementation changes the original list, so you probably want to return a pointer to a copy of the smallest node or NULL:
```
#include <stdio.h>
#include <stdlib.h>
typedef struct Node {
int val;
struct Node *pt_ne... |
{"Voters":[{"Id":807126,"DisplayName":"Doug Stevenson"},{"Id":1235698,"DisplayName":"Marcin Orlowski"},{"Id":12265927,"DisplayName":"Puteri"}]} |
I am trying to have the album images for each of the top tracks shown next to their song but no matter what I do they are showing up as little green boxes.
![Photo of What's Happening][1]
Here is the relevant code:
```
public void onGetUserProfileClicked() {
if (mAccessToken == null) {
Toast.mak... |
The issue here is that the functions `draw_objects` and `run_game_loop` are not correctly indented, leading the python interpreter to believe that they are not a part of the `Game` class.
For example, in the below code, (taken from [here][1])
```
class Bag:
def __init__(self):
self.data = []
d... |
**SOLUTION:**
> Need to have additionally add the libs in your pom.xml if that is acceptatble for you: The [docusign 4.5.0][1] using [jerseay-version 3.0.9][2] but the following dependencies not retrieved with docusign.
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<... |
Expect is a handy tool for handling interactive CLI applications.
`Dockerfile`
```
FROM ubuntu:22.04
RUN apt-get update && \
apt-get install -y \
wget \
expect \
libgomp1 \
libx11-6 && \
rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/NREL/EnergyPlus/... |
{"OriginalQuestionIds":[33260404],"Voters":[{"Id":5747944,"DisplayName":"sytech"},{"Id":-1,"DisplayName":"Community","BindingReason":{"DuplicateApprovedByAsker":""}}]} |
**TASK:**
Migration from Spring Boot 2.7.18 to 3.2 and Java 11 to Java 17 and had a dependency from `com.docusign.docusign-esign-java`
Used the last stable version
``` lang-xml
<dependency>
<groupId>com.docusign</groupId>
<artifactId>docusign-esign-java</artifactId>
<version>4.5.0</version>
</de... |
Failed to instantiate [com.docusign.esign.client.ApiClient] |
It seems like my function is only receiving the first char of a string when being alled |
|mysql|c|authentication|variables|pass-by-reference| |
null |
I tried and it didn't work. I cant make the canvas background transparent, I dont know whether its bcz of canvas or the globe or particles |
Not sure if this is the cause of your problem (which you do not actually explain), but since you emphasized the importance of every bot running in its own thread I must point out that calling **`Executor#execute` does *not* necessarily run its task on a background thread**. Read the Javadoc; it clearly states that the ... |
I had the same problem.
The problem is the zsh in MacOS, as I learned in another post.
"*" does not select hidden files in zsh.
The correct command to recursively copy on zsh including hidden files is:
cp -r *(D) ../otherfolder
|
I have started to learn Laravel and right now I'm trying to get user authentication to work. I followed the instructions from Laravels official documentation on how to register and verify the account via email.
The suggested route for the verification is:
```
Route::get('/email/verify/{id}/{hash}', function (Email... |
An very new to GO & am trying to understand channels. I am trying to create a main function which will be inserting elements into a channel & printing it from the channel all in the same function.
But am not able to do so without making the inserting part a separate function which is then run as a go routine.
But a... |
Insert & get element from Go channel in a single main function |
|go|channel|goroutine| |
null |
If you are seeing this error while executing a CLI command which communicates with orderer, then single/double quotes on `CORE_PEER_LOCALMSPID` environment variable can be an issue [as discussed here.][1]
```bash
# before
export CORE_PEER_LOCALMSPID="Org1MSP"
# after
export CORE_PEER_LOCALMSPID=Org1MSP
```
M... |
To match keywords more accurately, you can try to use `regex` on your pieclouddb database.(The following query was tested on PostgreSQL)
```
SELECT p.post_id,
CASE
WHEN COUNT(k.topic_id) = 0 THEN 'Vague!'
ELSE STRING_AGG(DISTINCT k.topic_id::TEXT, ',' ORDER BY k.topic_id::TEXT)
END AS to... |
I was trying to make a page that could in a single page (ie. a single .html file) display different contents depending on which buttons the user clicked. ie. if the user clicks "about" it shows them an about section. But it's not the kind of page that you scroll down to see all contents, but rather, contents that are n... |
|android|kotlin|mobile| |
i have a Steam Deck and would like to install GLFW on a Steamdeck, so that VSCode can find the Libary, i use Cmake. I used Cmake on another linux machine with no problems. I think its related to the steam deck and steam os.
I a location in with the following files in usr/lib/cmake/glfw3 :
- glfw3Targets.cmake,
-... |
I'm trying create a docker-compose file to connect a backend created in nodejs using typeorm to manipulate and connect with a postgresql database, but always is getting error. It's working in separeted containers but when I try to connect the typeorm using service name in docker-compose always returns connect ECONNREFU... |