Consider using libraries that simplify working with interfaces and types in Typescript, among other things. I found the npm package dynamo-repo to be the simplest and easiest one to work with.
This other answer has some explanation and examples: use-type-at-dynamodb-output
I was looking for the same and found out that there is an open discussion about it https://github.com/cucumber/cucumber-js/issues/2088 but it's not implemented in Cucumber.
I don't have enough reputation to comment, hence adding it as an answer.
@llermaly, from what I gather as per the reindex documentation, " Reindexing from remote clusters does not support manual or automatic slicing."
So, was this question answered? Even I have a similar requirement.
I discovered that you can't send the schema name along with it. Even though it's stated in the documentation.
instead of:
setup.Tables["dbo.Tennants"].SyncDirection = SyncDirection.DownloadOnly;
the correct one:
setup.Tables["Tennants"].SyncDirection = SyncDirection.DownloadOnly;
Subtle, but the error didn't show this, I discovered it through the author's own answer.
Finally, I was able to figure it out myself. The file was located in the following location in my android studio manager device explorer,
/data/data/host.exp.exponent/files/SQLite/mydb
I have same type of issue if you use any VPN or any VPN browser extension you can uninstall or pause then automatically solve this problem.
Same for windows Agent
UserParameter=icmppingsec[*], powershell -NoProfile -ExecutionPolicy bypass -Command "Test-Connection -ComputerName $1 -Count 4 | Measure-Object ResponseTime -Average | ForEach-Object { '{0:N5}' -f ($_.Average / 1000) -replace ',', '.'}"
I found a way to avoid some of not supported commands in standard SQL :
WITH rolling_dates AS (
SELECT
DATE '2024-01-07' AS flash_date
UNION ALL
SELECT DATE_ADD(DATE '2024-01-07', INTERVAL 1 QUARTER)
UNION ALL
SELECT DATE_ADD(DATE '2024-01-07', INTERVAL 2 QUARTER)
UNION ALL
SELECT DATE_ADD(DATE '2024-01-07', INTERVAL 3 QUARTER)
UNION ALL
SELECT DATE_ADD(DATE '2024-01-07', INTERVAL 4 QUARTER)
)
SELECT
* EXCEPT(rn)
FROM (
SELECT *,
ROW_NUMBER() OVER (PARTITION BY S.id, flash_date ORDER BY provided_at DESC) AS rn
FROM table S
CROSS JOIN rolling_dates
WHERE deleted.at IS NULL
AND provided_at <= TIMESTAMP(flash_date)
)
WHERE rn = 1
With this request, I can create my view and use it now.
The solution to the error is to keep C source files in resources/scala-native and also remove the @link("HelloWorld") from HelloWorld.scala as I already point a custom path to find the .so file using nativeLinkingOptions config in my build.mill
The solution was provided by a Scala Native Lead dev in Scala forum. Link to it here
One command was missing in all the answers.
First, try the git add . then git commit -m "some msg" then git push.
If that doesn't work then move on the the approach given below:
In my case, nothing was working until I used this command:
git push --set-upstream origin masterthis.Controls.SetChildIndex(this.lblBrandProduct, 0); is not genrated in Windows form for all the fields when i try to add a new form with new fields.Please help me on this
it is: git add full path of your file with file name
suppose I want to add a file MainActivity.kt then If i do
git add MainActivity.kt it will throw error sayingfatal: pathspec 'MainActivity.kt did not match any files
so to avoid that:
git add app/src/main/java/com/androminor/firstcompose/MainActivity.kt
I checked all of the above answer. To my surprise they where half baked reply giving wrong output.
Why not just use the apply function?:
df["ROMol"] = df[args.smi_column].apply(lambda x: pybel.readstring("smi", x))
Not only is it cleaner but should also be more efficient.
If you are not constrained to using pybel, RDKit has utility functions to do exactly what you want.
The browser has given h2 tags (and other tags) a font size of some rem, so that it will change size when the font size of the root element changes.
Let's say the browser sets the default root element font size for h2 to 1.5rem, for example. Now you change it to 1rem, so it of course gets smaller.
I have build a component that works with Alpine.js to fix the selected attribute issue when using select element with Livewire.
My Laravel Livewire Select Component is a custom component designed to enhance the functionality of HTML elements when used with Laravel Livewire. This component seamlessly integrates with Livewire to manage the default selected state of options, ensuring compatibility with Livewire's reactivity. It allows for programmatic default option selection and optimizes performance through an optional JavaScript loading feature.
You can fine the component an instruction on how to use it here:
https://github.com/samuelaustinudhedhe/Laravel-Livewire-Select-Component
Let me know if you need further assistance
isOdd = new BehaviorSubject(false);
private _destoyed = new Subject<void>()
ngOnInit(): void {
this.nestedFc.valueChanges
.pipe(
takeUntil(this_destroyed),
map((value: any) => value % 2 !== 0)
)
.subscribe((odd) => {
this.isOdd.next(odd);
});
Front :
<span *ngIf="(isOdd | async) as value"> {{value}}</span>`
Dont forget to next into complete _destroyed on ngDestroy.
cdr.detectChanges() isn't best way to fix this.
And with this behaviorSubject impl, you can add this one (Optional but better perf) :
changeDetection: ChangeDetectionStrategy.OnPush,
It must be at least 14 characters long and include uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), and special characters (!@#$%^&*).
The npm documentation states that you can have multiple lines for noproxy. I was able to get it to work by using this format...
noproxy[]=login.microsoftonline.com
noproxy[]=noproxy2.com
noproxy[]=noproxy3.com
file_path = "/mnt/data/dario_repeated_1_million_times.txt"
with open(file_path, "w") as file: file.write("Dario " * 1_000_000)
file_path
I already tried with custom classloader, it is dynamically adding into classpath, it is resolving the class cast exception but it is not loading all the classes from the jar files as it is calling a class from another jar file. and then it is giving me NoClassDefFoundError. Please give me suggestions to dynamically load all the classes from the jarfiles in java17?
Role-based access control (RBAC) is great for managing permissions, but it has a few downsides. It can get complicated in larger organizations, with too many roles leading to confusion. Sometimes, roles aren’t flexible enough for specific tasks, and tracking changes can be difficult—like the issue you mentioned with unauthorized configuration changes. Tools like Okta, OpManager, or AWS IAM can help. They offer features like audit trails, alerts, and access reviews, so you can track who’s doing what. Have you tried using any of these tools? You can also read upon customizable RBAC. They can really simplify managing access and avoid issues like the one you faced!
"rules": { "no-nested-ternary": "off" }
You have to add the query you're trying to run and your table structure from Athena, otherwise it would be so hard to help you.
Usually Athena works with JSON based on the way you configured the crawler to read the data and store it from your S3 files, maybe you stored the data as normal string and you're trying to access one of the attributes or your parsed structure is not what you're actually expecting and for this you have to check the table structure
I just tried some things and found it eventually guys.
XWPFParagraph paragraph2 = document.createParagraph();
XWPFRun run2 = paragraph2.createRun();
paragraph2.setAlignment(ParagraphAlignment.BOTH);
run2.setText("...text here....");
XWPFParagraph paragraph3 = document.createParagraph();
XWPFRun run3 = paragraph3.createRun();
paragraph3.setAlignment(ParagraphAlignment.BOTH);
run3.addBreak();
run3.addBreak();
run3.setText("...text here...");
Works like a charm
You need to use the jQuery-UI method of the button widget to enable it after disabling it: https://api.jqueryui.com/button/#method-enable
btn.button( "enable" );
If you bypass jQuery-UI it will not correctly manage the button state, which is the point of jQuery-UI.
I know its old but still answering because it may help someone in future.
I was facing same issue.
The reason was email sending was not configured in my wordpress.
Issue was fixed after Installing WP Mail SMTP plugin and configuring with my custom SMTP details.
guys i got an issue in vs code (phpcs executable is not found - phpcs) ..if anyone face this problem before searching the solution make sure the your php resolver extension is off .. i got this issue for the extensions
In EHTML you can just wrap with e-form and add you hidden input fields or <e-form-dynamic-value> to bind values, it will be more readable.
Yes, this is possible with the OpenTelemetry Incubator extension, see: https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/incubator
We are using no-code instrumentation with the java agent (no sdk) and I was able to get the url.full property exported to our Azure backend.
My config yaml file for the HTTP client side metric:
- selector:
instrument_name: http.client.request.duration
view:
attribute_keys:
- url.full
- http.route
- http.request.method
- http.response.status_code
- server.address
You could do the same for the server side metric too.
For more info check out the discussion: https://github.com/open-telemetry/opentelemetry-java-instrumentation/discussions/11220
If you stumble accross this in 2024, you might have run into this github issue.
so just came across your post, we had some queries regarding sso and scim, since you are also doing sso(using openid) and scim, what is your approach, we do the following
Let me know if the same approach you follow, and let me know what we are following is a proper approcah, as i couldnt find any documentation or steps on how to use both together,
thanks in advance
In my case, I had two "deplyments" inside the "deployments" tag of two different projects in standalone.xml. I deleted one and kept the one I was interested in and it worked again.
This seems to be a known bug in SQL Server 2022, you should upgrade to the latest version.
For more details, see https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate1#1993393
where the fix was done.
Latest CU15 can be downloaded https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate15
German instructions found here: https://www.flutter.de/artikel/flutter-assets-bilder-sound-verwenden English instructions: not yet found.
In the xsl:stylesheet element the xmlns:wix attribute needs to be updated from v3 to v4:
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
The same needs to be done in the .wxs file.
I amended this line of code msk = [isinstance(row, float) for row in df['latitude'].tolist()] to msk = df['latitude'].isnull().tolist() which essentially identifies those rows that have NaN values in the latitude column that I wanted to update. Thank you for the advice from @Anerdw.
First I have to say: Sorry for the noise!
I found a copy & paste-error in the SQL statement:
u.`name`=plu.`name`=MID(plu.`name`,3,LENGTH(plu.`name`)-4)
Should be:
u.`name`=MID(plu.`name`,3,LENGTH(plu.`name`)-4)
The produced error was just misleading in that case.
You can run PyTorch using ROCm for AMD gpu accelerated learning now, via ubuntu
Welcome to StackOverflow! Now, matrices are 'by design / by construction' always two-dimensional. Internally, they are represented as a single vector with a dimension attribution of length two -- enforcing just rows and columns. So a 'three-dimensional matrix' cannot exist, and that means you cannot use NumericalMatrix.
But Array objects are supported in whichever dimension you want to use, including three. There are examples in the package i.e. this is adapted from one of the tests
Rcpp::cppFunction("IntegerVector x(){return IntegerVector(Dimension(2,3,4));}")
But what you probably really want is to look at RcppArmadillo and its cube class which has (way) more support for three-dimensional arrays right out of the box.
Check this answer: How do I change tkinter default title in OS bar?
The following should do the trick. I had the same issue on Ubuntu 24.04
program=Tk(classname="My Window")
program.mainloop()
The information provided is insuffucient, first off, start by providing entire source code if you have it, second, the address you provided maybe randomized depending if PIE is enabled or not, so the data you provided maybe incorrect. Please provide the entire source code so that we can work on it and solve your issue.
The ceil() function only rounds up to integers. This work around can be adapted to round up to pennies. You can write a function to do that for you.
from math import ceil
payment = 3.1234
payment = 100 * payment
payment = ceil(payment)
payment = payment / 100
print(payment)
3.13
In my case I forgot to declare the property without getters and setters.
What you can do to avoid refresh token being sent to every request is to ensure it is only sent to specific path, for example:
res.cookie('refreshToken', refreshToken, {
httpOnly: true,
secure: true,
sameSite: 'Strict',
path: '/refresh-token' // this cookie will only be sent with requests /refresh-token
});
res.cookie('accessToken', accessToken, {
httpOnly: true,
secure: true,
sameSite: 'Strict'
});
Remove the cast to array
relation as same
public function skills()
{
return $this->hasMany(Skill::class, 'id', 'skills');
}
used the accessor like this
public function getSkillsAttribute($value)
{
$skillIds = json_decode($value, true);
return Skill::whereIn('id', $skillIds)->get();
}
In my case, setting the metadata type to attribute solved the issue.
vich_uploader:
metadata:
type: attribute
Granting individuals the power to determine which functions are employed and at what time poses a security threat that necessitates careful attention, in addition to the security risks inherent in viewing the function's results.
I am trying to use the two Anova with replication and this error message was displayed. Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf in 'y' In addition: Warning message: In storage.mode(v) <- "double" : NAs introduced by coercion Please I need help to interpret this message
Thank you everyone for your comments. Based on those comments, I added the following line to my code:
const markedSpaceNumbers = markedSpaces.map(Number);
My method now reads:
const checkIfMarksAreCorrect = () => {
const spaces = document.querySelectorAll(".marker");
const markedSpaces = Array.from(spaces)
.filter((space) => space.classList.contains('marked'))
.map((markedSpace) => markedSpace.textContent.trim());
console.log('The marked spaces are: ' + markedSpaces);
console.log(`checkIfMarksAreCorrect ballsDrawn: ${ballsDrawn}`);
const markedSpaceNumbers = markedSpaces.map(Number);
const legitSpaces = markedSpaceNumbers
.filter((markedNumber) => ballsDrawn.includes(markedNumber));
console.log('legitSpaces: ' + legitSpaces);
};
Everything is working now! Thanks again!
My understanding of git checkout was that if I specified the path I wanted my repo to end up at, it checks it out directly to there.
However, after some fiddling around, I have no discovered that the solution to this problem.
It is that even though i have specified the 'path: cibuild', inline with the error, i actually had to create the '/home/vsts/work/1/s/poc-plan-in-pr' directory myself manually.
- pwsh: |
New-Item -Path "$(Pipeline.Workspace)/s/$(Build.Repository.Name)" -ItemType "directory" -Force
displayName: "pr step: prepare checkout"
- checkout: self
displayName: "pr step: checkout repository"
path: "cibuild"
Thank you @j-loscos, works like a charm. I slightly adjusted your solution to include some new-lines (and removed the unnecessary restore at the end).
<Target Name="DisableWarnings" BeforeTargets="CoreCompile">
<ItemGroup>
<AutoGeneratedFiles Include="**/*.Designer.cs" />
</ItemGroup>
<WriteLinesToFile File="%(AutoGeneratedFiles.FullPath)"
Condition="!$([System.IO.File]::ReadAllText(%(AutoGeneratedFiles.FullPath)).StartsWith("#pragma warning"))"
Lines="$([System.String]::Concat("#pragma warning disable 1591",$([System.Environment]::NewLine),$([System.Environment]::NewLine),$([System.IO.File]::ReadAllText(%(AutoGeneratedFiles.FullPath)))))"
Overwrite="true"
Encoding="Unicode" />
</Target>
Great thanks a lot for this Solution!!! It has resolved my routine import problem in Talend
[apiController] [Route("api/[controller]")] remove the action object from there and add with the HttpGet method like [HttpGet("index")] and for every HTTP request use a unique name
You can use django web-push package. If you’re integrating django-webpush with Django REST Framework (DRF),you’ll need to implement a custom endpoint to save push subscription information, this package by default accepting session authentication so you will need to implement JWT.
Just remove the dependencies and undo the dependencies using ctrl+z
You need use the Native format builder or other tools to define a Custom nxsd. Make use of Choice,ChoiceCondition & ChoiceValue construct or StartsWith Constructs of nxsd to handle the data conditionally.
That's a bug, if you can make a reproduction of the problem (rebuilding the database from a script) then please file an issue on github (https://github.com/duckdb/duckdb/issues) so it can be fixed
.form-control:focus {
border: none !important;
outline: none !important;
box-shadow: none !important;// dont forget this one as it is the one which shows that blue shadow when typing
}
In my case the file containing [OneTimeSetUp] should be in root of your test project folder.
SingleTask did not work for me. However, this worked:
android:launchMode="singleInstance"
To query glue data catalog table from an AWS Glue job, you need the following requirements in your configuration.
Check this option :
and add the following param to the glue job :
--enable-glue-datacatalog true
Please let me know if these requirements address your problem
I have put this into AndroidManifest.xml
<activity
...
android:launchMode="singleInstance"
...
</activity>
I found solutions to both of my problems, and I'd like to share them in case others face similar issues.
Problem 1:
Fixed Positions in Network Graph Issue: The nodes in the network graph were not staying in fixed positions because Plotly automatically adjusts the axis ranges based on the visible data. When the data updates, the axes rescale themselves.
Solution: Set fixed axis ranges for the network graph subplot using update_xaxes and update_yaxes with fixedrange=True and specify the range parameter.
Problem 2:
Cumulative Data in Line Plot Issue: I was initially creating multiple traces per node for each time step, which made controlling visibility complicated and didn't allow the line plot to accumulate data up to the selected time.
Solution: Create a single trace per node in the line plot and use Plotly's frames and animation features to update the data over time. In each frame, update the x and y data of the line plot traces to include data up to the selected time.
Updated Code
Here's the updated code that implements these solutions:
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import numpy as np
# Example activation levels
times = np.arange(0, 10, 0.5)
nodes = ['A', 'B', 'C']
activation_data = {
'A': np.sin(times),
'B': np.cos(times),
'C': np.sin(times + np.pi / 4)
}
# Define fixed colors for each node
node_colors = {
'A': 'red',
'B': 'blue',
'C': 'green'
}
# Node positions
node_positions = {
'A': (1, 1),
'B': (2, 2),
'C': (3, 1.5)
}
x_positions = [node_positions[node][0] for node in nodes]
y_positions = [node_positions[node][1] for node in nodes]
# Create subplot layout
fig = make_subplots(
rows=2, cols=1,
shared_xaxes=False,
row_heights=[0.5, 0.5],
vertical_spacing=0.15
)
# Add line plot traces for each node
for node in nodes:
fig.add_trace(
go.Scatter(
x=[], # Empty initial data
y=[],
mode='lines+markers',
name=f'Node {node} Activation',
line=dict(color=node_colors[node]),
),
row=1, col=1
)
# Add network graph trace
initial_colors = [activation_data[node][0] for node in nodes]
fig.add_trace(
go.Scatter(
x=x_positions,
y=y_positions,
mode='markers',
marker=dict(
size=20,
color=initial_colors,
colorscale='Viridis',
showscale=False
),
name="Network Graph",
),
row=2, col=1
)
# Fix axes ranges for network graph
fig.update_xaxes(
range=[0, 4],
fixedrange=True,
row=2, col=1
)
fig.update_yaxes(
range=[0, 3],
fixedrange=True,
row=2, col=1
)
# Create frames for animation
frames = []
for t, time in enumerate(times):
frame_data = []
# Update line plot traces
for i, node in enumerate(nodes):
x_data = times[:t+1]
y_data = activation_data[node][:t+1]
frame_data.append(go.Scatter(
x=x_data,
y=y_data,
mode='lines+markers',
line=dict(color=node_colors[node])
))
# Update network graph colors
node_activation_colors = [activation_data[node][t] for node in nodes]
frame_data.append(go.Scatter(
x=x_positions,
y=y_positions,
mode='markers',
marker=dict(
size=20,
color=node_activation_colors,
colorscale='Viridis',
showscale=False
)
))
frames.append(go.Frame(data=frame_data, name=str(t)))
# Define slider steps
sliders = [dict(
steps=[
dict(
method='animate',
args=(
[str(k)],
dict(
mode='immediate',
frame=dict(duration=0, redraw=True),
transition=dict(duration=0)
)
),
label=f"t={times[k]:.1f}"
) for k in range(len(times))
],
transition=dict(duration=0),
x=0, y=0,
currentvalue=dict(
font=dict(size=12),
prefix='Time: ',
visible=True,
xanchor='center'
),
len=1.0
)]
# Update layout with frames and slider
fig.update(frames=frames)
fig.update_layout(
sliders=sliders,
height=600,
title="Synchronized Network Graph and Line Plot with Time Slider",
)
# Fix axes ranges for line plot
fig.update_xaxes(
range=[times[0], times[-1]],
row=1, col=1
)
fig.show()
According to https://cloud.google.com/text-to-speech/docs/voice-types:
Journey Voices doesn't support SSML input, speaking rate and pitch audio parameters, and the A-Law audio encoding.
I had same problem, but I created jax-ws-catalog.xml in my project and solved error. https://stackoverflow.com/a/34547520
In Firefox and Chrome, an anchor element <a> is rendered with display of inline.
Except, when the anchor tag is a child of another element that has display of flexbox, then the anchor tag is rendered with display of block by default.
2024:
Had a similar case and solved it with ADLFS (https://github.com/fsspec/adlfs)
It allows filesystem-like operations to azure blob storage.
Also the error "#1 Json Decoder Error Expecting Value: line 1 column 1 (char 0)" Can be due to UTF-8 BOM encoding bytes at the start of the JSON (in my case this was the issue, had to enforce encoding - utf-8-sig.
I found that the error occurred in the _layout.tsx section when creating an app in React Native. After wrapping the _layout.tsx part like this, the error was resolved. Thank you! When developing apps or websites, it’s often difficult to spot errors clearly, just like creating algorithms. I think I struggled with this for about three weeks.
// app/(tabs)/_layout.tsx
import React from 'react';
import { useColorScheme } from 'react-native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Colors } from '@/constants/Colors';
import { TabBarIcon } from 'C:\\app\\my-app\\components\\navigation\\TabBarIcon';
import NatureRecordForm from './NatureRecordForm';
import BiologyRecordForm from './BiologyRecordForm';
import RecordStorage from './RecordStorage';
import NatureDetails from './NatureDetails';
import BiologyDetails from './BiologyDetails';
import { NatureRecordProvider } from '@/RecordLogic/RecordContext';
export default function Layout() {
const colorScheme = useColorScheme();
const Tabs = createBottomTabNavigator();
return (
<NatureRecordProvider>
<Tabs.Navigator
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
headerShown: false,
}}>
<Tabs.Screen
name="NatureRecordForm"
component={NatureRecordForm}
options={{
title: 'Nature Record Form',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
),
}}
/>
<Tabs.Screen
name="BiologyRecordForm"
component={BiologyRecordForm}
options={{
title: 'Biology Record Form',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
),
}}
/>
<Tabs.Screen
name="RecordStorage"
component={RecordStorage}
options={{
title: 'Record Storage',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
),
}}
/>
<Tabs.Screen
name="NatureDetails"
component={NatureDetails}
options={{
title: 'Nature Details',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
),
}}
/>
<Tabs.Screen
name="BiologyDetails"
component={BiologyDetails}
options={{
title: 'Biology Details',
tabBarIcon: ({ color, focused }) => (
<TabBarIcon name={focused ? 'leaf' : 'leaf-outline'} color={color} />
),
}}
/>
</Tabs.Navigator>
</NatureRecordProvider>
);
}
could you please let me know what I am doing wrong in the following task?
What is wrong with my code? I can't find the issue and I tried everything I possible knew.
import pandas as pd
clean_data = pd.read_csv('production_data.csv')
clean_data['batch_id'] = clean_data['batch_id'].dropna() # Ensure no missing values
clean_data['production_date'] = pd.to_datetime(clean_data['production_date'], errors='coerce').dt.date clean_data['production_date'] = clean_data['production_date'].fillna(pd.to_datetime("2023-01-01").date())
clean_data['raw_material_supplier'] = clean_data['raw_material_supplier'].replace({1: 'national_supplier', 2: 'international_supplier'}).fillna('national_supplier') clean_data['raw_material_supplier'] = clean_data['raw_material_supplier'].str.lower().str.strip()
clean_data['pigment_type'] = clean_data['pigment_type'].fillna('other') clean_data.loc[~clean_data['pigment_type'].isin(['type_a', 'type_b', 'type_c']), 'pigment_type'] = 'other' clean_data['pigment_type'] = clean_data['pigment_type'].str.lower().str.strip()
clean_data['pigment_quantity'] = clean_data['pigment_quantity'].fillna(clean_data['pigment_quantity'].median()).clip(lower=1, upper=100).astype(float)
clean_data['mixing_time'] = clean_data['mixing_time'].fillna(clean_data['mixing_time'].mean()).astype(float)
clean_data['mixing_speed'] = clean_data['mixing_speed'].fillna('Not Specified') clean_data.loc[~clean_data['mixing_speed'].isin(['Low', 'Medium', 'High']), 'mixing_speed'] = 'Not Specified' clean_data['mixing_speed'] = clean_data['mixing_speed'].str.capitalize().str.strip()
clean_data['product_quality_score'] = clean_data['product_quality_score'].fillna(clean_data['product_quality_score'].mean()).clip(lower=1, upper=10).astype(float)
print(clean_data.info()) print(clean_data.isna().sum())enter image description here
For reference: A purely stack-based aggregation yields 114 baggs*/sec single threaded and 360 baggs/sec multi-threaded (code below).
Let's assume this is the max. performance we can gain from the CPU. Then we are still factor 10+ away from the 8 baggs/sec we get on a heap/main memory bound aggregation.
Isn't that a prove that only the main memory interaction is slowing things down? Meaning, the 65GB throughput limit on a 100GB M2 chip is more or less the factual limit that can be achieved?
#pragma omp simd reduction(+:sum) simdlen(8)
for (int l = 0; l < loops; l++) {
sum += sum_array_simd(array, 16);
}
...
double sum_array_simd(double *array, size_t size) {
float64x2_t sum_vec = vdupq_n_f64(0.0); // Initialize SIMD vector to zero
for (size_t i = 0; i < size; i += 2) {
float64x2_t vec = vld1q_f64(&array[i]);
sum_vec = vaddq_f64(sum_vec, vec);
}
double result[2];
vst1q_f64(result, sum_vec);
return result[0] + result[1];
}
*baggs = billion aggregations
I have found another way, much simpler employing library(ggExtra) for creating Marginal Histogram / Boxplot with simple commands:
ggMarginal(p1, type = "histogram", fill="transparent")
ggMarginal(p1, type = "boxplot", fill="transparent")
ggMarginal(p1, type = "density", fill="transparent")
I have the same issue. I removed the domains from crosslinking in GA4 on Nordicgear.dk and Applegenbrug.dk but i still have these weird sufix's. any suggestions?
Upgrading spotbugs version to 4.8.3 will solve the issue.
You can make an api with api gateway and lambda where the lambda will have ffmpeg to take one frame of the image on a particular time of the video and then send the image content from the api. Or even you can implement an event driven workflow where on video upload to s3, initiate that lambda to grab the image. Although in this case the video time set might be a tricky but based on your workflow you can decide.
what is the best method? Has it been resolved?
If it's still relevant, I've just created an NPM package called asf-file-props doing precisely that (extract and calculate duration) in TypeScript with no dependencies. Works with .asf, .wma and .wmv files.
Check out the sources on Github, those are pretty concise and straightforward: https://github.com/chamie/asf-file-props
If anyone is still looking for a quick hack for vuejs
"@click=closeOpenTabs" to the DisclosureButtonconst closeOpenTabs = () => document
.querySelectorAll('button[data-headlessui-state="open"]')
.forEach((b) => b.click());
I also found that when using the simple Excel function "=SUMIF(...)" it is very quick, while using VB code it takes ages. I could not believe the difference in time.
I asked ChatGPT: "Why is SUMIF in Excel so much faster than doing the same with visual basic code?" It gave me the following:
The SUMIF function in Excel is indeed faster than writing equivalent code in VBA for several reasons:
Internal Optimization: Excel functions like SUMIF are highly optimized in their native code. They run at a low level directly in the Excel engine, which processes them much faster than VBA, which is an interpreted language.
Efficient Memory Management: Excel functions operate within Excel’s own efficient memory management, while VBA often requires additional overhead for memory allocation and array handling. VBA is slower because it has to manage the data movement between the worksheet and the VBA runtime.
Parallel Processing: Excel’s functions are optimized to take advantage of multithreading when possible, especially in newer versions. VBA, however, is single-threaded, which means it can't leverage multi-core processors for parallel computation.
Overhead of VBA Loops: When you try to replicate a SUMIF using VBA, you often use loops and conditional statements, which add significant overhead. Excel functions like SUMIF handle large ranges in a single pass, while a VBA loop performs individual operations for each cell.
Fewer Interactions with the Worksheet: Excel’s built-in functions minimize interactions between Excel’s interface and the code itself. VBA, however, has to read and write back to the worksheet, adding more time to each operation.
For scenarios with large data sets or frequent calculations, using Excel's native functions is often much faster than relying on VBA.
Recheck the attribute name author.
The !important key should only be used as a temporary solution. It is generally a last resort in urgent situations and when overriding external CSS libraries. You can use document.querySelector(".element").style.display = "flex"; to apply a display style, and override it later with document.querySelector(".element").style.display = "none";
To ensure clear and manageable CSS, it is best practice to add, remove, or override the same classes instead of directly applying inline styles.
Using this option will work in github Action for me
ssh -o TCPKeepAlive=yes -o ServerAliveCountMax=20 -o ServerAliveInterval=15 username@host
Connecting a Java backend with an HTML/CSS frontend involves using frameworks like Spring Boot for the backend and RESTful APIs for communication, enabling seamless data exchange and dynamic user experiences.
To handle a "length 0" error in an R Shiny application, check if the object or data you're working with is empty before processing it. Use conditional statements like if (length(object) > 0) to ensure the object has data. Alternatively, the req() function in Shiny can help by pausing reactive expressions until certain conditions (like non-zero length) are met, preventing errors from empty data.
width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important; usebitttttttttttt t t t t t t t \t t t t width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;width: 600px !important;emphasized text
A NavigatorObserver can help you monitor route changes throughout the app without relying on the BuildContext.
Create a Custom NavigatorObserver
class RouteObserverService extends NavigatorObserver { String? currentRoute;
@override void didPush(Route route, Route? previousRoute) { super.didPush(route, previousRoute); currentRoute = route.settings.name; print("Current Screen: $currentRoute"); }
@override void didPop(Route route, Route? previousRoute) { super.didPop(route, previousRoute); currentRoute = previousRoute?.settings.name; print("Returned to Screen: $currentRoute"); } }
Add the Observer to Your App. Pass the custom observer to the MaterialApp to ensure it tracks navigation changes across the app.
final RouteObserverService routeObserver = RouteObserverService();
void main() { runApp(MyApp()); }
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( navigatorObservers: [routeObserver], home: HomeScreen(), ); } }
Push to screen like below to get the current visible screen name.
// Navigating to Screen using named Navigator.pushNamed(context, '/screenName'); // Navigating to Screen pushing a widget Navigator.push( context, MaterialPageRoute(builder: (context) => DetailsScreen()), settings: RouteSettings( name: '/screenName');
Access the Current Route from Anywhere. Since the RouteObserverService is global, you can access the currentRoute attribute to get the latest screen name from anywhere in the app.
String? currentScreenName = routeObserver.currentRoute; print("Currently Displayed Screen: $currentScreenName");
Yes with modules, functions are compiled separately, like object files, and the compiler only "sees" them during the link stage. Optimizations like inlining happen at link time, similar to link-time optimization (LTO) in headers. So, modules optimize later but work similarly to LTO
Had the same problem recently: Ran :checkhealth to find that one of my plugins needed NeoVim v.0.10.
Afterwhich, running :checkhealth again will list your TreeSitter parsers as missing, which requires a tedious job: Running TSInstall <parser> again.
Turns out I am an idiot :)
I am generating both a static and a dynamic version for all my libraries, and I was only generation CC information for the dynamic libraries (and most of the Unit Tests are currently using the static libraries).
All is well now.
With mysql2 for Node (with connection pool) & typescript,
try {
const [result] = await pool.execute<ResultSetHeader>(/* QUERY */,
[
/* PARAMS */
])
return result.affectedRows
} catch (e) { //etc
Please change launchWhenResumed to launch because launch will work only when the fragment resumes.
private fun reloadWebViewOnClick(){
//webview reload
lifecycleScope.launch {
launch(Dispatchers.Main) {
binding?.webview?.reload()
}
}
}
If you are using Xcode 15 or the latest code version try to set "No" for the "User Scripting sandbox" option on build Settings.
Make sure to add WidgetsFlutterBinding.ensureInitialized(); to your isolate before initializing Firebase.
There is also a way to start chrome with disabled security features:
chromium --ignore-certificate-errors --disable-web-security --user-data-dir=./dummy_data
You need to provide a valid data directory, otherwise it will not work.
Fixed! Just needed to manually specify
output_dir: .next/server/pages/
for the static site in app.yaml.
I have a similar issue. I am trying to migrate data from MSSQL to MySQL, and I feel that I have checked everything. Both MSSQL and MySQL are running locally. I am the only user on this desktop. I have tried and tested many times to see that full database permissions are granted on both MSSQL and MySQL sides. I have tried through the MySQL Workbench migration wizard and through command line. It seems that there could be something wrong with how the migration throws this error: "ERROR: Determine number of rows to copy" I am grateful for everyone who works on MySQL - but there has to be some kind of error in wbcopytables executable - or at least how it throws errors. It may be a bit of data, but it really isn't that big. I would think that the people who work on MySQL would want the transition from MSSQL to MySQL to be smoother. At this point I feel that I have tried every option in both the UI from MySQL Workbench, and also from creating a .cmd file.
if you get here in 2024, this may be caused by IntelliJ not indexing the project correctly. deleting the .idea folder and restarting the IDE worked for me. see IntelliJ does not show project folders
Solution to this problem is quite simple. Just wait until the HTML is parsed, before calling customElements.register. The scheme I normally use when the HTML children have to be processed in connectedCallback:
class MyComponent extends HTMLElement{ static { globalThis.addEventListener('load', ()=>{customElements.define('my-component', MyComponent)}); } }