The answer was to do a pip install . again after writing the tests. And the code worked
I know this is old, but stumbled here when googling for the issue. The approach mentioned by @Ch'nycos actually works here:
One can use the 'finished' event to turn the positions into static coordinates. So the basic approach (we use this in a Vue-Echarts setting, so all the 'this' references refer to the Vue component data):
on_finished: function() {
// getting the coordinate data from the rendered graph:
const model = this.chart.getModel()
const series = model.getSeriesByIndex(0);
const nodeData = series.getData();
// set the active layout to 'none' to avoid force updating:
this.active_layout = 'none'
// loop over node data to set the coordinates to the fixed node Data
this.graph_data.nodes.forEach((node, nodenum) => {
[node.x, node.y] = nodeData.getItemLayout(nodenum)
})
}
I can't say anything based on this information. Did you remember to run npm install? Which command are you using to start the application?
I found It. I needed to use the job class, not consumer class
cfg.Options<JobOptions<JobConsumer>>
working code
cfg.Options<JobOptions<TestJob>>
As of WordPress 6.7 SCRIPT_DEBUG, true enables the React StrictMode.
This causes an js-error which breaks the block(s).
Just set define('SCRIPT_DEBUG', false); in your wp-config.php as a temporary workaround. As mentiond here the ACF-Team should is working on a permanent fix.
Honestly.. i find this is pretty annoying too. And thats not the only one where its restricted.. i cant even use @auth directives with tokens.
But.. if you do it from your cloud functions, and basically generate your query as a string, instead of passing that array as a variable.. it works.
ugly workaround :/
For my Svelte 3 app this was needed:
Upgrade VSCode for latest;
Add eslint.validate in Extensions > ESLint > settings.json
"eslint.validate": [ "javascript", "svelte" ]
Updated answer 2024
FROM amazoncorretto:8-alpine-jdk
# Install AWS CLI v2
RUN apk update && \
apk add --no-cache \
aws-cli \
&& rm -rf /var/cache/apk/*
# Verify installations
RUN java -version && aws --version
Not sure if this is related but...
In this case some of the workspace file and git metadata files were on a cloud drive (i.e., One Drive) which seemed to cause some conflicting access issues.
As mentioned, make sure and commit or stash any changes to avoid any lose
May also need to close and reopen any Visual Studio code terminals if in use.
From filesystem the .git/rebase-merge folder was deleted then git rebase --quit (or --abort) doesn't find it and then finished.
I figured it out, my bad! I had intellisense turned off
After a lot of searching I found a plugin that was built on the same framework as the Tao Schedule Update and works just as easily--Content Update Scheduler. If you need to schedule changes to an already-published page without a lot of hoops to jump through, this is what you are looking for.
Did you find the solution to this problem? The above solution did not work.
Use JavaScript to Open/Close the Popover: For browsers that support popover, the popover attribute can be controlled via JavaScript as follows:
To show the popover: element.showPopover(); To hide the popover: element.hidePopover();
The meta comment:
Why is this so muddled? One wonders why bother using submodules at all?
Since Livewire 3, the attribute is not updated immediately. You need to change wire:model to wire:model.live.
<input type="radio" wire:model.live="payment" name="payment" value="balance">
You can read about that here: https://livewire.laravel.com/docs/upgrading#wiremodel
Yes, you can use bitwise operations in TypeScript as a method of converting floating-point numbers to integers! The bitwise OR operation (| 0) is commonly used to truncate a floating-point number to an integer.
Unfortunately, it doesn't seem like this is possible based on the AttachArtifactMojo and Artifact source code. The attachArtifact method they use always expects a type.
The best alternative is to use the maven-assembly-plugin to package your executable and install/deploy a tarball.
Add this command in your style.xml file before closing the style tag.
<item name="android:windowIsTranslucent">true</item>
Path to style.xml file:
[YourProjectName]\android\app\src\main\res\values\styles.xml
You want a sparkline. Sadly, it's not available in Tensorboard at the moment. See this discussion
@Kushal Billaiya's solution didn't work for me, as it overrides existing manifestPlaceholders. What I did instead was the following:
First, still set your Google Maps API Key as an environment variable named MAPS_API_KEY. I do this via the run configuration, but other ways exist.
Then in the android/app/build.gradle file (Important: There are 2 build.gradle files. You want the one inside the android > app folder), add one line to the defaultConfig:
defaultConfig {
...
manifestPlaceholders["mapsApiKey"] = "$System.env.MAPS_API_KEY"
}
And in the android/app/src/main/AndroidManifest.xml file, you can add this line inside the <application> tag:
<meta-data android:name="com.google.android.geo.API_KEY" android:value="${mapsApiKey}"/>
The property is being called CONNECT_SCHEDULED_REBALANCE_MAX_DELAY_MS for docker image and scheduled.rebalance.max.delay.ms as property.
Do you have an all-in-one setup or a distributed setup?
If its a distributed setup, you will see some logs in the gateway instance whenever an API is deployed in the Gateway. If you do not see such logs that means that API deploy notification is not sent to the gateway properly from the control plane. This could happen if the event_listening_endpoints available under eventhub config isnot properly defined in the deployment.toml of the gateway.
[apim.event_hub]
enable = true
username = "$ref{super_admin.username}"
password = "$ref{super_admin.password}"
service_url = "https://[control-plane-host]:${mgt.transport.https.port}/services/"
event_listening_endpoints = ["tcp://control-plane-host:5672"]
Please note that the above is a sample configuration taken from the WSO2 docs. But if you have a distributed setup, you need to have this configuration in the gateway to connect the gateway to the control plane to receive notifications. Please refer the official documentation [1] for more info on this.
This issue should not be ideally there if you have an all-in-one setup. But you can still check the hostnames and verify whether something is wrong there.
Another thing you can do is restarting the gateway to see whether the issue is resolved. If that is the case, you can narrow it down as an issue with the notification sending between the gateway and the control plane.
Nowadays you can set GIT_SUBMODULE_UPDATE_FLAGS: --remote in your gitlab ci file. This will check out the latest tip of your branch defined in .gitmodules.
See gitlab ci doc
A possible workaround I found:
If instead of CTRL+F, I use CTRL+SHIFT+F, to get the full search window, I get the option to uncheck "Include miscellaneous files":
This has the effect of returning only source code results instead of the "SourceServer" duplicates.
No such option exists for quick find.
There is an includePaths option that can be used to specify where the node_modules are located:
sass(
{
output: 'dist/styles.css',
options: {
includePaths: ['node_modules']
}
})
To add on to fartem's answer, you might also have to call the function with which you load the data with
Navigator.push(context, secondScreen).then((result) => setState(() { getAddress(); }));
Since you're using a FIPS yubikey, you need to use FIPS algorithms. Try generating an ssh key using rsa or ecdsa instead.
Solution source? I run fips openshift clusters, and our authentication to github using deploykeys fails unless we use fips compatible ciphers (rsa/ecdsa).
Microsoft Excel can’t force comma formatting across different regions, because it relies on each user’s system locale for number formats, so it's not possible to force a certain comma style from the Highcharts side.
For installing java 8 in any alpine image you need to replace https by http in file /etc/apk/repositories
FROM anyImage:alpine
RUN apk update && \
sed -i 's/https/http/' /etc/apk/repositories && \
apk update && \
apk add openjdk8-jre
I took a peek at the source for requests and found this comment:
This is supported by the docs as well: https://requests.readthedocs.io/en/stable/user/advanced/#ca-certificates which states that requests merely relies on the certifi package.
so, you can look at the certifi source and figure out how to monkey patch the where function.
https://github.com/certifi/python-certifi/blob/master/certifi/core.py
I don't see anything in the certifi source that reads from a place other than the pem file packaged with it.
Perhaps you and your client have different versions of python/certfi installed on your systems and aligning them would help?
Thanks, Mark
Any other solution how to make nextjs with next-auth working with laravel sanctum using CSRF cookie based authentication?
It is solution also when using @JsonFormat to parse date:
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd.MM.yyyy HH:mm:ss") private Date scheduledTime;
when default constructor is not provided then default parser for date is used and default patterns (but are provided @AllArgsConstructor and getters/setters). What is interesting it works during serialization, but not during deserialization. If you want to avoid manual ObjectMapper configuration then provide default constructor for the class, I suppose that @Andreas answer is coupled also with this issue.
Colorgram picks whites and greys from images with white background. To avoid I used a simple color_check :D
import colorgram as cg
color_list = cg.extract("image.jpg", 30)
color_palette = []
# from stackoverflow
for i in range(len(color_list)):
r = color_list[i].rgb.r
g = color_list[i].rgb.g
b = color_list[i].rgb.b
new_color = (r, g, b)
# Remove colours close to RGB 255 to exclude background grays
colorcheck = r+g+b
# set sensitivity 600-700
if colorcheck < 700:
color_palette.append(new_color)
print(color_palette)
In my particular case, this piece of XML in the .csproj file was causing the problem:
<ExcludeFromPackageFolders Include="TestFolder">
<FromTarget>Some message</FromTarget>
</ExcludeFromPackageFolders>
"Sync with Active Document" wouldn't work for any of the files in the TestFolder folder. Commenting that bit out seems to make it work again.
Obviously in certain cases that bit might be there for a reason so just deleting it might not be the proper solution so whoever might be reading this, you have to be the judge of that obviously.
Just writing this answer down just in case someone is having a similar problem, 'cause I definitely was getting annoyed for a long time because of this.
Add @ref="GridRef" to the SfGrid, and then call GridRef.PreventRender(false); in the places when you need to refresh the template (some onValuechange etc). This issue is caused by the Syncfusion team trying to optimize performance.(they are preventing rendering for those changes) I have encountered the same problem right now.
If you're having trouble building and accessing the dependency in your Flutter plugin project, here are some steps that could help:
1- Double-check Dependency Inclusion: Ensure the dependency's group:artifact:version string is correct. Any typo here would cause build issues.
2- Build and Sync Gradle Files: Sometimes, simply syncing and rebuilding can solve issues with using android studio
3- Dependency Scope: Ensure that your dependency is being imported in the correct scope in your plugin code. You may need to import the SDK in the plugin’s main class, typically located under android/src/main/kotlin.
4- Ensure Compatibility: Make sure that the dependency is compatible with the SDK version and min SDK version in your build.gradle.
5- Examine Build Output: Sometimes, the error messages in the build output provide clues. Check for specific error lines indicating missing classes, incompatible Java versions, or build process issues.
Try to use markerGroupRef.current as effect hook dependency.
useEffect(() => {
if(markerGroupRef.current) {
//here I want to access a method called getBounds() which is in the markerGroupRef.current object
//but markerGroupRef.current has null value and so it doesn't execute
//when making a save change and react app reloads it has the FeatureGroup class as value as expected
console.log(markerGroupRef.current)
}
}, [markerGroupRef.current])
How does one get this to work in python code?
There is a known bug for recent versions of PyCharm and other JetBrains IDEs which has not been yet solved.
For the time being, you must configure the console after each restart.
You can follow the issue here:
https://youtrack.jetbrains.com/issue/PY-58570/Unable-to-update-Python-Django-Console-settings
Yet another way to write traces to the "Output" window of debugger is to use System.Diagnostics.Debugger.Log method:
public static void WriteToDebugger(String message)
{
Debugger.Log(0, null, message);
Debugger.Log(0, null, Environment.NewLine);
}
You are updating data before removing the image so when you trying to remove image the path will be empty so that is causing error.
Check this code:
public function updateConcert(Request $request, Concert $concert)
{
$request->validate([
'name' => 'required|max:30',
'description' => 'required|max:200',
'date' => 'required|date',
'duration' => 'required|date_format:H:i:s',
'id' => 'required|numeric',
]);
$concert = Concert::find($request->id);
if ($request->hasFile('image')) {
Storage::disk('public')->delete($concert->image);
$imgName = microtime(true) . '.' . $request->file('image')->getClientOriginalExtension();
$request->file('image')->storeAs('public/storage/img', $imgName);
$concert->image = '/img/' . $imgName; // Cambiado para que sea idéntico al código de libros
$concert->save();
}
$concert->update($request->input([specify here inputs needs to update]));
$concert->artists()->sync($request->artists);
return redirect('concerts')->with('success', 'Concert updated');
}
AWS RDS doesn't provide granular details about the source IP addresses of incoming connections directly within the console.
However you could try few indirect methods like -
Enable VPC Flow Logs: If you have Configured VPC Flow Logs for the VPC where your RDS instance resides,This will capture information about network traffic, including source and destination IP addresses, port numbers, and protocol.
Check Ingress rules : Ingress rules of the security group associated with your RDS instance will reveal the IP address ranges that are allowed to connect to the database.
Also check the AWS CloudWatch Logs Insights.
You need to check
When using VB6 (Visual Basic 6) with ADODB Recordsets to display Chinese characters, it is common for the characters to appear as garbled text (like ?????? or ñ’è). This typically happens because the proper character encoding is not being used or handled correctly. Here's how you can address this issue:
Ensure that your database is configured to store Chinese characters using an encoding like UTF-8 or GB2312. If the database is using a different encoding, you will need to either:
In VB6, ADODB's Recordset may not handle Unicode data properly unless the correct character set is specified. Here are the steps to ensure proper handling:
Connection object's Charset property to specify the correct character encoding.
For example, if you're connecting to a MySQL database, you would set the charset to UTF-8:
conn.ConnectionString = "Provider=MSDASQL;DSN=your_dsn;Charset=UTF-8"
For SQL Server, ensure that the column data type supports Unicode (NVARCHAR instead of VARCHAR).If your data comes from a text source (e.g., a file or external service), ensure that the locale in VB6 is set to support Chinese characters:
SetLocale to configure the correct locale if you're working with Chinese text data in your application.
SetLocale "zh-CN" ' Simplified Chinese locale
Make sure that the font you're using in the VB6 form or control supports Chinese characters. Common fonts like SimSun or Microsoft YaHei should display Chinese characters correctly.
After configuring the connection and locale, make sure you're retrieving and displaying the data correctly:
GetString method of the Recordset object to retrieve data as a string:
strData = rs.GetString(adClipString)
If your application needs to support a wide range of characters, consider upgrading to VB.NET where Unicode support is native, or use a third-party library to handle encoding conversions.
By ensuring proper character encoding at both the database level and within your VB6 application, you should be able to display Chinese characters correctly in ADODB Recordsets.
Let me know if you need more detailed steps or examples for a specific database (like MySQL or SQL Server).
The "buckets" you provide are actually boundaries. When you provide 1, 2 and 3, then you get the buckets ~1, 1~2, 2~3, 3~
So, zero would be placed in your first bucket. The upper boundary is inclusive, while the lower boundary is exclusive. This is why the tag for the bucket is le (less equal) with the value of this tag being the upper boundary of the bucket.
if you are not in the correct namespace you can do:
kubectl delete ingress ingress-nginx --namespace=<insert-namespace-name-here>
#include <chrono>
#include <iostream>
#include <iomanip>
template <typename Duration, typename Clock>
Duration get_duration_since_epoch()
{
const auto tp = std::chrono::time_point_cast<Duration>(Clock::now());
return tp.time_since_epoch();
}
int main()
{
using float_sec_t = std::chrono::duration<double, std::chrono::seconds::period>;
// integer seconds
std::cout << get_duration_since_epoch<std::chrono::seconds, std::chrono::system_clock>() << std::endl;
// double seconds
std::cout << std::setprecision(15) << get_duration_since_epoch<float_sec_t , std::chrono::system_clock>() << std::endl;
}
the ages are the original values. The select-expression of <xsl:variable name="older-children" /> however seems to reference the maps inside the $children-variable, at least when looking at the code at face-value:
I just solved it by inserting the missing import statement:
import java.lang.String;
Solved!
Although it is supposedly undocumented by Microsoft (or possibly a bug in Azure App Service), I added the following statement to my startup script:
cp /home/site/wwwroot/<path to your custom ini>/<custom ini>.ini /usr/local/etc/php/conf.d/extensions.ini
Setting the PHP_INI_SCAN_DIR environment variable was not enough to customize the PHP settings. Therefore, I had to manually copy the ini file to the PHP settings location.
ScrollViewReader { proxy in
ScrollView {
content
.id("content")
}
.onChange(of: store.step) { // some state change triggers scroll
proxy.scrollTo("content", anchor: .top)
}
}
int x = (int)Char.GetNumericValue(char)
I have still same problem and putting locale as last paramter in query string did not help, any updates ?
Issue solved. I asked a former teacher of mine, and they gave me a few commands to run in the terminal that fixed the issue, which were the following:
echo "export BROWSER=\"/mnt/c/Program Files/Google/Chrome/Application/chrome.exe\"" >> ~/.zshrc
echo "export GH_BROWSER=\"'/mnt/c/Program Files/Google/Chrome/Application/chrome.exe'\"" >> ~/.zshrc
Thanks Yann!
this was an interesting question to solve Hope this answer helps
Select left(datename(month,date_col),3)+'-'+right(datename(year,date_col),2) from table_name
Use a uniform grid.
See a duplicate question on game dev stack here
You can import Katex. I got here via https://stackoverflow.com/a/65540803/5599595. Running in shinylive
from shiny.express import ui
from shiny import render
with ui.tags.head():
# Link KaTeX CSS
ui.tags.link(
rel="stylesheet",
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
),
ui.tags.script(src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"),
ui.tags.script(src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"),
ui.tags.script("""
document.addEventListener('DOMContentLoaded', function() {
renderMathInElement(document.body);
});
""")
with ui.card():
ui.p("Here's a quadratic formula: \\[x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}\\]")
ui.p("And an inline equation: \\(E = mc^2\\)")
ui.p("\\[3 \\times 3+3-3 \\]")
As data: belongs to standard, so I decided to keep it as it is, and in the client, it can replace that data: by empty string when it received the message.
If you want to store a connection token, use "keytar", it's more secure.
const keytar = require('keytar');
And use this like this :
await keytar.setPassword('app-id', 'authToken', token);
and :
await keytar.getPassword('app-id', 'authToken');
You can use CloudCompare.
Done :)
We can break down the problem into two steps:
std::cout<<a.length()==b.length()?a>b:a.length()>b.length();
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
I went with DavidMoye's approach (but using defaults channel instead) to update the base env for Anaconda 2020.07
conda update -n base -c defaults --all
## Package Plan ##
environment location: C:\ProgramData\Anaconda3
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-env-2.6.0 | haa95532_1 3 KB
navigator-updater-0.5.1 | py38haa95532_0 2.3 MB
------------------------------------------------------------
Total: 2.3 MB
The following packages will be UPDATED:
navigator-updater 0.2.1-py38_0 --> 0.5.1-py38haa95532_0
The following packages will be DOWNGRADED:
conda-env 2.6.0-1 --> 2.6.0-haa95532_1
Proceed ([y]/n)? y
Since Nextjs 15 params return a promise, so try using
interface PageProps {
params: Promise<{
slug: string[];
}>;
}
Leaning on the existing answers, and assuming you want to amend numeric columns, you could do something like:
t:@[t;;0^] exec c from meta[t] where t="j"
Ensure your PDO::ATTR_STRINGIFY_FETCHES setting is properly applied. if this solution not work then casting the data types in your PHP code like this:
(string) $value
It looks like I've started to figure out how to do what I need to do. Added the following lines to the "customTable" class:
# Custom headers
HH = customQHeaderView(parent = self, orientation=Qt.Horizontal)
VH = customQHeaderView(parent = self, orientation=Qt.Vertical)
self.setHorizontalHeader(HH)
self.setVerticalHeader(VH)
And added new class "customQHeaderView":
class customQHeaderView(QHeaderView):
MimeType = 'application/x-qabstractitemmodeldatalist'
def __init__(self, orientation: Qt.Orientation, parent=None):
super().__init__(orientation, parent)
self.setDragEnabled(True)
self.setAcceptDrops(True)
def dropEvent(self, event):
mimedata = event.mimeData()
if mimedata.hasFormat(customQHeaderView.MimeType):
if event.source() is not self:
source_item = QStandardItemModel()
source_item.dropMimeData(mimedata, Qt.CopyAction, 0,0, QModelIndex())
label = source_item.item(0, 0).text()
print(label)
event.setDropAction(Qt.MoveAction)
event.accept()
else:
event.ignore()
else:
super().dropEvent(event)
you need to get root folder first where you want to create folders by get_folder_by_server_relative_url and then call folders end point -
for e.g. here i want to create a folder under root folder i.e. Shared Documents
context.web.get_folder_by_server_relative_url("Shared%20Documents").folders.add(<your_folder_name>).execute_query()
context you can get it either from client ID and secret or user credentials. Please check below code to get context from user credentials
context = ClientContext('https://sites.ey.com/sites/<site_name>')
user_credentials = UserCredential(<your_username>, <your_password>)
context.with_credentials(user_credentials)
I have used package - Office365-REST-Python-Client
change the version you used in the implementation to earlier version - i used 6.0.3 - , if you have the same error you might uses a package that implements the version 6.1.0 -in my case it was "usb-serial-0.5.2" -, so you need to change the version in the package build gradle too, go to your project on android studio => external libraries => Flutter plugins=> the package ,and change the version from dependencies as you did with the build gradle file of your project
Implementing ShowDialogAsync() as in @noseratio's answer is fine for many scenarios.
Still, a drawback for time-consuming computational background-work is that cancellation of the dialog (i.e. form.Close()) will just close the dialog right away, before the background-work can be completed or cancelled.
In my scenario, this caused non-respondance of the main application for a few seconds, as cancelling the background-work took a while.
To solve this, the dialog cancellation must be delayed/refused until the work is really done/cancelled yet (i.e. finally is reached). On the other hand, a closing attempt should notify observers about the desired cancellation, which can be realized with a CancellationToken. The token can then be used to cancel the work by ThrowIfCancellationRequested(), throwing an OperationCanceledException, which can be handled within a dedicated catch statement.
There are a few ways how this can be realized, however I preferred using(Disposable) over the roughly equivalent try/finally.
public static class AsyncFormExtensions
{
/// <summary>
/// Asynchronously shows the form as non-blocking dialog box
/// </summary>
/// <param name="form">Form</param>
/// <returns>One of the DialogResult values</returns>
public static async Task<DialogResult> ShowDialogAsync(this Form form)
{
// ensure being asynchronous (important!)
await Task.Yield();
if (form.IsDisposed)
{
return DialogResult.Cancel;
}
return form.ShowDialog();
}
/// <summary>
/// Show a non-blocking dialog box with cancellation support while other work is done.
/// </summary>
/// <param name="form">Form</param>
/// <returns>Non-blocking disposable dialog</returns>
public static DisposableDialog DisposableDialog(this Form form)
{
return new DisposableDialog(form);
}
}
/// <summary>
/// Non-blocking disposable dialog box with cancellation support
/// </summary>
public class DisposableDialog : IAsyncDisposable
{
private Form _form;
private FormClosingEventHandler _closingHandler;
private CancellationTokenSource _cancellationTokenSource;
/// <summary>
/// Propagates notification that dialog cancelling was requested
/// </summary>
public CancellationToken CancellationToken => _cancellationTokenSource.Token;
/// <summary>
/// Awaitable result of ShowDialogAsync
/// </summary>
protected Task<DialogResult> ResultAsync { get; }
/// <summary>
/// Indicates the return value of the dialog box
/// </summary>
public DialogResult Result { get; set; } = DialogResult.None;
/// <summary>
/// Show a non-blocking dialog box with cancellation support while other work is done.
///
/// Form.ShowDialogAsync() is used to yield a non-blocking async task for the dialog.
/// Closing the form directly with Form.Close() is prevented (by cancelling the event).
/// Instead, a closing attempt will notify the CancellationToken about the desired cancellation.
/// By utilizing the token to throw an OperationCanceledException, the work can be terminated.
/// This then causes the desired (delayed) closing of the dialog through disposing.
/// </summary>
public DisposableDialog(Form form)
{
_form = form;
_cancellationTokenSource = new CancellationTokenSource();
_closingHandler = new FormClosingEventHandler((object sender, FormClosingEventArgs e) => {
// prevent closing the form
e.Cancel = true;
// Store the desired result as the form withdraws it because of "e.Cancel=true"
Result = form.DialogResult;
// notify about the cancel request
_cancellationTokenSource.Cancel();
});
form.FormClosing += _closingHandler;
ResultAsync = _form.ShowDialogAsync();
}
/// <summary>
/// Disposes/closes the dialog box
/// </summary>
/// <returns>Awaitable task</returns>
public async ValueTask DisposeAsync()
{
if (Result == DialogResult.None)
{
// default result on sucessful completion (would become DialogResult.Cancel otherwise)
Result = DialogResult.OK;
}
// Restore the dialog result as set in the closing attempt
_form.DialogResult = Result;
_form.FormClosing -= _closingHandler;
_form.Close();
await ResultAsync;
}
}
Usage example:
private async Task<int> LoadDataAsync(CancellationToken cancellationToken)
{
for (int i = 0; i < 10; i++)
{
// do some work
await Task.Delay(500);
// if required, this will raise OperationCanceledException to quit the dialog after each work step
cancellationToken.ThrowIfCancellationRequested();
}
return 42;
}
private async void ExampleEventHandler(object sender, EventArgs e)
{
var progressForm = new Form();
var dialog = progressForm.DisposableDialog();
// show the dialog asynchronously while another task is performed
await using (dialog)
{
try
{
// do some work, the token must be used to cancel the dialog by throwing OperationCanceledException
var data = await LoadDataAsync(dialog.CancellationToken);
}
catch (OperationCanceledException ex)
{
// Cancelled
}
}
}
I've created a Github Gist for the code with a full example.
you can also use code like this in ResponsiveContainer :
<Tooltip content={<CustomTooltip />} />
you do not need to pass call function which you are being called.
There are actually several errors in your model and data:
Errors in the model:
Cost is an indexed parameter, but you have declared as an scalar parameter param cost;, yo should rather use param cost{FOODS};.
This happens with other parameters in your model.
You should not name parameters and constraints in the same way, so you have "proteins" as a parameter and also as a constraint.
Errors in the data: 4. In your data section, you are re-declaring parameters. Data section is to assign values rather than declaring new entities:
param calories{FOODS};
param proteins{FOODS};
param calcium{FOODS};
param vitaminA{FOODS};
param cost{FOODS};
All the previous lines in the data section shouldn't be there
param calcium :=
Bread 418
Meat 41
How do you find your path, here is simple trick:
Invalid Executable. The executable '***.app/FBSDKCoreKit/FBSDKCoreKit.framework/hermes' contains bitcode. (ID: 37fb02b5-0173-4c01-8d79-88a9cf6a33d8)
then you have to do, how you can handle this just do copy this from your error and placed in the below solutionframework_paths = [
"Pods/FBSDKCoreKit/XCFrameworks/FBSDKCoreKit.xcframework/ios-arm64/FBSDKCoreKit.framework/FBSDKCoreKit",
"Pods/FBSDKShareKit/XCFrameworks/FBSDKShareKit.xcframework/ios-arm64/FBSDKShareKit.framework/FBSDKShareKit",
"Pods/FBAEMKit/XCFrameworks/FBAEMKit.xcframework/ios-arm64/FBAEMKit.framework/FBAEMKit",
"Pods/FBSDKCoreKit_Basics/XCFrameworks/FBSDKCoreKit_Basics.xcframework/ios-arm64/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics",
"Pods/FBSDKGamingServicesKit/XCFrameworks/FBSDKGamingServicesKit.xcframework/ios-arm64/FBSDKGamingServicesKit.framework/FBSDKGamingServicesKit",
"Pods/FBSDKLoginKit/XCFrameworks/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit",
]
All the lines in framework_paths are errors that come when I try to validate or upload the build. So most people face issue here that they don't know how to find the path of this framework, So you don't need to find it using commands.You can just use this template and if in your case different frameworks causing this bitCode error then just simply replace them. In my case if I receive the error of hermes-engine then what I will do I simply copy this from xcode and replace it
"Pods/FBSDKCoreKit/XCFrameworks/FBSDKCoreKit.xcframework/ios-arm64/FBSDKCoreKit.framework/FBSDKCoreKit",
"Pods/hermes-engine/XCFrameworks/hermes-engine.xcframework/ios-arm64/hermes-engine.framework/hermes-engine",
here I replace FBSDKCoreKit ---> hermes-engine
FBSDKCoreKit.xcframework ---> hermes-engine.xcframework
FBSDKCoreKit.framework ---> hermes-engine.framework
FBSDKCoreKit ---> hermes-engine
In this way you can solve this error. So finally what you have to write in pod file
replace this code portion
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
with--------------------->
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
framework_path = File.join(Dir.pwd, framework_relative_path)
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
puts "Stripping bitcode: #{command}"
system(command)
end
framework_paths = [
"Pods/FBSDKCoreKit/XCFrameworks/FBSDKCoreKit.xcframework/ios-arm64/FBSDKCoreKit.framework/FBSDKCoreKit",
"Pods/FBSDKShareKit/XCFrameworks/FBSDKShareKit.xcframework/ios-arm64/FBSDKShareKit.framework/FBSDKShareKit",
"Pods/FBAEMKit/XCFrameworks/FBAEMKit.xcframework/ios-arm64/FBAEMKit.framework/FBAEMKit",
"Pods/FBSDKCoreKit_Basics/XCFrameworks/FBSDKCoreKit_Basics.xcframework/ios-arm64/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics",
"Pods/FBSDKGamingServicesKit/XCFrameworks/FBSDKGamingServicesKit.xcframework/ios-arm64/FBSDKGamingServicesKit.framework/FBSDKGamingServicesKit",
"Pods/FBSDKLoginKit/XCFrameworks/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit",
]
framework_paths.each do |framework_relative_path|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
end
Thats it
Have you tried To integrate Kafka with Cassandra, the inegration can leverage the power of Kafka Streams and the DataStax Java Driver for Cassandra? This combination allows to efficiently stream data from Kafka and store it in Cassandra.
Up to Get-PSSession | Disconnect-PSSession command is ferfectly working. But Remove-PSSession is again making delay. WARNING: The network connection to computer.domain has been interrupted. Attempting to reconnect for up to 4 minutes... WARNING: Attempting to reconnect to computer.domain . WARNING: The reconnection attempt to computer.domain failed. Attempting to disconnect the session. WARNING: Computer computer.domain has been successfully disconnected.
You can use AppShortcutsProvider to add your intent as appShortcuts
V. old question, but for anyone else with similar issues:
I've had incredible difficulties with the same problem, I found this article:
https://cedalo.com/blog/enabling-websockets-over-mqtt-with-mosquitto/
The key here which I'd completely ignored until now and which it looks like you may have mis-typed is that the port is 8080 (you have 8008?). Here's my full mosquitto.conf file contents:
listener 1883 0.0.0.0
listener 8080
allow_anonymous true
protocol websockets
I probably need to add 0.0.0.0 to the second line for consistency - or remove it from line 1, but it works and, frankly, after days of hitting a brick wall, I can now connect using the ws:// protocol.
Resolved in a strange way. I've been experimenting a bit and when I changed the statement
var obj = {TYPE: item.getTitle(), DATE: item.getAllDayStartDate()}
to this:
var obj = {TYPE: item.getTitle(), DATE: (item.getStartTime() + (3 * HOUR))}
I didn't get the (wrong) start time + 3 hours, which would put the event at the correct date. Instead I now get the correct date and time, including the deviation from UTC time as 'GMT+0100'. This is what I originally wanted. Maybe adding an amount of time to the result of item.getStartTime() implicitly converts the result to local time???
Try this instead: You check the name of the input in the form, and you check if the 'datasheet' directory exists.
Thanks for Bryan Latten. It's work for me
You can get the file/ item versions using the endpoint described at https://aps.autodesk.com/en/docs/data/v2/reference/http/projects-project_id-versions-POST/
This solution worked for me: https://github.com/grafana/helm-charts/issues/1550. I uncommented the endpoint in the values.yml file or simply removed it.
Make sure you have specified the correct ARN and annotations in the values.yml file and have permissions to access the bucket.
what @simeon posted above is what I use regularly to compare data between two tables.
Regarding your question on why it is not displaying the results, it could be because its just running the CTEs , we would need to execute the sqls to display the results,for which you can use EXECUTE IMMEDIATE like shown here
You may need to specific the source url. Please refer to this https://github.com/CocoaPods/CocoaPods/issues/12679
I tried this from the wiki of the library.
https://github.com/revtel/react-native-nfc-manager/wiki/Expo-Go
But it didn't work, I didn't know what else to do, so I rewrote the project in bare react native.
At least it was 2 days of work for me.
If you want to create a project in expo with NFC, try first to see if the NFC works and then build the app, don't make the same mistake as me.
To bypass the Superset login you can extend the AuthOAuthView.login method to check if provider is None, and if there’s only one OAuth provider, assign it directly. Then you can define a custom security manager that uses this modified AuthOAuthView.
You can see the code for how to do it in this Github comment
In my case,
onNavigationStateChange works only on iOS,
onLoadProgress works only on Android.
The issue was not related to an incorrect class path or similar issues. I still don't know what the exact issue was or why the solution worked but I just refreshed the browser tab of the jupyter notebook root directory, that fixed my issue. Restarting the kernel multiple times did not work.
That is a bit strange but problem was with Coupon and UnderlyingUsage classes. They were also extending other classes and I had to add annotations to them as well. Once annotations for whole hierarchy for Coupon and UnderlyingUsage were added then error disappeard.
So if someone will face the same issue please look into all classes related to the one which you change.
It is because the alignItems: 'center' style on .container. Fix it by removing the style.
import UIKit
import Flutter
import UserNotifications
import AVFoundation
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Configure notification settings
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self
let options: UNAuthorizationOptions = [
.alert,
.badge,
.sound,
.criticalAlert // Add critical alert permission
]
UNUserNotificationCenter.current().requestAuthorization(
options: options,
completionHandler: { _, _ in }
)
}
// Configure audio session
do {
try AVAudioSession.sharedInstance().setCategory(
.playback,
mode: .default,
options: [.mixWithOthers]
)
try AVAudioSession.sharedInstance().setActive(true)
} catch {
print("Failed to set audio session category: \(error)")
}
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
// Add UNNotificationSoundName extension
extension UNNotificationSoundName {
static let customSound = UNNotificationSoundName("notification_sound.wav")
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Other existing entries -->
<!-- Add background modes -->
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
<string>remote-notification</string>
</array>
<!-- Add critical alerts entitlement -->
<key>com.apple.developer.usernotifications.critical-alerts</key>
<true/>
<!-- Add notification service extension -->
<key>com.apple.developer.usernotifications.time-sensitive</key>
<true/>
<!-- Configure audio session -->
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
</dict>
</plist>
import 'package:awesome_notifications/awesome_notifications.dart';
Future<void> initializeNotifications() async {
await AwesomeNotifications().initialize(
null,
[
NotificationChannel(
channelKey: "alarm_Category",
channelName: "Alarm Category",
channelDescription: 'Long duration alarm notifications',
defaultColor: Colors.blue,
ledColor: Colors.white,
playSound: true,
soundSource: 'resource://raw/notification_sound',
importance: NotificationImportance.Max,
criticalAlerts: true,
enableVibration: true,
enableLights: true,
locked: true,
// Add these settings for iOS
defaultRingtoneType: DefaultRingtoneType.Alarm,
channelShowBadge: true,
),
],
debug: true,
);
}
Future<void> scheduleAlarmNotification({
required int subId,
required DateTime scheduledTime,
required String memoText,
}) async {
await AwesomeNotifications().createNotification(
content: NotificationContent(
id: subId,
channelKey: "alarm_Category",
title: DateFormat('yyyy.MM.dd HH:mm').format(scheduledTime),
body: 'Alarm Memo: $memoText',
category: NotificationCategory.Alarm,
notificationLayout: NotificationLayout.Default,
criticalAlert: true,
fullScreenIntent: true,
wakeUpScreen: true,
autoDismissible: false,
locked: true,
displayOnForeground: true,
displayOnBackground: true,
customSound: 'resource://raw/notification_sound',
// Add iOS specific settings
timeoutAfter: Duration(seconds: 30), // Extend timeout
payload: {
'sound_duration': '29', // Add sound duration info
'critical': 'true', // Mark as critical
},
),
schedule: NotificationCalendar(
repeats: true,
preciseAlarm: true,
allowWhileIdle: true,
year: scheduledTime.year,
month: scheduledTime.month,
day: scheduledTime.day,
hour: scheduledTime.hour,
minute: scheduledTime.minute,
second: scheduledTime.second,
),
);
}
Create a new Notification Service Extension target in Xcode:
// NotificationService.swift
import UserNotifications
import AVFoundation
class NotificationService: UNNotificationServiceExtension {
var contentHandler: ((UNNotificationContent) -> Void)?
var bestAttemptContent: UNMutableNotificationContent?
var audioPlayer: AVAudioPlayer?
override func didReceive(
_ request: UNNotificationRequest,
withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void
) {
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
if let bestAttemptContent = bestAttemptContent {
// Configure sound
if let soundDuration = request.content.userInfo["sound_duration"] as? String,
let soundPath = Bundle.main.path(forResource: "notification_sound", ofType: "wav") {
let soundUrl = URL(fileURLWithPath: soundPath)
bestAttemptContent.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue: "notification_sound.wav"))
// Setup audio session
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default)
try AVAudioSession.sharedInstance().setActive(true)
audioPlayer = try AVAudioPlayer(contentsOf: soundUrl)
audioPlayer?.prepareToPlay()
audioPlayer?.play()
} catch {
print("Error setting up audio: \(error)")
}
}
contentHandler(bestAttemptContent)
}
}
override func serviceExtensionTimeWillExpire() {
if let contentHandler = contentHandler,
let bestAttemptContent = bestAttemptContent {
contentHandler(bestAttemptContent)
}
}
}
ffmpeg -i input.mp3 -acodec pcm_s16le -ac 2 -ar 44100 notification_sound.wav
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.usernotifications.critical-alerts</key>
<true/>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
// Check sound file properties
void validateSoundFile() {
final file = File('notification_sound.wav');
if (file.lengthSync() > 5 * 1024 * 1024) {
print('Warning: Sound file too large');
}
}
Future<bool> checkNotificationPermissions() async {
final status = await AwesomeNotifications().isNotificationAllowed();
if (!status) {
// Request permissions
return await AwesomeNotifications().requestPermissionToSendNotifications();
}
return status;
}
void testNotification() async {
final now = DateTime.now();
await scheduleAlarmNotification(
subId: 1,
scheduledTime: now.add(Duration(seconds: 5)),
memoText: 'Test notification',
);
}
Remember to:
Would you like me to explain any part in more detail?
To fix this, you have to set a type for an id column:
#[ORM\Id]
#[ORM\GeneratedValue(strategy: "AUTO")]
#[ORM\Column(type: 'integer')]
protected $id = null;
Create new migration, execute and after execution you should notice a new sequence in postgresql database sequences.
Cheers.
so it can only support the old version of expo from 51 Sdk to lower since meta start moving around with their Ts typescript which make all new dependances made tested on typeScript level not javescript you chance of having the issue resolve is by using old version of the expo modules before the creation of typeScript
which was tested on javaScript that is why it throw the erro of the module referring to the expo
just to note that I managed to do this following a suggestion (thank you!) to use textsplit():
=AND(ISNUMBER(VALUE(FIND(MID(TEXTSPLIT(A1,",",,TRUE),1,1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ",1))),ISNUMBER(VALUE(FIND(MID(TEXTSPLIT(A1,",",,TRUE),2,1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ",1))),ISNUMBER(VALUE(MID(TEXTSPLIT(A1,",",,TRUE),3,8))),LEN(TEXTSPLIT(A1,",",,TRUE))=10)
Posting this in case it's useful to anyone else. If the "ABCDEFGHIJKLMNOPQRSTUVWXYZ" makes this formula too long for custom data validation (255 character limit) put that in a cell and refer to it in the formula. Note this doesn't enforce uniqueness, that's been a step too far for me thus far!
Just wrap you column with Center for cross axis alignment center to work.
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextField(
controller: _emailController,
decoration: const InputDecoration(
labelText: 'Email',
),
),
TextField(
controller: _passwordController,
decoration: const InputDecoration(
labelText: 'Password',
),
obscureText: true,
),
],
),
);
Similarly, wrap row with Center for mainAxisAlignment: MainAxisAlignment.center to work:
Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
],
),
)
I use a custom function that wraps the text with a desired RGB(R=red, G=green, B=blue) color value in ANSI escape sequences. Here's what it looks like:
from random import randint
RANDOM_RGB_COLOR = {
"r": randint(0, 255),
"g": randint(0, 255),
"b": randint(0, 255)
}
def color(text: str, r: int = 256, g: int = 256, b: int = 256) -> str:
if (r > 255 or g > 255 or g > 255) or (r < 0 or g < 0 or b < 0):
return f"\033[38;2;{RANDOM_RGB_COLOR['r']};{RANDOM_RGB_COLOR['g']};{RANDOM_RGB_COLOR['b']}m{text}\033[38;2;255;255;255m"
return f"\033[38;2;{r};{g};{b}m{text}\033[38;2;255;255;255m"
Here are some similar solutions: How do I print colored text to the terminal?
The API was updated so that you can edit paid ACCREC invoices but this has not been extended to ACCPAY invoices or any type of credit note
Indeed it seems XCode 16 has been removed from macOS-14: https://github.com/actions/runner-images/issues/10703
In my case, I have updated my vmImage to macOS-15 and it works fine but unfortunately some people may have to rework their pipelines if they rely on macOS-14.
Just wrap you column with Center for cross axis alignment center to work.
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextField(
controller: _emailController,
decoration: const InputDecoration(
labelText: 'Email',
),
),
TextField(
controller: _passwordController,
decoration: const InputDecoration(
labelText: 'Password',
),
obscureText: true,
),
],
),
);
Similarly, wrap row with Center for mainAxisAlignment: MainAxisAlignment.center to work:
Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
],
),
)