I had such a need recently and wrote a small program to estimate the compressed size of directories. After testing various approaches, I found that sampling and compressing fractions of files to be the most accurate - the trick, I found, is in the sampling strategy. Wrote zip-sizer, a small go program, to solve the problem mostly for my personal use. I made releases for windows/mac/linux. Note though, this estimates only for gzip and bzip2, not zip as you require; but you can get a rough idea. (There is also a prototype python script in the "python/" directory that does the same thing; runs with just the stdlib). Hope you find it useful.
Just had this issue and couldn't find any solid info on it. Make sure that icon on the right side of this input field for files to exclude
is enabled. It toggles the global exclude rules within the results.
I just had same problem. Tried everything, including deleting contact & re - entering. My sent emails to this particular new address kept returning. I then sent same address from a secondary email address I have & the email went through. So , yes it seems the comma isn't the issue & I noticed it appearing on other addresses that I know do work. Must be some issue with my email address I was trying to send from. Whether the receiving address was blocking in some way ?
There is a way to populate a text at the scanner.nextLine() prompt that can be edited by the user.
I'm using this in a console application that prompts for a message with a specific max length. If the user enters a longer message an error message will be shown and the entered text is populated at the next scanner.nextLine() prompt iteration, so the user must not enter the whole message again and can edit it instantly.
The "trick" is to set the entered message to the system clipboard and paste it to the console using keyPress() method of the Robot class.
First we will need a method to set a string to the system clipboard.
public static void setClipboard(String str) {
// set passed string to clipboard
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(str), null);
}
Next there is a method needed that triggers the ctrl + v key press.
public static void pasteClipboard(int i) {
// triggers ctrl + v key press and release after a delay of i milliseconds
try {
// list containing ctrl + v key events
List<Integer> keys = new ArrayList<Integer>(List.of(KeyEvent.VK_CONTROL, KeyEvent.VK_V));
Robot robot = new Robot();
/*
* Passed integer argument to set a delay in milliseconds
* (a value of 50 is recommended) to make sure pasting the
* clipboard AFTER the System.out print streams are written out.
*
* QUESTIONS:
*
* Without any delay the clipboard will be pasted BEFORE
* the System.out print streams, starting from the 2nd iteration
* though this method is called AFTER the print calls, but why?
*
* Is there a way to achieve the correct behavior without any delay workarounds?
*
* The following has already been tried, always with the same faulty result:
*
* - using a while loop instead of recursion
* - flushed the output stream before calling this method
* - separating the print calls in a thread and waiting til it's finished
*/
robot.delay(i);
// key press sequence: ctrl, v
for (Integer key : keys) {
robot.keyPress(key);
}
// reversing the keys list especially to release the ctrl key
Collections.reverse(keys);
// key release sequence: v, ctrl
for (Integer key : keys) {
robot.keyRelease(key);
}
} catch (AWTException e) {
e.printStackTrace();
}
}
Please note the comments in my code. Is anybody out there who can explain / answer my questions?
Now we are coming to the method including all that stuff like message output and the whole logic part of checking the users input. It's built as a recursive method but can be built as a while loop, too.
public static String enterMessageRecursion(Scanner input, String msg, int maxlen) {
/*
* ANSI escape codes are used for styling the output:
*
* \033[1;97;41m = red background + white bold bright foreground
* \033[1;97;42m = green background + white bold bright foreground
* \033[1m = bold
* \033[0m = reset to default
*/
System.out.println(String.format("Please enter a message (%smax. %s chars%s):",
"\033[1m", maxlen, "\033[0m"));
if (!msg.isBlank()) // true if the user entered message is too long
pasteClipboard(50); // triggers ctrl + v key press with a delay of 50ms
msg = input.nextLine(); // scanner awaits user input
if (msg.length() > maxlen) {
// set message to clipboard if it's greater than the max message length
setClipboard(msg);
/*
* print out error message and continues with the next call of this method
* (see return statement)
*/
System.out.println(String.format("%sThe entered message is too long (%s chars).%s",
"\033[1;97;41m", msg.length(), "\033[0m"));
} else if (!(msg.isBlank() || msg.length() > maxlen)) {
/*
* At this point the message is not blank or not greater than the max message length,
* means the entered message is valid. This is the end of the method and recursion.
*/
System.out.print(String.format("%sThe entered message is valid (%s chars).%s",
"\033[1;97;42m", msg.length(), "\033[0m"));
}
// recursion til message is not blank or not greater than the max message length
return (msg.isBlank() || msg.length() > maxlen)
? enterMessageRecursion(input, msg, maxlen) : msg;
}
Finally we need a main method of course. Pretty straightforward and nothing exciting in here.
public static void main(String[] args) {
String msg = ""; // user message
int maxlen = 20; // max message length (chars)
Scanner input = new Scanner(System.in);
enterMessageRecursion(input, msg, maxlen);
input.close();
}
The result should look like this:
Important to know for adapting the code is that you need setClipboard() to set the clipboard to the string you want to populate at the scanner prompt. After printing out your prompt message right before your scanner.nextLine() call do pasteClipboard(50) for triggering the ctrl + v key press that should paste the string from the clipboard to the console. This string is editable by the user.
I tried to understand the algorithm involving bit operation, and end up with a doubt is this really useful ?
So first explaining how i understand the algorithm :
var bytes = new Byte[8];
rng.GetBytes(bytes);
This a simple "generate me 64 random bits", and it give a 8 bytes array.
var ul = BitConverter.ToUInt64(bytes, 0) / (1 << 11);
Well here is unnecessary divide operation as stated by the author himself in comment.
But I'll explain how i understand it :
given or 64 bits randomly generated, convert them as an unsigned 64 bits integer. For example
00011101_11100010_00000000_00001001_11101111_11100100_11110000_01011011
perform a left shift bit operation on 1
. Given we are working on 64 bits, it would result with 00000000_00000000_00000000_00000000_00000000_00000000_00001000_00000000
(52 0
, a 1
and 11 0
)
Divide 1. by 2., which as a 2 64 bits numbers is a same as performing a right shift bit operation on 1. by same 11 bits shift.
So in fact the result is 1. but with 11 0
bits first, and with the last extra 11 bits of 1. being discarded :
00000000_00000011_10111100_01000000_00000001_00111101_11111100_10011110
Double d = ul / (Double)(1UL << 53);
This was the must perpetuating part, because it used the same math operation pattern, and so you might be tricked to think in bit operation again.
But it is not the case anymore because using a double
cast here we are leaving the bit world to double one.
So here is a simple common divide operation on 2 doubles (the ulong
result in 4. is implicitly converted to double at this step if I'm right).
And understanding the 1UL << 53
is also tricky here because you have to understand the left (and right) shift bit operation only consider the last 5 bits of the right operand on 32 bits world (int
, uint
...), whereas it take the 6 last bits in 64 bits world (long
, ulong
, ... ). And as 53
in binary is 00110101
performing a left shift bit operation on 1
(implicitly a int32
) would consider only the last 5 bits of 00110101
=> 00010101
= 21
. In order to correctly left shift 53
bits, you have to use 1UL
instead to be in 64 bits world.
So here we are transforming 1UL
in 00000000_00100000_00000000_00000000_00000000_00000000_00000000_00000000
(10 0
, a 1
and 53 0
)
Then come the double
casting. But as you can see, 4. (1. right shifted 11 bits) result at most (if 1. is by chance only 1
bits) as :
00000000_00011111_11111111_11111111_11111111_11111111_11111111_11111111
Which is exactly (1UL << 53) - 1
!
So by dividing 4. result to 1UL << 53
we are simply dividing a random 53
bits binary number to its maximum (excluded) value !
---------------------------------
So here is my doubt after all this.
If this previous understanding is correct, then, why not simply create a random ulong
integer like done here, and simply directly dividing it by its maximum value (if a potential issue is overflowing 64 bits, then consider generating a 63
bits integer and dividing it by System.Numerics.BigInteger.Pow(2, 64)-1
instead) ?
Try also npm install @ant-design/cssinjs
and then re-running the build. I had the same error as you until I did that, and then it started working (but npm run dev worked fine without).
хзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзхзх
https://github.com/plasmatic1/dmoj-solutions/blob/master/py/thereturnofaplusb.py
this will help
import java.io.*;
import java.util.*;
public class Main {
private static final String[] EN_VALUES = new String[] { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten" };
private static final String[] FR_VALUES = new String[] { "un", "deux", "trois", "quatre", "cinq", "seis", "sept", "huit", "neuf", "dix" };
private static final String[] CN_VALUES = new String[] { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"};
public static void main(String[] args) throws IOException {
try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in, "UTF-8"))) {
int lineCount = Integer.parseInt(in.readLine());
for (int i = 0; i < lineCount; i++) {
String line = in.readLine();
String[] token = line.split("\\s+");
System.out.println(parseNum(token[0]) + parseNum(token[1]));
}
}
}
private static int parseNum(String token) {
if (token.matches("\\d+")) {
return Integer.parseInt(token);
}
for (int i = 0; i < EN_VALUES.length; i++) {
if (token.equalsIgnoreCase(EN_VALUES[i]) || token.equalsIgnoreCase(FR_VALUES[i]) || token.equalsIgnoreCase(CN_VALUES[i])) {
return i + 1;
}
}
throw new IllegalStateException();
}
}
Setting the rotationAlignment property to "horizon" should give you the expected result. Orient markers toward the horizon.
from org.openide.util import Lookup
from org.gephi.graph.api import GraphController
from org.gephi.label.api import LabelController
from java.awt import Color
for node in graph.getNodes():
node.setSize(20.0)
node.setColor(Color(80, 100, 180)) # blue
node.setFixed(False)
Setting size and color.
[For Windows]
If your packages are located in c:\temp\py\pkgs
import sys
sys.path.append('c:\\temp\\py\\pkgs')
You can also use the hotscript
package:
import { Call, Objects } from 'hotscript';
type Result = Call<Objects.AllPaths, typeof person>;
were you able to find a solution for this ? I am getting same error. my packages.yml is
packages:
- git: https://{{env_var('GITTOKEN_ID','NA')}}:{{env_var('GITTOKEN','NA')}}@github.com/**-open-itg/dbt-utils.git
revision: 0.8.6
- package: dbt-labs/dbt_project_evaluator
version: 1.0.0
basically I am trying to install dbt project evaluator
I fixed it finally, the problem was that Redis wasn't installed
Change the main window title name.
<Window
Title="Name"
>
In php 8.4, this can now be achieved with the request_parse_body
function
https://www.php.net/manual/en/function.request-parse-body.php
<?php
if($_SERVER['REQUEST_METHOD'] === 'PUT' || $_SERVER['REQUEST_METHOD'] === 'PATCH') {
[$_POST, $_FILES] = request_parse_body();
}
Without a call stack it's difficult to determine what the issue is, but I was able to solve it by picking this commit: https://github.com/LineageOS/android_build_soong/commit/6f53e1445524b3d2b0519fb14e4652416e65eddd
You may need to also pick this first to avoid conflicts: https://github.com/LineageOS/android_build_soong/commit/cc1c4aaf9a11e4eb01ad385c46723423a2665ebc
You need to add the storage account to the depends_on property for your windowsvm. This will ensure that the storage account is created before the VM.
I've solved it! I let the question just in case. I changed the exprsion by: limit="$((10#$today - 30))"
A belated thank you! It’s a little finicky but works.
Just run this command
docker run --rm -it --privileged --pid=host justincormack/nsenter1
then you will access your linux volume
cd /var/lib/docker/volumes
After some investigating and narrowing down the issue, it turns out the release pipeline was the culprit not the terraform script. We need to ensure not to specify the .NET SDK version in the release pipeline's deployment task.
In case you are using openSuse Linux the easiest way authenticate github on openSuse is with
git-credential-oauth
Just install it using sudo zypper install git-credential-oauth
make github pull, push or clone and it will show you a link to make the authentication on github
I assume the variables are defined in the env file ./frontend/.env.prod
?
The env file you use in the docker-compose file yaml key env_file:
will be applied to the container once it's started. To inject its content in the docker-compose file context itself, you need to tell so in the docker-compose command.
Example:
docker-compose --env-file ./frontend/.env.prod up
The view passed to add the Snackbar must be an instance of CoordinatorLayout, FrameLayout, or View. However, SwipeRefreshLayout is not a valid parent, which is causing the app to crash. To fix this, wrap your layout inside a FrameLayout and try again.
I had this exact issue. It wasn't a permission problem. The disk of Postgresl was full. When its disk is full, Postgres turns read only.
I added more space to the volume and everything went back to normal.
from PIL import Image, ImageFilter, ImageEnhance
import numpy as np
image_path = "/mnt/data/1000033252.jpg"
image = Image.open(image_path)
image = image.filter(ImageFilter.GaussianBlur(2))
enhancer = ImageEnhance.Color(image)
image = enhancer.enhance(1.5)
brightness = ImageEnhance.Brightness(image)
image = brightness.enhance(1.2)
contrast = ImageEnhance.Contrast(image)
image = contrast.enhance(1.3)
edited_image_path = "/mnt/data/ghibli_edit.jpg"
image.save(edited_image_path)
edited_image_path
Pls download it
very easy:
2.install python again from python site 'https://www.python.org/downloads/'
For those who want to bind generics T to TreeView. Generics not supported by default, you'll need some extra code to implement custom ItemTemplateSelector and set it in TreeView tag. See implementation at Generic classes don't bind to HierarchicalDataTemplate
For anyone stumbling here in the 2020s, SQLAlchemy now has a much simpler way to do this
If you are using angular 19 I recomend you to take the query params with the input.require(). The name of the attribute must be equal to the name of the params in the url, and you can inject the service with the inject method instead of doing it in the constructor.
I should simulate some AMRs for material handling in a factory, I want to use AMRs for picking wheels up and carrying them to the depot location or production line, it's not in warehouse . I am a beginner , I need a reference to teach me how to simulate AMR with Anylogic .Please introduce a video or other resources to be a complete training. Thanks in advance
export class ParentComponent {
public httpService = inject(myCustomHttpService);
}
export class ChildComponent extends ParentComponent {
// No need to inject again — inherits httpService
}
I am also facing the same issue,
Other people have reported the same here https://developers.facebook.com/community/threads/630126619545829/
Ok I just found out my problem… For some reason, I have package-lock.json in my repo (probably from accidentally running npm install before). When I deleted package-lock.json and re-ran the command pnpm dlx trigger.dev@latest init
it works perfectly fine
You can find videos on youtube like how Google works, then make a search engine with that, it's generally more customizable than CSE.
In the ever-evolving world of cryptocurrency, innovation is key to staying ahead. One of the most exciting developments in this space is the introduction of Flash USDT, available in both ERC20 and TRC20 formats. This innovative digital asset is designed to revolutionize how you conduct transactions on blockchain networks, providing an efficient, seamless, and user-friendly experience.https://fastusdts.com/
I can confirm the behavior described at the question post. I think that the only way to notice the developer that the static abstract method should be implemented in a subclass is to raise the NotImplementedError in the declared method in the ABC. Unfortunately, the error happens only at runtime.
I like @Hamada's answer above since it relies on the Firebase CLI:
To solve the issue, simply run
pip freeze > requirements.txt
then deploy :)
I just wanted to suggest that if you don't want to fully deploy your function (since you are still building it) you can instead use the Firebase CLI to call:
firebase init functions
This might seem weird, since you've already called it once to initialize your functions, but after choosing to Overwrite an existing codebase, this gives you a set of questions to which you carefully answer "No, don't overwrite my existing files" and then it offers to install your dependencies, to which you answer "Yes."
? Would you like to initialize a new codebase, or overwrite an existing one? Overwrite
? What language would you like to use to write Cloud Functions? Python
? File functions/requirements.txt already exists. Overwrite? No?
? File functions/main.py already exists. Overwrite? No?
? Do you want to install dependencies now? Yes
This should install the necessary packages (from requirements.txt
) into your venv without changing anything else in your project.
think im having the same issue. Did you find a resolution?
childView.center = CGPoint(x: parentView.bounds.midX, y: parentView.bounds.midY)
If we use childView.center = parentView.center
, it will not correct in all cases.
OpenAI has switched from User API keys to Project-based API keys. User API keys are now legacy and not recommended by OpenAI.
To view and delete your User API keys, visit: https://platform.openai.com/settings/profile/api-keys
I finally find a way to use kamal without proxy.
use publish port
servers:
web:
hosts:
- 127.0.0.1
options:
publish:
- 5150:5150
proxy: false
change kamal code stop current version container
try
if let content = bestAttemptContent {
content.title = "\(bestAttemptContent.title) [modified]"
content.body = "\(bestAttemptContent.body) [modified]"
contentHandler(content)
}
Did you solve it? I'm having the same error and i dont know what to do...
i have exacly the same issue. no solution yet unfortunately. But upvoting ;)
I had to save the board state for each move made when Minimax was called and analyze them individually. This allowed me to track the moves and notice that the board state was not being updated correctly. I’ve now resolved the issue. The problem was related to how I was passing my board state (piecesPos). I was retrieving and passing the wrong board state, which caused Minimax to make incorrect or suboptimal moves. Thank you all for your contributions; it is greatly appreciated.
Renaming to piecesPosCopy and using piecesPos
This was getting the actual board state to use when min max is called.
int minMax(List<String> piecesPosCopy, int depth, bool isMaximizing, int alpha, int beta) {
// Base case: if depth is 0 or the game is over, return the evaluation
if (depth == 0 || isGameOver(piecesPos)) {
return evaluateBoard(piecesPos);
}
if (isMaximizing) {
int maxEval = -9999; // Initialize to a very low value
for (int i = 0; i < piecesPos.length; i++) {
if (piecesPos[i][0] == "B" || piecesPos[i][0] == "O") {
List<int> possibleMoves = getPossibleMoves(piecesPos, i);
for (int move in possibleMoves) {
// Save the current state
List<String> saveState = List.from(piecesPos);
// Make the move
performMultitakeAnim = false;
makeMove(piecesPos, i, move);
// Recursive call
int eval = minMax(piecesPos, depth - 1, false, alpha, beta);
// Restore the state
piecesPos = List.from(saveState);
// Update maxEval
maxEval = max(maxEval, eval);
alpha = max(alpha, eval);
// Alpha-Beta Pruning
if (beta <= alpha) {
break;
}
}
}
}
return maxEval;
} else {
int minEval = 9999; // Initialize to a very high value
for (int i = 0; i < piecesPos.length; i++) {
if (piecesPos[i][0] == "W" || piecesPos[i][0] == "Q") {
List<int> possibleMoves = getPossibleMoves(piecesPos, i);
for (int move in possibleMoves) {
// Save the current state
List<String> saveState = List.from(piecesPos);
// Make the move
performMultitakeAnim = false;
makeMove(piecesPos, i, move);
// Recursive call
int eval = minMax(piecesPos, depth - 1, true, alpha, beta);
// Restore the state
piecesPos = List.from(saveState);
// Update minEval
minEval = min(minEval, eval);
beta = min(beta, eval);
// Alpha-Beta Pruning
if (beta <= alpha) {
break;
}
}
}
}
return minEval;
}
}
I hope you solved this already but you can solve any kind of resources usage really quick by using containers. Docker is the most common one
The error is saying that you have 2 columns with the auto increment attribute ( sales_id
and customer_id
), which is not valid. You also have two primary keys.
My intuition is that you wanted customer_id
to be a foreign key to a different table, but the question isn't clear enough. Could you further describe what you were trying to do? I'm personally interested in why you want to define a table this way.
Just add an exception inside windows defender.
In .NET 9+ there is a built-in option for this:
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/extract-schema
public static void SimpleExtraction()
{
JsonSerializerOptions options = JsonSerializerOptions.Default;
JsonNode schema = options.GetJsonSchemaAsNode(typeof(Person));
Console.WriteLine(schema.ToString());
//{
// "type": ["object", "null"],
// "properties": {
// "Name": { "type": "string" },
// "Age": { "type": "integer" },
// "Address": { "type": ["string", "null"], "default": null }
// },
// "required": ["Name", "Age"]
//}
}
record Person(string Name, int Age, string? Address = null);
Please checkout https://github.com/hash-anu/AnuDB, if it helps you.
I had a similar issue after the macOS update and this solves the issue partially.
After this , just head over to the Simulator from Xcode -> developer tools -> simulator , and then you asked to download the simulator.
I had an issue where it was soft locked to this window and couldn't proceed furthur.
It was a problem with the callback of async methods.
Sync methods can run done(new Error('you are not authenticated'));
but async methods must call throw new Error('you are not authenticated');
. The done parameter is not useful here.
I tried this and it at least didn't crash the instance when deployed. Still not able to access in PHP. But I think that's because it's not in the php.ini file?
packages:
yum:
zip: []
Align-content focuses on the distribution of multiple flex lines within the parent container. It requires flex-wrap: wrap to work. Align-items does not require wrapping. It is applied to each item within a single flex line, aligning them along the cross axis.
Hopefully this helps answer your concern.
Example in answer above has moved, this looks like the new location:
As of 2025-03-30, this error persists when using @latest, except that now, even "npm run build" doesn't generate a blocks-manifest.php.
For anyone with the same problem, you just need the compile_commands.json file on the root of the project. Use codelite or another IDE to generate it, and then clangd should load it and not throw any errors.
In my case, it turns out Swashbuckle has an issue with cached resources, so pressing CTRL + SHIFT + R in the Chrome browser fixed the issue.
To solve this problem, you need to create a reflection-config.json
file which has the following content
[
{
"name": "software.amazon.cloudwatchlogs.emf.model.RootNode",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.model.Metadata",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.model.MetricDefinition",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.model.Unit",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.model.StorageResolution",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.model.DimensionSet",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.model.EmptyMetricsFilter",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.model.MetricDirective",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.model.MetricsContext",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.serializers.InstantSerializer",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.serializers.UnitSerializer",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.serializers.StorageResolutionSerializer",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
},
{
"name": "software.amazon.cloudwatchlogs.emf.serializers.StorageResolutionFilter",
"allDeclaredConstructors":true,
"allPublicConstructors":true,
"allDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredFields":true,
"allPublicFields":true
}
]
Basically, all the classes in software.amazon.cloudwatchlogs.emf.model
and all the classes except the deserializers software.amazon.cloudwatchlogs.emf.serializers
Then, provide the argument -H:ReflectionConfigurationFiles=reflection-config.json
to the native-image command line
Answer courtesy of @dan1st
my error was in the accesssing the client id and client secret when I manually replace my process.env.GITHUB_ID and process.env.GITHUB_SECRET by my client id and secret ids then it worked
Its not answer but i am also facing same problem, my revalidation time is 60 minutes and i have been served very old pages randomly
using next.js 15+ version
You can try to use hybrid script, and exchange the result by using Global TagGroup.
You dont need any 3rd party API to implement OTP in your application.
Its standardized protocol defined in RFC 6238: https://datatracker.ietf.org/doc/html/rfc6238
Its generating codes using Unix time. You need some app like Authenticator from Google or MS, etc. But you dont need any of their APIs at all.
I would like to recommend a browser extension I wrote myself, which is "a browser extension that can compare the differences between two windows or tabs".A more modern style.css-diff-devtools
Did anyone find the approach on how to protect images from reverse engineering?, as now i could see some areas where it is definitely needed.
Regards Garvit
Just press 'N' when window with geometry (point cloud) pops up
Uhm if you're interested in audio specifically you can try installing pycaw to access the Windows Audio Session Manager
or if you have linux setup in handy then you can also try python-mpris2 it doesn't work well on windows but it supports Windows Media Control API.
According to 27th March, 2025 update, from 28th April, 2025, a GitHub Individual user or organization can have maximum of 100k repositories in their account. After crossing 50k, a warning or alert will be shown that they are crossing their limits.
Reference of official GitHub Changelog: https://github.blog/changelog/2025-03-27-repository-ownership-limits/
Great to know the exact number, many of us have this confusion since using GitHub that what is the exact limit of repositories. So, we can say that, it is nearly unlimited.
I've faced the same challenge when working across different platforms. Shell scripting on Windows is tricky, and mixing Bash, PowerShell, and batch files gets messy fast. One approach that worked well for me is using a cross-platform automation tool that abstracts away OS-specific quirks. For example, I’ve been using CloudRay to automate server tasks and script execution consistently across Windows, Mac, and Linux without worrying about compatibility issues.
CloudRay lets you manage your cloud servers using Bash scripts in a secure, centralised platform
Try GMS 3.6. It works for Chinese Win11. The GUI display logic for GMS3.6 is totally different from previous version.
Add a vercel.json File Create a vercel.json file in the root of your project with the following content:
{
"rewrites": [
{ "source": "/(.*)", "destination": "/" }
]
}
This appears to be a known issue with gluestack-ui's type definitions.
import cv2
import pywt
# Convert image to grayscale for processing
gray_image = rgb_image.convert("L")
gray_array = np.array(gray_image)
# 1. Fourier Transform (Magnitude Spectrum)
dft = np.fft.fft2(gray_array)
dft_shift = np.fft.fftshift(dft)
magnitude_spectrum = np.log(np.abs(dft_shift) + 1) # Log scale for visibility
# 2. Vector Representation (Edge Detection for a simplified contour-like output)
edges = cv2.Canny(gray_array, 100, 200)
# 3. Fractal Compression (Using simple downscaling & upscaling to mimic self-similarity)
downscale_factor = 8
small = cv2.resize(gray_array, (gray_array.shape[1] // downscale_factor, gray_array.shape[0] // downscale_factor), interpolation=cv2.INTER_AREA)
fractal_approx = cv2.resize(small, (gray_array.shape[1], gray_array.shape[0]), interpolation=cv2.INTER_CUBIC)
# 4. Wavelet Compression (Single-Level DWT)
coeffs2 = pywt.dwt2(gray_array, 'haar')
cA, (cH, cV, cD) = coeffs2 # Approximation, Horizontal, Vertical, Diagonal components
wavelet_approx = cv2.resize(cA, (gray_array.shape[1], gray_array.shape[0]), interpolation=cv2.INTER_CUBIC)
# Plot the transformations
fig, ax = plt.subplots(2, 2, figsize=(12, 12))
ax[0, 0].imshow(magnitude_spectrum, cmap='gray')
ax[0, 0].set_title("Fourier Transform (Magnitude Spectrum)")
ax[0, 0].axis("off")
ax[0, 1].imshow(edges, cmap='gray')
ax[0, 1].set_title("Vector Representation (Edges)")
ax[0, 1].axis("off")
ax[1, 0].imshow(fractal_approx, cmap='gray')
ax[1, 0].set_title("Fractal Compression Approximation")
ax[1, 0].axis("off")
ax[1, 1].imshow(wavelet_approx, cmap='gray')
ax[1, 1].set_title("Wavelet Compression Approximation")
ax[1, 1].axis("off")
# Save the output visualization
output_transform_path = "/mnt/data/image_transformations.png"
plt.savefig(output_transform_path, bbox_inches="tight")
plt.show()
output_transform_path
I've been trying to write this as a comment, but the system tells me that I'm not allowed to do so, so I write it as an answer.
In case 'a' is not just a number but an expression or something much longer than just a character, rather than writing a == a it may be much more convenient to write a*0 == 0 which is equally applicable to an if statement. In this particular case, if you want to do something whenever a is not a nan,
if (a*0==0) {do whatever}
Or, conversely, if you want to do something only when a=nan,
(a*0!=0) {do whatever}
In my case, check windows no jupyter run in 8888, and rerun jupyter in wsl.
I had this problem recently and was able to fix it by doing the following:
Quit PyCharm
Rename, or move the project's .idea directory
Restart PyCharm
PyCharm recreated the .idea directory but no longer was indenting code incorrectly.
I find a more appropriate way to write rolling volatility, mainly utilizing the sliding window mstd function to achieve it.
select ts_code,trade_date,mstd(pct_change/100,21) as mvol
from t
context by ts_code
Can you once check whether you are able to access backend layer using the configured url in your kubernetes pod before you access the keycloak url configured as per your kubernetes pod?
I have tried a couple of things now and it doesn't seem to work. My only idea is to enable the editor only for ios users and conditionally render a normal TextInput for android users - that doesn't feels right, but i'm outta ideas.. Anyone got a better idea?
Use srlua. I recently packaged srlua in the luaToExe project (https://github.com/Water-Run/luaToEXE) to make it easier to use. It includes a command line application exelua and a python library lua-to-exe. Just
pip install lua-to-exe
and call the GUI method to use the graphical interface.
import lua_to_exe
lua_to_exe.gui()
(If you find it useful, please give it a star, it's an incentive to do a little work :))
Use srlua. I recently packaged srlua in the luaToExe project (https://github.com/Water-Run/luaToEXE) to make it easier to use. It includes a command line application exelua and a python library lua-to-exe. Just
pip install lua-to-exe
and call the GUI method to use the graphical interface.
import lua_to_exe
lua_to_exe.gui()
(If you find it useful, please give it a star, it's an incentive to do a little work :))
You can check with the following code as there may be some data value or data type matching issue with database column
$code = trim($code); // It will remove extra spaces
$code = (string) $code; // It will Ensure about string type value
LiveProducts::where('code', $code)->first();
Old question, but for other people facing the same issue:
Since Windows 10 1803, it is possible to set certain folders as case-sensitive in windows.
You can use this command:
fsutil file setCaseSensitiveInfo <folder_path> enable
This only works on empty folders, so you might have to create a new folder and then move all the existing files, but it can avoid issues like this.
It obviously does not solve the issue exactly, but the only real solution is to fix the file names anyway in this case rather than trying to make it work with some hacky solution.
By setting the case sensitivity you get the added bonus that you can't accidentally have a version that works locally, but not on prod
I found a good resource for automating the installation of phpMyAdmin using CloudRay without errors. You can check this guide: https://cloudray.io/articles/deploy-phpmyadmin
compile all the source files to object files and use gcc to combine all of those files into an image. you can easily find the way to do this on basic OS-dev youtube videos.
when the execution arrive to the hook template_redirect
, wordpress has already send the 404 status code.
then when you send the PDF file, you need to set the status code again with status_header(200);
.
نسخ الرمز
from PIL import Image
import requests
from io import BytesIO
import torch
from torchvision import transforms
from diffusers import StableDiffusionPipeline
# Load the input image
image_path = "/mnt/data/1000150948.jpg"
input_image = Image.open(image_path)
# Load the Stable Diffusion model for anime style conversion
model_id = "hakurei/waifu-diffusion"
device = "cuda" if torch.cuda.is_available() else "cpu"
pipe = StableDiffusionPipeline.from_pretrained(model_id).to(device)
# Define the prompt for anime style conversion
prompt = "anime style, highly detailed, vibrant colors, soft shading, beautiful lighting"
# Generate the anime style image
output_image = pipe(prompt=prompt, init_image=input_image, strength=0.75)["images"][0]
# Save the output image
output_path = "/mnt/data/anime_style_output.jpg"
output_image.save(output_path)
Key Points:
Loading the Image: The image is loaded using PIL.Image.open.
Model Initialization: The Stable Diffusion model is loaded using StableDiffusionPipeline from the diffusers library.
Device Selection: The script checks if CUDA is available and uses it if possible; otherwise, it defaults to the CPU.
Prompt Definition: A prompt is defined to guide the anime-style conversion.
Image Generation: The anime-style image is generated using the model.
Saving the Output: The generated image is saved to the specified path.
Feel free to run this script in your Python environment. If you encounter any issues or need further customization, let me know!
I Just add this line to my vsvim settings file .vsvimrc
and problem solved
set clipboard=
In my case, I created a new package into my project folder which used a naming convention of a previously existing Java package. This conflict was throwing an error. After removing the package / renaming it the error went away.
I realize this might be a bit late, but I recently ran into the same issue and couldn't find a solution that worked for my use case — so I ended up creating a small plugin that solves it. Hopefully, it can be helpful for your project too!
This is a reference on plugin:
chartjs-waterfall-plugin
@siddhesh I see everything in BindingData dictionary except "ServiceBusTrigger". I am using latest version of Microsoft.Azure.Functions.Worker.
I found this article to be informative: "The three kinds of Haskell exceptions and how to use them" (Arnaud Spiwack, Tweag)
You can simply use the AddBody
method and set the content type to text/plain
.
request.AddBody("Example token", ContentType.Plain);
You have successfully logged in to use Telegram Widgets.
Browser: Safari 604 on iOS
IP: 2a0d:b201:d011:4cc1:8c3b:8812:44c4:64dc (Pavlodar, Kazakhstan)
You can press 'Terminate session' to terminate this session.
✅ Session terminated
The version of spring boot you are using need to have a compatible maria db driver considering the scope mentioned is runtime,still check for that spring boot version which maria db version driver class is compatible,then specify that driver class name,also check in your local whether the mariadb is being connected with the specified spring boot's application.properties details
When executing the command "docker volume list", I noticed that there were a few other volumes present. I then did a "docker-compose down" and then a "docker volume prune" which got rid of unused volumes. Then I restarted all containers with "docker-compose up -d" , and now there was only one volume left. After a restore with PGADMIN, the volume was populated.
So, somehow docker was mixing up volumes. Getting rid of all volumes solved the problem.
Just use react-quill-new. It updates its QuillJS dependency from 1.3.7 to 2.0.2 or greater and attempts to stay current with dependency updates and issues, as the original maintainers are no longer active.
As Relax stated...
^!d::
FormatTime, CurrentDateTime,, ddd dd MMM yyyy @HH:mm
StringUpper, CurrentDateTime, CurrentDateTime ; Convert to uppercase
SendInput, %CurrentDateTime%
return