Got on the same trap.
Following the tutorial you can access the repo and see from where he imports the basicAuth function
Tutorial: https://medium.com/@a16n.dev/password-protecting-swagger-documentation-in-nestjs-53a5edf60fa0
import * as basicAuth from 'express-basic-auth';
Try
which pg_resetwal
It should give an o/p like so
/usr/lib/postgresql/15/bin/pg_resetwal
Change your user to su -l postgres, if not already
Execute command like so
/usr/lib/postgresql/15/bin/pg_resetwal <path to pg data>
Try replacing the call with an explicit find
+ deleteAll
:
List<Embedding> embeddings = repository.findAllByFileName(fileName);
log.info("Deleting {} Embedding objects with fileName={}", embeddings.size(), fileName);
repository.deleteAll(embeddings);
Why?
Spring Data Redis retrieves IDs via the @Indexed
field and then deletes by those IDs — if the index is broken, outdated, or Redis fails to deserialize the objects, the deletion may silently do nothing. An explicit find
→ deleteAll
is easier to debug and log.
In NRF24_Write_8Bit_Register
after i send my command function i need to read SPI1->DR to clear 0x00 value from it. but i didn't. Thats why i had to call read functions twice. This is the proper way to do it:
(NOTE: Thank you hcheung for your help. After reading your comment i got the answer.)
void NRF24_Write_8Bit_Register(uint8_t NRF24_Register, uint8_t NRF24_Register_Bit, uint8_t NRF24_Set_Reset){
uint8_t buffer_write = 0xFF;
uint8_t buffer_read = 0;
NRF24_Read_8Bit_Register(NRF24_Register, &buffer_write);
if(NRF24_Set_Reset == 1){
buffer_write |= NRF24_Register_Bit;
}else{
buffer_write &=~ NRF24_Register_Bit;
}
SysTick_Delay_uS(10);
GPIO_ResetBits(GPIOA,GPIO_Pin_4);
SPI_I2S_SendData(SPI1, (0x20 | NRF24_Register));
buffer_read = SPI_I2S_ReceiveData(SPI1);
while(!(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE)));
buffer_read = SPI_I2S_ReceiveData(SPI1);
while(!(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_TXE)));
SPI_I2S_SendData(SPI1, buffer_write);
while(!(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE)));
buffer_read = SPI_I2S_ReceiveData(SPI1);
while(SPI_I2S_GetFlagStatus(SPI1,SPI_I2S_FLAG_BSY));
GPIO_SetBits(GPIOA,GPIO_Pin_4);
SysTick_Delay_uS(20);
}
You can also mock just ReactiveMongoDatabaseFactory. It won't try to connect to the db, but rest of the functionalities stay intact:
@MockBean
ReactiveMongoDatabaseFactory mongoDatabaseFactory
The reason that you get the 401 error is most probably because your session has timed out. As with all API:s, the session token that you get is only valid for a certain period of time.
In the Appylar REST documentation overview under section 5, it says:
The session token that was created and returned calling the POST /api/v1/session/ endpoint, will expire after a while. From there on, the API will respond with an HTTP 401 for all requests. When that happens, the SDK must make sure to automatically renew the session by calling the POST /api/v1/session/ endpoint again.
In other words, you have to refresh the session in your sdk when you get the 401 error.
Ensure your tsconfig.json file has:
{
"compilerOptions": {
"jsx": "react",
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"strict": true
},
"include": ["src"]
}
first give Linearlayout Orientation than also provide code from where u move imageview.
For java 24:
It Resolve My Problem:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.38</version>
<scope>provided</scope>
</dependency>
Then Reload maven file it will fix it...
[email protected] Thanks for contributing an answer to Stack Overflow!
Please be sure to answer the question. Provide details and share your research! But avoid …
Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips
I got the full color string into a string field as follows, after a long stugle ...:
var fBackColor =Convert.ToString (MyDialog.Color.ToArgb());
rgbColor = Color.FromArgb(Convert.ToInt32(fBackColor)).ToString();
Can you please try "scripts": { "test": "mocha" }
in package.json file and then run the only command as
'npm test'
As @Slaw already suspected in the question comments while I composed this answer, its fundamentally a sequencing problem, hidden by a bit of compiler syntactic sugar.
JLS 14.20.3.2 states that this:
/* task creation if option 1 */
try (/* option 1 or 2 resource statement here */) {
var taskFuture = taskExecutor.submit(() -> {
task.run();
return true;
});
var result = taskFuture.get(30_000, TimeUnit.MILLISECONDS);
System.out.println("Got result: " + result);
} catch (Exception e) {
System.out.println("Caught exception: " + e);
throw new RuntimeException(e);
} /* finally if option 1 */
is fundamentally treated as this:
/* task creation if option 1 */
try{
try (/* option 1 or 2 resource statement here */){
var taskFuture = taskExecutor.submit(() -> {
task.run();
return true;
});
var result = taskFuture.get(30_000, TimeUnit.MILLISECONDS);
System.out.println("Got result: " + result);
}
} catch (Exception e) {
System.out.println("Caught exception: " + e);
throw new RuntimeException(e);
} /* finally if option 1 */
Which already hints at the problem.
taskExecutor.close()
will happen (as part of exiting the inner try) before your own finally ever executes, leading to taskExecutor shutdown hanging forever* because the AtomicBoolean
value is not yet true.AtomicBoolean
to true
) before the call to taskExecutor.close()
, which means that method returns as soon as the task has (quite soon, if not already) terminated.#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#define PORT 7000 // Replace with your desired port 7XXX
#define MAXLINE 1024
void handle_client(int connfd) {
char buffer[MAXLINE];
int n;
// Read message from client
n = read(connfd, buffer, sizeof(buffer) - 1);
if (n < 0) {
perror("Read error");
close(connfd);
return;
}
buffer[n] = '\0'; // Null-terminate the message
// Print received message
printf("Received from client: %s\n", buffer);
// Echo the message back to the client
write(connfd, buffer, strlen(buffer));
close(connfd);
}
int main() {
int listenfd, connfd;
struct sockaddr_in servaddr, cliaddr;
socklen_t len;
pid_t childpid;
// Create server socket
listenfd = socket(AF_INET, SOCK_STREAM, 0);
if (listenfd < 0) {
perror("Socket creation failed");
exit(1);
}
memset(&servaddr, 0, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = INADDR_ANY; // Listen on all available interfaces
servaddr.sin_port = htons(PORT);
// Bind the socket to the address and port
if (bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) {
perror("Bind failed");
exit(1);
}
// Listen for incoming connections
if (listen(listenfd, 10) < 0) {
perror("Listen failed");
exit(1);
}
printf("Server started on port %d\n", PORT);
// Main loop to accept and handle clients
for (;;) {
len = sizeof(cliaddr);
connfd = accept(listenfd, (struct sockaddr *)&cliaddr, &len);
if (connfd < 0) {
perror("Accept failed");
continue;
}
if ((childpid = fork()) == 0) {
close(listenfd); // Child doesn't need the listening socket
handle_client(connfd);
exit(0); // Child process terminates here
}
close(connfd); // Parent closes the connection socket
while (waitpid(-1, NULL, WNOHANG) > 0); // Clean up any terminated child processes
}
return 0;
}
------------------------------------------------------------------
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#define PORT 7000 // Replace with the same port used in the server
#define MAXLINE 1024
int main() {
int sockfd;
struct sockaddr_in servaddr;
char send_buffer[MAXLINE] = "Hello from ITxxxxxxxx";
char recv_buffer[MAXLINE];
int n;
// Create socket
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0) {
perror("Socket creation failed");
exit(1);
}
memset(&servaddr, 0, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(PORT);
if (inet_pton(AF_INET, "127.0.0.1", &servaddr.sin_addr) <= 0) { // Assuming server is on localhost
perror("Invalid address or address not supported");
close(sockfd);
exit(1);
}
// Connect to server
if (connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) {
perror("Connection failed");
close(sockfd);
exit(1);
}
// Send message to the server
write(sockfd, send_buffer, strlen(send_buffer));
// Receive the echo from server
n = read(sockfd, recv_buffer, MAXLINE);
if (n < 0) {
perror("Read error");
close(sockfd);
exit(1);
}
recv_buffer[n] = '\0';
// Print the echo response
printf("Received from server: %s\n", recv_buffer);
close(sockfd);
return 0;
}
Did u find the problem and figure out the answer bro
According to this answer and this article, the pyvenv.cfg
file is essential for running a virtual environment, and it appears that the venv can't function without it.
You should wrap the filament view with a react native view place a hight to the view and should render. That was my issue around 3 days.
Interestingly two years later, we still have this problem with iPhone Xs iOS 18.4.1 and Flutter version 3.32.0-0.2.pre. Somehow set FLTEnableWideGamut
to FALSE
, fix the problem. Our issue was taking photo using iPhone/iPad's camera will showing image as green dominated color. Anyone can explain why?
Anyway, add a message here in case someone else have similar problem.
add this to your docker-compose.yml
env_file: ./.env
and add your ENVs in that file
I also got this error, I resolved it by opening Visual Studio Code with Run as administrator privilages (in Windows).
how about:
class TestDivFunction(unittest.TestCase):
def test_division(self):
self.assertEqual(div(10, 2), 5)
self.assertEqual(div(-10, 2), -5)
self.assertEqual(div(0, 1), 0)
def test_division_by_zero(self):
self.assertTrue(math.isnan(div(10, 0)))
I encountered the same error while installing Ghost 5.
After troubleshooting, I found the root cause: I had initially installed Ghost-CLI using pnpm. By default, pnpm (and Yarn) places global bin
and node_modules
in user-level paths (e.g., ~/.local
), whereas npm does not have this issue (npm uses system-level paths).
To resolve it, I uninstalled Ghost-CLI and reinstalled it globally with npm, which fixed the problem.
Hopefully, this solution helps others facing the same issue.
This an iTerm2 bug and has likely been fixed in https://github.com/gnachman/iTerm2/commit/223eacd424db38e0a5b7c93b48bcde06af1bafbd.
You can track this in:
Please try to install txfonts: https://ctan.org/pkg/newtx
I originally wanted to have everything packed together in one place, so I extracted SQL Developer into the Oracle 21c product directory. However, that approach caused some issues. When I instead extracted it to a different folder, the problem was resolved.
I have a solution for this.
Write a bash script for MacOS on your Windows Machine that goes into your python project, installs dependencies, including PyInstaller, and then compile.
You can ship your project with the bash script and the Mac User just has to run the script as an executable. Essentially automatically compiling on their machine.
Though there could be some problems where the user may have to manually download Hombrew or Python3, because MacOS is funny like that.
Problem is solved. Turns out i was pulling all the images for lookup.
allImages = await ctx.Images.AsNoTracking().ToListAsync(token);
allImages = await ctx.Images
.AsNoTracking()
.Select(img => new Fatalix_Project_Image
{
Id = img.Id,
OriginalFileName = img.OriginalFileName
})
.ToListAsync(token);
This was more than enough. It was loading more than 20 mbs of image data everytime i swap to a project display page. The imagedata should never be loaded.
In this sense i was hoping cancellation token would save me the trouble but turns out it does not.
Currently blazor page is functioning perfectly, as each image is loaded through a controller instead of a linq query.
[HttpGet("{id}")]
public async Task<IActionResult> GetImage(int id)
{
var image = await _context.Images.FindAsync(id);
if (image == null || image.ImageData == null)
return NotFound();
var contentType = "image/jpeg";
if (image.OriginalFileName.EndsWith(".png")) contentType = "image/png";
else if (image.OriginalFileName.EndsWith(".gif")) contentType = "image/gif";
return File(image.ImageData, contentType);
}
A rookie mistake, but still took me 14 days to find the source of the problem. Thanks.
[2025] Edit the minimum ios version in the podfile then run pod install.
Changing platform :ios, '12.0' to platform :ios, '13.0' then running pod install fixed it for me.
background-size:cover and background-position:fixed don't work together .. just use cover. position:fixed is giving the element absolute positioning, which you probably don't want in this instance.
lastly, I suggest changing body height: 1500px; to height:100vh -- unless you want need it to be that specific height.
let random_int (start: int, end_: int) =
let random = Random()
seq { start .. end_ } |> Seq.map (fun _ -> random.Next(start, end_))
I found this on AlexisGrant.com:
How to find a book’s word count: Go to that book's page (on Amazon) and scroll down to "Inside This Book." Under that heading, click "Text Stats." (It’ll be a blue link.) A new window will pop up. Under “Number of,” you’ll see "words." That’s your number!
Check to make sure you're not using Link to wrap a component with a useEffect(). In my case I had a CustomButton that had a useEffect, which was causing a full reload.
This may sound dumb, but I got tricked by this today. I had put in some new config var key:value pairs, then went to another page, and went back later to make sure I had the key names correct, and the pairs were gone.
Later after doing one on the command-line to try that, I noticed that the pairs are sorted. Basically, my new ones were buried in the list of other key:value pairs after the page was reloaded, where I expected them to be at the bottom!
Are you running the notebook interactively or with a Service Principal?
You will get the error
## Not In PBI Synapse Platform ##
when running a notebook using Service Principal and you are using Sempy. Also some properties of notebookutils.runtime.context will return None, like WorkspaceName and UserName.
I wrote about this a blog post which you will find here: Who's Calling? Understanding Execution Context in Microsoft Fabric
Try this: In the "Import" tab, disable texture compression by unchecking the "Lossless" or similar settings. You can always convert your spritesheet to PNG websites like https://image.online-convert.com/convert-to-png
And this video is good: https://www.youtube.com/watch?v=GPYBNdYuSD8
You're passing an org.json.JSONObject directly to RestTemplate, which doesn't automatically convert it into a proper JSON request body. It just sends it as an object, which becomes null in deserialization.Postman automatically sets the correct Content-Type and sends the JSON string. In code, unless you use the right body object and headers, Spring might not serialize it to the proper format, resulting in null values being received by the API.Use a Map<String, String> or create a POJO for the request body, and ensure the correct headers are set.
The Circuit Breaker pattern is used to prevent an application from performing an operation that is likely to fail. It monitors the number of recent failures and determines when to “break” the circuit, stopping requests for a certain period. This prevents the system from being overwhelmed with failed requests and allows time for the underlying issue to be resolved.
Let RecyclerView handle views ,you only handle data and then notice recyclerview data are changed.
adapterNotCheckedList = RecyclerViewListAdapter(clickListener = { view: View, listItem: Any, position: Int ->
//Here, besides visibility i want to move it to the top everytime unCheckedList gets smaller.
checkedList.add(unCheckedList.removeAt(position))
// you need get adapter.
topAdapter.notifyItemRemoved(position)
bottomAdapter.notifyItemInserted(checkedList.lastIndex)
})
if unchecked list is too large ,you will only see top recyclerview.
Centering Caption Text -- Kenneth's 5/9/2023 answer does get the caption text to display below the thumbnail image, but for me, at least, it is left-justified. I have searched and found several solutions to center the caption text, but all of them apoparently applied to earlier versions of NextGen Gallery. I am running version 3.59.12 and none of the solutions I found did the job. Caption text remains left-justified. Any solutions to center it using a later version?
Try the root user, and then you will have a message like:
Please login as the user "cloud-user" rather than the user "root"
Then you know the user.
In my case, it was cloud-user.
Initializes a new instance of the class
Gets format info
The filename of the archive file .
is null . The caller does not have the required permission to access . The is empty, contains only white spaces, or contains invalid characters . Access to file is denied . The specified exceeds the system-defined maximum length. For example, on Windows based platforms, paths must be less than 248 characters, and file names must be less than 260 characters . File at contains a colon (:) in the middle of the string . An I/0 error occurred while opening the file . Information about archive format or null if a format was not detected .
Gets format info
The stream of the archive file .
is null .
is not seekable Information about archive format or null if format was not detected .
Represents information about the archive format
Gets the class that represents the archive file
Gets the archive format
<member name="M Aspose Zip ArchiveInfo ArchiveFormatInfo .ToStrin
use @types
lib to help typescript recognize definition of turndown
npm i --save-dev @types/turndown
Now Metadata::from_account_info()
isn't available. Do you know how to do that in newest versions? Thanks!
What worked for me was opening the solution explorer and selecting "Reload with Dependencies" on my projects there.
2025 and using tf_keras instead of tf.keras.Sequential works !!
# Create model
import tf_keras
callback = tf_keras.callbacks.EarlyStopping(monitor="val_loss", patience=3)
model_1 = tf_keras.Sequential([
use_layer,
tf_keras.layers.Dense(1, activation="sigmoid")
])
Enums do not require annotation in the enhanced client mapper in aws sdk2
you can just do
@Data
@DynamoDBBean
@NoArgsConstructor
public class SomeModelClass {
...
private SomeEnum someEnum
...
}
(Lombok @Data annotation)
{ "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more validation errors occurred.", "status": 400, "traceId": "00-78bd11a5cea5244998ade80c059479d0-8cb569e070ca0047-00", "errors": { "$": [ "'a' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0." ] } }
Saving the context fixed the issue:
Button("Add") {
let newModel = MyModel(name: "Example")
modelContext.insert(newModel)
try? modelContext.save() // Added this line.
selectedModel = newModel
}
Most trades on Binance or Coinbase don’t go directly on the blockchain. When you deposit crypto into the exchange, it goes into their wallet, and your account balance updates inside their system, not on-chain. When you buy or sell, it’s just numbers changing in the exchange’s database — no blockchain transaction happens at that point. Only when you withdraw your crypto to your own wallet does the exchange send it on-chain, and that’s when it appears on the blockchain. This system keeps trading fast and cheap, but it also means you have to trust the exchange to hold your funds safely. That’s why audits and proof of reserves are so important.
After doing further research, it seems that mockito 5.17.0 uses bytebuddy 1.15.11 that supports up to Java 23
Caused by: java.lang.IllegalArgumentException: Java 24 (68) is not supported by the current version of Byte Buddy which officially supports Java 23 (67) - update Byte Buddy or set net.bytebuddy.experimental as a VM property
bytebuddy only supports Java 25 ( including Java 24 ) from 1.17.5. The current workaround is to configure net.bytebuddy.experimental as suggested by this link also - https://github.com/raphw/byte-buddy/issues/1396
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dnet.bytebuddy.experimental=true -javaagent:${mockito.core.jar} </argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
In aggregate initialization, you know that you are always initializing the first member of a union, anonymous or not, while a structured binding does not know which anonymous union member is active, and so there is no way for a structured binding to know which anonymous union member to bind to.
If structured bindings were to always bind to the first anonymous union member, and that member were not active, it would lead to undefined behavior in C++ (even if type punning would work in C).
Anonymous unions do not have a union object which can be bound to in structured bindings, since the anonymous union members become members of the containing scope.
In contrast, a named union member can be bound by a structured binding, because then the union member object is the binding, and whichever union member is active can be accessed through the union object.
On a Mac, to copy text as plain text in Visual Studio Code:
Install the "Copy Plain Text" extension.
Use the shortcut "Ctrl + Option + C" to copy in plain text.
Paste the copied text as usual using "Cmd + V".
Add a class name to the button before appendChild, and add all the static styling in the CSS file.
JS:
button.className = 'lobby-button';
CSS:
.lobby-button:hover {
background-color: light-blue;
}
In case you need to add styling only using JS, other solutions are available here
The answer is in Message "error: resource android:attr/lStar not found".
Add the following code to app/android/build.gradle file solves the problem.
subprojects {
afterEvaluate { project ->
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")) {
project.android {
compileSdkVersion 34
buildToolsVersion "34.0.0"
}
}
}
}
I see when I navigate via url www.mysite.com/pricing/ it's working. but when I click on nav pricing, it is serving as www.mysite.com/pricing without forward slash. I put "/pricing/" in the nav. Still unsure why redirects happen.
Run flllow commands to upgrade all other dependacies
npx expo install --fix && npm start -- --reset-cache
Were you able to solve this? I am having a very similar issue and cannot find a solution anywhere.
Do we seriously not have a solution for this?
I am just trying to do this myself and it is super annoying.
Even more annoying to argue with the AI LLMs who give me stupid 'solutions' to this which do not work :-(
EDIT update: Here is the link to a Youtube video with two ways of doing this.
https://www.youtube.com/watch?v=9BlxoOqEdtU&ab_channel=LeonRenner
In my case the VPN was the cause, disable it and try again
What makes you think there's an issue with the state? With RocksDB, state that has been deleted can take some time to actually be compacted and freed. By default, I believe compaction begins somewhere around 400MB.
OP raised this question on the Futureverse discussion forum at https://github.com/futureverse/future/discussions/777, where much more progress were made. See that for more details.
You posted this around 2025-04-14. There was a regression in future 1.40.0 (released on 2025-04-10) that might explain this. I've fixed this regression in future 1.49.0 (release on 2025-05-09). See https://future.futureverse.org/news/index.html for more details on what has been updated and fixed.
The main mistake is to use a public GUI instead of the player's GUI. the path to the local GUI is accessible via game.Players.LocalPlayer.PlayerGUI
local gui = game.Players.LocalPlayer.PlayerGui
local button = gui. -- Enter your path to button
button.MouseButton1Click:Connect(function()
button.Text = "Clicked"
wait(1)
button.text = "CLICK ME"
end)
I would like you to give me the code for this snapchat account @gh.nouhaila
I used this for expire field in postgresql
ALTER TABLE sec_sessioninfo ALTER COLUMN expire_at SET DEFAULT CURRENT_TIMESTAMP + INTERVAL '1 HOUR'
I ran into this same problem and was able to resolve it by approaching the problem from a different angle. Instead of calling toast.custom()
I call toast()
and change the style of the normal toasts to not interfere with the custom content I want to display. This leaves the default animations in place.
First I added a custom class to all toasts via the toastOptions
prop on the always-present <Toaster />
element.
<Toaster
toastOptions={{
className: 'react-hot-toast'
}}
/>
I then targeted that custom class with CSS selectors to override the style of the default toast. In my case this required removing the margins and padding of the original toast and it's child element.
.react-hot-toast, .react-hot-toast > * {
margin: 0 !important;
padding: 0 !important;
}
Depending on the style of the content you want to display you may also need to set the background-color
, border-radius
, or other properties that conflict with the style of your custom JSX.
Is there a way to import the tables from mysql to solr without specifying field i.e. somehow I just specify the tables I want to import and solor creates those tables and imports all the fields.
You would need to create Python Function App, please see the example below:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cextensionv5&pivots=programming-language-python
For Python triggers and bindings are not supported to run as web job, instead you would need to create function app.
For anyone stumbling on this question after years, I tried Nyerguds' answer above, and while it did work for many programs such as Discord, it did not work out for pasting transparent pictures in Adobe Photoshop 2024 (25.12.3).
However, I did notice Photoshop will successfully paste transparent pictures copied from Google Chrome (but not Firefox).
For this reason, I have tried to investigate this by debugging the clipboard state, and while I don't have Nyerguds' intrinsic knowledge to really understand about what's going on internally in terms of format, here's a version that should work as a starting point for pasting transparent pictures in Photoshop.
You need to add a "Format17"
entry to the DataObject (also known as DIBV5), and the data must use the BITMAPV5HEADER with the bV5AlphaMask value set to to 0xFF000000
for Photoshop to acknowledge it as being a transparent picture.
The code below assumes you are already using Nyerguds' answer.
// byte[] dibData is the first 13 lines of the `public static Byte[] ConvertToDib(Image image)` code from Nyerguds's answer.
private static byte[] ToDibV5(byte[] dibData, int imageWidth, int imageHeight)
{
const uint dataStartPos = 0x7C;
var result = new byte[dataStartPos + dibData.Length];
// Lines with IGNORED means the value of 0 is used.
// https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapv5header
// 4 DWORD biSize;
ArrayUtils.WriteIntToByteArray(result, 0x00, 4, true, dataStartPos);
// 4 LONG biWidth;
ArrayUtils.WriteIntToByteArray(result, 0x04, 4, true, (uint)imageWidth);
// 4 LONG biHeight;
ArrayUtils.WriteIntToByteArray(result, 0x08, 4, true, (uint)imageHeight);
// 2 WORD biPlanes;
ArrayUtils.WriteIntToByteArray(result, 0x0C, 2, true, 0x01);
// 2 WORD biBitCount;
ArrayUtils.WriteIntToByteArray(result, 0x0E, 2, true, 0x20);
// IGNORED -- 4 DWORD biCompression;
// IGNORED -- 4 DWORD biSizeImage;
// IGNORED -- 4 LONG biXPelsPerMeter;
// IGNORED -- 4 LONG biYPelsPerMeter;
// IGNORED -- 4 DWORD biClrUsed;
// IGNORED -- 4 DWORD biClrImportant;
// IGNORED -- 4 DWORD bV5Size;
// IGNORED -- 4 LONG bV5Width;
// IGNORED -- 4 LONG bV5Height;
// IGNORED -- 2 WORD bV5Planes;
// IGNORED -- 2 WORD bV5BitCount;
// IGNORED -- 4 DWORD bV5Compression;
// IGNORED -- 4 DWORD bV5SizeImage;
// IGNORED -- 4 LONG bV5XPelsPerMeter;
// IGNORED -- 4 LONG bV5YPelsPerMeter;
// IGNORED -- 4 DWORD bV5ClrUsed;
// IGNORED -- 4 DWORD bV5ClrImportant;
// IGNORED -- 4 DWORD bV5RedMask;
// IGNORED -- 4 DWORD bV5GreenMask;
// IGNORED -- 4 DWORD bV5BlueMask;
// 4 DWORD bV5AlphaMask;
ArrayUtils.WriteIntToByteArray(result, 0x34, 4, true, 0xFF000000); // MUST BE SET for alpha to work in Photoshop.
// IGNORED - 4 DWORD bV5CSType;
// ArrayUtils.WriteIntToByteArray(fullImage, 0x38, 4, true, 0x57696E20); // Google Chrome sets this to LCS_WINDOWS_COLOR_SPACE(0x57696E20)
// CIEXYZTRIPLE bV5Endpoints;
// IGNORED - 4 DWORD bV5GammaRed;
// IGNORED - 4 DWORD bV5GammaGreen;
// IGNORED - 4 DWORD bV5GammaBlue;
// IGNORED - 4 DWORD bV5Intent;
// ArrayUtils.WriteIntToByteArray(fullImage, 0x6C, 4, true, 0x04); // Google Chrome sets this to LCS_GM_IMAGES(0x04)
// IGNORED - 4 DWORD bV5ProfileData;
// IGNORED - 4 DWORD bV5ProfileSize;
// IGNORED - 4 DWORD bV5Reserved;
Array.Copy(dibData, 0, result, dataStartPos, dibData.Length);
return result;
}
// Then, add this in your existing DataObject.
data.SetData("Format17", false, dibv5Data);
// If by any chance you are using SetClipboardData in user32.dll, use `(uint)17` instead of `"Format17"`.
https://youtu.be/yKzntXzwCRQ?si=c1R8EZOuLszSWjNV
Lately I’ve been experimenting with a no-code AI tool called Div-Idy that lets you build playable video games just by describing them in plain English. And yeah—I was skeptical too, but it actually works.
So far I’ve built:
A Flappy Bird clone with different themes
A stock market simulator where you buy/sell based on random events
A space shooter
A clicker/idle game
A weird game show trivia style thing
Even a basic platformer just by typing "a game where a cube jumps over spikes"
What’s crazy is it gives you the HTML/JS/CSS code instantly, and you can edit it if you want—or just hit play. You don’t need to install anything, and it works in your browser.
It’s not Unreal or Unity obviously, but for fast 2D games, game jam ideas, or learning, it’s surprisingly powerful. And it’s 100% free to try right now.
If you’re like me and have a ton of game ideas but not enough time (or code experience) to build them, it might be worth checking out:
🔗 https://div-idy.com?s=stack
Curious if anyone else has tried it. Would love to see what others come up with.
I have run in to the same problem I want to search multiple entities using the keyword like amazon and macy.com let you search the products database and different attributes like size, color etc are stored in different tables. I ran into a video on FTS in MYSql and it can accomplish what I want and integrates well with java as I'm using spring boot jpa for my implementation but I'm concerned about the performance. I want to follow up on the authors of this question and want to know is solr a better solution, if so can I keep my data in MYSQL database and somehow link it to solr and only use solr for search purposes.How do I do that as I don't fine much information on it on internet. Is solr better? is it easy to search solr using JPA or Java? and what about the author of this question what did you end up using and how is it working for you?
in trigger.yml
call_az_terra:
needs: parse_and_call
uses: ./.github/workflows/az_terra.yml
with:
environment: ${{ needs.parse_and_call.outputs.environment }}
secrets:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
az_terra.yml (reusable workflow)
on:
workflow_call:
inputs:
environment:
required: true
type: string
secrets:
AZURE_CREDENTIALS:
required: true
The solution was provided by Benjamin W.
In order to help you, we need a bit more information than that. Are we talking about a database running on your local machine or remote? What are the connection parameters you are using? What is the exact error you are getting?
The img_grey approach works for me after fixing the data type to 8-bit integers:
img = Image.fromarray(255*data.astype(np.uint8), 'L')
It seems like you are experiencing intermittent timeouts which could be caused by cold starts or concurrency saturation. There could be delays caused by cold starts if there are bursts of requests and despite setting the maxInstances to 30. Try setting the minInstances to 1 so that there is always a warm instance ready to handle requests.
Additionally, consider increasing your concurrency if a large number of requests comes beyond your concurrency limit as some requests may be queued.
You can also take a look at this Google Cloud Community discussion for helpful insights.
As far as I know, the android documentation specifies to use the assets
directory or a res/raw/
for raw files.
So, you could create the assets directory in ...\main
C:\Users\(me)\AndroidStudioProjects\(android studio project name)\app\src\main\assets
Check the official documentation: https://developer.android.com/guide/topics/resources/providing-resources
System was old, the key was not long enough, had to create a new key.
Did you figure it out ? I have the same problem
There seems to be an issue with forwarding ref in versions 2.0.0 and 2.1.0. It's a bug; they probably forgot to use ForwardRef when exporting the RigidBody Component. You can downgrade to 1.5.0, and your code will probably work :). Let's hope they'll fix it fast.
This problem was known by JetBrains and has been solved in version 2025.1.
Instead of to_timestamp
try date_format
Starting from 2025-05-08 Postgres 18 support virtual generated columns.
PostgreSQL 18 introduces virtual generated columns that compute the column values just-in-time during query execution, instead of having to store them. This is now the default option for generated columns. Additionally, stored generated columns can now be logically replicated.
https://www.postgresql.org/about/news/postgresql-18-beta-1-released-3070/
InputLabelProps
was deprecated in material UI v6 and is getting removed in v7. This is what is working for me in v6.4.10:
<TextField label="ML Features" slotProps={{inputLabel: { shrink: true } }} />
I don't think there is a readily available intermediate lockfile API that can be used at this moment. We were facing the same problem, and I have been researching for the same solution.rules_python
has an experimental lock API, but again, it doesn't generate the intermediate uv.lockfile
. On the other hand, rules_uv performs the pyproject.toml
to requirements.txt
translation you mentioned.
I found that this npm package does what I need. It detects similar characters and performs replacements so I can then test strings.
WinUI 3 does not support kiosk mode, and it is only available for UWP, hence why it isn't showing up when you try to set it up for kiosk mode.
From the maintainer of the Windows App SDK which includes WinUI 3:
I discussed this at some length with the team that owns this area. The short answer is that at least for now kiosk mode is limited to UWP applications, and a change to that will require changes to the OS itself since there are some security model considerations.
Please consider opening this ask in feedback hub so it's tracked as a platform request. While the team is now aware of the gap, direct customer input is always appreciated.
https://github.com/microsoft/WindowsAppSDK/discussions/2653#discussioncomment-3450696
I wasn't able to find any workaround for this but as the maintainer mentioned, it would require OS changes which I doubt that you can bypass using just your app.
You can track #3642 on the microsoft/WindowsAppSDK
repository for progress on kiosk mode. The thread doesn't have any workarounds I could find either.
the same as the top answer but this answer helps you find the url faster
search in console for -[MAAsset logAsset]: assetId:
then copy the "__BaseURL"
and "__RelativePath"
"__BaseURL" = "https://updates.cdn-apple.com/2025/mobileassets/043-04469/1BBC5F79-9AE4-4B5B-B082-92AF42967D6E/";
"__RelativePath" = "com_apple_MobileAsset_iOSSimulatorRuntime/A5D7BEF2-F8FE-45DB-9986-0D938766809A.aar";
example of download url of iOS 18.2 (22C146) SDK + iOS 18.3.1 (22D8075) Simulator (Components absent)
then download link is https://updates.cdn-apple.com/2025/mobileassets/043-04469/1BBC5F79-9AE4-4B5B-B082-92AF42967D6E/com_apple_MobileAsset_iOSSimulatorRuntime/A5D7BEF2-F8FE-45DB-9986-0D938766809A.aar
the reason of typing a seperate answer that i dont have enough reputation to make a comment, so an upvote would help in future helping people in comments
search "XYZ</module>"
there should be at least 2 result like
parent pom "<module>XYZ</module>"
and parent parent pom"<module>ABC/XYZ</module>"
delete parent parent pom module definition.
Unless I am missing something, wouldn't simply using a switch
trigger .onAppear
?
import SwiftUI
enum CustomTab: CaseIterable {
case one, two, three, four, five, six
}
struct CustomTabContainer: View {
//State values
@State private var selection: CustomTab = .one
//Body
var body: some View {
ZStack {
// Content area: only the active view is instantiated
Group {
switch selection {
case .one:
FirstCustomTabView()
case .two:
SecondCustomTabView()
case .three:
ThirdCustomTabView()
case .four:
FourthCustomTabView()
case .five:
FifthCustomTabView()
case .six:
SixthCustomTabView()
}
}
.foregroundStyle(.white)
.frame(maxWidth: .infinity, maxHeight: .infinity)
// Custom tab bar
HStack {
ForEach(CustomTab.allCases, id: \.self) { tab in
Button {
selection = tab
} label: {
Image(systemName: iconName(for: tab))
.font(.system(size: 24))
.frame(maxWidth: .infinity)
.foregroundStyle(selection == tab ? .accent : .gray)
}
}
}
.padding(20)
.background(.bar, in: Capsule())
.padding(20)
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom)
}
}
private func iconName(for tab: CustomTab) -> String {
switch tab {
case .one: return "1.circle.fill"
case .two: return "2.circle.fill"
case .three: return "3.circle.fill"
case .four: return "4.circle.fill"
case .five: return "5.circle.fill"
case .six: return "6.circle.fill"
}
}
}
struct FirstCustomTabView: View {
var body: some View {
ZStack {
Color.red
.ignoresSafeArea()
Text("First View")
.font(.largeTitle)
}
.onAppear {
print("first appeared")
}
}
}
struct SecondCustomTabView: View {
var body: some View {
ZStack {
Color.orange
.ignoresSafeArea()
Text("Second View")
.font(.largeTitle)
}
.onAppear {
print("second appeared")
}
}
}
struct ThirdCustomTabView: View {
var body: some View {
ZStack {
Color.yellow
.ignoresSafeArea()
Text("Third View")
.font(.largeTitle)
}
.onAppear {
print("third appeared")
}
}
}
struct FourthCustomTabView: View {
var body: some View {
ZStack {
Color.green
.ignoresSafeArea()
Text("Fourth View")
.font(.largeTitle)
}
.onAppear {
print("fourth appeared")
}
}
}
struct FifthCustomTabView: View {
var body: some View {
ZStack {
Color.blue
.ignoresSafeArea()
Text("Fifth View")
.font(.largeTitle)
}
.onAppear {
print("fifth appeared")
}
}
}
struct SixthCustomTabView: View {
var body: some View {
ZStack {
Color.purple
.ignoresSafeArea()
Text("Sixth View")
.font(.largeTitle)
}
.onAppear {
print("sixth appeared")
}
}
}
#Preview {
CustomTabContainer()
}
"I installed the app using the latest version of React Native (0.79.2). The app installs successfully, but when I try to set up navigation and run the following command:
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
the app fails to build. I receive an error related to react-native-reanimated, specifically in the path:
D:\My Applications\NavPragy\node_modules\react-native-reanimated\android.cxx\Debug\5vy6z126\arm64-v8a."
I did the above steps of uninstalling and installing the plugin. Still seeing the same issue. Is there any other way to resolve it?
Hi Did you find solution of this issue?
Selamat malam Google yang terhormat di sini saya meminta bantuan kepada google agar memulihkan akun google saya yang di retas oleh orang yang tak di kenal saya mohon bantuannya terimakasih
Using pyjanitor:
df.deconcatenate_column("V", sep="-", new_column_names=["V1","allele"])
added provideHttpClient to the app.config.ts and changed all HttpClient includiung the inject to provide HttpClient but now the app doesnt even display any text that the component is working
yes, you can either loop across files or parallel the runs.
for bam in $(ls *.bam)
do
samtools fastq $bam > my_converted_$bam_file.fastq
done
or
parallel -j 4 'samtools fastq {} > {.}.fastq ' ::: *.bam # where 4 is the number of jobs you want to run in parallel
Change type in the methods from holder: SurfaceHolder?
-> holder: SurfaceHolder
i made a sale in last 30 days and i still get the 429 error
This appears to be due to a liquibase release after version 4.28.0-1. I downgraded liquibase to version 4.28.0-1 from 4.31.1. At each version in between I tested the "update" command, and each version until 4.28.0-1 exhibited the same error. Once I arrived at version 4.28.0-1, the liquibase update succeeded.