instruction
stringlengths
0
30k
Generic type condition is lost when using typeof
|typescript-typings|typescript-generics|
I would use a boolean mask, this will avoid overwriting existing data, and also be more efficient since only the relevant rows will be evaluated: ``` add = df['StreetAddress'].str.extract(r'(\d{5})', expand=False) m = add.notna() df.loc[m, 'Zip'] = add[m] df.loc[m, 'StreetAddress'] = (df.loc[m, 'StreetAddress'] ...
It's `org.jetbrains.kotlin` not `org.jetbrain.kotlin`. (They say two brains are better than one.)
I asked ChatGPT and Google Bard a C++ question that **"What functions can access a global variable that appears in the same file with them?"** They answered that "Any function within the same file where the global variable is declared can access that global variable. Global variables have program-level scope, which ...
The problem with multi series doughnut charts is that you have to generate the labels yourself as described [here][1]. Please take a look at your amended and runnable code and see how it works. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> new Chart('multiD...
tengo una aplicación de Angular que está alojada en un servidor IIS, usa Nginx como servidor proxy y su subdominio fue creado con Cloudflare. Mi problema es que esta aplicación usa Prime Ng pero no funcionan los estilos, sin embargo cuando alojo esta aplicación en otro Hosting como firebase funcionan los estilos prim...
No me funcionan los estilos de Prime Ng Angular en subdominio
|angular|nginx|iis|primeng|cloudflare|
null
Per [documentation](https://kkroening.github.io/ffmpeg-python/#ffmpeg.input) > Any supplied kwargs are passed to ffmpeg verbatim (e.g. `t=20`, `f='mp4'`, > `acodec='pcm'`, etc.). So, `.input(r=18)` should do the trick
I had to change the QR code generator that we had been using for years since Google discontinued the chart API that was being used. I found a new one here https://goqr.me/api/doc/create-qr-code/. The way that I had it programmed worked for a month or so, but has now stopped. [Code that has stopped working](https:/...
I've encountered an issue where SwiftData remains in the /Users/(username)/Library/Containers/~ directory even after my app has been deleted.(other apps too) This behavior is not what I expected. Has anyone else faced this issue? Thanks.
Hi I want to publish an app on the Microsoft store and this requires an EV certificate. I found that Identrust is the cheapest option, but I wanted to double check that they support using a cloud based HSM? So far I have only heard that Digicert and Sectigo support it, but they are 2x the price. If not has anyone do...
Identrust X Google Cloud HSM X Electron Builder
|electron|electron-builder|hardware-security-module|ev-certificate|
Word2vec only knows the tokens you pass it. If you want *some* multiword entities to be a single learned word-vector, you need to preprocess your text to combine those, for example changing the original 2 tokens `['red', 'panda']` (as they appear in a larger context) into `['red_panda']` instead. There are many pot...
Flutter API fetch code throws "index out of range" using Bloc
|arrays|flutter|list|api|gridview|
null
{"Voters":[{"Id":6403381,"DisplayName":"Tony stark"}]}
I am using useContext to get user information in the login page and display it in the home page it displays the information at first but when i refresh the home page the information get lost why please i am a beginner in react
React useContext returns it value but it returns undefined after page is refresh
|reactjs|react-hooks|react-context|
null
I guess what you are doing wrong over here is, columns array look out for title paramter along with data to render column header. So can you try ahead with this $datos = [ { "data": "id", "title": "id" }, { "data": "number", "title": "nombre" } ]; where data param is key of ...
Finally I uninstalled useless and buggy 1GB Anaconda to install the [micromamba][1] as Alexey suggested. a) Installation in PowerShell: Invoke-Expression ((Invoke-WebRequest -Uri https://micro.mamba.pm/install.ps1).Content) b) setup MAMBA_ROOT_PREFIX to c:\micromamba micromamba -r c:\micromamba ...
I tried to create a nodejs server which will return response of ip address value app.get('/UserIP', function(req, res) { console.log(req.connection.remoteAddress); res.send(JSON.stringify({'ip':req.connection.remoteAddress})); }); later I have created a client to get this ip address <...
Use NavigationLink and Button in one List. ``` struct HomeView: View { var body: some View { NavigationView { List(0..<10, id: \.self) { index in if index % 2 == 0 { NavigationLink { } label: { ...
{"OriginalQuestionIds":[6607675],"Voters":[{"Id":1765658,"DisplayName":"F. Hauri - Give Up GitHub","BindingReason":{"GoldTagBadge":"bash"}}]}
1. An exception is thrown in the procedure EnterHours() **Description of procedure EnterHours()** The file HoursWeek1.txt stores the number of hours each employee has worked in week 1, in the order: • employee number • number of hours worked. For example, the first set of data is for employee 21548 who ha...
System.NullReferenceException: 'Object reference not set to an instance of an object.' ┃Visual Studio/VB.NET 2022 IDE Version
|vb.net|visual-studio|ide|
null
I need to send money from my paypal account either to a bank card linked to a PayPal, or directly to a bank card, not necessarily linked in a PayPal account. I have used some API's that send money within paypal accounts which work perfectly fine, but now having the feature to send directly to bank cards would be even b...
How can I send money to someone else's bank account linked to Paypal using Paypal API?
|paypal|paypal-sandbox|paypal-rest-sdk|
You can use [conditional compilation] for that, i.e. the [`cfg_attr`] attribute. ```rust #[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))] pub struct MyStruct { ... } ``` This is commonly used in other libraries. However, other crates usually name the feature `serde` as well. You ...
{"OriginalQuestionIds":[39922986],"Voters":[{"Id":16343464,"DisplayName":"mozway","BindingReason":{"GoldTagBadge":"dataframe"}}]}
|r|dplyr|pipe|bind-rows|
null
I have been trying to work with the obs-websocket Python library to control OBS Studio (version 29.0.2) via a remote script. I have done this before with C# libraries but having some trouble with the Python (version 3.11.8) versions. I can connect to the websocket without issue and can change scene easily enough. Ho...
getaddrinfo EAI_AGAIN cerberus.profound.works
|networking|docker-compose|
null
|php|linux|laravel|mariadb|
My AWS Lambda function is executing successful until it returns the response. It is a proxy integration. The below image shows the sample response sent. It complies with the output format of proxy integration. But still it returns 502 code and Internal Server Error. In Cloudwatch logs, no error was logged for this. ...
AWS Lambda Gateway 502 error but function is successful until it returns response
|aws-lambda|
null
I want to create an array that collects three variable values. These variable values are obtained from my Azure Keyvault. Here is the script: CREDENTIAL = DefaultAzureCredential(exclude_shared_token_cache_credential=True, exclude_environment_credential=True, exclude_managed_identity_credential=True, exclude_...
As the warning states, you can use an `A` element under a Router component. So, moving the Router component in a way to wrap the `A` elements like shown below should solve your problem: ```typescript function App() { return ( <Router> <Header /> <Route path="/" component={Home} /> ...
From https://stackoverflow.com/questions/78215422/get-the-customers-total-spend-for-a-period-of-1-year-in-woocommerce/78216338#78216338 answer to my previous question: ``` // Utility function: Get customer orders total amount from specific status on a period function get_orders_sum_amount_for( $user_id, $period = '1...
|sql|database|postgresql|
You might be interested in [this solution][1]; uses execfile() to load a series of settings files in order, where each file has full access to settings from previously-loaded files, to update, modify, etc. ```python $ ls settings/ 10-base.conf 20-engines.conf 30-site.conf ... $ cat settings.py import os...
[![method called for each prompt given an angle name (A, B, or C)](https://i.stack.imgur.com/7K15A.jpg)](https://i.stack.imgur.com/7K15A.jpg) I am making an application that lets a user input a triangle's known angles and side lengths, and depending on the unknown side, calculate that length or angle. This method is...
I have a dataset in Spotfire where each row contains a TASK_START and TASK_END column, as well as several other columns containing values. As an example input, something like this: | TASK_START | TASK_END | USER | PROJECT | | 01-JAN-24 | 01-MAR-24 | name1 | project1 | | 01-JAN-24 | 01-APR-24 | name1 | pro...
I'm optimizing some work I did moving from Orange to Python code, but I'm having some problems with image Embedders. I'm trying to recreate my work using Tensorflow/Keras, but the outputs of the VGG16 networks but the 4096 outputs of the activation layer of the penultimate FC layer for this architecture, using Orange ...
so i have been learning html and CSS from a guy called mosh Hamedani. In his course he was building a website and in that website he is using card component to display the prices of plans. now here is the problem as you can see in code below there is an element with plan class and i applied `max-width: 500px;` and `mar...
effects of applying margin:0 auto to child element of element with display grid
|html|css|grid|margin|card|
null
I am learning C++ and I was working on a project for my class. The project is a CityClock class that displays time, toggles format between the 24 and 12-hour clocks, and a tick function that adds one second to the time of the current object. I was then asked to add a move constructor, a move operator, a copy constructo...
Oracle PL SQL Code to SQL Server T-SQL Code conversion
I have many different data (image, time_series etc.) I will use them separately to create a model and I found the following code as an example.Would I be doing the right thing if I worked with such an algorithm?Or is there another way I can do it? ``` import numpy as np from sklearn.ensemble import VotingClassif...
I am making a website using Next.js and React. I've made this navbar but every time I use it it returns this error 3 times: Error: Hydration failed because the initial UI does not match what was rendered on the server. Warning: Expected server HTML to contain a matching <div> in <div>. And this one once: E...
Page with a Navbar with Next.js and React. Error: Hydration failed because the initial UI does not match what was rendered on the server
|javascript|reactjs|next.js|tailwind-css|
null
We are migrating Spring from 5.6.x to 6.2.x. We have SSO authentication and we use SAML2. What we noticed in production, few sessions were getting 401 and logs said "Failed to match SubjectConfirmationData@InResponseTo of: #RequestId#. I don't have any prior experience with Spring security but debugging this issue made...
Simply calling a character Arial does not make it happen, unless the font is "inside" the PDF and since you dont know if the character used by a client will be American or Armenian or Asian etc. You would need to include every font based character from around the World. So usually fields have no real characters other t...
Why are the Keras and Orange VGG16 outputs different and how to fix it?
|keras|vgg-net|orange|
null
A `<Link>` tag is typically used for linking to other documents, such as a CSS stylesheet. Whereas the <a> tag is used to link to an external page, such as `<a href="https://www.youtube.com"></a>` would take the user to YouTube.
We wrote a very simple console POC, we remove almost every line and the Main looks like this static void Main() { string _connectionstring = "Data Source=<name from TNS file>;User Id=<my user id>;Proxy User Id=<a service account>;Proxy Password=<the service account password>"; using (Oracl...
I am having issues with a query which includes BEGINSWITH (or CONTAINS for that matter). I am trying to follow the example as found in the Mongo Db documentation: This query to find instances of the \<Pantry\> model is not filtering the way it should. (all of this is in the viewModel) This is the query: ```...
What is a better way to allow no user input while also preventing non-number inputs
|python|exception|
null
XPath for job titles could be : `//div[@class="col-sm-9"]/a/@href` For job URLs : `//div[@class="col-sm-9"]/a/h2/text()` One liner for both : `//div[@class="col-sm-9"]/a/@href|//div[@class="col-sm-9"]/a/h2/text()` Results : href="/jobs/Business-Management/Contract/United-States-of-America/Virgi...
I have a page where I need to display posts, but I want to group these posts into chunks of 5 items each. For example, every 5 posts should be wrapped in a new <div> container. So every 5 posts I should have the following: **Blog.vue** ``` <div class="flex overflow-x-auto my-6 gap-4 md:grid md:grid-cols-3 ...
How to split posts into Chunks with Vue, Laravel, and Inertia?
|laravel|vue.js|inertiajs|
null
In more recent versions of CMake / MSVC use: set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY $<0:>) For building libraries, rather than executables, see: https://stackoverflow.com/a/78197002/3220983
The backspace doesn't modify the contents of the string, it just affects how the string is printed on a terminal. The string contains `o` followed by backspace. Since `o` is a word character and backspace is a non-word character there's a word break between them, so `\b` in the regexp matches there.
How to pass my variables in a for loop from one function to another [python]
|python|function|for-loop|
I have 'FloodWaitError' problems when I run the script below. The purpose of this script is to check Telegram group names against URLs specified in a database and update the status of groups in the database accordingly. The aim is to check whether the chain exists and then to scrap it. I've tried to introduce ran...
FloodWaitError with Telethon module
|python-3.x|telegram|telethon|
null
|ios|swift|iphone|core-telephony|
I don't think the symbol has a specific name, it is definitely a Sigma, just barred. If you want to draw this in LaTeX, you can use the math version of the `\Xlap` commands (where `X` is one of `l` `c` `r`) offered by the `mathtools` package, that allow printing a symbol without it taking any actual space. Here I u...
I want to populate my ListView with 16 names of districts from text file. But when I open page it shows 16 rows without content in ListView. Is there also any other option to display content of txt file line by line? I listed below those 16 names. The output: [![enter image description here][1]][1] My Code: ...
I have been trying to wrap a fortran module that takes several 1-dimensional arrays and returns calculated values CTP and HILOW. ``` subroutine ctp_hi_low ( nlev_in, tlev_in, qlev_in, plev_in, & t2m_in , q2m_in , psfc_in, CTP, HILOW , missing ) implicit none ! ! Input/Output Var...
I am encountering an f2py dimension error when passing numpy array to fortran
|python|numpy|fortran|f2py|
null