The ABA problem in concurrent programming occurs when a shared variable changes from A → B → A, making it appear unchanged to a thread performing a compare-and-swap (CAS) operation. This can lead to unintended behavior because the underlying object at address A may no longer be the same.
In Rust, solving the ABA problem often involves techniques like:
Tagged Pointers with Versioning: Each pointer is paired with a version number, ensuring that even if the same memory address is reused, outdated versions are detected.
Epoch-Based Reclamation: This method tracks memory usage across threads and prevents premature deallocation.
Hazard Pointers: A safe memory reclamation technique that ensures a thread accessing a shared object is aware of potential modifications
Length: {{ (list$ | async)?.length }}
@if((list$ | async)?.length > 0){
<ul>
<li *ngFor="let item of (list$ | async)">
{{ item.name }}
</li>
</ul>
}@else {
<span>no data</span>
}
I use Angular 17
, and this solution worked perfectly for me. To check the length of an observable array and handle empty data, I use the async pipe
with the safe navigation operator ?.
Why are you using the LinkedIn Community Management API? Do you have to retrieve followers, statistics and posts for a company?
Why don't you just connect through the official LinkedIn Sales Navigator ?
I have the same error have you solved the problem?
Click on OVR button on the status bar of VS Code to enable insert mode.
(In my keyboard, insert key didn't wok. But Print Screen key worked)
I can confirm what @jxtps mentioned in the comment: logging into the relevant Wikimedia project is required to activate the API key.
For instance, if you're making a request to a German Wikipedia page, your Python code might look like this:
access_token = 'your-long-access-token'
response = requests.get(
'https://de.wikipedia.org/w/api.php',
params={
'action': 'query',
'format': 'json',
'titles': 'Judas_Priest',
'prop': 'revisions',
'rvlimit': 1,
},
headers={
'Authorization': f'Bearer {access_token}',
}
)
However, if you haven’t logged into the German Wikipedia (in this case, de.wikipedia.org
), the API call will fail — likely with a 403 error. Simply visiting the page in your browser while logged in will activate your access token for that specific project, and subsequent API calls should return a successful 200 response.
This issue should be considered resolved.
openPanel.allowedContentTypes = [.json]
There is already an issue open with this error
https://github.com/flutter/flutter/issues/166677
They say: "(The good news is that while this is crashing, it's crashing specifically while the app is shutting down—generally this is the case where a user swipes an app away in the task manager—so the user won't experience it as a crash.)"
It means you’re developing and running an MVC-based application (like in Laravel, ASP.NET MVC, Django, or Ruby on Rails) on a dedicated hosting environment.
conclusion:-
Using MVC on a dedicated host is ideal for businesses or developers building custom web applications with high traffic, advanced features, or sensitive data. You get the power and flexibility of a full server, with the structured coding benefits of MVC.
In test_lCase case:
def test_lCase():
assert shorten("TWitTER") == "TWtTR"
should read: =="TWtTER"
you missed an "E"
you can implement like this
// If token still valid, return it
if (Date.now() < token.accessTokenExpires) {
return token;
}
// If token expired, refresh it
return await refreshAccessToken(token);
This config solves the problem
local wf = hs.window.filter
-- print primary screen id
screen_id = hs.screen.primaryScreen():id()
print(screen_id)
filter = wf.new():setCurrentSpace(true):setDefaultFilter{}:setScreens(screen_id)
switcher_space = hs.window.switcher.new(filter)
hs.window.switcher.ui.showThumbnails = false
hs.window.switcher.ui.showSelectedThumbnail = false
hs.hotkey.bind('alt', 'tab', 'Next window', function()
switcher_space:next()
hs.alert.closeAll()
end)
hs.hotkey.bind('alt-shift', 'tab', 'Prev window', function()
switcher_space:previous()
hs.alert.closeAll()
end)
-- Bind option + number keys to switch spaces
for i = 1, 6 do
hs.hotkey.bind('alt', tostring(i), function()
hs.spaces.gotoSpace(i+2)
end)
end
print(hs.spaces.allSpaces())
Add vertical-align: middle;
to the td
, can solve the problem.
Replace axios and qs modules with this in frontend projects and reduce size 73KB:
I think in this case you need to rethink your UI architecture. Why not do something like this:
if isPurchased {
// process pro functions
} else {
// open paywall
}
First of all, you need to understand why Isolates are used in Flutter. There are multiple purposes.
Why Isolates are Used in Flutter
Preventing UI Freezes:
Moves high or expensive operations off the main UI thread
Keeps your app responsive and jerky free while heavy computation
True Parallel Execution:
Allow concurrent processing across multiple CPU cores
Each isolate runs independently with its own thread and isolated memory
Batter Memory Management:
Handle better memory management than traditional way.
Background Processing:
Handles tasks when the app is in the foreground
Limited background processing capabilities
Limitations of Isolates
However,There are also isolates limtations
- Communication Overhead: Passing data to isolates serialization/deserialization
- No Direct UI Access: Isolates can't directly update the UI
- App Termination: Isolates don't live/survive on application termination.
----------------------------------
Remote push notifications
Still If you would like to use push notifications in a way even when your app is terminated or killed, you can handle push notification logic on the server side. With server-side push notifications, both Android and iOS platforms will work perfectly. so push notification will not be depend on isolate.
from pathlib import Path
import shutil
# Move the video file to a downloadable public location
source_path = Path("/mnt/data/Ruslan_i_Lyudmila_Book_Trailer_Husan.mp4")
target_path = Path("/mnt/data/Download_Ruslan_i_Lyudmila_Book_Trailer_Husan.mp4")
# Copying the file to ensure it's available under
If you need to convert raster images into PSD format for editing or handoff, try using:
👉 ImageConvertHQ - Image to PSD
Converts any image to .PSD
100% free and browser-based
Useful for frontend devs, UI/UX teams, and prototyping
Bonus: Works smoothly on mobile and doesn’t require any technical steps. Just upload > download. Done.
Problem solved at
https://github.com/langchain-ai/langgraph/discussions/4384
import base64
from langchain_core.tools import tool
def image_to_base64(image_path: str) -> str:
with open(image_path, "rb") as image_file:
encoded_string = base64.b64encode(image_file.read())
return encoded_string.decode('utf-8')
def do_screenshot_and_save_it_to_local_disk():
# Pretend that this function will take a screenshot and return the path of the image.
return "/path/to/pic.png"
@tool
def get_screenshot():
picture_path = do_screenshot_and_save_it_to_local_disk()
return [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_to_base64(picture_path)}"}}
]
Use a data model that represents your UI structure.
Build a composable function that recursively renders the appropriate UI components based on the data model.
Use state to dynamically update the UI when needed.
By following this approach, you would be able to create a highly flexible UI that adapts to runtime conditions and user preferences.
I have two Doubts
1)Can i able to Add Multiple Packages to be scanned using @ComponentScan? is its Recommended or encouraged to create packages out of Main Class Path ?
2)if i use Both @SpringBootApplication and @ComponentScan does it cause Any unpredictable Issues While Testing , Deploying ?
<input type="checkbox" id="F" name="F" class="form-check" value="0"
@if (str0[0] == 'T') { Html.Raw("checked"); } />
I have a problem with this syntax. "checked" show on top of page.
anybody can help me?
NextAuth's signOut only clears your browser/client session, you still have to make an API call to your IAM backend's end-session-endpoint with the correct parameters.
When a page loads, start a timer (and restart it with user activity if necessary) and when the timer runs out, make the call to the end-session-endpoint. If that call is successful, next-auth will pickup the session state as 'unauthenticated' then you can (for example) router.push to your login page.
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download Artifact'
inputs:
buildtype: 'current'
downloadtype: 'specific'
downloadPath: '$(System.ArtifactoryDirectory)'
targetPath: '$(System.ArtifactoryDirectory)'
- task: Bash@3
displayName: 'Copy and Upload to BrowserStack (App Live & App Automate)'
inputs:
targetType: inline
script: |
#!/bin/bash
# Define directories
SOURCE_DIR="$(System.ArtifactsDirectory)"
DEFAULT_DIR="$(System.DefaultWorkingDirectory)"
DEST_DIR="$DEFAULT_DIR/artifacts"
# BrowserStack Upload URLs
APP_LIVE_UPLOAD_URL="https://api-cloud.browserstack.com/app-live/upload"
APP_AUTOMATE_UPLOAD_URL="https://api-cloud.browserstack.com/app-automate/upload"
# Replace with your actual BrowserStack username and access key, and securely reference them using variable groups from the Azure DevOps Library.)
BROWSERSTACK_USERNAME="resfeber_JwNHAx"
BROWSERSTACK_ACCESS_KEY="Enter Your Key Here"
# Create destination directory if it doesn't exist
mkdir -p "$DEST_DIR"
# Find and copy matching APK and IPA files from both SOURCE_DIR and DEFAULT_DIR
find "$SOURCE_DIR" "$DEFAULT_DIR" -type f \( -name "*.apk or.aab" -o -name "*.ipa" \) -exec cp {} "$DEST_DIR" \;
echo "✅ Matching artifacts copied to $DEST_DIR"
# List files in the destination directory
ls -al "$DEST_DIR"
# Find the latest artifact
ARTIFACT_PATH=$(ls -t "$DEST_DIR"/*.apk or .aab "$DEST_DIR"/*.ipa 2>/dev/null | head -n 1)
# Check if an artifact was found
if [[ -z "$ARTIFACT_PATH" ]]; then
echo "❌ Error: No valid artifact found in $DEST_DIR" >&2
exit 1
fi
echo "✅ Artifact selected for upload: $ARTIFACT_PATH"
# Function to upload to BrowserStack
upload_to_browserstack() {
local UPLOAD_URL=$1
local UPLOAD_TYPE=$2
echo "🚀 Uploading to BrowserStack $UPLOAD_TYPE..."
RESPONSE=$(curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY" \
-X POST "$UPLOAD_URL" \
-F "file=@$ARTIFACT_PATH")
echo "📤 Upload response: $RESPONSE"
# Extract app_url from response
APP_URL=$(echo "$RESPONSE" | jq -r '.app_url')
if [[ -n "$APP_URL" && "$APP_URL" != "null" ]]; then
echo "✅ $UPLOAD_TYPE Upload Successful!"
echo "🔗 Use this link to open the app in BrowserStack $UPLOAD_TYPE: $APP_URL"
else
echo "❌ Error: Upload to $UPLOAD_TYPE failed!" >&2
exit 1
fi
}
# Upload to both App Live and App Automate
upload_to_browserstack "$APP_LIVE_UPLOAD_URL" "App Live"
upload_to_browserstack "$APP_AUTOMATE_UPLOAD_URL" "App Automate"
int main() {
int t, height, width;
int circles, radius;
vector<int> xCordinates;
vector<int> yCordinates;
int num;
string input;
cin >> t >> height >> width;
cin >> circles >> radius;
// Ignore the newline character left in the buffer after the last cin
cin.ignore();
getline(cin, input); // Read the third line
stringstream ss1(input);
while (ss1 >> num) {
xCordinates.push_back(num);
}
getline(cin, input); // Read the third line
stringstream ss2(input);
while (ss2 >> num) {
yCordinates.push_back(num);
}
return 0;
}
You have several options that create a visual barrier between the elements, which stops margin collapsing
Add overflow: hidden to their parent
.container {
overflow: hidden;
}
Add a small padding or border to their parent
.container {
padding-top: 1px; (or padding-bottom)
}
git remote over http on windows and IIS
this is how to do this what You want on iis - it works but they may be better solution as writen because of cgi is obsolete .
Maybe you have a misunderstanding of OpenAI's batch API
The pylink
restart command is what needed here; indeed it is not very clear in the docs.
So I did find another solution. Very simple but it does the job. I've added a status property in the object, when deleting the status is changing
Then using styling{display: skill.status === 'delete' ? 'none' : 'flex'}
In addition to answers provided, if your using intelli J it is also essential to enable Lombok plugin.
There might be [server] FATAL: kernel too old
for kernel is too old. It seems like VSCode still use glibc < 2.28 or libstdc++ < 3.4.25?
I've same question and found this via Google search. I know this is a 10 years old post but people like me might also find this post.
Now the latest Python document has clear instructions about derived exception instance:
https://docs.python.org/3/tutorial/errors.html#handling-exceptions
A class in an except clause matches exceptions which are instances of the class itself or one of its derived classes.
An except clause listing a derived class does not match instances of its base classes.
The first matching except clause is triggered.
I'd say it's a lot more clear than the terms like "in turn" in old documents.
JaggerJo's solution above worked for me, thanks for that! Using Apple M3 Pro (Sequoia) and .NET 8.
I removed rsync homebrew lib for now because it's affect the XCode build, here is command for removing rsync for now. Later with update this issue might fixed
How does Tadarise 10mg work in individuals with high cholesterol?
High cholesterol and ED (Erectile Dysfunction) are two common health challenges faced by men worldwide. Both conditions can significantly affect one’s quality of life. While high cholesterol is linked to cardiovascular problems, ED is often considered an uncomfortable topic to discuss. However, the good news is that there are medications available for both.
Among the popular ED treatments, Tadarise 10mg is a widely used option. It has gained popularity for its effectiveness, but many wonder how it interacts with high cholesterol. To understand this, we must first see how high cholesterol and ED are related.
Can High Cholesterol Cause ED?
High cholesterol can be an underlying cause of ED because it negatively affects blood circulation. Cholesterol builds up in the arteries, forming plaques that narrow the passageway for blood. This reduced blood flow can affect various parts of the body, including areas responsible for normal function. When blood cannot circulate freely, it becomes challenging to maintain normal physiological responses, leading to conditions like ED.
It is important to manage cholesterol levels, not just for your heart but also for your overall well-being. Cholesterol can be managed by tweaking your lifestyle, whereas managing ED requires medications like Tadarise 10mg.
How Does Tadarise 10mg Help Manage ED?
Tadarise 10mg contains tadalafil, which belongs to a group of medications that work by relaxing blood vessels and improving blood flow. This process is essential for maintaining normal physiological responses. The active ingredient, tadalafil works by inhibiting an enzyme called PDE5, which otherwise restricts blood flow. By inhibiting PDE5, Tadarise 10mg allows for better circulation. Like any medication, Tadarise 10mg may cause some side effects, including:
Headache
Flushing
Nasal congestion
Dizziness
Muscle pain
It is advisable to consult a healthcare professional before using Tadarise 10mg, especially if you have any pre-existing conditions or are on medication for cholesterol.
How does Tadarise affect individuals with High Cholesterol & ED?
Tadalafil primarily works by relaxing the smooth muscle cells and blood vessels. However, its impact on cholesterol levels is not as straightforward. Potential effect of Tadalafil on High Cholestrol individuals includes -
Most research indicates that Tadalafil does not directly reduce cholesterol levels. However, it improves blood circulation, which might indirectly benefit cardiovascular health.
Tadalafil's ability to enhance blood flow might slightly improve vascular health, but it should not be considered a treatment for high cholesterol.
Some studies suggest that improved endothelial function due to increased blood flow may have marginal benefits, but the evidence is limited.
Tadalafil is generally safe when taken with statins (cholesterol-lowering drugs), but following a healthcare professional's advice is crucial.
Combining Tadarise with specific cholesterol medications might increase the risk of side effects, such as muscle pain or weakness.
Always consult a healthcare provider before combining Tadarise with cholesterol-lowering medicines to ensure safety and avoid adverse interactions.
Buying Tadarise 10mg in Bulk
When considering buying Tadarise 10mg in bulk, keep the following in mind:
Certified Suppliers: Ensure you purchase from authorized distributors to avoid counterfeit products.
Compare Prices: Bulk purchases often come with discounts, but compare prices to get the best deal.
Check Expiry Dates: Long-term storage should be considered when buying in bulk.
Consult a Doctor: Before making any purchase, get medical advice to confirm that Tadarise 10mg is suitable for you.
Conclusion
Tadarise 10mg is an effective option for managing ED, but its interaction with high cholesterol needs careful consideration. While high cholesterol does not directly affect the efficacy of Tadarise, the combination of cholesterol medications and Tadarise can have implications. Always seek medical advice to ensure safe usage, especially when dealing with both conditions. Authenticity and proper storage are crucial for bulk purchases to maintain the medication’s effectiveness.
**
Disclaimer: This text is not intended to give any medical advise of any type. This is solely for informational purposes. Please consult a doctor before consuming any medication or undergoing any treatment to know what will work best for you as per severity.**
=indirect(vlookup(a1,$i$8:$j$13,2,false))
in my case I use: =INDIRECT(UNIQUE('Data Validation'!$E$2:$E$25,FALSE,TRUE))
I have tried this but it throws an error: "The source currently evaluates to an error. Do you want to continue?"
Thank You Very Much, its resolved,
This is the same issue than when I try running from gutter icons:
Currently, you cannot run common Compose Multiplatform tests using android (local) test configurations, so gutter icons in Android Studio, for example, won't be helpful.
Found in the documentation, section "android emulator".
#include <iostream>
#include <vector>
#include <sstream>
using namespace std;
int main() {
string input = "1 2 3 4 5"; // Space-separated string of integers
vector<int> nums;
// Create a stringstream object with the input string
stringstream ss(input);
int temp;
// Extract integers from the stringstream and add them to the vector
while (ss >> temp) {
nums.push_back(temp);
}
// Output the vector contents
for (int num : nums) {
cout << num << " ";
}
return 0;
}
I don't know how to create context KafkaClients and I got bug kerberos only
As an alternative, IPLocate also offers a free IP to Country database, also available on GitHub without an account.
Disclaimer: I run this service.
This happens due to the dependency conflicts. Both apache-poi and other dependency has transitive dependency of commons-compress. And both the dependencies uses different version of commons-compress.
There are two ways to fix this issue.
Exclude the transitive dependency commons-compress from other dependency.
Use dependencyManagement to enforce global version for commons-compress
The issue was the the CSV file contained Commas in the number values. So while the column was set to an integer SQLite was reading it as a number until the comma, then it was dropping the rest.
Opened the CSV in Excel, removed the commas, recreated the table and its summing correctly now.
If you're having rounding issues within the math of your program, I've been there. This line works like a charm.
x = Math.round(x * 100.0) / 100.0;
That being said, if you only want the answer to be rounded at the end (aka the output) just use SYstem.out.printf("%2f", x); like these guys suggested
I just created my account so I can't comment yet. However, I am working on a group project for school and I can say you just saved me from so much trouble. Thank you !
I am using redis-server 5.0.8. It works fine with python: channels_redis 4.2.1 and redis 5.2.1.
The early used redis-server 3.2.12 had such 'BZPOPMIN' issue.
Did you end up figuring out a solution? Thanks!
i do not know, and I am having trouble too
.surpriseCursor {
cursor: url(clapping_hands.gif), help; /* max size = 32 X 32 pixels */
}
<a name="surprise"> </a>
<a href="#surprise" onclick="PlaySound('applause', 'applause.mp3'); return false">
<img class="surpriseCursor" src="Broken_Heart.gif"><p>
</a>
The FQDN is not currently defined for ICE candidates. In RFC 5245, FQDN candidates were under-defined. Specifically, RFC 5245 states that when parsing <connection-address>, an agent can differentiate between an IPv4 address and an IPv6 address by the presence of a colon in its value; the presence of a colon indicates an IPv6 address. This is impossible for FQDN. This means it is impossible to determine the priority for this candidate when the candidate checklist is created, and the transport for the m-line when this candidate is selected. As a result, FQDNs were prohibited when RFC 8839 was written. The intent was that if anyone actually needed FQDN candidates, an extension or an update to RFC 8839 would be written.
I think FQDN candidates are generally a bad idea. Instead of adding an FQDN candidate, an agent responsible for generating SDP should resolve the DNS name and insert the actual address into the SDP..
I removed rsync homebrew lib for now because it's affect the XCode build, here is command for removing rsync for now. Later with update this issue might fixed.
For now run this command:
brew uninstall rsync
This is expected to be resolved by checking the settings in firebase.json. Please check the following points.
"public": "dist"
Please make sure that static files such as index.html are placed directly under the "dist" folder. If not, fix "dist" to the correct path.
El error es porque le pones la variable "l_param_name" a todo
p_parm_name => l_param_names,
p_parm_value => l_param_names,
In my case I was trying to reference the secret value directly with valueFrom, but the secret/value was not yet created, after creation the error was resolved.
Could you provide more information about your bug?
Could you check if you hace the lucide-react.d.ts file? You can add the LayoutDashboard there
Don't make space between the element at html document I try that it success with me .
It is not boxing.. Let me clarify.
Boxing is value type to reference type.
So class object is reference type but the property inside is still value type. So you are assigning value type to value type
Deleting the .sln folder works for me (using Visual Studio 2022)
Cloudflare can detect and block automated traffic even when you're using real browsers like Chromium through Puppeteer. This is because it doesn’t just check for JavaScript execution—it also evaluates fingerprinting signals, behavioral patterns, and IP reputation.
Try using puppeteer-extra-plugin-stealth, which masks some of Puppeteer’s detectable behaviors. This helps in many cases but isn’t foolproof against more aggressive Cloudflare configurations.
Run Chrome in headful mode (not headless), mimic human-like interactions (e.g., delay typing, random scrolls), and avoid triggering rate limits. Still, this might not get past high-security pages.
Your IP plays a big role. Using datacenter IPs often leads to immediate blocks. Rotating through residential or ISP proxies with good reputation can help avoid detection.
If you're hitting a wall with Puppeteer and spending too much time on anti-bot workarounds, Bright Data’s Scraping Browser might be worth exploring. It’s fully compatible with Puppeteer and Playwright, but it runs in an environment optimized for scraping—handling the fingerprinting, session management, and IP rotation for you. You just write your Puppeteer scripts like usual.
Cloudflare is tough with Puppeteer alone. You can tweak your setup with stealth plugins and proxies, but for high-reliability scraping, a tool like the Scraping Browser gives you the same Puppeteer interface without the blocks.
After clearing the cache if the launchpad is open, the launchpad will appear as blank initially.
After sometime all the tiles will be visible in the launchpad. If you refresh the browser, you will see that one by one all the tiles will be appearing.
Since you are only going to 100, you only need to test for divisibility by 2, 3, 5, and 7. That should be a no-brainer not requiring the Miller-Rabin primality test. And, as done with the best sieve of Eratothsenes above, you can only consider numbers of form 6n+1 and 6n-1, so you don't even need to test for divisibility by 2 or 3.
Side show: It is easy to test a number for divisibility by 2, 3, or 5 just by looking at it. Do you want to know how to bust a big number down so you can easily test for divisibility by 7, 11, and 13 just by looking? Easy. Suppose the number is 123456. Subtract the 123 from the 456 to get 333. This has the same remainder modulo 7, 11, and 13. Do not be afraid of negative results; just add 1001 to make it positive.
Check for divisibility by 7: add double the hundreds digit to the remaing two, 6+33 = 39 = 4mod7.
Check for divisibility by 11: subtract the tens digit from the sum of the hundreds and ones digits, 6-3 = 3. So we have 3 mod 11.
Check for divisibility by 13: I do this the hard way, subtracting multiples of 13. Sorry. I would think 333, 203, 73, 21, 8. That is 123456 modulo 13.
There is a great book that I highly recommend: "Dead Reckoning" by Ron Doerfler.
Pls use ReactQuery and Mobx or Redux
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
const [submitting, setSubmitting] = useState(false)
const [formError, setFormError] = useState('')
In the most recent version of SmartGit, you need to request a license. As an alternative, I prefer using gitg on Ubuntu 24.04. gitg is the GNOME GUI client for viewing Git repositories. You can install it via the App Center or from https://wiki.gnome.org/Apps/Gitg.
file -> invalidate caches/restart and it will work.
Do you want to implement a video player with OpenCV?
Let's say the fps of a normal video is 24, a interval of diplaying a frame is around 41 milliseconds.
Then you should measure the execution time of the code above waitKey, denotes as exeTime, the paraemter of waitKey should be (41 - exeTime).
Brother, you can change the setting.
If this doesn't work, you can set the format directly to the template.
{{ added_date|date:"Y-m-d H:i" }}
which you show this: 2025-04-24 06:26
in the 24 Hr format.
This is probably happening because you are trying to click on an element that is not clickable, such as the input element for example.
You can grab the element that contains the input, whether it is a span, label or div.
What about setting the defaults to null on the constructor and use the theme on the build method? This is what the flutter widgets do and that's how your app is more maintainable.
For example, in your build method you would have something like:
final theme = Theme.of(context);
return MyChildWidget(color: color ?? theme.primaryColor, ...);
As for dimensions, you could also use a dimension theme. See https://pub.dev/packages/dimensions_theme
I never used this package, but I had a similar implementation on a project.
Compound assignments on volatile have actually been un-deprecated for C++23.
History
You can find here the discussion that led to the de-deprecation:
https://www.reddit.com/r/cpp/comments/jswz3z/compound_assignment_to_volatile_must_be/
The corresponding paper:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2327r0.pdf
The tracking of said paper's state (now accepted/merged):
https://github.com/cplusplus/papers/issues/1023
And finally, the push by JF Bastien to revert the de-deprecation, which failed but led to all compound assignments on volatile being de-deprecated for consistency:
https://github.com/cplusplus/nbballot/issues/488
Silencing the warnings
Clang option -Wno-deprecated-volatile can be used to silence the warnings in the meanwhile, however, I believe it'll also silence warnings about other volatile uses that are still deprecated, such as volatile-qualified parameters and return types.
Removing most of the remaining deprecated uses of volatile is being discussed for C++26 and seems pretty close to adoption: https://github.com/cplusplus/papers/issues/1556
This should do what you want. You didn't say if you wanted any data currently below row 1 to be overwritten or pushed down, so I've assumed pushed down.
Dim count As Long
count = CLng(Range("A1")) + 1
rows("2:" & count).Insert
Range("b1:g" & count).FillDown
Finally, I explicitly added these roles to the default service account ([email protected]) and now it remembers through deployments.
Cloud Datastore Owner
Eventarc Event Receiver
Firebase Admin
Firebase Admin SDK Administrator Service Agent
Firebase Authentication Admin
Storage Admin
char
can be used instead of bool
.
And to distinguish it from std::vector<char>
, where char
is really used as char
, a typedef can be introduced:
typedef char boool;
std::vector<boool> v;
Is it possible to put a nested shell to background and return to a parent shell similarly to the
vim
example?
Yes
kill -STOP $$
try following for resizing the image:
<?php
$data = $form->getData();
$uploadedFile = $data['profielfoto'];
// get the original file info
$originalPath = $uploadedFile['tmp_name'];
$originalName = $uploadedFile['name'];
$targetDirectory = dirname($originalPath); // original dir
// create new filename
$info = pathinfo($originalName);
$resizedFilename = $info['filename'] . '_resized.' . $info['extension'];
$resizedPath = $targetDirectory . '/' . $resizedFilename;
// get dimensions from uploaded img
list($originalWidth, $originalHeight) = getimagesize($originalPath);
// calculate new dimensions
$percent = 0.5; // that would be 50% percent of the original size
$newWidth = $originalWidth * $percent;
$newHeight = $originalHeight * $percent;
$originalImage = imagecreatefromjpeg($originalPath);
$resizedImage = imagecreatetruecolor($newWidth, $newHeight);
// resize and save
imagecopyresampled($resizedImage, $originalImage, 0, 0, 0, 0, $newWidth, $newHeight, $originalWidth, $originalHeight);
imagejpeg($resizedImage, $resizedPath, 90); // 90 is quality (0-100)
// free up your memory
imagedestroy($originalImage);
imagedestroy($resizedImage);
// now $resizedPath should contain the path to the resized image
or if you want to crop the image heres some code for that too:
<?php
// define crop area
$cropWidth = 200; // your crop width
$cropHeight = 200; // desired crop height
// calc position (here: center)
$cropX = ($originalWidth - $cropWidth) / 2;
$cropY = ($originalHeight - $cropHeight) / 2;
// create the cropped image
$croppedImage = imagecreatetruecolor($cropWidth, $cropHeight);
imagecopyresampled($croppedImage, $originalImage, 0, 0, $cropX, $cropY, $cropWidth, $cropHeight, $cropWidth, $cropHeight);
// save cropped image
$croppedFilename = $info['filename'] . '_cropped.' . $info['extension'];
$croppedPath = $targetDirectory . '/' . $croppedFilename;
imagejpeg($croppedImage, $croppedPath, 90);
imagedestroy($croppedImage);
(used from my project and modified)
i hope that works for your code but please double check
Descargar go mod : descarga módulos sin modificar go.mod o go.sum.
go mod tidy : limpia y actualiza go.mod y go.sum asegurándose de que reflejen las dependencias reales requeridas por el código.
Inside mockStatic constructor, use
withSettings().defaultAnswer(invocation -> {
if ("now".equals(invocation.getMethod().getName())) {
return (your now mock);
}
return invocation.callRealMethod();
})
Have you tried adding a childBuilder.ToTable(x => x.IsTemporal());
after defining the properties inside OwnsOne?
I believe that, by doing that, you inform ef that childProp is also temporary.
I got that from here.
They're completely unrelated.
Public Alerts is basically an emergency broadcast system used by governments to push notifications to everybody in an area... which might be an earthquake, but can be anything the authorities want to broadcast. For example, it saw some use in my city just last week due to a series of major storms passing through... and it was used during the Covid pandemic to advise of short-notice changes in the lockdown rules.
In contrast, Earthquake Alerts is a system for monitoring and warning of earthquakes specifically.
I like David's response, since it gives me the flexibility I need. However: correct it to:
<ul>
{% for p in pages %}
{% unless p.show_in_nav == false %}
<li><a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a></li>
{% endunless %}
{% endfor %}
</ul>
(the only difference is prefixing p.
before show_in_nav
)
I tried all the other options metioned and none of them worked for me.
The solution for me was to reinstall laragon and to make it not happen again open the database (HeidiSQL) go to tools, user manager, chose user "root" and put a new password there and save it, then exit HeidiSQL, go to MENU (top left), then MySQL, change root password, in the first one you have to write the one that you just set in HeidiSQL and then you can change it to something else (yes, again).
If you dont change the password in the MENU it will ask you for a password that doesnt exist. And if you dont changed the password in HeidiSQL first it will say that the password is empty (?) so you can not change it in the MENU if you leave the first box blank.
After doing all this you have to use the last password that you set in the MENU everytime you acces the database.
Looks like it was recently added(2 days ago):
Issue: https://github.com/gruntwork-io/terratest/issues/1540
PR: https://github.com/gruntwork-io/terratest/pull/1543
Last release was a few months ago:
https://github.com/gruntwork-io/terratest/releases
Hopefully this will make it into the next release?
After the time I came up to the working solution. I decided to use Celery task to calculate next occurrence date, when training passed.
Future improvements can cover celery-beat schedule, to make sure all trainings was updated at the end of the day.
I can't pretend that it is the best solution, but if anyone has more experience working with this type of work, I would appreciate any changes or improvements.
models.py
class Training(TimestampModel):
template = models.ForeignKey(TrainingTemplate, on_delete=models.CASCADE, related_name='trainings')
start_time = models.TimeField()
end_time = models.TimeField()
location = models.ForeignKey(TrainingLocation, on_delete=models.PROTECT, related_name='trainings')
recurrences = RecurrenceField()
next_occurrence = models.DateTimeField(null=True, editable=False)
next_occurrence_celery_task_id = models.UUIDField(null=True, editable=False)
members = models.ManyToManyField(Member, through=MemberTraining, related_name='trainings', blank=True)
objects = TrainingManager()
class Meta:
ordering = ['next_occurrence', 'start_time']
indexes = [
models.Index(fields=['next_occurrence', 'start_time']),
]
def save(self, *args, **kwargs):
self.next_occurrence = self.calculate_next_occurrence()
super().save(*args, **kwargs)
def calculate_next_occurrence(self) -> datetime.datetime | None:
try:
now = timezone.now()
today = timezone.make_naive(now).replace(hour=0, minute=0, second=0, microsecond=0)
next_date = self.recurrences.after(today, inc=True)
combined = datetime.datetime.combine(next_date.date(), self.start_time)
aware_dt = timezone.make_aware(combined)
if aware_dt > now:
return aware_dt
next_date = self.recurrences.after(today + timedelta(days=1), inc=True)
return timezone.make_aware(datetime.datetime.combine(next_date.date(), self.start_time))
except AttributeError:
return None
signals.py
@receiver(post_save, sender=Training)
def calculate_next_occurrence(sender, instance, *args, **kwargs):
if instance.next_occurrence:
if instance.next_occurrence_celery_task_id:
AsyncResult(str(instance.next_occurrence_celery_task_id)).revoke()
result = calculate_next_training_occurrence.apply_async(
args=(instance.id, ),
eta=instance.next_occurrence,
retry=False,
)
Training.objects.filter(id=instance.id).update(next_occurrence_celery_task_id=result.id)
tasks.py
@shared_task
def calculate_next_training_occurrence(training_id: int):
try:
training = Training.objects.get(id=training_id)
training.next_occurrence = training.calculate_next_occurrence()
training.save(update_fields=['next_occurrence'])
except ObjectDoesNotExist:
pass
Any updates on this? I have the same problem
Yes
E
B
Jung
Vfdddff
Jeejejejd
I agree with @Gunjan Patel's answer that downgrading to a supported Node.js version is the right fix. While the small improvement to your package.json is that it’s safer to specify:
"engines": {
"node": "20.x"
}
Buildpacks only support a fixed set of Node versions, so sticking to a known compatible one (like 18.x or 20.x) is the most reliable option.
Latency or packet loss can cause desynchronization, where multiple peers claim one thing and the rest claim another thing. None of them can agree on what happened since there is no ground truth or any other entity that can validate. It's like asking to hold a game of Football without a referee. Yes players can moderate each other, but all it needs is enough people to blink at the same time, to disagree on what events occurred in the match. You may start up in a synchronized state, but eventually, peers will diverge. It's just a byproduct of entropy.
Besides this obvious issue, P2P networks are not very secure, and it would be very troublesome to keep hackers banned, they can just reconnect without a server moderating. Sure you could keep a copy of banned accounts, but again, you have no way to validate bans. Also it's very easy for someone to flood the network with fake accounts, to the point where a distributing a copy of the list of bans becomes infeasible.
Finally, a hacker can send packets with fake position.
I don't want any latency of adding in a server
Everything i mentioned above is conflict issues, which you could still resolve. However, traversing the network and validating information from every peer will add extreme latency. Even if you parallelize the network, every peer's latency will depend on the slowest of the group.
In conclusion: Both systems will introduce latency, but a Server can provide conflict resolution and better moderation, but a P2P network will have a lot of difficulty replicating the same behaviour, and implementing and designing that system will be strenuous.
Hi I was wondering about this too! It looks like you can get the permalink from the uploaded file in GitHub, paste it into your browser and switch the 'https://github.com" to "https://raw.githubuser.content.com" and remove the blob
⬇️
to get an embed url for the iframe viewer:
<iframe
src="https://mozilla.github.io/pdf.js/web/viewer.html?file=THE ABOVE LINK HERE"
width="100%"
height="600px"
style="border: none;">
</iframe>
found the solution.
i had to remove logging from the elastalert.py
Did you find out how use the Clover gateway on Python?
you can also convert data by requesting it in imperial format from the api like so....
`fetch("https://api.openweathermap.org/data/2.5/weather?q=salt lake city&units=imperial") .then(res => res.json()) .then(data => console.log(data))
`
Thanks to Richard Heap and his suggestion, I was able to adjust the soap envelope using SoapUI. Turns out, there is no SOAPAction header, because the action is actually passed in Content-Type header:
Header values can be checked like this:
Create a mock service and start it
Create a request and send it
Open the message log in the bottom of the mock service window
As it also turns out, different actions have different namespace versions, so you cannot just use one namespace like
'http://thalesgroup.com/RTTI/2015-05-14/ldb/$action'
and expect it to work with all actions by adding them in the end.
Another way of thinking about this question is calling log2(n) of k. With that we have n=2k. When n grows asymptotically (approach infinity), k also grows.
So 5log2(n) (call it F(N) like Sumeet) becomes 5k and n1/2 (call it G(N) as well) becomes 2k/2.
We can clearly see that G(N) = O(F(N)), since 2k/2 <= 5k for k >= 1.
Now we just need to show that G(N) = Omega(F(N)) to prove G(N) = Theta(F(N)).
To do so, we need to find a positive constant c such as:
c . F(N) <= G(N) for n > n0, that is c <= G(N) / F(N) = 2k/2 / 5k. At first we think that this ratio will go to zero when k approaches infinity, but look:
We can make 2k/2= 2(k.m)/(2.m)=(2m/2)k/m. We can choose m such as 2m/2=5. To do so we need m>4 (keep this inequality in mind, it is important). With this trick we can transform 2k/2 into 5k/m so or ratio becomes 5k/m / 5k that equals 5k.(1-m)/m. Since m < 4 we have 1 - m < 0, so the exponent of the previous exponential is negative:
5k(1-m)/m = 1/(5k.(m-1).m) = 1/(5b) where b = k.(m-1).m.
Since m is a constant greater than 4, when k goes to infinity (equivalent to n goes to infinity) the ratio 2k/2 / 5k that is equivalent to 1/(5b) with b going to infinity also goes to infinity!
So if we pick a value of n0 really high (asymptotically high) we can pick any positive constant c to make c . F(N) <= G(N). That is G(N) = O(F(N)) AND G(N) = Omega(F(N)), so G(N) = Theta(F(N)).
I am getting this message Response Text: {"code": 40002, "message": "Invalid request parameters", "message_detail": "no capable device", "stat": "FAIL"} in python. Any thoughts on how to resolve this? It seems to be working fine when i give the factor with sms but not with push. Currently we do have it working on other areas and we push it over the phone. Any idea on how to fix this? Below are the options i am using.
username = "xyz"
factor = "push"
device = "auto"
method = "POST"
the rest of the information seems to be fine as it is pushing sms codes to the phone.
params = {
"username": username,
"factor": factor,
"device": device
}
print("\nParams:", params) # Ensure it exists before using it
# Sort & encode parameters
param_string = "&".join(f"{urllib.parse.quote(k)}={urllib.parse.quote(v)}" for k, v in sorted(params.items()))
# Send request to Duo
duo_url = f"https://{host}{path}"
headers = {
"Authorization": auth_header,
"User-Agent": "Duo Python Client",
"X-Duo-Date": date
}
response = requests.post(duo_url, headers=headers, data=params)
Your main problem is the sort
function here. See, sort
is an in-place operation, and object types in javascript are stored as references. So in your code you:
useState
to create newArticles
(newArticles
is a reference)sorted
as newArticles.sort(...)
, this is the same reference that points at newArticles
since sort
is in-place.setNewArticles
on sorted
which is just the same reference with newArticles
. React sees the same value and does not see a reason to re-render.One option to fix this is to copy the object first send set newArticles
to this newly created object like this:
function sortVotes() {
const sorted = [...newArticles].sort((a, b) => a.upvotes - b.upvotes);
setNewArticles(sorted);
}
Important note: trying to mutate state variables directly is a bad practice and can cause bugs. Please avoid that.
Check if container architecture and node architecture match.
If container is amd64 and node is arm64 it won't find the image
@Guillaume Outters
@Adrian Klaver
yes that's what I meant How do I get the ID, timestamp, and value of the row having the highest value per day?
Thanks guys. You have given me a lot to work with.
I tried Local History and Reverting, but that did not work. Like so many other solutions the basic files were not accessible apparently.
Deleting the .idea directory was not going to accomplish anything since settings.gradle and build.gradle weren't in the app configuration.
I have searched for the build and settings gradle files but have not been able to find them. so that questions the guilt of AS. They must be somewhere, however, since the Left side app has full access to listing them and it compiles and runs fine. (Remains a mystery.)
I have diligently copied the app directory to backup for years now. That, apparently is sufficient for maintain code, but it is no way to try to backup the entire version. The projectFilesBackup must be created when new instances of AS are downloaded. They have the code files and all the Activity files, but none of the gradle files.
So the bottom line resolution must go to CommonsWare's offer. I did not set up a VCS because I did not have multiple conflicting coders. But I do have the code files and all the Activity files from the projectFilesBackup. So it looks like I will have to create a new app altogether and past the code in from that file.
Installing the VSCode Goto definition alias extension for automatic redirects should help
The GNOME Project has probably declared that you are forbidden form configuring your OWN scrollbars on your OWN system.