instruction
stringlengths
0
30k
I don't think you can send directly to native syslog protocol. However, with [syslog-ng][1] you can read (and forward) from various sources. I would try to use the `network()`, i.e. tcp source and then simply try `UTL_TCP.WRITE_LINE()` function. Most likely it will work better with `no-parse` option. Then you can si...
I have a couple of iterative algorithms written in C++ to solve the same problem. When running these algorithms on my machine for very large input sets, it is quite easy to classify them based on the time each algorithm takes for the given input set. But these runtimes are based on my machine and the number of backg...
C++ : Is there an objective universal way to compare the speed of iterative algorithms?
|c++|algorithm|performance|time|time-complexity|
null
Im trying to convert a string I got from [math.js](https://mathjs.org/) (for example `2*x^2+5x-1` ) to a runnable python function that looks something like this: ```python def f(x): return 2*(x**2)+5*x-1 ``` I've experimented with `sympify` from the `sympy` module: ```python from sympy import sympify, s...
This might work for you (GNU sed & parallel): parallel echo 's/{1}/{2}/g' ::: $elements :::+ {1..999} | sed -f - file Use parallel to build up the sed commands into a file which is imported using the `-f` option on a piped invocation of sed. N.B. If there are more than 999 elements, then increase the argumen...
I have a docker container that runs a ROS2 (humble) node that publishes (among other things) imu data on a topic. The host is an NVIDIA jetson AGX orin. This part runs fine. I run the Docker container with host network with the aim of being able to access this published topic outside the container. This is where troub...
ROS2 memory usage spike in Docker
|docker|ros2|nvidia-jetson|
null
I want to select from a Listbox and use the value selected to retrieve other data which will also be inserted to another Listbox for selection. When selecting the first Listbox, it works successfully without any error. The second Listbox also gets updated with new list on selecting the first one. The problem comes when...
To end a timer in MicroPython, you may use the `.deinit()` function. Here's an example variation of your code that blinks the LED 5 times using a `Timer`: ``` python from machine import Pin, Timer led = Pin(25, Pin.OUT) timer = Timer() blink_counter = 0 def blink(timer): global blink_counter ...
I am trying to color a country map based on level of weather risk in each admin area. I believe this can best be done in R, though my knowledge of R is next to zero. From this post https://stackoverflow.com/questions/76121544/cannot-add-labels-for-country-with-ggplot-geom-polygon-and-geom-textlibrary(maptools), I have...
I'm inserting this script into my wordpress site using Elementor: `<script src="https://www.fourvenues.com/assets/iframe/"></script>` It looks great while I'm logged-in but as soon as I log-out I got this error on the console: Uncaught TypeError: Cannot read properties of null (reading 'style') at create...
Javascript not loading while logged out from Wordpress
|javascript|wordpress|
null
1. In your initial job, store a value in the cache. For instance: ```php Cache::put('foo', 'bar'); ``` 2. In your subsequent job, retrieve the stored value from the cache. For example: ```php Cache::get('foo'); ``` This way, you can share data between jobs using Laravel's cache system.
I just fired up a new project to verify that this works: npm init npm install prisma --save-dev Add .env file with database information, e.g. DATABASE_URL="postgresql://postgres.xxxxyyyyzzzz:passpasspass@aws-0-us-west-1.pooler.supabase.com:5432/postgres?schema=public" where postgres.xxxxyyy...
One way is to calculate where each box is to be and position them absolute. Here's a simple example. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css --> .container { width: 100%; height: 100px; border: 1px solid brown; display: flex; ...
How do I get a country as a region in R
|r|
One should always differentiate between the license of the 1. wiki software 2. content of a given wiki (not your own wiki, presumably) 3. content of your wiki The [DokuWiki][1] "license" setting locally configures the license under which the **content of your wiki** can be distributed. This can be achieved ...
I am trying to create server and client interaction on Microcontroller ESP32. It'll consist of simple HTTP server and a client. So the client will send a POST request to the server, and the server will do some logic with the data it received. And for more context, here is the server-side code : ``` if (cli...
How to correctly read POST REQUEST body on ESP32
|c++|http|arduino|esp32|
A concise, modern approach: ``` fetch('https://example.com?' + new URLSearchParams({ foo: 'value', bar: 2, })) ``` **How it works:** When a string (e.g. the URL) is being concatenated with an instance of [URLSearchParams][1], [its toString() method][2] will automatically be called to convert the inst...
Signal-based utility keeping track of multiple async operations performed with observables
|angular|typescript|rxjs|rxjs-observables|angular-signals|
I solved this issue by creating a generic `LoadingStatusManager` utility that looks like this: ```typescript import { computed, Signal, signal, WritableSignal } from '@angular/core'; import { catchError, Observable, tap } from 'rxjs'; export class LoadingStatusManager<KeyType extends string> { private readon...
please help , i cannot access to kibana even that it is running as well as elasticsearch, i got this msg to this url : https://localhost:5601/ the message is : statusCode 401 error "Unauthorized" message "[missing authentication credentials for REST request [/.kibana_7.17.6/_search?from=0&rest_total_hits_as...
Your Code would really need a formatter and some proper Coding Style, but thats not for now. I cannot really tell you why it doesnt work with your code, because I need more information, but if I understand your problem correctly or more like the result you want to achieve is, that the Ghost should fade in the closer h...
So basically I'm creating a automation that copy a information from a cell and save it in to a var so i can paste in to a app like notepad or wathever ``` import win32com.client as win32 import pyautogui import global_variables def copiar(): try: excel = win32.GetActiveObject("Excel.Application...
Can't copy a cell information using Win32com library
null
> To access nested JSON objects within an array in ReactJS (or > JavaScript in general), and based on your specific case, you need to > adjust how you're iterating over the data. Specifically, you'll need > to take into account that firms is an array of objects within each > item of your vendorList. Also, it looks ...
Your code might compile now, but it will not work as you expect. The `INT8_*` macros have totally different values than the `INT_*` ones. `INT_MIN`/`INT_MAX` are the min/max values for an `int` (and are defined in <limits.h> header). It is typically **32 bit** and therefore the values that you used before were p...
Converting Math.js-like Expressions to Runnable Python Code
|python|math|sympy|equation|math.js|
null
|json|debugging|
You should not be aiming to respond in a different channel for the sake of user experience, as this could be confusing. Similarly, there is no option to send an empty response. The best way to tackle this would be to respond to the interaction with a message (which could be ephemeral), notifying the user that a ...
I have a code for Arduino Nano RP2040 written with the usage of Raspberry Pi SDK (it was written to use with Raspberry Pi Pico, but then I switched to Arduino Nano Connect RP2040). Now I want to add WiFi functionality to it, so I want to control the WiFi NINA which is on the board. I'm trying to port Arduino's WIFIN...
I need to convert some Oracle query strings to be Postgres compatible. Some of the queries use the Oracle TO_NUMBER function which isn't valid in Postgres. So I need to remove all occurrences of the TO_NUMBER function in the sql queries, and replace with an explicit cast to integer... Here is an example SQL to be co...
I have 2 tables in my DB **Table** dbo.Customers Id | Name 1 | Customer1 2 | Customer2 **Table** dbo.Images Id | OwnerId |ImageUrl | OwnerType 1 | 1 | abc.jpg | Info 2 | 10| xyx.jpg | Products 3 | 1 | customer1.jpg | Customer 4 | 2 | customer2.jpg | Customer ...
See example ``` with -- recursive -- for PostgreSql cte as( select expression_id,oid ,concat( case when lv in('*','+','-') then concat('[',lid,']') else cast(lv as varchar) end ,ov ,case when rv in('*','+','-') then concat('[',rid,']') else cast(rv as varchar) end ...
I know I'm a little late to this party, but Android context can't be accessed in the Shared module because it's a business library. It will cause a circular dependency, then on top of that it won't work for iOS. What you can do is to expose the Android context inside the source set. You can use this jetpack libr...
I have some Python code that pulls data from a pdf file and converts it into excel. It then grabs specific data from that excel file and saves it to a new excel file. I want to name the final excel file something unique each time and thought datetime.now().isoformat() would be a good solution. So I save datetime.now()....
Add a .xlsx extension to a variable in Python
|python|
null
I am working on a SvelteKit application with a Supabase back-end. I just finished on input validation, and now I am trying to display errors for invalid credentials. I am struggling find a way to do this. Here is src/routes/login/+page.svelte: ```js <script> import { superForm } from "sveltekit-superforms"; ...
How do I display Supabase AuthApiError from server-side in client -side
|javascript|error-handling|sveltekit|supabase|
please help , i cannot access to kibana even that it is running as well as elasticsearch, i got this msg to this url : https://localhost:5601/ the message is : statusCode 401 error "Unauthorized" message "[missing authentication credentials for REST request [/.kibana_7.17.6/_search?from=0&rest_total_hits_as...
I had the same problem to which I would suggest an alternative approach. This duplicates the rows which must go to two separate windows. Input: ```python from pyspark.sql import functions as F, Window as W df0 = spark.createDataFrame( [(0, 'A', 0), (1, 'C', 0), (2, 'B', 0), (3, 'C', 0), ...
I’m working with ZGC in Java JDK17, and I’ve been looking into some long-running requests where I can’t figure out where some of the time is going. When I checked the GC logs, I saw that the thread IDs for jit,compilation were from user threads, and the timing lined up with when those slow requests were happening. I’m ...
Does this work? Coversion = VAR FirstUUID = FIRSTNONBLANK('Url-shortener'[UUID], 1) VAR FilteredTroux = FILTER(Troux, Troux[UUID] = FirstUUID) RETURN SELECTCOLUMNS(FilteredTroux, "Column", [UUID])
You should use **ToolbarItem(id: ...)** but be aware that it captures a single state, so it is not possible to reset different FocusStates or know which field should be reset, or at least I did not find the way how to do it. struct FocusCancellable: ViewModifier { func body(content: Content) -> some Vie...
Simply pip install the latest version of bigframes before 1.0.0: ``` !pip install bigframes==0.26.0 ```
I am making a casino for a client and I want to setup a wallet which will be used to pay for gas for all the information being uploaded on the contract. I am using the private key to create a signer and then sending the transaction but for some reason the transaction is not being formed. ``` async function sendT...
Trying to send transactions via a signer using my private key
|blockchain|ethers.js|
null
|scala|sbt|scanamo|
I am just wondering how to use data from an existing python variable (defined in a .py script) in matlab. Specifically, I would like to use the variable 'commandv' that stores an array defined in abfdata.sweepC, given the following script in python (stored as 'get_command-Voltage.py': ``` import pyabf import ma...
I wrote the code below ``` miRNA.list <- c("let-7a-5p", "let-7a-1-3p", "let-7b-5p") summary.df <- data.frame() for (miRNA in miRNA.list) { temp.name <- miRNA temp.df <- df.mirna.pv %>% filter(`temp.name` == "yes") %>% summarise(downregulated = sum(str_count(status, "do...
null
null
|r|dataframe|for-loop|dplyr|
null
null
null
null
It is intended that .NET Core versions and higher - e.g. .NET 8 - don't appear in the list for configuring the .NET CLR version setting, since the .NET CLR is not being used by those versions. It is recommend to set No Managed Code. [![enter image description here][1]][1] See step 6 in the [documentation](http...
Minimizing IdentityServer4 Round Trips in Microservice Architecture with Ocelot
I am getting **POST http://localhost:3000/api/user-profile net::ERR_ABORTED 500 (Internal Server Error)** error message in developer console when trying to submit data to my Supabase Database. The terminal says **TypeError: res.status is not a function at POST**. This is my first time attempting to make an API route in...
NEXTJS - POST net::ERR_ABORTED 500 (Internal Server Error)
|api|post|next.js|supabase|http-status-code-500|
null
Input is automatically stored in the variable it is called, such as "first_name", which you can read whenever you use it. #Read a value from a user and store the value in first_name first_name = input('Enter a name: ') whole_number = input('Enter an integer: ') plural_noun = input('Enter a noun in...
I know that some other people have pointed out the fact that you can run pip with a proxy, but I'd like to point out that you can do this "globally" too. For me, running export http_proxy=[proxy info] export https_proxy=[proxy info] pip install flask worked.
if(maze[i][j + 1] == "1" && visited[i][j + 1] != "1" && j + 1 < maxCol) `j + 1 < maxCol` is a correct check but it's too late. `maze[i][j + 1]` and `visited[i][j + 1]` have already been accessed. You need to do bounds checking before you access the arrays, not after. Same thing with all other `if` statements. ...
We have a process that converts xml to html via a XSLT file. We are using css from the same website that is using the process. ``` <head> <link href="$siteURL/css/pdf.css" rel="stylesheet" type="text/css"></link> </head> ``` This worked when the server was Windows Server 2012 R2, but does not...
link href to website css does not work since upgrading to Windows Server 2019
|xslt|iis-10|windows-server-2019|
null
I've used `SDL_CreateWindow` with the flag `SDL_WINDOW_BORDERLESS` and `SDL_WINDOW_RESIZABLE` to make a borderless window. But sdl gives me this *ugly* rectangular window that doesn't fit into MacOS at all. So how can I make a borderless window with rounded corners? Thanks.
{"Voters":[{"Id":22948852,"DisplayName":"tahzibi.jafar"}],"DeleteType":1}
>MacOS 14 Sonoma<br> emacs-plus/domemacs I use `emacsclient -c` to launch Emacs from the terminal. It opens in a small window with no focus. It is a waste to manually set fullscreen. I want Emacs to open in fullscreen mode with input focus, handsfree. Also, I prefer native fullscreen because non-native fullscree...
How can I make 'emacsclient' open in native fullscreen every time I launch it from the terminal in macOS?
|emacs|fullscreen|
Include the following lines in your configuration file (`~/.config/doom/config.el` for `doomemacs` or `~/.emacs.d/init.el`): ``` (setq ns-use-native-fullscreen :true) (add-to-list 'default-frame-alist '(fullscreen . fullscreen)) ``` Save (`C-x C-s`) the configuration and exit emacs. The next time you launch Emacs,...
Parent-Child vs `Range.IndentLevel` - [![enter image description here][1]][1] **The Calling Procedure (Example)** <!-- language: lang-vb --> Sub RunParentChild() Dim ws As Worksheet: Set ws = ThisWorkbook.Sheets("Target") Dim rg As Range: Set rg = ws.Range("A1", ws.Cell...
I am currently fitting a set of models on a subset of data for each level of a factor variable. As the models take a long time to run, I use the `foreach` and `doParallel` package to estimate the set of models for each level of a variable in parallel using %dopar%. I only pass the subset of data to each worker to avoi...
I am fairly new to Solana development and currently learning how to mint fungible tokens with custom metadata. I am able to mint a SPL-Token on devnet using spl-token library, however finding it bit confusing for minting a token with metadata. which library is preferred for creating metadata, is it @metaplex/foundation...
How to Mint a Fungible Token with Metadata on Solana using @Solana/web3.js
|solana|solana-web3js|solana-program-library|
MediaQuery.of(context).copyWith(padding: EdgeInsets.only(bottom: 8.0,)) Using this method at BuildContext time may help you