instruction stringlengths 0 30k β |
|---|
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']
... |
Very Late Answer!! Might be helpful to somebody in the same situation as myself.
I had a similar issue. I had configured all the tags properly. They were visible correctly in the 'Social Share Preview' extension during development. The tags were working fine for LinkedIn also. But they were not getting shared when u... |
Since you only want to read the url query parameters, useSearchParams is the hook for you.
Const searchparams = useSearchParams();
Const category =searchparams.get("category");
In next js 13 and above searchparams is removed from the useRouter hook. And instead useSearchParams in added and its read only.
Although ... |
I have a Grade Multi-Project Build, that consist of following projects:
- fk_core
- fk_database
- fk_product
- fk_backend
In the project `fk_product` i have defined a `QuarkusTest` that starts up a Testcontainers-Database and tests a Rest-Endpoint in this project.
To make this possible i needed to define the... |
If you want to use `SnackBar` inside `CupertinoApp`, just wrap your `CupertinoApp` by `ScaffoldMessenger`:
```dart
ScaffoldMessenger(
child: CupertinoApp(
...
)
)
```
Here working full example:
```dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// thi... |
|jmeter|beanshell| |
Can someone help me with finding out why I receive problems in VS code when coding in solidity even after installing the needed extensions?
I tried installing various different extensions individually and the issue persists. |
unexpected keyword or identifier .ts(1434) |
|node.js|visual-studio-code|solidity|keyword|uniqueidentifier| |
null |
I am building on the Twilio Rest Api v2 and Twilio Studio. For the purposes of my prototype/ demo, I have set up quick loop that is triggered by my Rest call. It asks the user for input 3 times, each time incrementing an parameter which I can print back to the user or send in an http body by typing: {{flow.variables.... |
I am using following generic interface to select matching key-value pair types of an interface:
```ts
interface DefaultParams<T> {
screen: keyof T;
params?: T[keyof T];
}
```
and I want to use it with this navigation types so that I can pass respectively matching values in my navigate function:
```ts
... |
TypeScript dynamically pick matching key-value pairs of an interface |
|typescript|typescript-typings|typescript-generics| |
null |
[enter image description here](https://i.stack.imgur.com/MEsn1.jpg)
I tried dash to panel, but it breaks the interface. The icons in the application menu have a jerky animation. I do not know why this is happening.
Is there any extension that hides the top bar if the app is open to full screen? |
In fedora Linux, Waydroid opens in fullscreen mode, but in gnome the top panel is not hidden |
|linux|fullscreen|fedora|gnome|waydroid| |
null |
I am using yarn workspaces in which I have 3 projects.
My-project
folder-1
folder-2
folder-3
Some devs work on folder-1, others on folder-2 and the rest on folder-3. The flow of the release is the following:
- PRs are created on feature branches and merged to develop.
- The... |
I am learning next.js and i am developing a project right now. I encountered a problem while learning next-auth and got stuck in the project :/
next.js version of my project is **14.1.4**
```
src\auth.ts:
```
```
import NextAuth from "next-auth/next";
import GoogleProvider from "next-auth/providers/googl... |
I have a Next.js app with the following structure:
```
.
βββ next.config.js
βββ src /
βββ app/
βββ page.tsx
βββ getYoutubeTranscript/
βββ getYoutubeTranscript.tsx
```
`next.config.js` has the following policy defined:
```
// @ts-check
/** @type {import('next').Nex... |
{"OriginalQuestionIds":[3127429,49023201],"Voters":[{"Id":943435,"DisplayName":"Yogi"},{"Id":354577,"DisplayName":"Chris"},{"Id":1048572,"DisplayName":"Bergi","BindingReason":{"GoldTagBadge":"javascript"}}]} |
0x402020 call Writefile
0x40202x return here
Call Writefile will push the return address 0x40202x before entering the Writefile
So on entry into the function
Esp + 0 will have 0x40202x the return address
Esp + 4 will hold hFile
Esp + 8 will hold LpBuffer
Eso + c will hold nNumberOfBytesToW... |
You can use the [JoinFaces](https://github.com/joinfaces/joinfaces) starter.
As written on [Mojarra](https://github.com/eclipse-ee4j/mojarra), you need more dependencies.
```gradle
implementation group: 'org.jboss.weld.servlet', name: 'weld-servlet-shaded', version: '5.1.0.Final'
```
Don't create FacesServlet yo... |
To better understand what happened I suggest you to make screen and save html.
If you'll do it you'll see that you need some time to wait (or sleep - not the best solution)
```
# save screen
driver.save_screenshot("webpage.png")
# save html
html_code = driver.page_source
with open("webpage.html", "w", encodi... |
I am trying to use the ProjecTILs package in R and when I try to generate radarplots they aren't "closed" - the first and last points are not connected so the internal shading is off. I have attached an example below. This is despite them appearing normal in any vignette I have seen for the package.
Does anyone hav... |
I'm looking for a solution to aggregate data quickly with a regular delta load of any updates to the transactional database.
We currently have the transactional DB and then a read-only replica, which is being used for our reporting, by changing the connection string to read-only application intent. This isn't ideal... |
{"Voters":[{"Id":13447,"DisplayName":"Olaf Kock"},{"Id":8398549,"DisplayName":"Cid"},{"Id":10008173,"DisplayName":"David Maze"}],"SiteSpecificCloseReasonIds":[18]} |
```
dplyr::filter(df, max(diff(Disease))>0, .by=ID)
```
Output:
```
ID Visit Disease
1 2 1 1
2 2 2 2
3 2 3 1
4 4 1 1
5 4 2 1
6 4 3 1
7 4 4 2
``` |
# pip install pycocotools
from pycocotools.coco import COCO
import json
def merge_coco_json(json_files, output_file):
merged_annotations = {
"info": {},
"licenses": [],
"images": [],
"annotations": [],
"categories": []
... |
You can create a database view that consolidates the columns from multiple tables and then query this view using Entity Framework.
**Create a Database View:**
CREATE VIEW YourEntity AS
SELECT Column1, Column2, Column3, Column4, Column5, Column6
FROM Table1
UNION ALL
SELECT NULL AS Colu... |
For avoiding [X-Y problem](https://xyproblem.info/):
The original question is, I want to develop a Java library in Java 21, but with support for Java 8.
Then, I want to release a Java library, with 2 different Java versions, 8 and 21, with one single repository (to avoid massive code duplication) and some configu... |
{"Voters":[{"Id":16217248,"DisplayName":"CPlus"},{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":10871073,"DisplayName":"Adrian Mole"}]} |
**encountering error while executing below query,can someone help with this?
**
```
encountering error while executing below query,can someone help with this?
<MERGE INTO {processed_db}.{processed_table} target
USING (
SELECT *
FROM (SELECT row_number() OVER (PARTITION BY {key}
ORDER BY COALESCE(transact_... |
I figured out how to do this. I have created two Boxes inside main Box (for the 1st half of the screen and for the 2nd half) and use detectDragGestures for them separately.
```
Box(
modifier = Modifier
.fillMaxHeight()
.width(screenWidth / 2)
.pointerInput(Unit) {
detect... |
I have a problem with my Python script, which is a Discord bot. The script detects an "Empty Message", even though the message that has been sent into the server does have content, which are commands. Is there a way to fix this? I haven't found one yet.
```
@client.event
async def on_message(message):
if mess... |
null |
Please advise how to control rows order in flextable.
For example, in the table [The Epidemiologist R Handbook](https://epirhandbook.com/en/index.html) the order of rows arranged in the ascending way, and Other and Missing rows in the midle of table. But I want to have these rows in the end. How to do this?
https... |
I have an Oracle SQL query that is giving me a "ORA-00918: column ambiguously defined" error on a line that is a comment line |
|sql|oracle-sqldeveloper|ora-00918| |
null |
First you can do a connection test from your client.
tnsping UWBSDBPROD
If this was successful try to connect with sqlplus
sqlplus whatsappdb/whatsapp@orcl
or
sqlplus whatsappdb/whatsapp@10.70.236.30/UWBSDBPROD
If you can connect with sqlplus, than there is probably a problem with the Larave... |
I'm encountering issues when trying to push changes to a Git remote repository using GitPython. I'm receiving two different errors intermittently, and I'm unsure how to resolve them.
**Error 1**
```Error lines received while fetching: error: remote unpack failed: index-pack failed
error: failed to push some refs t... |
Trouble pushing to Git remote using GitPython: "remote unpack failed" and "RPC failed; HTTP 500" |
|python|python-3.x|git|gitpython| |
I want to execute rsync to update several directories on another machine, without typing the password for each one of them. I decided to try the expect extension by following some simple StackOverflow examples. See below a very simplified version of my script. The rsync command works correctly when executed by itself. ... |
I am trying to install Google Assistant SDK on Windows following instructions at:
https://github.com/googlesamples/assistant-sdk-python/tree/master/google-assistant-sdk
It looks like some requirement not being satisfied is causing the installation to backtrack to version 0.3.3. Install log is pasted below. Can some... |
Installing Python Google Assistant SDK Backtracks to Unusable Older Version |
|python-3.x|windows|google-assistant-sdk| |
null |
I am trying to create a process where I upload certain editable pdf data parse through the editable pdfs and then arrange the data in a df. I have managed to read the data in the editable pdfs and get them into a df, but I have run into an issue where the names on the individuals are appearing across the df as columns ... |
how to pivot only specific columns in a python dataframe after being parsed from editable pdf's |
|python-3.x|list|dictionary|pivot| |
I am using the wordpress plugin Responsive Lightbox & Gallery and noticed that about a week ago all my galleries have disapeared. Each post has added rlevant shortcode, but the galley created with mentioned plugin isn't visible.
Example: https://3mwkuchni.pl/sniadania/pieczony-pasztet-do-smarowania/
Has anybody any i... |
Responsive Lightbox & Gallery issue |
|wordpress|plugins|gallery|wordpress-shortcode|lightbox2| |
null |
I am completely new to C# and Visual Studio.
I am trying to develop Azure Functions where whenever I hit the endpoint I get the following error message:
For detailed output, run func with --verbose flag.
[2023-12-06T09:16:43.271Z] Host lock lease acquired by instance ID '0000000000000000000000004FD42D6E... |
I am using microsoft aspnetcore identity, and since I need to add an additional property for my IdentityUser I need a customer register method.
```
[AllowAnonymous]
[ApiController]
[Route("api/[controller]")]
public class UserController : ControllerBase
{
private readonly UserManager<AppUser> _userManager;
... |
You can only **EMBED** Youtube videos in an *iframe* and it'll only work if they're not very popular (ie: most music videos with tons of views get blocked).
Here's how I do it, however... it is based on **data:text/html** to create a "openable" page on the fly and I'm not sure if this still works in the latest brows... |
You can only **EMBED** Youtube videos in an *iframe* and it'll only work if they're not very popular (ie: most music videos with tons of views get blocked).
Here's how I do it, however... it is based on **data:text/html** to create a "openable" page on the fly and I'm not sure if this still works in the latest brows... |
next-auth get and post problem: Cannot read properties of undefined (reading 'GET') |
|next.js|next-auth| |
null |
I have assembly A witch have reference to type T in another assembly B. But at runtime this assembly doesn't have that type, so I get `TypeLoadException`.
Is there any way to load T from my assembly without **(!)** recompilation of B?
I'm searching for managed solution (any runtime flavor) and without IL rewrite.... |
Custom type resolution |
|c#|.net|.net-core| |
I created [abstracttree](https://pypi.org/project/abstracttree/), which is a generic library for visualizing trees.
I tried it on your problem.
First create a nested subparser:
```python
parser = argparse.ArgumentParser(prog='PROG')
parser.add_argument('--foo', action='store_true', help='foo help')
subparsers =... |
I'm using the latest v123.0.60 with CefSharp.Wpf.ChromiumWebBrowser.
I am trying to post a form with LoadUrlWithPostData with a customize headers (mykey=value).
Couldnt find anything around it in documentation or chatgpt.
Can it be done at all?
Thanks.
LoadUrlWithPostData able to be posted with custom he... |
How do i customize headers when running with LoadUrlWithPostData |
|cefsharp| |
null |
[image](https://i.stack.imgur.com/MEsn1.jpg)
I tried dash to panel, but it breaks the interface. The icons in the application menu have a jerky animation. I do not know why this is happening.
Is there any extension that hides the top bar if the app is open to full screen? |
Quarkus Gradle Multi-Project-Build Modular Testing Build-Problem |
|gradle|quarkus| |
I have been trying do multi-level mixed effects model on the microbiome data I am working, but I keep getting the error below. What is frustrating is that, I don't encounter this error on my Windows OS which I use in the office, indicating that the problem may not be with the code. I am using a Mac OS. Someone should p... |
Error in running a multi-level mixed effects model on microbiome data |
|r|linear-regression|linear-programming|mixed-models|multilevel-analysis| |
null |
when the script tag in astro has the is:inline property, Astro does not post process that script as normal. That is, everything related to transpilation stops working to leave the file as it is, without any process. In this case the js imports are not carried out, nor are the css imports, etc...
Check the docs: http... |
{"Voters":[{"Id":4996248,"DisplayName":"John Coleman"},{"Id":14807111,"DisplayName":"Maik Lowrey"},{"Id":2602877,"DisplayName":"Christoph Rackwitz"}]} |
This is how mine looks:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
<key>get-t... |
I am running kali linux with vmware and when i use bettercap's net.show it only shows eth0 and gateway and it doesnt show all the devices connected to the network.
I did try turning net.probe on and i changed the vm settings to bridging but it still doesnt work,
any ideas how i can get other devices ips?βββββββββββ... |
net.show command only shows my own ip not other devices |
1. Please, delete your existing procedure `LogAction` and the actual content of `UserForm_Initialize` event
2. Please, insert a class module and name it "ClassLabelsEvents", then copy the next code inside its code module:
```
Option Explicit
Public WithEvents myLabel As MSForms.Label
Private Sub myLabel_Clic... |
I used your same example but I am getting an error
"message": "The application has encountered an error",
"type": "NullPointerError"
import requests
import json
import urllib.parse
query = "SELECT min({cart_pai.pk}) FROM {cart as carrinho JOIN cart AS ca... |
I am trying to prefill the shipping address section but I can't, I have passed multiple different parameters specifying the shipping address but each one throws an error saying unknown parameter, help!
Now I am adding these line because I am getting error while posting this question saying that it looks like your po... |
I'm switching my app from firebase web (V8) to react-native-firebase. (I figured it would be less work to refactor than going to web V9) But I have run into a problem.
I use Priority values to store a value that indicates ordering of objects in a realtime database container, and when I read the snapshot the priorit... |
Priority values missing from firebase realtime database DataSnapshot |
|firebase-realtime-database|react-native-firebase| |
I am trying to implement LIF neuron (with two delay constants alpha and beta,one for membrane potential and other for synaptic current),in verilog. Now how can I model a tau_m = 100ms in verilog (digital - so I have to subtract a value ). Is there any reference
I tried with existing codes but which leak value to be... |
Spiking neural network on FPGA |
|neural-network|verilog| |
null |
For me, it turned out to be some permissions, see [answers here][1]
Write in your VS Code terminal or Windows PowerShell:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
or
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
[1]: https://stackoverflow... |
{"Voters":[{"Id":14853083,"DisplayName":"Tangentially Perpendicular"},{"Id":4722345,"DisplayName":"JBallin"},{"Id":238704,"DisplayName":"President James K. Polk"}],"SiteSpecificCloseReasonIds":[18]} |
I'm using Tree-sitter to parse Python code and extract ASTs, and trying to manually traverse ASTs to infer types based on assignments and function definitions.
But I'm struggling with accurately resolving types (variables, functions, classes) due to Python's dynamic typing. Specifically, challenges arise with:
- In... |
I'm using Laravel 10 and have created an API using Laravel Sanctum. I want this local API to display a view in my controller. The API functions correctly when tested with Postman, but when it's called in my controller, the page fails to load and eventually times out. I have already set my memory limit in `php.ini` to 5... |
Prefill Stripe Shipping Address fields? |