instruction
stringlengths
0
30k
I am using latest version of primeng i.e 17. While searching in autocomplete after selection of 2-3 items the size of suggestion panel reduced to almost 0. Still the items are present but they are not properly visible. Any particular solution for this ?
Issue in p-autocomplete virtual scroll in primeng 17
|primefaces|primeng|angular17|
I am very new with power BI and I need dynamically calculate with DAX the distinct count of client that have spend in the analyzed period more than zero. In the example below if in the report I have the store I expect zero client for store A and 1 for store B. I am not able to have the total spend in the table because...
|python|python-import|relative-path|python-packaging|relative-import|
I have a time series with values every 5 minutes. I want to upsample it to have values every 10 seconds (the last known value is repeated) so that I can combine these values with values from another time series providing values every 10s. How do I do that? Is that even possible? Would it be easier with PromQL in Pro...
How to upsample a time series using Flux (or InfluxQL if easier)?
I want to do this [![Text with different colors][2]][2] from this view model public class MainWindowViewModel : ViewModelBase { public ObservableCollection<TextRun> RunList { get; set; } public MainWindowViewModel() { RunList = new ObservableCollection<Tex...
I am developing website to navigate a sample Mastercard payment gateway and I want detect order id after the payment. In my code I set functions (callbacks) beforeRedirect , afterRedirect and completeCallback (Javascript functions) mentioned in documentation. I add js alerts for all functions to check they are wo...
Why some functions not working when navigate to the payment gateway?
|javascript|php|html|payment-gateway|mastercard|
I followed the readme of grpc-web [helloworld example][1] to setup a local Javascript client that talks to Greeter grpc service using the protoc generated JS client stub via envoy proxy. I switched out the nodejs grpc server with a grpc-java server implemented from the **Greeter.proto** and its working fine. [![ente...
grpc-web js client request to grpc-java backend server fails when using nginx instead of envoy
|java|nginx|grpc|grpc-java|grpc-web|
|python|python-3.x|pandas|
Your question explicitly asks for an MVVM compliant way to handle attached UI events (or UI events in general) in the application view model. There is none. Per definition, the view model must not participate in UI logic. There is no reason for the view model to ever handle UI events. All the event handling must take p...
I keep coming up against this issue, so I would be grateful for shared insights from the resident experts. I can't be the only one who keeps encountering this. I know I'm using old hardware, but I'm interested in the relevant issues for this sort of hardware and newer. I'm using a 3.2 GHz Ivy Bridge Xeon with 32 GB ...
Custom FormRequest redirects to web route in Laravel 11
|php|laravel|
In Flutter, is there a way to determine the user's skin color settings for their emojis?
I am using Next.js 14 with App Router. This works both for `/@username` and nested paths like `/@username/about`: ```js const nextConfig = { async rewrites() { return [ { source: '/@:username/:path*', destination: '/users/:username/:path*', }, ] }, } ```
The Compose documentation e.g. [here][1] mentions, that `Modifier.drawBehind` only affects the drawing phase, other phases are not re-executed when this modifier changes. But how does Jetpack Compose know that e.g. `Modifier.drawBehind` only affects the drawing phase? [1]: https://developer.android.com/develop/...
{"Voters":[{"Id":2675154,"DisplayName":"honk"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":14732669,"DisplayName":"ray"}],"SiteSpecificCloseReasonIds":[16]}
Pre-compile the expression and its Jacobian to function objects, then pass them into `minimize`. Note that it attempts to be somewhat smarter than your intended gradient descent which may or may not be helpful; this defaults to Kraft's sequential least-squares programming method. ```python import string import n...
The default values of **BlockDeviceMappings** in json format is: ```json BlockDeviceMappings: [{ DeviceName: '/dev/sda1', Ebs: { DeleteOnTermination: true, SnapshotId: 'snap-06e838ce2a80337a4', VolumeSize: 8, VolumeType: 'gp2', Encrypted: false, }, } ``` Notes: - SnapshotId...
I need to write a function in JavaScript for calculating the in-tangents and out-tangents of a cubic Bézier curve, knowing the following: start control point (x1, y1), end control point (x2, y2) and end point (x, y). Please help!
JS function for calculating tangents in a cubic Bézier curve
|derivative|cubic-bezier|
I am trying to make a PDF generator based on a html files using Google Apps Script. Unfortunately I am not able to apply custom font for this. I came up with the idea to load the font in base64 format, but it is not working for me. What am I missing? I have tried to use `@font-face` with google fonts, but it seems...
How to use custom font during html to pdf conversion?
|html|css|google-apps-script|pdf|base64|
null
I have a dataframe from a CSV file with fields for latitude and longitude. I want to convert the df to a geodataframe of points with the lat and lon fields. When I map the points, the points show up in the wrong place (i.e., middle of the ocean). I checked my gdf against another version of the gdf and confirmed that...
Python Geopandas unable to convert latitude longitude to points
|python|geopandas|
null
It looks like you use `push` to add children to `Data`, which means you can use this approach to get only the most recently added child node: dbReference = db.getReference("Data"); Query query = dbReference.orderByKey().limitToLast(1); query.addValueEventListener(new ValueEventListener() { ......
Data binding the TextBlock Runs in Avalonia
|c#|wpf|data-binding|avaloniaui|avalonia|
I want similar functionality of scrolling section to section using window.addEventListener('scroll', function); in my nextjs app similar to https://www.elsner.com/ . Please look into this while i am using scroll it conitnously scrolling to sections to sections. My Code: const options = { root: null, ...
I am new to lasio so maybe I am missing some existing parameter. All I want to do is read a LAS file , make some changes in well, curve , parameter and other section and write them back to LAS files. But the issue is during writing operation all commented out lines are getting removed as they were not read by la...
Using lasio.read() , read commented out lines(#) and preserve those lines while writing to Las
|python-3.x|las|
null
I am a super beginner to programming so I have had ChatGPT help me build this toolbox. The one thing I cannot get to work right now is having a few buttons ping servers (localhost for testing) and display the response to the front end. Anything I am missing here? ``` <h2>Server Status:</h2> <div class="but...
You can use [`Series.str.extract`](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.extract.html) like so: ```python df["Alternative"] = df["Desc"].str.extract(r"(\d{8,12})") ``` This applies the regex `r"(\d{8,12})"` ([explained here](https://regex101.com/r/Hndt1Z/1)) over each row. The values in...
Create a middleware.ts (or .js) in the root of your project. (https://nextjs.org/docs/app/building-your-application/routing/middleware) import { NextResponse } from 'next/server'; export function middleware(request: Request) { const requestHeaders = new Headers(request.headers); requestH...
const imageUpdater = async (imagePublicId, imagePath) => { try { const result = await cloudinary.uploader.upload(imagePath, { public_id: imagePublicId, }) return result } catch (error) { throw new AppError( StatusCodes.BAD_REQUEST, ...
In know MySQL (MariaDB) functions and the case statement but how to combine the two? I'm implementing a TO_STR translate function where I don't want to pollute the database with addtional tables. This is what I tried: ```SQL CREATE FUNCTION CODE_TO_STR(CODE CHAR(4)) RETURN VARCHAR(50) AS BEGIN RETURN SELECT C...
How to use a case statement in mysql function
|mariadb|mysql-function|
No, it's a division by zero error, which means that you at some point try to perform this pattern ``` a / b ``` where `b` is 0. In mathematics division by zero is a special problem. Let's suppose that you divide a / 0 and let's suppose its result is r: a / 0 = r Now, let's multiply the equation with 0,...
[![enter image description here][1]][1] i used the above code in selenium 4.16.0, chrome-120.0.6099.217 ```python from selenium.webdriver.edge.service import Service service_obj = Service() driver = webdriver.Chrome(service=service_obj) driver.get("https://google.com") ``` [1]: https://i.stack.imgur...
In accountsList.vue i call the following script where i commented a lot out because im doing a serious refactor and i wanted to isolate the problem. "balance" has a proper value and is set, i checked. <script setup> import Account from "@/Pages/Partials/AccountItem.vue"; import {UseAccountsStore} from ...
null
null
I'm trying to execute `kubectl` commands in python ```python process = subprocess.run(["kubectl", "get", "pods", "-n", "argocd"]) ``` which throws error: ```none __main__ - INFO - E0328 08:18:04.126243 25976 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?ti...
|java|android|firebase|firebase-realtime-database|
null
null
null
null
The answer is to use the following schedule: `0 0/3 * * *` in conjunction with an appropriate `start_date` and `end_date`. I used [crontab.guru][1] to design the CRON expression. You can click on the `next` button to have examples of the following executions. [1]: https://crontab.guru/#0_0/3_*_*_*
I need the Birt.war that is compatible with JAVA 17 and Tomcat 10. We have a birt.war file but it worked with JAVA 8 and its ancient. I need a new one or preferably the project so I can build it myself. All the links I see for the birt war say file unavailable. Can some one please help me by posting a link to a birt wa...
I need the BIRT.war that is compatible with Java 17 and Tomcat 10
|java|eclipse|birt|tomcat10|
null
Having prepared a snippet, I can see that it is working. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> // SET POPUP(TARGET) BEHAVIOUR WHEN CLICKING A MATCHING TRIGGER ID $("[id^='trigger-']").on("click", function() { var id = parseInt(this.id.repl...
I have not been able to make it work with the 'username + password' overload of the `Credentials` class. I did manage to get the intergration to work with a Github Personal Access Token. 1. Create a Personal Access Token (PAT) in Github (source: https://docs.github.com/en/authentication/keeping-your-account-and-...
[enter image description here](https://i.stack.imgur.com/sojTu.png) This is error i got( i have attach the image too) App.jsx:14 [2024-03-30T14:08:58.599Z] @firebase/firestore: Firestore (10.10.0): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=permiss...
recently i have tried to connect vite and firebase but at end i got this error i dont know to solve this
|reactjs|firebase|vite|
null
I want to create a form in contact form 7 that is able to change the response in a filled field to standard text in the output email. The form is - for example - about buying/selling cars. In the label there's a question "are you looking for a car at the moment?. In the field there is a dropdown menu yes/no. The o...
You are looking for [`mapslices`](https://docs.julialang.org/en/v1/base/arrays/#Base.mapslices): julia> mtx = [1.0 8.0;-Inf 5.0;5.0 -Inf;9.0 9.0] 4×2 Array{Float64,2}: 1.0 8.0 -Inf 5.0 5.0 -Inf 9.0 9.0 julia> mapslices(sortperm, mtx; dims=1) # apply...
null
I have a Word VBA Macro in which I the requestbody of a httpRequest is a JSON string.:- ``` ' Compose the request body Dim requestBody As String requestBody = {"message":{"subject":" & subject & ","body": {"content": " & body & ","contentType": "Text"},"toRecipients": {"emailAddress": {"address": " & recipi...
VBA JSON String
|json|vba|
null
I have been stuck on this all day and would really appreciate some help. I have a table which I created in Power Query and have loaded this into an Excel worksheet named "Pay Com". To this table, I have added 2 slicers - one for Job and the other for Country. The filters work fine on the table. I am trying to a...
Propertu in Pina returns null after setting the value
|laravel|vue.js|pinia|
found the solution: just dismiss keyboard to lose focus: useEffect(() => { const keyboardDidHideListener = Keyboard.addListener( 'keyboardDidHide', Keyboard.dismiss, ); return () => { keyboardDidHideListener.remove(); }; }, []);
Trying to make a short example with django 5 async signal. Here is the code: View: ```python async def confirm_email_async(request, code): await user_registered_async.asend( sender=User, ) return JsonResponse({"status": "ok"}) ``` Signal: ```python user_registered_async = Signal() ...
Django 5 signal asend: unhashable type list
|python|django|python-asyncio|django-signals|
Why do we need to add paranthesis when adding function as an expression to lambda? def print_(): print('hello') show = lambda: print_ show() gives ```<function print_ at 0x0000019046503560>``` whereas show1 = lambda: print_() show1() gives ```hello``` Why t...
Why do we need to add brackets to lambda functions?
|python|lambda|
You are closing the plotter inside the loop.. Consider these options: ```python from vedo import * meshes = load("letter_*.vtk") # sort is done automatically plotter = Plotter(axes=1) for i, m in enumerate(meshes): m.pos([i*2000, 0, 0]).color(i) plotter.show(meshes).close() ``` [![enter image description...
How to add default text in output to filled fields in Contact Form 7
|wordpress|forms|webforms|contact-form-7|contact-form|
null
How to solve this problem ![enter image description here](https://i.stack.imgur.com/kX7Fy.png) ``` [root@iZf8z8ooxm0rsr5hsejg0iZ config]# docker exec -it mosquitto sh / # mosquitto -v 1711804289: mosquitto version 2.0.14 starting 1711804289: Using default config. 1711804289: Starting in local only mode. Conn...
In React, with the React Pro Sidebar, using something like updating on `document.body.scrollHeight` worked for me: ```jsx const [viewHeight, setViewHeight] = useState< string | number >("100vh") useEffect(() => { setViewHeight(document.body.scrollHeight) }, [document.body.scrollHeight]) ... return ...
I have one NFSv4 server (Debian 11) and two client machines (Debian 11) which are mounting a NFS share exported by the server with `all_squash` option. I set the `all_squash` option because the two client machines have one user with same name but different UID. As addition to `all_squash` i set the `anonuid` and `anong...
Restrict user access on mounted NSFv4 share with all_squash option
|debian|nfs|uid|
I'm using the firestore emulator and exists isn't preventing calls when the document exists. ``` match /usernames/{username} { allow update: if false; allow create: if isUsernameAvailable(request.resource.data.username); function isUsernameAvailable(rawName) { let name = rawName.lower...