instruction
stringlengths
0
30k
βŒ€
New Blazor Web App, Password Reset "A valid antiforgery token was not provided"
|blazor|.net-8.0|
I'm currently working on integrating Microsoft Graph APIs into my Java application to retrieve license details for users in my Microsoft 365 tenant. I referred to the official Microsoft documentation [here](https://learn.microsoft.com/en-us/graph/api/user-list-licensedetails?view=graph-rest-1.0&tabs=java) to understand...
mp4 embedded videos within github pages website not loading
|javascript|html|css|github-pages|embedded-video|
null
It's an array of pointers to C strings (or char arrays). Where each string in the array is in the first[] and each character is in a second [], and each string of chars is an array of characters typically terminated by a null character or a zero byte. In main() the argc parameter specifies how many strings there ar...
The issue with your regex is that you have `\d` and `\)` which appear in the regex as `d` and `)` (due to string parsing prior to the regex engine) the latter then causes an "unmatched closing parenthesis" error at the next `)`. You need to escape the `\` to ensure you get `\d` and `\)` into the regex i.e.: ```regex ...
When you are using Express edition you can try this: #if DEBUG if (fooVariable == true ) System.Diagnostics.Debugger.Break(); #endif The **#if-statement** makes sure that in the release build, breakpoint will not be present.
I understand that a ternary conditional operator can be used to shorten the following: if x > a: y += 12 else: y += 10 re-written as: y += 12 if x > a else 10 Is there something to shorten a statement if it's just the if portion with no else? i.e.: if x > a: y += 12 can be re-written a...
Having trouble implementing Microsoft Graph Java SDK to list licenses assigned to user
|java|charts|licensing|azure-java-sdk|azure-identity|
null
I have an xarray.Dataset that looks like: print(ds2) <xarray.Dataset> Dimensions: (time: 46, latitude: 360, longitude: 720) Coordinates: * time (time) datetime64[ns] 1976-01-01 1977-01-01 ... 2021-01-01 * latitude (latitude) float64 89.75 89.25 88.75 ... -88.75 -89.2...
How to add a new variable to xarray.Dataset in Python with same time,lat,lon dimensions with assign?
|python|dataset|python-xarray|assign|
I know my answer is not about fixing certificate validation from the source but the google landed me here because an error message I faced was the same. Given: 1. Windows 10 2. company's proxy behind (don't know exactly what's going on behind corporate's network but have Symantic Endpoint Protection is being ...
Basic Python Question: Shortening If Statements
|python|if-statement|conditional-statements|conditional-operator|
null
You can use `printf` with the space and then a separate line feed. Also `putchar` is a thing. Furthermore you should keep stack 16 byte aligned and using the exit syscall is bad practice. A possible solution: extern printf extern putchar global main section .data format_specifi...
- In Desktop (The emulator turns on automatically) [npm start video](https://youtu.be/uUhNKguiao4) [terminal(?) image](https://i.stack.imgur.com/k913N.png) [emulator image](https://i.stack.imgur.com/GY4MG.png) - On the laptop After turning on the emulator can activate the React-Native Which ...
I have a list of items which i am able to drag and drop. When picking up the item it's hidden and i want to it to be revealed again on released wherever even outside the app window. Im using onDrag and am yet to find a way to detect when the item is released except when in a .drop area.
When using onDrag in SwiftUI on Mac how can detect when the dragged object has been released anywhere?
|swift|macos|swiftui|
null
How to extend Navigation View to show beyond safe area in swiftUI
I understand that a ternary conditional operator can be used to shorten the following: ``` if x > a: y += 12 else: y += 10 ``` re-written as: ``` y += 12 if x > a else 10 ``` Is there something to shorten a statement if it's just the if portion with no else? i.e.: ``` if x > a: y += ...
I am using xml-crypto version 6 to digitally sign xml in nodejs. But the package automatically add `Id="_0"` and `URI="#_0"` attribute to the elements being signed. Can anyone one help how to disable the addition of attributes. I am trying to digitally sign a xml code using `pem` file with the `xml-crypto` packa...
null
Right click on InvokeAsync in the controller and from there create a view it will work
Try this ```dart class MyCustomClipper extends CustomPainter { @override void paint(Canvas canvas, Size size) { Path path_0 = Path(); path_0.moveTo(111.858,1.73511); path_0.lineTo(111.434,1.05619); path_0.lineTo(111.01,1.73512); path_0.lineTo(107.096,8); path_0.lineT...
I have created a report with JasperReport, when I tried it on localserver everything went well. However, when I tested on the server, the following error occurred. "Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextPars...
Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: . .
|java|spring|spring-boot|jasper-reports|
null
while in a specific page i need to know the name of the page, which was set by named routes. i caould know with normal 'context', but i couldn't do using global context. my code: ``` // ModalRoute.of(context)?.settings.name with global context, trying! import 'package:flutter/material.dart'; void main(){runA...
flutter, find route name of a page using global context while using named routes
|flutter|navigation|
null
I have used recast for my code generation with babel as i have checked it is compatible with babel but recast is removing all my comments Here is my recast code const generatedAst = recast.print(ast, { tabWidth: 2, quote: 'single', }); I am passing AST generated from ba...
I am using the [Llama-2-7b-hf][1] model with the `model.generate` function from the transformers library (v4.38.2) and it's returning the outputs as a single tensor, instead of the dict I expected. I have a copy of the model stored locally: ``` [Llama-2-7b-hf]$ ls -1 config.json generation_config.json LICENSE.t...
meta-llama/Llama-2-7b-hf returning tensor instead of ModelOutput
|huggingface-transformers|llama|
You have to manually change data in double list comprehension: L = [b['Conversion'] for k, v in input['data'].items() for a, b in v.items()] print (L) [{'id': '1', 'datetime': '2024-03-26 08:30:00'}, {'id': '50', 'datetime': '2024-03-27 09:00:00'}] out = pd.json_normalize(L) ...
I want to use Web Audio API to simulate sound like guitar or something. Currently, I am using OscillatorNode to make sound by changing frequency. But I have no idea which node should I use and how to use it to make sound like guitar or something. Should I change waveform or what? and how? Here is some reference ...
|html5-audio|
Whether a thread created using Linux's pthread library is a user-level thread or a kernel-level thread? I hope to get a professional answer to this question. Because I've heard that different versions of the Linux kernel as well as different compiler versions can have an impact on the answer to the question.
thread created by pthread in Linux belongs to ULT or KLT?
|linux|pthreads|
null
I am store ~1500 last events in Redis in soreted set. When set is more than 1500 elements, which is better (least loaded) way to clear first events? Im using redis:6.0.2 Several options come to mind: 1. Simplest is using something like CRON or some interval to clear it 2. Using some global count and incremen...
To simplify the example, I consider a dataframe with 3 10-Q and 2 10-K entries for each of two values of *cik*. I'll filter for the 2 most recent 10-K rows and the most recent 10-Q row for each group defined by *cik*. ```python import polars as pl import datetime df = pl.DataFrame({ "cik": [0] * 5 + [1] *...
I understand that a ternary conditional operator can be used to shorten the following: ``` if x > a: y += 12 else: y += 10 ``` re-written as: ``` y += 12 if x > a else 10 ``` Is there something to shorten a statement if it's just the if portion with no else? i.e.: ``` if x > a: y += ...
{"Voters":[{"Id":5910058,"DisplayName":"Jesper Juhl"},{"Id":3581217,"DisplayName":"Bart"},{"Id":6752050,"DisplayName":"273K"}]}
I am trying to find the numbers that ends with 4 in a list of numbers. I tried the following code but getting an error message saying *TypeError: list indices must be integers or slices, not str* ``` x = [12, 44, 4, 1, 6, 343, 10, 34, 12, 94, 783, 330, 896, 1, 55] x_str = list(map(str, x)) for ele in x_str: ...
This is my (untested) code to perform this operation on nested directories: def latest(file: File): File = if (file.isDirectory) { latest(file.listFiles.maxByOption(_.lastModified).getOrElse(file)) } else { file } This is tail recursive and will compile to a simple loop.
I'm developing a web compiler in TypeScript and I've encountered a small, but still irritating issue: I have a progress bar inside an iframe element which keeps rendering for a short amount of time. I want that progress bar to be rendered only when there's a code bundling process. Here's a piece of that TypeScri...
Persisted progress bar
|typescript|react-hooks|react-typescript|
null
I receive a file from a third party. The file seems to contain both ANSI and UTF-8 encoded characters (not sure if my terminology is correct). Changing the encoding in Notepad++ yields the following: [![Notepad++ screenshot][1]][1] [1]: https://i.stack.imgur.com/G0hcd.png So when using ANSI encoding, Em...
The IsShuttingDown property is an internal static property of the Application class therefore you can access to value it with below code var isShuttingDownProp = typeof(Application).GetProperty("IsShuttingDown", BindingFlags.Static | BindingFlags.NonPublic); var isShuttingDown = isShuttingDownProp.GetValue(Applicati...
{"Voters":[{"Id":23918954,"DisplayName":"payam jabbari"}]}
Recently I Found This Error For log in to my mysql and mariadb on My UnixBase MacOS. And i try similar Ways in StackOverFlow To fix this problem. but problem not solved. [![Terminal Error](https://i.stack.imgur.com/YfKZl.png)](https://i.stack.imgur.com/YfKZl.png) i try systemctl to check mariadb or mysql is runn...
Can't Fix Mariadb & Mysql ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2) On MacOs
|mysql|mariadb|
null
I am using this code to generate an automatic table of contents in docx ``` <w:sdt> <w:sdtPr> <w:alias w:val="Summary" /> </w:sdtPr> <w:sdtContent> <w:p> <w:r> <w:fldChar w:fldCharType="begin" w:dirt...
How can I create an automatic table of contents in docx without the text being bold?
|xml|ms-word|ms-office|openxml|docx|
I have got the code for a react native app, and want to publish this to appstore. After importing into Xcode, opening the ios folder I am running into over 200 Yellow warnings and 15 Red warning. I dont know if this means that there is an issue with react code or just how i have set it up. Currently the warning i am ge...
List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
|python|
Trying to put multiple arguments into a string in Bash is generally not a good idea. Sometimes the only way to make it work is to use `eval`, and that often just gives you more problems (some of which may be very unobvious). See [Why should eval be avoided in Bash, and what should I use instead?](https://stackoverflo...
I have an array like this: $sports = array( 'Softball - Counties', 'Softball - Eastern', 'Softball - North Harbour', 'Softball - South', 'Softball - Western' ); I would like to find the longest common prefix of the string. In this instance, it would be `'Softball - '` I am thi...
|php|string|algorithm|prefix|
The code setup is as follows: - Module ui_theme.py defines a theme and variant selector. - variant_selector has an on_change event handler. - Module cards_page.py imports ui_theme.py and has a handler on_variant_change. Now, what I want to achieve that when ui_theme.on_change event is invoked then it should ...
I was trying to run this java code as a script to generate sub-classes in /home/ankit/Dev/Zealot/com/piscan/Zealot directory. But it is not running and constantly giving the same error. This is the error: cd "/home/ankit/Dev/Zealot/com/piscan/tool/" && javac GenerateAst.java && java GenerateAst Error: Could...
`char *second = "test5";` initializes `second` to point to the first character of the array created by a string literal. About string literals, C 2018 6.4.5 7 says: > … If the program attempts to modify such an array, the behavior is undefined. Since your program attempts to modify the array when it calls `strcpy...
Well I'm trying to enable my users to login with their gmail accounts like I saw in some sites on the top right of the browser windows as I show in the image. The only thing I could get searching was use the Google Sign-in API but that let me create a button which open a popup with my accounts but I want to show it whe...
Google sign-in in web site detecting user accounts and display in iframe/popup
|html|google-signin|
Detect click outside multiple components
You have to manually change data in double list comprehension: L = [b['Conversion'] for k, v in input['data'].items() for a, b in v.items()] print (L) [{'id': '1', 'datetime': '2024-03-26 08:30:00'}, {'id': '50', 'datetime': '2024-03-27 09:00:00'}] out = pd.json_normalize(L) ...
null
As others mentioned before, in 2 steps: 1. Dex2jar 2. Pick up a decompiler I will focus on step 2. Take a look at this research paper : [The Strengths and Behavioral Quirks of Java Bytecode Decompilers][1] Understand the strength and weaknesses of each decompiler. 1. [CFR][2]: Considered by many as t...
|javascript|typed-arrays|
null
Single backtick is working in the browser or anywhere else with the combination Shift + ^ but in VSCode I am unable to type a single backtick, I need to do this combination twice & get 2 backticks and the cursor jumps to the right of the second backtick then when I try to go back with the left arrow key I get a special...
Enviroment: Linux Subsystem for Windows, Ubuntu 20.04. What I want to achieve is to make my buttom split smaller. [After using Shift+F2](https://i.stack.imgur.com/cYrL2.png) And I just couldn't use the hotkeys `Shift+Alt+[←↑→↓]` to resize. Along the way of finding a solution, I suddenly recall that I can ...
Couldn't Use Shift+Alt+[←↑→↓] to Resize the Splits in Byobu
|bash|ubuntu|terminal|hotkeys|byobu|
null
I'm probably missing something obvious or simple, but i'm struggling to add an 'if self.cut_scene_manager.cut_scene is None:' into my input of my player class Here is my main.py and player.py: ``` import pygame import sys from settings import * from level import Level from player import Player from npc impo...
creating cutscenes using OOP and pygame
|python|oop|pygame|
null
{"Voters":[{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":1940850,"DisplayName":"karel"},{"Id":1377002,"DisplayName":"Andy"}],"SiteSpecificCloseReasonIds":[13]}
When attempting to SSH into a remote host, if you encounter an issue where the connection fails with an error message, it's possible that the host's key has changed since the last connection. One solution to resolve this issue is to remove the entry associated with the remote host from the `known_hosts` file. Here a...