use NITRO 100% works
// nuxtconfig
export default {
runtimeConfig: {
public: {
YOUR_VAR: 'hello',
},
}
}
/// cmd
yarn build
cross-env NITRO_PUBLIC_YOUR_VAR=bye node .output/server/index.mjs
// runtime
console.log(useRuntimeConifg().public.YOUR_VAR) // 'bye'
Good afternoon! Tell me, did you manage to solve the problem? I will be grateful for the answer.
Below are some suggestions you can try:
Please try the above points and see if your application works.
You need to replace <account-ID>
with your actual AWS account numeric ID and <my-project>
with the CodeBuild project's name, the one that should be allowed to assume that role.
I am facing the same issue. What was the solution you found?
Found a solution, if anyone ever has a similar problem.. I changed
passport.deserializeUser(function(id, done) {
User.findById(id, function(err, user) {
done(err, user);
});
});
to
passport.deserializeUser(async function(id, done) {
try {
const user = await User.findById(id).exec();
done(null, user);
} catch (err) {
done(err, null);
}
});
And added {} to arrow function before res.render(which wasn't the only problem)
After researching and leaving a bugreport for Angular team I have the answer
For using AngularNodeAppEngine
is mandatory to have "outputMode"
option in build config. If you want to prevent prerendering use CommonEngine
instead.
Solution to this problem in my case : start nomad with --bind 0.0.0.0 flag :
nomad agent -dev --bind 0.0.0.0
In the meantime, I was able to solve the problem by myself with the help of two links from the Internet (one of them from Stackoverflow).
The problem was due to the fact that at the time I updated the database, a commit flag was apparently not set internally.
When debugging, I could see that the DataSet had been updated correctly, but a flag was still missing, which meant that the changes were not written and no error message was displayed. This situation was very confusing.
Link 1: http://www.codingeverything.com/2013/01/firing-datagridview-cellvaluechanged.html
Link 2: DataGridView row is still dirty after committing changes
From link 1 I first took the use of the events, while link 2 provided a valuable tip regarding the use of a BindingSource and a Handler.
Since my problem already exists in an old message on Stackoverflow, which has not received a single answer, I would like to publish my solution to the problem here.
First the function dgvConfig which now uses a global BindingSource.
Private Sub dgvConfig(ByRef dgv As DataGridView)
Try
Dim col1 As New DataGridViewTextBoxColumn
col1.Name = "col1"
col1.HeaderText = "Host"
col1.DataPropertyName = "myKey"
Me.dgvRmServers.Columns.Add(col1)
Dim col2 As New DataGridViewCheckBoxColumn
col2.Name = "col2"
col2.HeaderText = "Active"
col2.DataPropertyName = "myValue"
col2.TrueValue = "true"
col2.FalseValue = "false"
bs.DataSource = _dsxConfigDb.DataSet.Tables("hosts")
Me.dgvRmServers.Columns.Add(col2)
Me.dgvRmServers.AutoGenerateColumns = False
Me.dgvRmServers.SelectionMode = DataGridViewSelectionMode.FullRowSelect
Me.dgvRmServers.AllowUserToAddRows = False
Me.dgvRmServers.AllowUserToDeleteRows = False
Me.dgvRmServers.DataSource = _bs
AddHandler _bs.ListChanged, AddressOf CustomersBindingSource_ListChanged
Catch ex As Exception
End Try
End Sub
Next are the EventHandlers I used.
CustomersBindingSource_ListChanged:
Public Sub CustomersBindingSource_ListChanged(sender As Object, e As ListChangedEventArgs)
Try
_dsxConfigDb.SqliteUpdateKvp("hosts", _dsxConfigDb.DataSet.Tables("hosts").Rows(dgvRmServers.CurrentCell.RowIndex)("myKey"), dgvRmServers.Rows(dgvRmServers.CurrentCell.RowIndex).Cells(1).Value)
Catch ex As Exception
End Try
End Sub
DataGridView_CurrentCellDirtyStateChanged:
Private Sub DataGridView_CurrentCellDirtyStateChanged(sender As System.Object, e As EventArgs) Handles dgvRmServers.CurrentCellDirtyStateChanged
If dgvRmServers.IsCurrentCellDirty Then
dgvRmServers.EndEdit(DataGridViewDataErrorContexts.Commit)
End If
End Sub
DataGridView_CellValueChanged:
Private Sub DataGridView_CellValueChanged(sender As DataGridView, e As DataGridViewCellEventArgs) Handles dgvRmServers.CellValueChanged
If e.RowIndex = -1 Then
Exit Sub
Else
If dgvRmServers.IsCurrentCellDirty Then
_bs.EndEdit()
End If
End If
End Sub
Finally, the function that writes my changes back to the database.
Public Function SqliteUpdateKvp(ByVal tbl As String) As Boolean
Try
Using con As New SQLiteConnection(_conn)
con.Open()
Using da As New SQLiteDataAdapter("SELECT * FROM hosts", con)
Using cb As New SQLiteCommandBuilder(da)
'da.UpdateCommand = cb.GetUpdateCommand
Dim testo = da.Update(_dsxConfigDb.DataSet, tbl)
End Using
End Using
con.Close()
End Using
Return True
Catch ex As Exception
_dsxLogger.WriteMessage(ex.Message, TraceEventType.Error)
Return False
End Try
End Function
Now it is possible to write the changed states of the CheckBoxes correctly into the database without any problems.
Summarized _bs.EndEdit() did the trick.
Had the same issue when using custom defined shadcn components.
I was also getting another issue to do with the .
Fixing that means adding "module": "preserve"
to tsconfig.json. It's required by "moduleResolution": "bundler"
That change refreshed the Editor (VS Code), fixed the script issues, and fixed the @render error too.
Please read more into the change v5 change from slots to snippets because the change also has some quirky edge cases: https://svelte.dev/docs/svelte/v5-migration-guide#Snippets-instead-of-slots
had same issue so change the port to 5432, even in their docs they are mentioning 6543 but this is for Transaction pooler and you need Session pooler which is 5432
you need to put the absolute path like `Users/<your_user>/data/something/something
Try button "ACTION" then chose "Create log alert"
I've got the same problem caused by the web site files are store in the same folder as my jekyll installation.
To solve :
mkdir web
mv *.html ./web
cd web
bundle exec jekyll serve
Consider using something like Laravel Herd. It's now pretty much the best tool for running Laravel/PHP apps locally for dev on Windows machines. You can run multiple PHP versions for different projects amongst a load of other features including a GUI for managing Node versions.
The best way to exclude the externals folder from the Next.js build process is to rename it with a leading underscore (e.g., _externals). Next.js treats folders starting with an underscore as ignored by default, preventing them from being included in the build.
i implementing this code in my project annd is working fine
onTap: () async { if (shareList[index]['title'] == "Whatsapp") { final url = "https://wa.me/?text=${articleLink.toString()}"; if (await canLaunchUrl(Uri.parse(url))) { await launchUrl(Uri.parse(url)); Navigator.pop(context); } else { throw 'Could not launch $url'; } } else if (shareList[index]['title'] == "Facebook") { final facebookPageUrl = Uri.parse( "fb://facewebmodal/f?href=https://www.facebook.com/$articleLink"); if (await canLaunchUrl(facebookPageUrl)) { await launchUrl(facebookPageUrl, mode: LaunchMode.externalApplication); Navigator.pop(context); } else { final fallbackUrl = Uri.parse( "https://www.facebook.com/$articleLink"); Navigator.pop(context); if (await canLaunchUrl(fallbackUrl)) { await launchUrl(fallbackUrl, mode: LaunchMode.externalApplication); } else { throw 'Could not launch Facebook URL'; } } } else if (shareList[index]['title'] == "Gmail") { final Uri emailUri = Uri( scheme: 'mailto', path: '', query: Uri.encodeFull( 'subject=Send a Article Link&body=$articleLink'), ); if (await canLaunchUrl(emailUri)) { await launchUrl(emailUri); Navigator.pop(context); } else { throw 'Could not launch email app'; } } else if (shareList[index]['title'] == "LinkedIn") { final profileUrl = Uri.parse( "https://www.linkedin.com/sharing/share-offsite/?url=${Uri.encodeComponent(articleLink)}"); if (await canLaunchUrl(profileUrl)) { await launchUrl(profileUrl, mode: LaunchMode.externalApplication); Navigator.pop(context); } else { throw 'Could not launch LinkedIn profile'; } } else { Clipboard.setData(ClipboardData(text: articleLink)) .then((_) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( content: Text("Link copied to clipboard"))); }); // Clipboard.setData(ClipboardData(text: articleLink)); Navigator.pop(context); } },
-> Extend Exception for checked exceptions (must be declared in method signatures). -> Extend RuntimeException for unchecked exceptions (optional handling, usually due to programmer error). -> NumberFormatException is a subclass of IllegalArgumentException and is thrown when a string does not match the expected numerical format. -> IllegalArgumentException is for bad method arguments
Im using:
Java 21
Spring Boot 3.3.0
VM options: -javaagent:/aspectjweaver-1.9.22.jar -javaagent:/spring-instrument-6.2.2.jar
I upgraded version of hibernate-core to 6.5.3.Final and it works fine. This error relate to https://hibernate.atlassian.net/browse/HHH-18108
I found that adding this tag <meta name="viewport" content="width=device-width, initial-scale=1">
tells the browser how to scale and display the page on different screen sizes - now the issue is resolved.
Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag
I found my app was using a library still on javax, specifically javax.xml.bind. Updated to a version that used jakarta and the error messages in the console went away.
This seems to work for me:
export $(echo ${QUERY_STRING} | tr '&' '\n' | xargs -L 1)
You need to call keycloak.init(...); to launch the auth process.
Ошибка -bash: /Applications/Python 3.x/Install Certificates.command: No such file or directory указывает на то, что скрипт Install Certificates.command отсутствует в вашей установке Python. Это может быть связано с тем, что Python был установлен не через официальный установщик с сайта python.org, или скрипт был удален.
Не волнуйтесь, проблему можно решить вручную. Вот несколько способов исправить ошибку с SSL-сертификатами на macOS.
Пакет certifi предоставляет актуальные корневые сертификаты для Python. Установите его:
bash Copy pip install certifi После установки обновите переменную окружения SSL_CERT_FILE, чтобы Python использовал сертификаты из certifi:
bash Copy export SSL_CERT_FILE=$(python -m certifi) 2. Вручную обновите сертификаты
Если у вас нет скрипта Install Certificates.command, вы можете вручную скопировать сертификаты из пакета certifi в системную папку Python.
Найдите путь к сертификатам certifi: bash Copy python -m certifi Это вернет путь к файлу cacert.pem, например: Copy /Library/Frameworks/Python.framework/Versions/3.x/lib/python3.x/site-packages/certifi/cacert.pem Скопируйте этот файл в папку с сертификатами Python: bash Copy sudo cp $(python -m certifi) /Library/Frameworks/Python.framework/Versions/3.x/etc/openssl/cert.pem (Замените 3.x на вашу версию Python.) 3. Переустановите Python
Если проблема сохраняется, возможно, стоит переустановить Python с официального сайта python.org. Убедитесь, что вы скачали и установили последнюю версию Python для macOS.
После установки проверьте, появился ли скрипт Install Certificates.command:
bash Copy ls /Applications/Python\ 3.x/ Если скрипт есть, выполните его:
bash Copy /Applications/Python\ 3.x/Install\ Certificates.command 4. Используйте Homebrew для установки Python
Если вы используете Homebrew, вы можете установить Python через него:
bash Copy brew install python После установки обновите сертификаты:
bash Copy /usr/local/opt/[email protected]/bin/python3 -m pip install --upgrade certifi 5. Проверьте переменные окружения
Убедитесь, что Python использует правильные сертификаты. Проверьте переменную окружения SSL_CERT_FILE:
bash Copy echo $SSL_CERT_FILE Если она не указывает на файл cacert.pem из certifi, установите её вручную:
bash Copy export SSL_CERT_FILE=$(python -m certifi) 6. Используйте флаг --trusted-host
Если проблема возникает только при установке пакетов через pip, вы можете временно отключить проверку SSL:
bash Copy pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org <package_name> 7. Проверьте версию OpenSSL
Убедитесь, что у вас установлена последняя версия OpenSSL:
bash Copy openssl version Если версия устарела, обновите её через Homebrew:
bash Copy brew install openssl Итог
Если скрипт Install Certificates.command отсутствует, вы можете вручную обновить сертификаты с помощью пакета certifi или переустановить Python. После этого проблема с SSL-сертификатами должна быть решена.
You are not really giving enough information here, for example:
See https://developers.docusign.com/docs/esign-rest-api/esign101/error-codes/ for information on what the error codes represent for the docusign api.
and you might want to check the common error FAQ at https://developers.docusign.com/docs/esign-rest-api/esign101/error-codes/troubleshooting-common-errors/
Use “pool.promise.query” insted of pool.query
It will make it promise forcefully so await will work with it
You might want to add a fixed width to the container, so that the scroll can work
-2
I just deleted .gradle folder from android folder and run "npm run android" again and it worked
Delete the postcss.config.js
file
And then npm i -d @tailwindcss/vite
,
and also change the vite.config.ts
file
...
import tailwindcss from "@tailwindcss/vite";
export default defineConfig(async () => ({
plugins: [
react(),
tailwindcss(),
],
...
...
for RHEL/OracleServer try rpm -qi glibc-devel
:
> rpm -qi glibc-devel
Name : glibc-devel
Version : 2.28
Release : 236.0.1.el8.7
Architecture: x86_64
Source RPM : glibc-2.28-236.0.1.el8.7.src.rpm
...
on Debian try dpkg -s libc6-dev
S1 = list(map(str, input("Enter string 1")))
S2 = list(map(str, input("Enter string 2")))
set1 = set(S1)
set2 = set(S2)
count = 0
for i in set1:
for x in set2:
if i == x:
count = count+1
print(count)
I'm joining the conversation in case there's anyone who's ending here in 2025 like me. I'd also like to know if there's a way to know the values before the modified ones or simply the fields that have been updated. I do not make the connection through web hook, but directly with the Logic Apps connector for Azure DevOps. It seems that, using the web hook, you can specify the trigger more.
In my case I want to create a child item when it changes to a specific state. I don't need to know what the previous state was, but I do need to know if it's the state the field that has been modified. I've seen that I can solve it with the item's modification date and a specific field for the state modification date, but this doesn't exist for all fields. If it is useful for someone who is looking for a solution to the case presented here, I would try to deduce the previous state from the text of the "System_Reason" field, since this will indicate the reason for the state change and by default it mentions the previous state. It's not ideal but it might be useful. Or directly use the web hook method.
can you show your code of your form ? we need to see how you implement the form. and how you insert functions on it.
I had the same problem and decided to try connecting my phone using Android Studio (via QR). After that, the name of the connected PC was displayed on the phone. After that, I already went to VS Code.
About composer if the agent has installed composer, you can just use composer <YourCommand>
with Command Line
step.
Deactivate event will be raised when you will switch focus to another application too. How to prevent this ?
For anyone else looking just to increase the number of rows displayed in box mode there is:
.maxrows 1234
Thanks everyone for your comments. Here I post the answer for the initial question after some testing. I followed some of the comments and I confirm the issue was related to QEMU, when I tested on a physical machine and a hypervisor it worked fine.
Take a look at this plugin I built for lightweight-charts-python ( https://github.com/EsIstJosh/lightweight-charts-python) , you can probably do some minor adjustments to get it to work using normal lightweight-charts :
import { IPrimitivePaneRenderer, Coordinate, IPrimitivePaneView, Time, ISeriesPrimitive, SeriesAttachedParameter, DataChangedScope, SeriesDataItemTypeMap, SeriesType, Logical, AutoscaleInfo, BarData, LineData, ISeriesApi, PrimitivePaneViewZOrder } from "lightweight-charts";
import { PluginBase } from "../plugin-base";
import { setOpacity } from "../helpers/colors";
import { ClosestTimeIndexFinder } from '../helpers/closest-index';
import { hasColorOption } from "../helpers/typeguards";
export class FillArea extends PluginBase implements ISeriesPrimitive<Time> {
static type = "Fill Area"; // Explicitly set the type name
_paneViews: FillAreaPaneView[];
_originSeries: ISeriesApi<SeriesType>;
_destinationSeries: ISeriesApi<SeriesType>;
_bandsData: BandData[] = [];
options: Required<FillAreaOptions>;
_timeIndices: ClosestTimeIndexFinder<{ time: number }>;
constructor(
originSeries: ISeriesApi<SeriesType>,
destinationSeries: ISeriesApi<SeriesType>,
options: FillAreaOptions
) {
super();
// Existing logic for setting colors
const defaultOriginColor = setOpacity('#0000FF', 0.25); // Blue
const defaultDestinationColor = setOpacity('#FF0000', 0.25); // Red
const originSeriesColor = hasColorOption(originSeries)
? setOpacity((originSeries.options() as any).lineColor || defaultOriginColor, 0.3)
: setOpacity(defaultOriginColor, 0.3);
const destinationSeriesColor = hasColorOption(destinationSeries)
? setOpacity((destinationSeries.options() as any).lineColor || defaultDestinationColor, 0.3)
: setOpacity(defaultDestinationColor, 0.3);
this.options = {
...defaultFillAreaOptions,
...options,
originColor: options.originColor ?? originSeriesColor,
destinationColor: options.destinationColor ?? destinationSeriesColor,
};
this._paneViews = [new FillAreaPaneView(this)];
this._timeIndices = new ClosestTimeIndexFinder([]);
this._originSeries = originSeries;
this._destinationSeries = destinationSeries;
// Subscribe to data changes in both series
this._originSeries.subscribeDataChanged(() => {
console.log("Origin series data has changed. Recalculating bands.");
this.dataUpdated('full');
this.updateAllViews();
});
this._destinationSeries.subscribeDataChanged(() => {
console.log("Destination series data has changed. Recalculating bands.");
this.dataUpdated('full');
this.updateAllViews();
});
}
updateAllViews() {
this._paneViews.forEach(pw => pw.update());
}
applyOptions(options: Partial<FillAreaOptions>) {
this.options = {
...this.options,
...options,
};
this.calculateBands();
this.updateAllViews();
super.requestUpdate();
console.log("FillArea options updated:", this.options);
}
paneViews() {
return this._paneViews;
}
attached(p: SeriesAttachedParameter<Time>): void {
super.attached(p);
this.dataUpdated('full');
}
dataUpdated(scope: DataChangedScope) {
this.calculateBands();
if (scope === 'full') {
const originData = this._originSeries.data();
this._timeIndices = new ClosestTimeIndexFinder(
[...originData] as { time: number }[]
);
}
}
calculateBands() {
const originData = this._originSeries.data();
const destinationData = this._destinationSeries.data();
// Ensure both datasets have the same length
const alignedData = this._alignDataLengths([...originData], [...destinationData]);
const bandData: BandData[] = [];
for (let i = 0; i < alignedData.origin.length; i++) {
let points = extractPrices(alignedData.origin[i],alignedData.destination[i]);
if (points?.originValue === undefined || points?.destinationValue === undefined) continue;
// Determine which series is upper and lower
const upper = Math.max(points?.originValue, points?.destinationValue);
const lower = Math.min(points?.originValue, points?.destinationValue);
bandData.push({
time: alignedData.origin[i].time,
origin: points?.originValue,
destination: points?.destinationValue,
upper,
lower,
});
}
this._bandsData = bandData;
}
_alignDataLengths(
originData: SeriesDataItemTypeMap[SeriesType][],
destinationData: SeriesDataItemTypeMap[SeriesType][]
): { origin: SeriesDataItemTypeMap[SeriesType][], destination: SeriesDataItemTypeMap[SeriesType][] } {
const originLength = originData.length;
const destinationLength = destinationData.length;
if (originLength > destinationLength) {
const lastKnown = destinationData[destinationLength - 1];
while (destinationData.length < originLength) {
destinationData.push({ ...lastKnown });
}
} else if (destinationLength > originLength) {
const lastKnown = originData[originLength - 1];
while (originData.length < destinationLength) {
originData.push({ ...lastKnown });
}
}
return { origin: originData, destination: destinationData };
}
autoscaleInfo(startTimePoint: Logical, endTimePoint: Logical): AutoscaleInfo {
const ts = this.chart.timeScale();
const startTime = (ts.coordinateToTime(
ts.logicalToCoordinate(startTimePoint) ?? 0
) ?? 0) as number;
const endTime = (ts.coordinateToTime(
ts.logicalToCoordinate(endTimePoint) ?? 5000000000
) ?? 5000000000) as number;
const startIndex = this._timeIndices.findClosestIndex(startTime, 'left');
const endIndex = this._timeIndices.findClosestIndex(endTime, 'right');
const range = {
minValue: Math.min(...this._bandsData.map(b => b.lower).slice(startIndex, endIndex + 1)),
maxValue: Math.max(...this._bandsData.map(b => b.upper).slice(startIndex, endIndex + 1)),
};
return {
priceRange: {
minValue: range.minValue,
maxValue: range.maxValue,
},
};
}
}
class FillAreaPaneRenderer implements IPrimitivePaneRenderer {
_viewData: BandViewData;
_options: FillAreaOptions;
constructor(data: BandViewData) {
this._viewData = data;
this._options = data.options;
}
draw() {}
drawBackground(target: CanvasRenderingTarget2D) {
const points: BandRendererData[] = this._viewData.data;
const options = this._options;
if (points.length < 2) return; // Ensure there are enough points to draw
target.useBitmapCoordinateSpace((scope) => {
const ctx = scope.context;
ctx.scale(scope.horizontalPixelRatio, scope.verticalPixelRatio);
let currentPathStarted = false;
let startIndex = 0;
for (let i = 0; i < points.length - 1; i++) {
const current = points[i];
const next = points[i + 1];
if (!currentPathStarted || current.isOriginAbove !== points[i - 1]?.isOriginAbove) {
if (currentPathStarted) {
for (let j = i - 1; j >= startIndex; j--) {
ctx.lineTo(points[j].x, points[j].destination);
}
ctx.closePath();
ctx.fill();
}
ctx.beginPath();
ctx.moveTo(current.x, current.origin);
ctx.fillStyle = current.isOriginAbove
? options.originColor || 'rgba(0, 0, 0, 0)' // Default to transparent if null
: options.destinationColor || 'rgba(0, 0, 0, 0)'; // Default to transparent if null
startIndex = i;
currentPathStarted = true;
}
ctx.lineTo(next.x, next.origin);
if (i === points.length - 2 || next.isOriginAbove !== current.isOriginAbove) {
for (let j = i + 1; j >= startIndex; j--) {
ctx.lineTo(points[j].x, points[j].destination);
}
ctx.closePath();
ctx.fill();
currentPathStarted = false;
}
}
if (options.lineWidth) {
ctx.lineWidth = options.lineWidth;
ctx.strokeStyle = options.originColor || 'rgba(0, 0, 0, 0)';
ctx.stroke();
}
});
}
}
class FillAreaPaneView implements IPrimitivePaneView {
_source: FillArea;
_data: BandViewData;
constructor(source: FillArea) {
this._source = source;
this._data = {
data: [],
options: this._source.options, // Pass the options for the renderer
};
}
update() {
const timeScale = this._source.chart.timeScale();
this._data.data = this._source._bandsData.map((d) => ({
x: timeScale.timeToCoordinate(d.time)!,
origin: this._source._originSeries.priceToCoordinate(d.origin)!,
destination: this._source._destinationSeries.priceToCoordinate(d.destination)!,
isOriginAbove: d.origin > d.destination,
}));
// Ensure options are updated in the data
this._data.options = this._source.options;
}
renderer() {
return new FillAreaPaneRenderer(this._data);
}
zOrder() {
return 'bottom' as PrimitivePaneViewZOrder;
}
}
export interface FillAreaOptions {
originColor: string | null; // Color for origin on top
destinationColor: string | null;
lineWidth: number | null;
};
export const defaultFillAreaOptions: Required<FillAreaOptions> = {
originColor: null,
destinationColor: null,
lineWidth: null,
};
interface BandData {
time: Time;
origin: number; // Price value from the origin series
destination: number; // Price value from the destination series
upper: number; // The upper value for rendering
lower: number; // The lower value for rendering
};
interface BandViewData {
data: BandRendererData[];
options: Required<FillAreaOptions>;
};
interface BandRendererData {
x: Coordinate | number;
origin: Coordinate | number;
destination: Coordinate | number;
isOriginAbove: boolean; // True if the origin series is above the destination series
}
function extractPrices(
originPoint: SeriesDataItemTypeMap[SeriesType],
destinationPoint: SeriesDataItemTypeMap[SeriesType]
): {originValue: number| undefined, destinationValue: number| undefined} | undefined {
let originPrice: number | undefined;
let destinationPrice: number | undefined;
// Extract origin price
if ((originPoint as BarData).close !== undefined) {
const originBar = originPoint as BarData;
originPrice = originBar.close; // Use close price for comparison
} else if ((originPoint as LineData).value !== undefined) {
originPrice = (originPoint as LineData).value; // Use value for LineData
}
// Extract destination price
if ((destinationPoint as BarData).close !== undefined) {
const destinationBar = destinationPoint as BarData;
destinationPrice = destinationBar.close; // Use close price for comparison
} else if ((destinationPoint as LineData).value !== undefined) {
destinationPrice = (destinationPoint as LineData).value; // Use value for LineData
}
// Ensure both prices are defined
if (originPrice === undefined || destinationPrice === undefined) {
return undefined;
}
// Handle mixed types and determine the appropriate values to return
if (originPrice < destinationPrice) {
// origin > destination: min(open, close) for BarData (if applicable), otherwise value
const originValue =
(originPoint as BarData).close !== undefined
? Math.min((originPoint as BarData).open, (originPoint as BarData).close)
: originPrice;
const destinationValue =
(destinationPoint as BarData).close !== undefined
? Math.max((destinationPoint as BarData).open, (destinationPoint as BarData).close)
: destinationPrice;
return {originValue, destinationValue};
} else {
// origin <= destination: max(open, close) for BarData (if applicable), otherwise value
const originValue =
(originPoint as BarData).close !== undefined
? Math.max((originPoint as BarData).open, (originPoint as BarData).close)
: originPrice;
const destinationValue =
(destinationPoint as BarData).close !== undefined
? Math.min((destinationPoint as BarData).open, (destinationPoint as BarData).close)
: destinationPrice;
return {originValue, destinationValue};
}
}```
For Linux distributions, you need to perform an additional step i.e. opening the RDP from the IP4 Firewall. Steps:
After a lot of struggle I found this option. For Windows instances RDP works by default, but for Linux distributions this needs to be done additionally.
Did you find any APIs? I have the same problem. I'm searching for APIs that provide a maintenance schedule for a specific car based on input (model, engine type, etc.), but I couldn't find any freeones.
The Problem with an ssh-server behind traefik is that ssh-clients do not send a HostSNI Parameter with the tcp connection because it does not use tls.
traefik community post with the same problem
https://community.traefik.io/t/routing-ssh-traffic-with-traefik-v2/717
But Traefik can only route if it is present.
I have tried myself setting up a git server behind traefik my easiest solution was putting it on another port.
I don't know about gitlab but eg. Gogs (a git server) allows setting a port in the config for ssh cloning so the provided command in the ui uses that.
quit helpful, it worked for me.
flutter_barcode_scanner: ^2.0.0
There are many things possible using coder.ceval
- including calling C++. But also many limitations. Currently working on this as well. You can call arrays, but there are limitations if you have typedefs that define array datatypes.
Meanwhile SOQL has learned new tricks:
SELECT FIELDS(ALL) FROM myTableName
This selects every field - custom and standard fields of myTableName. FIELDS(Custom)
and FIELDS(Standard)
work as the name suggests.
i am using windows 11 OS and for framework 4.7,4.8 its not working even trying all the given code snippets
HttpClient client = new HttpClient(new HttpClientHandler { SslProtocols = SslProtocols.Tls12 });
For an in-depth look at how Android native code works, there is a scientific paper that explains it in detail (self-promotion, I am one of the authors) -- with a focus on how malware abuses it.
The Dark Side of Native Code on Android [PDF]
Have a look at Sections 2, 4.2, and 4.3.
You might be getting a JavaScript error that you're not seeing. The best way to check and fix it is by using Chrome DevTools, opening the Console, and looking for any errors.
Once you identify the error, you can try to resolve it.
To do this, while on the webpage where the title filter isn't working, follow these steps:
Right-click on the page. Select Inspect. Go to the Console tab and check for errors.
For intersection you can use the following formula if your excel supports LET command. =LET(x,ISNA(MATCH(G29:G34,H29:H32,0)),IFERROR( FILTER(G29:G34,NOT(x)),"")) G29:G34 is the range of first set H29:H32 is the range of second set
const inp = document.querySelector("input");
const h2 = document.querySelector("h2");
inp.addEventListener("input", function(){
console.log(inp.value);
h2.innerText = inp.value;
});
I'm encountering the same errors. Did you find any solution? Any idea why this error is occurring?
I've adapted @ThomA answer with the following code (Obviously, this isn't production code):
WITH CTE_PROMPT AS (
SELECT PERSON_NUMBER
,'M' Gender
FROM EMPLOYEES
)
SELECT EMPLOYEES.PERSON_NUMBER
,SEX
FROM EMPLOYEES
LEFT OUTER JOIN CTE_PROMPT ON EMPLOYEES.PERSON_NUMBER = CTE_PROMPT.PERSON_NUMBER
WHERE SEX = Gender OR Gender = 'ALL'
This works. For some reason it didn't like the CTE_PROMPT query without a table.
const { onCall, HttpsError } = require("firebase-functions/v2/https");
exports.getQuestion = onCall((request) => {
if (!request.auth) {
throw new HttpsError(
"unauthenticated",
"You must be authenticated to access this resource."
);
}
const { key1, key2 } = request.data;
// or
// const data = request.data;
});
For more refer
The simplest function that matches the examples that you provided is FLOOR(value) + 0.5
.
Here's an example:
SELECT
value, FLOOR(value) + 0.5
FROM UNNEST([0.01, 2.3913, 4.6667, 2.11]) AS value
Is seems, to be known issue: YouTrack CMP-4610
Long story short: JetBrains doesn’t care about this now, use native UI.
Same issue was faced so when searched in intervet got the solution saying
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
platforms: ${{ steps.platform-matrix.outputs.matrix }}
regions: ${{ steps.region-matrix.outputs.matrix }}
steps:
# Step 1: Retrieve and parse PLATFORMS
- name: Platform Matrix
id: platform-matrix
env:
PLATFORMS: ${{ vars.variablename }}
run: |
# Convert the repository variable to JSON array
MATRIX_JSON=$(jq -nc --arg values "$PLATFORMS" '$values | split(",")')
echo "::set-output name=matrix::$MATRIX_JSON"
Changed the set-output line with below line
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
The code ran perfectly . Same is also communicated here : https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Any update on this? I have the same error.
i've got the same problem. When i'm running npx expo start
it's working just fine, but when i generate the apk running eas build --profile development --platform android
and install the apk doesn't work and not show any errors to find the cause. I've already try adding
[
'expo-build-properties',
{
android: {
usesCleartextTraffic: true, // ? enable HTTP requests
}
}
]
to app.json file and running npx expo install expo-build-properties
.
What can i do?
you cant directly import a server component into a client component, but you can give it as a child of this client component (this thread talking about it should help you : How can i use server component in client component?).
After using this code I am getting exception "uncaught exception :error invariant failed in cypress" . Any idea how to handle it
But this now means that every class in my system that needs to log, needs to get this LogService injected into it, which seems redundant.
I wouldnt count injecting logger to consumers as redundant or an issue unless injection is creating logger instances each time. Being redundant in this case (injecting ilogger to each consumer) actually may help to readability and tests.
Option 1 inject iloggable/ilogger to consumers; Add iloggable/ilogger to container/provider then get it from the provider via constructor when needed, which you think redundant and cumbersome :). If needed you can also implement logger factory/provider so multiple loggers can be used simultaneously. Asp.net for instance similarly use ILogger and it's usually injected to consumers with constructor DI.
Option2 use singleton; If you insist on a static option; Create a singleton logger service/wrapper with iloggable/ilogger injected then use the service from anywhere without di. Readability, tests may be bit worse off than having Ilogger injected to consumers.
I also encountered this issue while working with Spring Boot 3.4.1, and upgrading httpclient5 to 5.4.1 resolved it.
Spring Boot 3+ internally uses Apache HttpClient 5 for HTTP communication. If your project depends on an older version (e.g., 5.2.x or 5.3.x), Spring Boot's auto-configuration may break due to missing classes like:
org/apache/hc/client5/http/ssl/TlsSocketStrategy
Thanks to the existing answer for pointing out the correct version upgrade!
benz Custom Protocol demo worked well for me, thank you.
I encountered a issue after that when triggering a callback to the app and just sharing the solution if anyone encounters the same.
if you run into "Windows cannot find the app to open" error when clicking on any of the buttons/Actions on the notification, do a case insensitive comparison in the "second-instance" event
i.e arg.toLowerCase().startsWith(appProtocol.toLowerCase())
My 100 deposit have not been on my wallet
This works well.
return manager
.getRepository(SlideshowItemEntity)
.createQueryBuilder('slideshow_items')
.softDelete()
.where('image_id NOT IN (:...imageIDs)', { imageIDs: imageIDs.join(',') })
.andWhere('slideshow_id = :slideshowID', { slideshowID: slideshowID })
.execute();
It highly depends on what and how you are ui testing. Content descriptions are not possible for certain composables e.g LazyColumn or a Custom composable you write but you might still need to test it. In this case having a testTag is perfectly fine. Just make sure that you don't have testTag strings all over the place; separate them into a TestTagConstants if possible. You can more about ui testing here
Its possible to delete a dependency thru the GUI, via Project Structure -> Dependencies. But make sure that under Modules sidebar, you have selected app or your module, and NOT "All Modules". Then the the minus sign will also be visible, and you can use that for removal.
There not a dead letter trigger that I am aware of, but you could poll. This will sound a bit strange and there are other alternative,
Its crude and not ideal
DECLARE @cadena varchar(max) SET @cadena= 'AB1CAB2CA7274743B3C' SELECT @cadena AS Cadena
SELECT CHARINDEX('B', @cadena) AS PosB1 , CHARINDEX('B', @cadena, CHARINDEX('B', @cadena) + 1) AS PosB2 , CHARINDEX('B', @cadena, CHARINDEX('B', @cadena,CHARINDEX('B', @cadena) + 1)+1) AS PosB3 , SUBSTRING(@cadena,CHARINDEX('B', @cadena),2) AS Str01 , SUBSTRING(@cadena,CHARINDEX('B', @cadena, CHARINDEX('B', @cadena) + 1),2) AS Str02 , SUBSTRING(@cadena,CHARINDEX('B', @cadena, CHARINDEX('B', @cadena, CHARINDEX('B', @cadena) + 1)+1),2) AS Str03
I have the same Problem. Did you find any Solution?
If I got you right, you want to exclude or change rules of SpotBugs. This works nicely with the excludeFilter - an xml file in which you can customize rules based on patterns.
Please refer to
Need to remove controls This is a prop that allows you to display native video player controls
̶c̶o̶n̶t̶r̶o̶l̶s̶
Let's say you have a user that registered, and a controller that handles it. You write everything in the controller to register them and send off an email welcoming them, as well as giving them roles and other things maybe. This can become very single use case and restrictive, and require you to copy everything to another controller if you wanted to reuse the code.
Now with events and listeners (the event is really just the model in my opinion), you can have multiple events with the same model, and you name the event what you want to be the "start of the tree". The listeners are under that and will fire because that event did, and let you do things while being able to use the passed information from the event. So let's say $user in this example, as long as $user is passed on the call to the event, you can now use anything in the $user object, like $user->name, in your listeners
The benefit is that you can move a lot away from the controller. Move the role setting to a listener, move the email sending to another listener, etc. And just have 1 event called something like UserRegisteredEvent that will fire all those listeners. You can also easily reuse them in something like the admin dashboard part of the application and just call the event you already have, and all the listeners will follow. Or even make a new event and only attach the new event to some of those existing listeners, but without having to redo much code (for example, a new event called AdminPanelUserRegisteredEvent will only be attached to SendRegistrationEmailListener)
Hopefully that kinda helps some people coming across this later
Go fixed that error.
Go Version <=go1.21
for i := range whatever {
defer func() { fmt.Print(i) }()
}
Outputs: 44444
Go Version >=go1.22
for i := range whatever {
defer func() { fmt.Print(i) }()
}
Outputs: 43210
I got Dbeaver 24.3.3.202501191633 but it still throws this error on CSV import to Oracle 9i database.
i tried to add new key but when i saved successfully new key it is literally disappear why?
This article provides a well-structured and insightful deep dive into Streams and Tasks, offering clear explanations, practical examples, and real-world applications. The addition of behind-the-scenes insights and best practices makes it a valuable resource for both beginners and experienced users.Snowflake Online Course
Get timestamp of today
$iTimestamp = new \DateTime()->getTimestamp()
Get timestamp of yesterday
$iTimestamp = new \DateTime("1 day ago")->getTimestamp()
Set the centeredScaling
property of the fabric.Object.prototype
to true
.
fabric.Object.prototype.centeredScaling = true;
This will ensure that all objects created using Fabric.js will have centered scaling enabled by default.
You can check Vue FabricJs Starter kit for basic structure initialization.
I believe Jest, by design, will terminate after one assertion fail.
By the way, I use this npm package expect-type to test type. Elysia.js also has a lot of test for types.
Currently my application creates tables but without the prefixes:
docker exec -it postgres16 psql -U spring_batch_test
psql (16.6 (Debian 16.6-1.pgdg120+1))
Type "help" for help.
spring_batch_test=> \dt
List of relations
Schema | Name | Type | Owner
--------+------------------------------+-------+-------------------
public | batch_job_execution | table | spring_batch_test
public | batch_job_execution_context | table | spring_batch_test
public | batch_job_execution_params | table | spring_batch_test
public | batch_job_instance | table | spring_batch_test
public | batch_step_execution | table | spring_batch_test
public | batch_step_execution_context | table | spring_batch_test
public | orders | table | spring_batch_test
(7 rows)
spring_batch_test=>
You can try modify the cypress.config.ts by adding this line:
supportFile: 'cypress/support/index.ts'
As shown below:
export default defineConfig({ e2e: {
supportFile: 'cypress/support/index.ts',
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
I solved it by adding the namespace to the classes for which it was reporting the error.
For example:
namespace PATHSUPERMAN_ADSAINITIALIZER { public class AdsInitializer : MonoBehaviour {
} }
I had the same case mentionned by @lordbao, but I couldn't delete using project structure (the popup of error blocked acces to my project).
My solution was to change directly in .iml file for my project :
A module file (the .iml file) is used for keeping module configuration
It's an xml file you can delete the duplicated entry for sourceFolder tag.
To filter your global CSS file for styles used in a specific HTML file in VS Code:
For the most efficient method, use a CSS purge tool.
But how do you refer to the package.json?
you can set the reports "outputLocation" properties, my code example produces xml output:
spotbugsMain {
reports {
xml.outputLocation.set(layout.buildDirectory.file("/spotbugs/spotbugs.xml"))
}
}
Reference: https://github.com/spotbugs/spotbugs-gradle-plugin#readme
This answer might be delayed, but i believe the most simple way to resolve this is to downgrade scipy to certain older version (for me scipy==1.6.2 is good). This is simply because both _status_message and wrap_function were removed from scipy.optimize.optimize in recent version of scipy.
according to a github issue the dir is the problem, as it doesn't work
disabling Antivirus Kaspersky and use of command
git update-git-for-windows
helped me
The issue seems to be the node version. With the latest node:20 container with Node 20.18.3 the tests fail. When hardcoded to 20.18.2, the tests succeed.
Have you find the solution for this issue?
After troubleshooting, I found that the issue was due to configuration settings.
-Steps to Fix the Sub-Category Slider
Admin Panel
→ Stores
→ Configuration
.
Under Theme Settings → Category
, ensure the following:
Show Sub Collection
→ Set to "Yes
".
Ratio Sub Collection
→ Set to 1
.Catalog
→ Categories
, then:Select the parent category containing the subcategories.
Check the following settings:
Category Thumbnail
→ Must be set (image should exist).
Display Mode
→ Set to "Static block and products".
Ensure there are products assigned to the category.
3. Ensure Subcategories Are Properly Configured
For each sub-category, verify:
Use Parent Category Settings
→ Set to "Yes".
Ensure the subcategory is enabled and has products.
the result is
I still dont have the solution but It could be related to the date format. I am investigating change - for / and use western europe format
Compose Webview(WebView in AndroidView) doesn't work properly. You should use XML layout for WebView
check this answer => [https://stackoverflow.com/questions/78482022/android-webview-in-compose-not-displaying-certain-pages-properly/79435209#79435209]
I would probably do something like that.
const pathArr = pathname.split('/')
let nonExistentFolders
for (let i = 0; i < pathArr.length; i++) {
if (pathArr.match(/\d+/) && i+1 < pathArr.length) {
const folderName = pathArr[i+1]
// validate id and folder name
continue
}
nonExistentFolders = pathArr.slice(i, -1)
break
}
for (const folder of nonExistentFolders) {
// generate id/folder name pairs
}
// push new route
Have you thought of using next.js' property params
in the page's component?
It could first of all simplify the pathname logic.
firstly ,need to check the order of importing modules, import the react and then the react-dom
A bug was reported in Padrino's GitHub repository. Have a look here: https://github.com/padrino/padrino-framework/issues/2298
The reporter posted a monkey patch. You can maybe track this problem or post a workaround.
To use native Node modules in your packaged Electron application, you'll need to follow these steps:
First, install the native Node module using npm, just like you would in any other Node.js project:
npm install <module-name>
Since Electron uses a different Node.js version and ABI (Application Binary Interface) than the one installed on your system, you'll need to rebuild the native module for Electron. You can use the electron-rebuild
package to automate this process.
Install electron-rebuild
as a dev dependency:
npm install --save-dev electron-rebuild
Then, rebuild the native modules:
./node_modules/.bin/electron-rebuild
On Windows, you might need to use:
.\node_modules\.bin\electron-rebuild.cmd
Alternatively, you can set up environment variables to install and rebuild native modules directly using npm. Here's an example:
# Set Electron's version
export npm_config_target=1.2.3
# Set the architecture of your machine
export npm_config_arch=x64
# Set the target architecture
export npm_config_target_arch=x64
# Set the distribution URL for Electron headers
export npm_config_disturl=https://electronjs.org/headers
# Tell node-pre-gyp to build the module from source code
export npm_config_runtime=electron
export npm_config_build_from_source=true
# Install all dependencies
HOME=~/.electron-gyp npm install
If you prefer to manually rebuild the native module, you can use node-gyp
. Navigate to the module's directory and run:
cd /path-to-module/
HOME=~/.electron-gyp node-gyp rebuild --target=1.2.3 --arch=x64 --dist-url=https://electronjs.org/headers
For larger projects, it's a good practice to separate frontend and backend dependencies. You can have two package.json
files: one for frontend dependencies and one for backend (native) dependencies.
Root package.json
:
{
"name": "my-app",
"version": "1.0.0",
"description": "A sample application",
"license": "Apache-2.0",
"main": "./src/main/main.mjs",
"dependencies": {
"react": "^18.2.0",
"react-router-dom": "^5.3.3"
},
"devDependencies": {
"electron": "^31.2.1",
"electron-builder": "^25.0.1"
}
}
Backend package.json
:
{
"name": "my-app",
"version": "1.0.0",
"description": "A sample application",
"license": "Apache-2.0",
"main": "./dist/main/main.js",
"scripts": {
"postinstall": "./node_modules/.bin/electron-rebuild"
},
"dependencies": {
"sqlite3": "^5.1.7",
"sharp": "^0.33.5"
}
}
By following these steps, you can successfully use native Node modules in your Electron application. This ensures compatibility and stability across different platforms.
Does this help, or do you have any specific questions about using native Node modules in Electron?