Maybe you can try to see if your video stream is normal, https://edgeone.ai/tools/hls-player
I have also face the same issue in my Nextjs project. So what i have done - instead of using this
@tailwind base;
@tailwind components;
@tailwind utilities;
i use this in global.css
@import "tailwindcss/preflight";
@import "tailwindcss/utilities";
@import 'tailwindcss';
then =>install tailwind css
npm install -D tailwindcss postcss autoprefixer
=>check postcss.config for correct configuration
const config = {
plugins: ["@tailwindcss/postcss"],
};
export default config;
If tailwind.config.js is missing, generate it using:
npx tailwindcss init
Now import the css file into your main page
import './globals.css';
Add tailwind classes for demo purpose
<p className="text-blue-600 dark:text-sky-400">The quick brown fox...</p>
run it
npm run dev
Are you able to resolve the issue?
I am facing the same issue.
I ran Headed playwright in WSL ubuntu using xLaunch. The browser was launched successfully but failed at page.goto step
I tried to use page.keyboard.press('F5') but it's still failed.
I tried to get some logs and everything is ok:
await world.page.waitForSelector('body', { state: 'attached' }); // Wait for the body element to be attached
console.log('Page is ready for navigation');
// Wait until the page is fully loaded
await world.page.waitForLoadState('load');
console.log('Page is fully loaded and interactive.');
Except I can not interact with the browser.
The test runs ok in Headless mode.
I fixed the issue of not being able to pan when zoomed in by using alignment top left, the only issue left is maybe the logic that I'm using to paint the paths.
I used this last command successfully, however when I export the value (float) fields to the excel sheet they are always formatted as text? Is there a solution?
Thanks
Share
Added my fix to the Question section.
Thanks for the answers and inputs and sorry for late reply...
In my setup Java is used so solution with capture group of sln did the trick. Thanks a lot!
Qt's internal documentation is now available at https://contribute.qt-project.org/doc/. For example, here is The V4 Garbage Collector: https://contribute.qt-project.org/doc/d3/d9f/v4-garbage-collector.html.
import * as pdfjsLib from "pdfjs-dist/legacy/build/pdf";
pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
"pdfjs-dist/build/pdf.worker.min.mjs",
import.meta.url
).toString();
I am currently working with pdfjs-dist, and this did the trick for me
There are basically 3 ways in spring to inject a dependency to the target class. You need to understand the difference first to understand what you need to achieve.
Field Injection:
@Service
public class StudentService {
@Autowired
private StudentRepository studentRepo;
// complete service code using studentRepo
}
Field injection can be achieved using Spring by adding the @Autowired annotation to a class field. And what does @Autowired do? @Autowired is an annotation provided by Spring that allows the automatic wiring of the dependency. When applied to a field, method, or constructor, Spring will try to find a suitable dependency of the required type and inject it into the target class.
Setter Injection:
@Service
@Transactional
public class UserService {
private UserRepository userRepository;
@Autowired // Setter Injection
public void setUserRepository(UserRepository userRepository) {
this.userRepository = userRepository;
}
...
}
One more method to do Dependency Injection using Spring is by using setter methods to inject an instance of the dependency.
Constructor Injection:
@Service
@Transactional
public class StudentService {
private final StudentRepository studentRepo;
// Dependency being injected through constructor
public StudentService(StudentRepository studentRepo) {
this.studentRepo = studentRepo;
}
...
}
The final one is Constructor Injection. In OOP we create an object by calling its constructor. If the constructor expects all required dependencies as parameters, then we can be 100% sure that the class will never be instantiated without having its dependencies injected.
Now the confusing part for you is the @AllArgsConstructor annotation provided by the Lombok library. What this annotation does is that it simply creates a constructor of the class with all the available member fields of that class. So basically this annotation does the same thing what can be achieved by the constructor injection with a simple annotation. But remember the Field injection, Setter injection & Constructor injection are not the same & used on different scenarios. you can refer this link for more details - https://docs.spring.io/spring-framework/reference/core/beans/dependencies/factory-collaborators.html#beans-constructor-vs-setter-injection
May I provide my own experience on how I tackled the problem on Windows 11 on Oracle VM? I was unable to resolve the problem on installing the latest versions or old versions. Then I installed miniconda instead and installed those packages I needed with conda. It works.
This happens when trying to send data to the Zapier webhooks from inside a web browser and altering the Content-Type header during the process. Because of Cross Browser Security restrictions, your browser will reject these requests. To combat this, do not set a custom Content-Type
header in the request.
related:
How do I get the total CPU usage of an application from /proc/pid/stat?
The calculation is too intrusive/complex. So top own process hit %1-3 ish load:)
I wish kernel to provide this stuff more straitforward and programmaticaly, easy to machine parse.Maybe already exists i dont know.
I am not sure cgroups subsystem exposed something related.
Actually I found in the docs, that stimulus_controller() helper function escapes all non-scalar values, thus it is better to declare values in a straight forward attribute style.
data-controller="url-manager"
data-url-manager-prototype-value="{{ form_row(prototype)|e('html_attr') }}"
The driver is trying to capture the previous result before starting the new screen recording. You can disable this with the following (docs):
driver.start_recording_screen(forcedRestart=True)
The response shows that the model answers directly instead of calling the function, meaning it does not recognize that tool use is required. Try adjusting the system prompt
could you please share your experience, i thought of trying the same.
i have a awx 17 is running fine, recently i have upgraded the Postgres as well.
But i really want to upgrade the awx task/web containers
I'd like to know what causes this error. I have it too. In Luke's answer from Jan 19th, I fail to see how switching the installation sequence to ghcup solves the problem because we don't know the root cause. The error message suggests a configuration error, but that is very hard to diagnose if you're on the user side of the stack install.
Here's something i just came up with:
def permute(elements):
permutations=[]
for i in range(999999):
tmp_elements = elements.copy()
candidate = []
while len(tmp_elements)>0:
index = random.randint(0,len(tmp_elements)-1)
candidate.append(tmp_elements[index])
tmp_elements.pop(index)
if candidate not in permutations:
permutations.append(candidate)
permutations.sort()
return permutations
Here remove borderWidth from menu style
I've also faced this problem, so basically you can add the devTools manually to your react native app by just adding:
import { NativeModules } from 'react-native';
NativeModules.DevSettings.setIsDebuggingRemotely(true);
And if it is not fixed, then try another browser like chrome.
Turns out I forgot I had enabled a new feature (dynamic firewall) on my Turris router a while back. I feel like I did this long enough ago it wasn't a problem at the last renewal, but people are reporting issues with it blocking Let's Encrypt. I removed the feature and certbot succeeded. All is good now.
https://forum.turris.cz/t/dynamic-firewall-blocks-lets-encrypt-renewals/16876
/ Grid Container /
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); / Automatically adjusts columns based on screen size /
gap: 20px;
padding: 20px;
}
/ Content Styling /
.content {
background-color: #f4f4f4;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/ Video Styling /
.video iframe {
width: 100%;
height: 100%;
aspect-ratio: 16 / 9; / Maintains a 16:9 aspect ratio for the video /
border-radius: 8px;
}
/ Make sure the video container has a defined height /
.video {
background-color: #000;
border-radius: 8px;
}
<div class="grid-container">
<div class="content">
<h1>Responsive YouTube Video with CSS Grid</h1>
<p>This is an example of embedding a YouTube video inside a CSS Grid layout.</p>
</div>
<div class="video">
<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
It looks like the extra read is your best option - https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Syntax says that the grammar only supports comparator operators, not arithmetic operators.
I don't know if there's an underlying technical reason for this though - hopefully not, and hopefully one day DynamoDB supports this.
In PIXI 8, you need to use the App variable created at the beginning
//created at start
import {Application, Sprite, Container} from "pixi.js";
let App = new Application();
//use inside your application
let sprite = Sprite.from(App.renderer.generateTexture(container));
Where container
is a variable of type `Container` that has the other sprites in it that you want to be part of the mask. Basically, exactly like @Zyie's answer, but updated for Pixi 8.
Use a while
to check if the button is pressed. The if
statement wil evaluate to False
, so it will just skip over it and continue. Your code should be like this:
import streamlit as st
btn = st.button("Click here")
while not btn:
pass
# modal code here
"modal"
Creating groups and adding users to them won't grant access to the Azure subscription or allow users to create resources. To enable a user to perform any actions within the subscription, you must specifically assign access to the Azure subscription.
If you want to prevent users from accessing any information within Entra ID as well, you can enable a setting within Entra ID. Go to Entra ID > User Settings > Restrict access to Microsoft Entra admin center, and click Enable.
Once enabled, normal users won’t be able to view Entra ID. However, if they are granted access to the Azure subscription, they can still access the subscription, while the restriction on Entra ID remains in place.
This menu-maker came from following a discussion about how to force a response to an input statement. It is the only code I have ever written that I thought might be of use to others. Years too late to help Milan :(
def make_menu(alist, columns=3, prompt='Choose an item > '):
# adds an item number to each element of [alist] ([menu_items]).
# pop and concatenate [menu_items] elements
# according to number of columns,
# and append to [menu].
# join [menu] elements to form input prompt
alist.append('Quit')
menu_items = [f'[{i}] {j}' for i, j in enumerate(alist, 1)]
choices = [str(i + 1) for i in range(len(alist))]
menu_row = ''
count = 0
menu_items.reverse()
col_width = len(max(menu_items, key = len))
menu =[]
# build the final menu until no more menu_items
while menu_items:
count += 1
menu_row = menu_row + menu_items.pop().ljust(col_width + 3)
if count == columns or not menu_items:
menu.append(menu_row)
count = 0
menu_row = ''
menu.append(f'\n{prompt}')
mn = 1
mx = len(alist)
while True:
choice = input('\n'.join(menu))
if choice in choices:
break
else:
print(f'Enter a number between {mn} and {mx}\n')
ch = int(choice)
if ch == len(alist):
print("\n\nQuit")
exit()
return choice, alist[ch - 1]
if __name__ == "__main__":
mylist = 'cat dog monkey turkey ocelot bigfoot drop-bear triantewontegongalope'.split()
mychoice, item = make_menu(mylist, columns=3)
print(f'\nYou chose item [{mychoice}] \nwhich was {item}')
In my case, after 2 days of struggling , I installed the simulation component of Xcode and boom the problem's gone away. Open Xcode-> Settings -> Components -> install simulator
All I have to do is wrap the entity in org.springframework.hateoas.EntityModel and the URI will be perfectly converted
@RequestMapping(method = { RequestMethod.PUT }, path = "/{pos}", consumes = {MediaType.APPLICATION_JSON_VALUE, "application/hal+json"})
public ResponseEntity<Activity> edit(@PathVariable("pos") long pos, @RequestBody EntityModel<Activity> activity) {
// custom logic...
Activity updated = repository.save(activity);
return ResponseEntity.ok(updated);
}
In my case, after 2 days of struggling , I installed the simulation component of Xcode and boom the problem's gone away. Open Xcode-> Settings -> Components -> install simulator
I use this shape
- ssh -i $SSH_PRIVATE_KEY_GITLAB -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "source ~/.nvm/nvm.sh && cd $DEPLOY_PATH && npm install && npm run build:pm2"
source ~/.nvm/nvm.sh
- would be the part that solves missing path to pm2
If your text contains multiple HTML tags, this library NativeHTML can be very helpful.
Just install pandas in your enviroment or root Python by using
pip install pandas
I'd advise you to start using virtual enviroments or a package manager like Anaconda.
== Quest 6 received. Add an src/matrix_sort.c program that sorts the given
matrix, putting rows with the minimum sum of elements first, followed by rows
with the maximum sum of elements. Input data for the program are numbers N
and M – matrix dimensions, and NxM of the numbers – matrix elements. The memory
for the matrix must be allocated dynamically using one of the 3 methods. And it
has to be cleared at the end of the program. In case of any error, output "n/a".==
Input
Output
13 34 3 19 0 55-4 7 -10
-4 7 -104 3 19 0 55
I have the following excel VBA, which finds files based on an excel list and copies then from the source folder to the destination folder.
But, I need to be able to copy the file based on a file containing certain text, i.e. my excel list has QTMP-1 as a file name but I want it to identify and copy all files (there may be more than one) that contain QTMP-1 before moving to the next search item in my list.
The code below is based on an exact match (and assumes 1 list item to 1 file). What do I need to change?
Sub copyfiles()
'Updateby http://www.hardipdabhi.wordpress.com
'Copies files from one folder to another based on a list in excel
Dim xRg As Range, xCell As Range
Dim xSFileDlg As FileDialog, xDFileDlg As FileDialog
Dim xSPathStr As Variant, xDPathStr As Variant
Dim xVal As String
On Error Resume Next
Set xRg = Application.InputBox("Please select the file names:", "www.hardipdabhi.wordpress.com", ActiveWindow.RangeSelection.Address, , , , , 8)
If xRg Is Nothing Then Exit Sub
Set xSFileDlg = Application.FileDialog(msoFileDialogFolderPicker)
xSFileDlg.Title = "Please select the original folder:"
If xSFileDlg.Show <> -1 Then Exit Sub
xSPathStr = xSFileDlg.SelectedItems.Item(1) & "\"
Set xDFileDlg = Application.FileDialog(msoFileDialogFolderPicker)
xDFileDlg.Title = "Please select the destination folder:"
If xDFileDlg.Show <> -1 Then Exit Sub
xDPathStr = xDFileDlg.SelectedItems.Item(1) & "\"
For Each xCell In xRg
xVal = xCell.Value
If TypeName(xVal) = "String" And xVal <> "" Then
FileCopy xSPathStr & xVal, xDPathStr & xVal
End If
Next
End Sub
Brother, I followed all the steps, but the issue is still not resolved. I checked the zip module in PHP CLI using (php -m | grep zip
), but the error persists. I also uncommented extension=zip
in php.ini and restarted the server. I cleared Laravel cache, reinstalled Composer, and tried everything, but I'm still getting the Class 'ZipArchive' not found
error. I'm using [OS name], and my PHP version is [PHP version]. What should I do next?"
I'm having this trouble too
for me, I use react native and background color is darker than the on I have set
any advice on this??
You can try Client instead of User as below
await _hubContext.Clients.Client(loginResponseDto.User.Id).SendAsync("SessionExpiryTime", tokenExpiry);
soon, we won't even need to add anything to + reference anything from the HTML - instead we can accomplish this completely within just a few lines of CSS using the sibling-count()
and/or sibling-index()
functions!
Just a simple code
$video_url = 'https://www.youtube.com/watch?v=2nO8KRtAqjA&t=3s';
$video_id = '';
// Extract the YouTube video ID
if (preg_match('/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/]+\/.+\/| (?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/i', $video_url, $matches)) {
$video_id = $matches[1];
}
$card_image = $video_id ? "https://img.youtube.com/vi/{$video_id}/hqdefault.jpg"
echo $card_image;
as of node version 23
const EventEmitter = require('node:events');
class MyEmitter extends EventEmitter {}
const myEmitter = new MyEmitter();
myEmitter.on('event', () => {
console.log('an event occurred!');
});
myEmitter.emit('event');
Thanks for TheMaster reply.
I add Slides service and test. I understand.
but i rewrite my app to use advanced slides service is difficult...
Publish add-on script is very difficult.
function createPresentation() {
try {
const presentation =
Slides.Presentations.create({'title': 'MyNewPresentation'});
console.log('Created presentation with ID: ' + presentation.presentationId);
return presentation.presentationId;
} catch (e) {
// TODO (developer) - Handle exception
console.log('Failed with error %s', e.message);
}
}
Save it as test_pandas.py
in your computer.
If you are on Windows and have Python installed, go to that folder, right click the file, "Edit with IDLE > Edit with IDLE..."
Then click "Run > Run Module"
If you are on Linux, just open a terminal to that folder and run:
python3 test_pandas.py
\> trigger alert when any queue in the storage has messages not processed
You used the “Queue Message Count” measure with the “Average” aggregation type.
To obtain the alert using the Log Analytics workspace and queue metrics, we can
enable the transaction by going to metrics and then enable storage read, write, delete under the Diagnostics settings by keeping destination as log analytics workspace.
To retrieve the unprocessed queue messages from storage, use the KQL query below.
\> trigger alert when any queue in the storage has messages not processed
You used the “Queue Message Count” measure with the “Average” aggregation type.
To obtain the alert using the Log Analytics workspace and queue metrics, we can
enable the transaction by going to metrics and then enable storage read, write, delete under the Diagnostics settings by keeping destination as log analytics workspace.
To retrieve the unprocessed queue messages from storage, use the KQL query below.
```kql
AzureMetrics
| where TimeGenerated > ago(7d)
| where MetricName == "QueueMessageCount"
| where Total > 0
| summarize Count=count() by bin(TimeGenerated, 1h), ResourceId
| where Count == X
| order by TimeGenerated desc
```
created the alert rule while utilizing the dynamic threshold.


Created the Action groups

The Alert had been triggered to the mail as I had connected to the Action group of the alerts

**References:**
[Create an Azure Monitor metric alert with dynamic thresholds - Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-dynamic-thresholds)
[Monitor Azure Queue Storage](https://learn.microsoft.com/en-us/azure/storage/queues/monitor-queue-storage?tabs=azure-portal)
created the alert rule while utilizing the dynamic threshold.


Created the Action groups

The Alert had been triggered to the mail as I had connected to the Action group of the alerts

**References:**
[Create an Azure Monitor metric alert with dynamic thresholds - Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-dynamic-thresholds)
[Monitor Azure Queue Storage](https://learn.microsoft.com/en-us/azure/storage/queues/monitor-queue-storage?tabs=azure-portal)
Yes, it is true; I worked on a Blazor Web Assembly project.
Blazor WebAssembly is slower than React/Vue in startup time
For heavy computations, Blazor WebAssembly can be faster than JavaScript frameworks
DOM manipulation in Blazor WebAssembly is slightly slower due to JS Interop
If you want a lightweight app with quick interactivity, React/Vue are better choices.
If you want to reuse C# code, have complex logic, or prefer .NET development, Blazor WebAssembly is great
In my team, we've got two scripts
Allow the web app to communicate with the container registry -- adding the IP of the web app to the ACR network settings
Adding the IP of the build agent to the container registry -- script that gets the IP of the azure devops build agent and we add that to the ACR network settings
I also faced this issue, and after debugging, I found that it was due to an incorrect import in my index.css file.
reason : Incorrect imports
This is incorrect and can cause styles (including margin and padding) to not apply properly.
Correct import (✅ Right way)
Instead, just use:@import "tailwindcss"
sdtio.h interfaces are 'buffered'. introduces sync penalty, and some usec delays.
test your OS native unbuffered interfaces or even syscalls if you dont care about portability.
Keep in your mind that buffered and unbuffered ifaces MUST not mix into the same project or same underlying file.
Try myhlscloud, I used it and found it quite effective
the flutter_google_places: ^0.3.0. package has the issue recently also we dont get any new version of it .instead using flutter_google_places Use google_flutter_places..it should resolve the issue
I tried running npm run check
; still got the error. Tried adding the ".svelte-kit/ambient.d.ts"
line to the tsconfig; still got the error. Tried both in tandem and still got the error! I had to add an env.d.ts
file to make the errors go away. In terms of build errors, I am pretty far from production-ready at this point, but a cursory npm run build
didn't show any errors popping back up.
I am also facing the same issue and I have not found any solution to this.
RESET SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
start slave;
This works well for me and doesn’t require a plugin:
:%norm I<p>^OA</p>
Where the % sign indicates the whole page. Capital I inserts at the beginning of the line
Where ^O represents ctrl-o which exits insert mode. The capital A appends insertion at the end of the line.
Another example covering a range of lines:
:5,25norm I<p>^OA</p>
Is identical except the % sign is replaced by the range of lines you wish to tag.
The accepted answer by @DSM has a problem highlighted in the comments:
Be careful with dense because if the values are the same, they get assigned the same rank! – Valerio Ficcadenti
This may cause your code to break if you rely on the uniqueness of (group_ID, rank)
.
The following code uses argsort within each group and inverts the map, so it does not suffer from the same problem:
df["rank"] = df.groupby("group_ID")["value"].transform(
lambda x: x.to_frame("value")
.assign(t=np.arange(x.shape[0]))["t"]
.map({
y: x.shape[0] - i
for i, y in enumerate(x.argsort())
}))
The distilbert-base-uncased model has been trained to treat spaces as part of the token. As a result, the first word of the sentence is encoded differently if it is not preceded by a white space. To ensure the first word includes a space, we set add_prefix_space=True. You can check both the model and its paper here: distilbert/distilbert-base-uncased
Unfortunately you have to read through the model's technical report or research around to see how they are trained. Happy learning! :)
Solana rent is a fee mechanism on the Solana blockchain that charges users for account storage. If accounts become inactive, users can lose SOL over time. RentSolana is a tool that helps users recover locked SOL rent by closing unused accounts and optimizing their wallets -- solana rent recovery
I know this is out of context, but where do you learn Kotlin Multiplatform and Compose Multiplatform? Looking forward to your reply!
My findings so far: I had .net and extension conflict, so uninstalled SSIS. Then I tried reinstalling it.
The log file indicates an unstable parent registry key.
Ran sfc /scannow in cmd and resulted in nothing.
Uninstalled Net8 bootstrapper from programs, restarted.
Once that was done, I was able to launch the Visual Studio Installer, add SQL Server Integration Services Projects 2022 back from the extensions list, individual components.
Extension was visible in the launched app Visual Studio Extensions.
Enabled the extension and was prompted to upgrade to ver 1.5. For some reason that was handled as a download.
Completed download and ran that as administrator with repair option because modify options were to install somewhere else or uninstall. That failed.
Followed troubleshooting link: https://learn.microsoft.com/en-us/sql/ssdt/ssis-vs2022-troubleshooting-guide?view=sql-server-ver16#installation-issues, which is where I am now and I'm tired and going to bed.
try MediaQuery.removePadding
MediaQuery.removePadding(
context: context,
removeTop: true,
removeRight: true,
removeLeft: true,
removeBottom: true,
child: GridView.builder(
)
)
To clone a submodule from another project, you can refer to the steps below.
In your new_proj, turn off Limit job authorization scope to current project for non-release pipelines and Protect access to repositories in YAML pipelines option from Project Settings -> Pipelines -> Settings.
In your pipeline, set submodules
to true
in your checkout task.
steps:
- checkout: self
submodules: true
- script: |
tree
displayName: 'ListAllFiles'
In your base_repo project, add build service account Project Collection Build Service (yourOrgName) into the Contributors group. (If you still have the same error in the pipeline, add project-level build service account new_proj Build Service (yourOrgName) into the Contributors group as well.)
Result:
go to the terminal directly from the jupyter notebook( File > New > Terminal) and run the following commands:
conda create -n opencv
then:
conda activate opencv
then:
conda install -c anaconda opencv
for firefox(maybe all based on it) its stored into prefs.js
its configurable for all? browsers. So its should be stored somewere.
But most users dont chance defaults and browsers accepts XDG defaults as own defaults mostly i think.
Don't have any expertise in frontend, but i think you should try this video: https://www.youtube.com/watch?v=4qNZYlcxy8g
Set the padding of the GridView to zero
GridView.builder(
// Add this line
padding: EdgeInsets.zero,
{...}
)
Use settings.json:
"python.defaultInterpreterPath"
https://update.code.visualstudio.com/1.83/win32/stable
this will work for win 7/win8/win8.1 32 bit
I found this native implementation playlist
https://youtube.com/playlist?list=PLQhQEGkwKZUqIf4ZAcZOHCUdpNExKYK9n&si=A11qEOy8wLSx8CTz
When you say 'disk write buffer' are you means kernel buffer or hw buffer?
if it is the latter see dmesg.
Try to quote the identifier, use back ticks:
@Table(name="`Player_Stats`")
I came across the same issue as reported by OP, so I dug a bit further into the source code around DeterminePathSeparator and got it to output the filename that it didn't like.
It turns out that this error can occur when a filename has a %5C in it on Azure File Shares, e.g. sample%5Ctest.xml
The filename is "decoded" into sample\test.xml
So the Azure file path is then
https://......../folder/sample\test.xml
You can't see this using Azcopy list command.
Logged https://github.com/Azure/azure-storage-azcopy/issues/2977
I was really interested in finding a dynamic reallocation for gsoap, so I decided to give it a shot. Here's what I came up relatively quickly.
The trick is that soap_malloc actually stores the allocation size and the next allocation address at the end of the allocation by adding extra padding.
In short, to reallocate a soap pointer, you need to add extra padding, write the allocation size, write the next pointer address, write the canary word and update the pointer address in the allocation chain.
Failing to do so would result with memory error while disposing of the gsoap instance.
I simply derived the logic from soap_dealloc and soap_malloc.
The following seems to work perfectly fine, but could probably use further testing:
SOAP_FMAC1 void* SOAP_FMAC2
soap_realloc(struct soap *soap, void * ptr, size_t n, size_t * orignalsize){
char *p;
size_t k = n;
if (SOAP_MAXALLOCSIZE > 0 && n > SOAP_MAXALLOCSIZE){
if (soap)
soap->error = SOAP_EOM;
return NULL;
}
if (!soap)
return realloc(ptr, n);
//Add mandatory extra padding
n += sizeof(short);
n += (~n+1) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary by rounding up */
if (n + sizeof(void*) + sizeof(size_t) < k){
soap->error = SOAP_EOM;
return NULL;
}
//Search pointer if memory alloaction list
char **q;
for (q = (char**)(void*)&soap->alist; *q; q = *(char***)q){
if (*(unsigned short*)(char*)(*q - sizeof(unsigned short)) != (unsigned short)SOAP_CANARY){
printf("ERROR: Data corruption in dynamic allocation\n");
soap->error = SOAP_MOE;
return NULL;
}
if (ptr == (void*)(*q - *(size_t*)(*q + sizeof(void*)))){
break;
}
}
if (*q){
//Extract original allocation size
if(orignalsize){
*orignalsize = *(size_t*)(*q + sizeof(void *));
//Shift original size to exclude original size and canary value
*orignalsize -= sizeof(void*) - sizeof(size_t) - sizeof(unsigned short); //Handle round up?
}
//Reattach broken pointer chain
if(*(char***)q)
*q = **(char***)q;
p = (char*) realloc(ptr,n + sizeof(void*) + sizeof(size_t));
if(!p){
printf("ERROR: Data corruption in dynamic allocation\n");
soap->error = SOAP_MOE;
return NULL;
}
/* set a canary word to detect memory overruns and data corruption */
*(unsigned short*)((char*)p + n - sizeof(unsigned short)) = (unsigned short)SOAP_CANARY;
/* keep chain of alloced cells for destruction */
*(void**)(p + n) = soap->alist;
*(size_t*)(p + n + sizeof(void*)) = n;
soap->alist = p + n;
return (void*)p;
}
printf("ERROR: Pointer not found in memory allocation cache\n");
soap->error = SOAP_SVR_FAULT;
return NULL;
}
Here's a simple example to increment allocation count by 1
__sizeProduct++;
prod_array = soap_realloc(soap, prod_array, sizeof(struct ns1__Product) * __sizeProduct, NULL);
newproduct = &prod_array[__sizeProduct-1];
soap_default_ns1__Product(soap, newproduct); // <----- This is the important part otherwise you will have to populate the entire object manually
Here's a another example to increment allocation count by n amount. This method allows a jump without needing to know the original size.
size_t original_size;
int newsize = n;
prod_array = soap_realloc(soap, prod_array,sizeof(struct ns1__Product) * newsize, &original_size);
for(size_t i=newsize;i>original_size;i--) // <-- Loop newly allocated space
soap_default_ns1__Product(soap, (struct ns1__Product *) &prod_array[i-1]); // <----- This is the important part otherwise you will have to populate the entire object manually
I originally designed this for my onvifserver project with the goal to lower memory footprint as much as possible.
I researched it and found out that Flutter hasn't made any official library for desktop app connections with Firebase. An alternative approach is to go through the native platform and do some configuration, which is quite complex and mind-tripping work.
[rsyslog_v8]
name=Adiscon CentOS-$releasever - local packages for $basearch
baseurl=http://rpms.adiscon.com/v8-stable/epel-7/$basearch
enabled=0
gpgcheck=0
gpgkey=http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon
protect=1
this is intendet to be a comment. not enought rep to make a comment sorry.
maybe qemu related? So remove qemu from the equation to see whether it is or not. I means run it as native.
Here are some suggestions you can check. The exposed API
api://6ea427d1-d3f6-479c-8cc8-f4cb73278354/portal/aws
is different from what I can see on the error message
api://6ea427d1-d3f6-479c-8cc8-f4cb73278354/portal
.
Make sure you are exposing a correct address.
If you use encodeURIComponent()
on the entire scope, the slashes (/) will be encoded, which may cause Azure
to misinterpret the scope.
you can try it like :
"scope=" + encodeURIComponent("api://6ea427d1-d3f6-479c-8cc8-f4cb73278354/portal/aws")
or just hard code it for testing, like:
"scope=api://6ea427d1-d3f6-479c-8cc8-f4cb73278354/portal/aws"
In your error message, stated tenant mismach
.
Make sure the correct tenant ID is used in the authentication request.
If your app is multi-tenant, ensure that it is properly set up for external tenants.
The tenant ID should be correct in your Azure endpoint:
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/authorize
.
Also, make sure that the API permission is consented for users. If not, try granting Admin Consent in Azure Portal under API Permissions.
Plus, When requesting a token, ensure that you are requesting Delegated Permissions under API Permissions and that they match what is configured under Expose an API
.
Verify that the scope is set under Expose an API
. Make sure the Client ID matches the registered application. Check if the Application ID URI (api://{client-id})
is correctly set in Expose an API
.
You can also log your scope before redirecting and make sure the scope is set correctly: console.log("Requested Scope: ", scopeName);
.
If still you couldn't spot the issue, please provide more information.
Good luck.
As Adam Nevraumont pointed out, std::unique_ptr<void*>
wont work.
If you're using c++17
, std::any
is probably your best option.
This would replace std::unique<void>
with std::unique<std::any>>
. Keep in mind std::unique_ptr<void>
won't compile without a lot of extra work.
Best options are:
void*
std::unique<std::any>>
for smart pointer support + type safetyResources on std::any
Questions related to std::any
:
Restarting my ngrok agent did the trick for me
The before-leave
is not an event and should be passed via v-bind:before-leave
(or :before-leave
).
In Element Plus documentation, attributes, events, and slots are typically categorized on the right side using dedicated sections labeled Attributes
, Events
, and Slots
.
Since Firebase has migrated from legacy FCM APIs to HTTP v1, client-side apps (e.g., Swift apps) cannot directly generate access tokens. Instead, tokens must be created using a server-side service account.
However, I managed to generate an access token directly in Swift using CryptoKit
and SwiftJWT
and successfully send push notifications via Firebase Cloud Messaging (FCM).
Download your serviceAccount.json
file from Firebase.
Add it to your Xcode project.
Below is my implementation to generate an access token and send an FCM notification:
//
// Created by DRT on 14/02/20.
// Copyright © 2020 mk. All rights reserved.
//
import Foundation
import UIKit
import CryptoKit
import SwiftJWT
class PushNotificationSender {
func sendPushNotification(FCMtoken: String, title: String, body: String,type: String,targetFUserId: String,firebasePushId: String) {
self.getAccessToken { result in
switch result {
case .success(let token):
print(token)
self.sendFCMMessage(token: token,
fcmToken: FCMtoken,
title: title,
body: body,
type: type,
targetFUserId: targetFUserId,
firebasePushId: firebasePushId)
case .failure(let failure):
print(failure)
}
}
}
// this func will send the notification to the fcm token device
func sendFCMMessage(token: String, fcmToken: String, title: String, body: String,type: String,targetFUserId: String,firebasePushId: String) {
let url = URL(string: "https://fcm.googleapis.com/v1/projects/gymstar-94659/messages:send")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.addValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
let body: [String: Any] = [
"message": [
"token": fcmToken,
"notification": [
"title": title,
"body": body
],
"data": [
"badge" : "1",
"sound" : "default",
"notification_type": type,
"message": body,
"firebaseUserId": targetFUserId,
"firebasePushId": firebasePushId
]
]
]
let bodyData = try! JSONSerialization.data(withJSONObject: body, options: [])
request.httpBody = bodyData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
do {
if let jsonData = data {
if let jsonDataDict = try JSONSerialization.jsonObject(with: jsonData, options: JSONSerialization.ReadingOptions.allowFragments) as? [String: AnyObject] {
NSLog("Received data:\n\(jsonDataDict))")
}
}
} catch let err as NSError {
print(err.debugDescription)
}
}
task.resume()
}
// this func will return access token and if some error occurs, it returns error
func getAccessToken(completion: @escaping (Result<String, Error>) -> Void) {
guard let jsonPath = Bundle.main.path(forResource: "serviceAccount", ofType: "json") else {
completion(.failure(NSError(domain: "FileNotFound", code: 404, userInfo: nil)))
return
}
do {
let jsonData = try Data(contentsOf: URL(fileURLWithPath: jsonPath))
let credentials = try JSONDecoder().decode(ServiceAccountCredentials.self, from: jsonData)
let iat = Date()
let exp = Date(timeIntervalSinceNow: 3600) // Token valid for 1 hour
// Create the JWT claims
let claims = JWTClaims(
iss: credentials.client_email,
scope: "https://www.googleapis.com/auth/cloud-platform", // Change this to your required scope
aud: "https://oauth2.googleapis.com/token",
iat: iat,
exp: exp
)
// Create a JWT signer using the private key
var jwt = JWT(claims: claims)
// Private key in PEM format, needs to be cleaned
let privateKey = credentials.private_key
.replacingOccurrences(of: "-----BEGIN PRIVATE KEY-----", with: "")
.replacingOccurrences(of: "-----END PRIVATE KEY-----", with: "")
.replacingOccurrences(of: "\n", with: "")
let jwtSigner = JWTSigner.rs256(privateKey: Data(base64Encoded: privateKey)!)
let signedJWT = try jwt.sign(using: jwtSigner)
// Send the signed JWT to Google's token endpoint
getGoogleAccessToken(jwt: signedJWT) { result in
switch result {
case .success(let accessToken):
completion(.success(accessToken))
case .failure(let error):
completion(.failure(error))
}
}
} catch {
completion(.failure(error))
}
}
// Send the JWT to Google's OAuth 2.0 token endpoint
func getGoogleAccessToken(jwt: String, completion: @escaping (Result<String, Error>) -> Void) {
let tokenURL = URL(string: "https://oauth2.googleapis.com/token")!
var request = URLRequest(url: tokenURL)
request.httpMethod = "POST"
request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
let bodyParams = [
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"assertion": jwt
]
request.httpBody = bodyParams
.compactMap { "\($0)=\($1)" }
.joined(separator: "&")
.data(using: .utf8)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
completion(.failure(error))
return
}
guard let data = data else {
completion(.failure(NSError(domain: "NoData", code: 500, userInfo: nil)))
return
}
do {
if let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any],
let accessToken = json["access_token"] as? String {
completion(.success(accessToken))
} else {
completion(.failure(NSError(domain: "InvalidResponse", code: 500, userInfo: nil)))
}
} catch {
completion(.failure(error))
}
}
task.resume()
}
}
struct ServiceAccountCredentials: Codable {
let client_email: String
let private_key: String
}
struct JWTClaims: Claims {
let iss: String
let scope: String
let aud: String
let iat: Date
let exp: Date
}
extension Data {
func base64URLEncodedString() -> String {
return self.base64EncodedString()
.replacingOccurrences(of: "+", with: "-")
.replacingOccurrences(of: "/", with: "_")
.replacingOccurrences(of: "=", with: "")
}
}
Generate an Access Token:
Read Firebase service account JSON file.
Create a JWT using SwiftJWT
.
Sign it with your Firebase private key.
Send it to Google's OAuth 2.0 token endpoint to get an access token.
Send FCM Notification:
Use the access token in an Authorization
header.
Send a push notification to the target FCM token
via https://fcm.googleapis.com/v1/projects/YOUR_PROJECT_ID/messages:send
.
Replace "YOUR_PROJECT_ID"
in the sendFCMMessage
method.
The serviceAccount.json
should be added to your project.
The private key must be properly formatted before using it for signing.
Go to Stores > Attributes > Product. Make sure:
"tags" attribute exists.
"Use in Search" and "Visible on Catalog Pages on Storefront" are set to Yes.
"Use in Product Listing" is enabled if you want it available in the API.
Never had an issue with time being inconsistent across the platforms. It's probably an issue within your save methods themselves.
If these methods perform a heavy operation, such as writing to a file, then they might take more time than the WaitForSeconds you're doing. You see, both InvokeRepeating and IEnumerator allow to do some "parallel" work, but it's not truly parallel. It's still happening on the main thread, so it might freeze the thread for, let's say, 200ms, and your next invocation will be 200ms later.
If you really need to do such heavy work in the background constantly, you might want to consider creating a new real thread - that will do the saving - without taking up your main thread upon which you run the game.
You might also want to attach a remote profiler session to your phone and investigate what it is that eats your framerate.
Additionally, running the same coroutine within the same coroutine like you do is a very ugly line of code :P. Just put the content of the coroutine inside the while(true) loop, and you'll have the same effect.
To @Dan Pittsley answer's, when I simply rename file or folder in explorer in GitLab.
The changed name will be displayed on left panel of explorer.
However, it seems that the file name will not be changed even I reload the web page.
I forgot to say I open the explorer through select the file and click Edit
button then select
web page.
I suggest to use the Qt::mightBeRichText function.
As the official Qt documentation states:
Returns
true
if the string text is likely to be rich text; otherwise returnsfalse
.
Although it might detect if it is rich text, in my opinion it's an accurate approach.
I cannot color your cells but we can at least beautify them. You can directly use HTML tags <fieldset>,<legend> and <center> and <b> to make text boxes with their own special little headings that are bold, with centered text inside as well. It looks very nice, no running of code is needed. Unfortunately, no colors. Yet.
Not aware of any method to do this automatically, and given that AMIs don't have a kubernetes attribute the only way is either via tags if your using custom amis and/or by name. For example you could extend your ami selector like so:
amiSelectorTerms:
- name: "amazon-eks-node-1.30-*"
set the version of nuxt SEO to 2.1.1 for now, they havent even update the documentation
pure logic:
first: get only 'day' part of 'date' cmd. save it.
then: increment it by one, check overflow(february or march) and apply with 'overflow fix' if needed.
final: put new value back to 'date format'
can you specify please what do you mean by generating your swagger doc using javadocs instead of swagger annotations
Currently Docker hub is only supported to use registry mirror to my knowledge as I don't see any mention of it on the ECR documentation. I have found a feature request for you're asking for
So.. just in case any else comes here like me.. We used to have a profiler in android studio
View> Tool Window > Profiler..
and it would show you all the activities as you move throughout the app.. In Meerkat, its a bit more hidden, but still there,
Run the app in the emulator
open profiler
select Find CPU Hotspots
click btn Start anyway
use ur app..
Then u will get the recording of the activities used.
If you're still facing this error on browser-side:
you have to specify type="module"
on the script tag
<script type="module" src="main.js"></script>
You are getting this error because you haven't installed Pandas. While you might have Pandas installed in Anaconda (which is why it works there), to work in IDE you'll need to install Pandas through pip install pandas
or similar.
Check Hibernate SQL Output
Enable SQL query logging to see what queries Hibernate is executing:
Add this to application.properties:
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
Check the console logs when making the GET request. If Hibernate is querying player_stats instead of "Player_Stats", it means case sensitivity is the problem.
Ensure Entity Scanning Is Enabled
This ensures Spring Boot recognizes Player as a valid entity.
Try changing to @Service on PlayerService and check
PostgreSQL treats unquoted table names as lowercase by default. Your entity is mapped to "Player_Stats" (with mixed case), but Spring Boot, by default, generates queries using lowercase (player_stats).
try : " from moviepy import VideoFileClip" instead of "from moviepy.editor import VideoFileClip". It works.
According to the OP in the comments:
The macs I was working on had python 2.7 installed; I wrote the program on a windows machine using python 3.7. To solve the problem, I installed python3, used
pip3 install pandas numpy
(since pip by itself was installing the modules to 2.7), and thenpip3 install xlrd
.
You have 2 options to copy tables from one storage account to another.
Use Azure storage explorer - https://learn.microsoft.com/en-us/azure/storage/storage-explorer/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows
Build Azure data factory pipelines
If you are doing this just once Azure storage explorer is best but use ADF pipelines it this is repetitive exercise.
No extra work needed. As long as reCAPTCHA is enabled and properly configured in the admin panel, Magento automatically takes care of validating the response before processing the registration. If the reCAPTCHA fails, the form submission is rejected.