instruction stringlengths 0 30k ⌀ |
|---|
I am using Svelte with [Ultralight][1], communication is handled with JavaScriptCore so Ultralight set / call functions on the global javascript object (which I believe is window). Now I want to call these functions in my svelte app, but I am using modules and so I can't set / use global functions.
So for now I am s... |
How to Call Global Functions from Modules and Maintain Modularity? |
|javascript| |
I try to go from Spring-Boot 2.7 to 3.1 - its regarding Security.
What I have under old version 2.
public class SecurityConfiguration extends WebSecurityConfigurerAdapter
{
@Override
protected void configure (HttpSecurity http) throws Exception
{
http.cors ().an... |
# What is Deployment and Process Lifetime Managment with Systemd?
A Python Application is an executable Python script which may also have a dependency on some shared Python code which exists in local Python modules or Packages.
To deploy an application (any application, not necessarily a Python one) we would norm... |
How to Deploy and Manage a Python Application with Systemd |
|python|linux|deployment|systemd| |
You should add a listener to focusNode value to detect where the TextFormField is being focused or not.
I prefer to use **ValueNotifier** and **ValueListenableBuilder** to rebuild only the Text widget not all the widgets in the screen.
final isEmailFocused = ValueNotifier<bool>(false);
@override
... |
I'm currently utilizing the **Eigen** library within my C++ project, and I'm working with a tensor `tensorA` defined as `{2.02, -4.2, 2.2, 2.2}`. My question pertains to the behavior of the `argmax()` function when applied to this tensor.
Specifically, when I call `argmax()` on `tensorA`, should I expect the result ... |
null |
IMHO is [ControlFlow][1] much better suited:
fn functional_programming() -> bool {
let foo = [1, 2, 25, 4, 5];
let ControlFlow::Continue(sum) = foo.iter().try_fold(0, |sum, &bar| {
if bar > 20 {
return ControlFlow::Break(sum);
}
ControlFlo... |
{"OriginalQuestionIds":[54004635,45763121],"Voters":[{"Id":943435,"DisplayName":"Yogi"},{"Id":5625547,"DisplayName":"0stone0"},{"Id":9267406,"DisplayName":"imhvost"}]} |
Sometimes when closing vscode, or a tab in it, I get a dialogue asking "Do you want to save the changes you made to ``filename``?" However, the unsaved edits are actually from a previous session that was closed without such a query, probably when turning off the computer, so I can't remember if it was meaningful edits,... |
**Solved**.
It seems that I'm forced to use the endpoint `api/broadcasting/auth` in order to `channels.php` be called / executed.
On the Pusher JS configuration all I had to do was changing this line:
authEndpoint: 'api/auth',
to:
authEndpoint: 'api/broadcasting/auth', |
to anyone who comes across this thread looking for a solution for a similar issue that results in the following message
`1. NA Each element of '...' must be a named string.`
Check if your dictionary has any "NA" or blank in it. Once you remove the line with NA, your match_df() command should work for all columns.... |
To retrieve Docker logs from the last hour for a specific container with `container_id`:
docker logs --since=1h 'container_id'
If the logs are large, then try considering to save logs into to a file:
docker logs --since=1h 'container_id' > /path/to/save.txt
|
I've been struggling with this issue for 2 days and still couldn't find a solution. I would be very happy if you could help.
I'm using PrelineUI in my project.
The input select looks like this:
```
<select multiple wire:model="category" id="category"
data-hs-select='{
... |
std::vector push_back rvalue does not compile |
|c++| |
null |
As Divi doesn't allow modules to be displayed using Divi slider, i tried to come with a workaround.
My only issue is that my ring drawing animation doesn't work in the first time the slide is loaded and only fire once and not every time the slide is changed.
Here's the code I came up with:
```
$( document... |
Display Ring on Divi slider module |
|javascript|counter|slide|divi| |
{"Voters":[{"Id":9245853,"DisplayName":"BigBen"}]} |
[enter image description here][1]Can anyone tell me why we should set the counter j in the inner for loop to (i+1) not (i=0) (beacause I think setting j to i = 0 will get all elements in the array).
And why we using break;
I am new in programming.
Thanks in advance.
Here I check for the duplicates and if I set (j... |
According to [github issues][1], they have their concerns of not implementing the **partial** keyword. Therefore, you will need to write it yourself.
This task is no more than mixing prototypes. However, if you want a reliable one, you need to be very careful with method and property conflicts, also with `type infer... |
I have this JSON array file.
```
[
{
"id": 1,
"name": "John Doe",
"email": "john.doe@example.com",
"age": 25
},
{
"id": 2,
"name": "Jane Doe",
"email": "[jane.doe@example.com]",
"age": 28
},
{
"id": 3,
"name": "Bob Smith"... |
use
```
from tensorflow.keras.layers import Dense
```
|
I need to print the bounding box coordinates of a walking person in a video. Using YOLOv5 I detect the persons in the video. Each person is tracked. I need to print each person's bounding box coordinate with the frame number. Using Python how to do this.
The following is the code to detect, track persons and displa... |
I want to download the face book shorts of motivational category without URL and access token
I want to get the 10 shorts every time whenever I run the code. without login or creating account also. I just want to get the shorts or short video clips of motivational category. |
i want to download the facebook shorts of motivational category without url and access token |
|python|python-3.x| |
null |
It's a basic JavaScript manipulation and can be achieved by simply changing the `src` of 4 images that you're showing with the new one.
Assuming you have a structure somewhat similar to:
```html
<div class="images-container">
<img id="image1" src="image1.png" />
<img id="image2" src="image2.png" />
... |
I'm trying to learn to use gui in java using eclipse ide.
When I run this code
```
import javax.swing.JOptionPane;
public class GUI {
public static void main(String[] args) {
String name = JOptionPane.showInputDialog("Enter your name");
JOptionPane.showMessageDialog(null, "Hello "+name);
}
... |
### Very easy to do in 2022.
It's very easy and common to do this, **you just add the rear as a child**.
To be clear the node (and the rear you add) should both use the single-sided shader.
Obviously, the rear you add points in the other direction!
Do note that they are indeed in "exactly the same place". S... |
The difference between the result generated by the C# code and the reference data is due to an incomplete porting of the Java reference code to C#.
In particular, the implementation of the MAC and the implementation of the `TLV` class that performs ASN.1/DER encodings are missing. If the Java code is ported *complet... |
I think best would be just to set `left` and `top` using `%` units.
You can do the same for the `width` of the marker.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
const rect = document.getElementById('map1').getBoundingClientRect();
const originalWid... |
I am implementing oauth2 for uber supplier [api][1]. But the authorization URL returns a page with no information and Accept button disabled.
Did anyone come across such a problem or have been able to integrate uber suppliers api?
[![enter image description here][2]][2]
[1]: https://developer.uber.com/d... |
Uber Supplier API oauth not returning a terms and accept button diabled |
|uber-api| |
I have a json like
[
{
"url": "https://drive.google.com/file/d/1tO-qVknlH0PLK9CblQsyd568ZiptdKff/view?usp=share_link",
"title": "– Flexibility"
},
{
"url": "https://drive.google.com/open?id=11_sR8X13lmPcvlT3POfMW3044f3wZdra",
"title": "– Prono... |
Eigen: What's the output of argmax/argmin when applied to a tensor with duplicate values? |
|c++|eigen|tensor| |
I am trying to write a personal project in JavaScript.
So I started with an empty folder with two files:
card.js
constants.js
and in `card.js`, I used on the first line:
import { SUIT } from "./constants.js";
and run it using `node card.js`. It doesn't work, giving the error:
> (node:9157... |
|c++|opencv|computer-vision| |
You may add the `setState` method as a `listener` to the `FocusNode` object named `emailText`. This will change the color of the Text you want to change based on the focus on the TextField.
**Modified code:**
```
class _SignInState extends State<SignIn> {
bool isPasswordVisible = false;
bool _isEmail = t... |
Within the function `sumAtBis`
int sumAtBis(tree a, int n, int i){
if(i==n){
if(isEmpty(a))
return 0;
else
return root(a);
}
return sumAtBis(left(a),n,i+1)+sumAtBis(right(a),n,i+1);
}
there is no check whethe... |
I'm testing this code
$query = "SELECT * from `items` where category_id=?";
$stmt = $mysqli->query($query);
$stmt->bind_param("s", $category_id);
$stmt->execute();
$result = $stmt->get_result();
while ($row = $stmt->fetch_assoc()) {
printf ("%s (%s)\n", $row['name'], $row['code'... |
> Has anyone encountered this problem
Yes, millions of developers before you. There are several similar questions even on this site.
> is there any solution?
Yes, _install_ docker inside the Jenkins container. Typically, you would create a Dockerfile that will build your Jenkins agent image.
Strongly do no... |
Does anybody know how to convert a string to a BigInt without using the BigInt() constructor or any other libs like math ect.?
So, my task is to implement arithmetic operations on strings without relying on bigint or arithmetic libraries. Can someone give me a hint ?
input is valid string with positive number insid... |
String to BigInt in JavaScript |
|javascript|string|bigint| |
null |
I wanted to create a uber-fat jar for my spring boot app and for that I am using *maven-shade-plugin*.After mvn clean install , i see there are two jar created one is normal and another shaded,normal jar is working fine but when I am trying to run shaded jar it is failing with below error
**Error: Could not find or ... |
In a basic Remix V2 app, i need help understanding if the following is expected behavior, a bug in V2, or possibly a missing configuration option or setting.
When running in development mode i am seeing the `useLoaderData` hook receive a JavaScript object declaration as opposed to JSON data.
I could not find any... |
After I plugged my iPhone into my mac, I started debugging my app. For the first few days, it all seemed smooth.
But after a few days, things changed.
The `Debug` -> `Attach to process` menu is empty, as shown below. I can't figure out why.
But the weirder thing is that when I debugged my app three months later, t... |
Run an external command within jq to manipulate each values of a particular key |
|jq| |
I'm using a Metal compute pipeline to render into a `CAMetalLayer`'s drawable and keep running into problems with non-integer pixel formats resulting in a slightly noisy image, due to some apparent round-off errors during compositing.
Specifically I'd like to configure the layer to use `.rgba16Float`, but the noise ... |
Using MTLPixelFormat.rgba16Float results in random round-off errors |
|swift|metal|rounding-error|pixelformat|cametallayer| |
I am trying to save text он Cyrillic in an R script, but I am encountering a problem. Specifically, when I save it with encoding UTF-8, everything appears fine. However, after closing the script and reopening it, I notice some unreadable characters. See below:
df<-
list("00OÿÃÂÃÂÃ... |
R and text on Cyrillic |
|r| |
Solved :)
Changing this line:
DWORD foundAddress = FindPattern(mainModule, mInfo.SizeOfImage, pattern, mask);
To this:
uintptr_t foundAddress = FindPattern(mainModule, mInfo.SizeOfImage, pattern, mask); |
Laravel livewire get data from blade |
|laravel|laravel-livewire|livewire-3| |
null |
[](https://i.stack.imgur.com/Xwljx.png)
How can I reorder the project views using drag and drop in Cypress?
Actually on hover the list name it will display the icon to drag and drop and it will reorder based on it please help
[![enter image de... |
How to create a function on reordering the project views using Cypress automation |
# IDEA support overview
Since IDEA 2022.3, support for additional dictionaries in both the plain "word list" and the Hunspell format is already _built-in_ - see [IDEA documentation][1].
In older IDEA versions, one needs to install the [Hunspell plugin][2] to use the Hunspell dictionaries, or to use just the plain... |
I'm trying to have an element project a shadow / blurred edge onto an element behind it, causing the latter to "dissolve", without impacting the background. Hopefully the following images can better illustrate my problem.
This is what I was able to get:
 - NuGet `System.Reactive` and add `using System.Reactive.Linq;` - then you can do this:
IDisposable subscription =
Observable
.Interval(TimeSpan.FromSeconds(1.0))
.Subscribe(_ => function());
To stop the observable you just call `subscription.Dispose(... |
I have an `.obj` file, but when I render it to video using the `kire` package, it is upside down.
Now I need the mesh to be inverted in the z-axis, so that it works normally with the rest of my system.
How can I achieve this with Python? |
Invert an .obj file with Python |
|python|.obj| |
Python structural pattern matching for string containing float |
You should keep using `rdfs:range` in this way, it has the intended meaning under both RDFS and [OWL2-DL semantics](https://www.w3.org/TR/owl2-direct-semantics/). Jena should be filtering out triples that have have literals in the subject position. As @IS4 states, this is just syntax, and there are proposals to relax t... |
@Bernards answer is right. This is a confusion many new to LLM has.
>I understand instruction-tuning is a form of fine-tuning but with an instruction dataset. But are all datasets not instruction datasets? What other kinds are there?
An LLM is trained on a sequence of words where the next word is the implicit lab... |
I would like to input a text prompt in [stylegan2][1].
So far, I've been able to load the generator (G) using
G,D,Gs = load_networks('gdrive:networks/stylegan2-ffhq-config-a.pkl')
which calls a function defined in the `pretrained_networks.py` file.
Now, I can't figure out how to use the generator in th... |
How to output MySQL table in PHP |
I want to get all 5 pages of data from this website http://www.witcorp.co.th/product_chem.php?txtType=1#nogo
But the problem is I can get only the first pages data table when scraping following the picture
[Chemical data](https://i.stack.imgur.com/jRmuJ.png)
And I try to switch to the other pages by Selenium bef... |
How can I debug issues when logging in using next-auth. I use my custom form. After clicking sign in button we send credentials to `ouraddress/api/auth/callback/credentials` and Ii network tab I can see json response
```
{
"url": "http://localhost:3000/api/auth/error?error=Cannot%20read%20properties%20of%20undef... |
Next-Auth credentials login troubles debugging |
|next.js|next-auth| |
> Is there any easier way to output whole table to HTML markup?
Sure.
Learn to use **templates**.
Just separate your prepared statements from output.
To do so, at first collect your data into array:
/* fetch values */
$data = array();
while ($row = $stmt->fetch_assoc()) {
$data[]... |
```
TITLE
——
1 nuit
1 nuit
1 nuit
1 nuit
1 nuit
total : 5 nuits
——
1 nuit
1 nuit
1 nuit
total : 3 nuits
——
1 nuit
1 nuit
1 nuit
1 nuit
1 nuit
1 nuit
and so on...
```
I'm having this paragraph in which I'd like to select the last lines after the occurence of the last `——`
It should m... |
it seems to me you could achieve your goal by means of formulas
if you insert one column and one row you could use this formula
=IF(SUM(G$5:G5)<G$2;IF(SUM(F6:$F6)<8;1;"");"")
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/d7G9y.png |
I need help converting a column of 179 observations from an excel file that holds 2 variables (days and values). After i try converting the dataframe with ts(as.vector(a1dataraw['x'], the vector returns with start=1 but also end=1 when it should be 179?
Can someone please identify where im going wrong?
``` r
... |
{"Voters":[{"Id":6243352,"DisplayName":"ggorlen"},{"Id":16217248,"DisplayName":"CPlus"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[13]} |
The easiest thing is probably to drop the templates entirely and just implement the specific type of tuple you're using:
```
cdef extern from "<tuple>":
cdef cppclass Coordinate "std::tuple<double*, double*, double*>":
Coordinate()
```
Of course, since you already have the typedef you could just d... |
**I have the following code:**
return (
<KeyboardAvoidingView style={{ flex: 1 }} behavior="padding" enabled>
<View style={style.flex1}>
<View style={style.imageContainer}>
<Image
style={style.image}
source={require("../../assets/pictures/LoginBackgroun... |
How to prompt a text in stylegan2 |
|image|machine-learning|artificial-intelligence|generative-adversarial-network|stylegan| |
After a complete clean up, I see the same today, so I try with:
`apt install nginx-core`
Don't know why nginx-full does not creates the directory, but nginx-core does.
tested on debian
Try and tell us :) |
Your example uses the shorthand version `container`. To use this syntax you must specify both a name and a type separated by a slash:
```container: container-name / container-type;```
If you just want to specify the type, use `container-type` instead.
The reason your example doesn't work as expected, is becaus... |