instruction stringlengths 0 30k ⌀ |
|---|
Sharing RSO2 Topic communication between containers operating on two Windows host machines A and B, each equipped with Docker |
I'm coding a program to find perfect numbers. I have found some interesting properties and worked on my code to generate perfect numbers. This is my idea:
```static List<int> TesterPerfectNumber(int upperbound)
{
List<int> nums = new List<int>();
for (int i = 2; i < upperbound; i++)
{
if (IsPr... |
I suggest using the toString() method, then use the split() or subString() method; get the number string before 'tickers'. |
Why does getting a datastore work when using `val` but not when using `fun`?
```
val Context.settingsDataStore: DataStore<Preferences> by preferencesDataStore(name = "settings")
fun Context.test(name: String){
// Property delegate must have a 'getValue(Nothing?, KProperty*>)' method. None of the following ... |
Preferences datastore with dynamic name: Property delegate must have a 'getValue(Nothing?, KProperty*>) method |
|android|android-jetpack-datastore| |
I would like to access my `log::Log` impl instance in order to access a particular field, but once I receive the reference I am not able to downcast it to my struct.
I tried to convert the logger reference into `core::any::Any` and then downcasting it into my original struct, but I always obtain `None`.
```rust
... |
null |
I want to change the class 'fa-meh-blank' to 'fa-smile-wink' but it doesn't work.
When I flip the two classes, however, it works. I don't understand what's wrong, what would anyone have an idea?
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
const icone = do... |
Icons of Font Awesome don't change |
raceback (most recent call last):
File "C:\Users\Tariq\Downloads\Blank-main\Blank\env\Scripts\process.py", line 9, in <module>
import pyaes
ModuleNotFoundError: No module named 'pyaes'
288 INFO: PyInstaller: 6.5.0, contrib hooks: 2024.3
288 INFO: Python: 3.12.2
307 INFO: Platform: Windows-10-10.0.19045-... |
Python 3.12.2 Tool |
|python|windows|pyinstaller| |
null |
When I try to divide `1/60` or `1/(60*60)` it gives 0. Even in debugger window. I am a bit confused what it could be, because `2/3` or `2.5/6` give results.
My code:
int main()
{
double k1 = 1/60;
cout << k1 << endl;
double k2 = 1/(60*60);
cout << k2 << endl;
retu... |
Dividing 1 by any number gives 0 |
If you read the Firebase documentation, you'll see there are two [message types](https://firebase.google.com/docs/cloud-messaging/concept-options):
> * Notification messages, sometimes thought of as "display messages." These are handled by the FCM SDK automatically.
> * Data messages, which are handled by the clien... |
null |
|docker|ros2| |
null |
null |
null |
null |
null |
null |
I am working on a RN app, but I can't seem to get rid of what appears to be a default header at the very top.
At first I thought that this might have to do with react-navigation or something, but even if I render only some text:
```typescript
const App = () => {
return (
<View style={{ backgroundColor: '... |
Unable to remove (default?) header |
|react-native|expo| |
|python|documentation|psd|color-profile| |
|android|android-intent|whatsapp| |
null |
[Example](https://i.stack.imgur.com/ujcMb.jpg)
Мне нужно выбрать иерархическую систему управления базой данных для моего проекта, какую иерархическую систему управления базой данных вы бы посоветовали использовать мне? Заранее благодарю. Спасибо
haven't tried anything yet. |
This toy code:
```cpp
union a {
int b;
int c;
};
template<int a::* p> void b() {}
template<> void b< &a::b >() {}
template<> void b< &a::c >() {}
```
Builds fine in clang and gcc, but in MSVC gives:
> error C2766: explicit specialization; 'void b<pointer-to-member(0x0)>(void)' has already been d... |
I'm using a [CDN](https://unpkg.com/vue) to run some vue code in my `index.html`. I'm just learning from a tutorial and this is my first time I use vue.
This is `index.html`.
```html
<!DOCTYPE html>
<html>
<head>
<title>THE TITLE</title>
</head>
<body>
<div id="app">
{{ greeting }}
<input v-m... |
I think you can use static parameters and shadow attributes `_select="{$xpathId}"`.
```
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:param name="providerId" />
<xsl:param name="xpathId" static="... |
`call` is necessary for .bat or .cmd files, else the control will not return to the caller.
For exe files it isn't required.
`Start` isn't the same as `call`, it creates a new cmd.exe instance, so it can run a *called* batch file asynchronosly.
`call` has some unexpected behavior for the arguments, the parser ... |
|python|python-3.x|oop|metaclass| |
**NEW**
In the meantime I think I found a better solution
df.between_time('7:00', '10:45')
Full code:
import pandas as pd
idx = pd.date_range("2024-01-01 06:00", periods=3600*6+5, freq="S")
df = pd.DataFrame([i for i in range(len(idx))], index=idx)
print(df.between_time('7... |
I'm try decode a barcode created by myself, but i cant.
Created barcode reading another barcode scanner app.
I try bitmatrix and bitmap to convert BinaryBitmap but always returning null result
Yes, sometimes can return null if not decode but **how can i strong my encode code for pure decode?**
Error is
`java.... |
Zxing decode com.google.zxing.NotFoundException |
|android|kotlin|zxing| |
null |
I have a npc class which has a method called `chase` that is referenced inside the `update` function. when `chase` is called it says its not a function or it's not defined. I have another method being referenced in the same way that works.
chase()
{
this.Phaser.Physics.moveToObject(NPC_spr,... |
|python|dataset|huggingface-datasets|vision-transformer| |
For the exact code format, errors are logged and sent back to the client(Postman) in `development` mode. But not sent back to the client in `production` mode. This is the code for the global error handler
module.exports = (err, req, res, next) => {
err.statusCode = err.statusCode || 500;
err.status... |
While trying to install ruffle through Homebrew, I get across the error of: undefined reference to \`SSL_get0_group_name'.
Here is the output of the process:
```
brew install --HEAD ruffle-rs/ruffle/ruffle
==> Fetching ruffle-rs/ruffle/ruffle
==> Cloning https://github.com/ruffle-rs/ruffle.git
Updating /home/... |
I can't recall when this was changed, but the current method to get a `Context` object during Instrumented testing is to import
```java
import android.support.test.InstrumentationRegistry;
```
and call
```java
InstrumentationRegistry.getContext();
```
Hope this helps! |
null |
I'm normally very comfortable performing joins in my work/on online practice sets but sort of blanked when I got this question.
Here's the data: [enter image description here](https://i.stack.imgur.com/iUmN0.png)
I was asked to perform a Select * statement on the two tables, and write down the result for all 5 ki... |
Had a really embarrassing interview today. The question was SQL based and was about the 5 types of JOINS |
|sql|mysql|sql-server|postgresql|sqlite| |
null |
Hey all I am trying to figure out how to go about updating a part of my json. So far I have not found anywhere that shows me how to do this.
For an example, this is what I am needing to update:
{
"lastUpdated": "",
"firetvs": [
{
"name": "lr",
"... |
Try it, maybe this is what you wanted? Saves the selected ranges into two separate PDF files, maybe I misunderstood you. Part of the code was found on this forum and adapted to your needs. Good luck.
Option Explicit
Sub Export()
Dim shArr As Variant
Dim wb As Workbook
... |
The [handle class](https://www.mathworks.com/help/matlab/handle-classes.html) and its copy-by-reference behavior is the natural way to implement linkage in Matlab.
It is, however, possible to implement a linked list in Matlab without OOP. And an abstract list which does *not* splice an existing array in the middle t... |
Is there a away to use services provided by Supabase in android studio with Java and not with Kotlin?
and if there is, then how? |
First step Set a fixed height and width for the element in css file , Adjust the height and width for smaller viewports
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
#HomeNewsEventsWrapper{
height: 200px;
width: 100%;
background:red;
... |
Please advise according to following issue below
If Not Intersect(Target, Me.Columns("X")) Is Nothing Then
Please your support Regarding to this issue
If Not Intersect(Target, Me.Columns("X")) Is Nothing Then |
In ChartJs I want to custamize the bar chart.I'm placed the images in empty places if i click on the legend that images cannot be hide. I made a attendance bar chart if person is absent that place will show absent image & alslo if person is working hours place in that place(bar chart in stacked). Finally I want if abs... |
Render Image update when I click legend chartjs |
|javascript|chart.js|bar-chart|chartjs-2.6.0|chartjs-plugin-annotation| |
null |
If you wanted to use `TreeMap`, you can write a custom `Comparator` as [mentioned in the comments](https://stackoverflow.com/questions/78236814/java-not-case-sensitive-map-key-where-key-is-pairstring-string#comment137929528_78236814) by [Federico klez Culloca](https://stackoverflow.com/users/133203/federico-klez-culloc... |
{"Voters":[{"Id":368354,"DisplayName":"Lennart"},{"Id":307138,"DisplayName":"Ocaso Protal"},{"Id":205233,"DisplayName":"Filburt"}]} |
I have created a website, where I connected it to firebase using Js.
I want to access the array 'correct' outside of the scope of the function, i.e. I want to make it accessible globally.
[![enter image description here][1]][1]
```
var mcqq = firebase.database().ref("mcq_choice/");
mcqq.orderByChild("mcq_ch... |
**input**
idx = pd.MultiIndex.from_product([['A', 'B'], ['C', 'D']])
`idx`
MultiIndex([('A', 'C'),
('A', 'D'),
('B', 'C'),
('B', 'D')],
)
**desired output:**
like **[level0 values, level1 values]** (values can be Index or list a... |
Java Jackson update json 2nd value instance in array |
|java|json|jackson|nodes|objectmapper| |
I wanted to remove dates that were formatted like so
<p>8 March</p>
<p>8 February</p>
<p>8 Dec</p>
I was able to use following reg expression
/<([\w]*)\b[^>]*>(\d).*<\/\1>/
e.g. https://regexr.com/7u3sc |
today I ran into this problem, while using server actions with react-query
```js
const { data, error, isError } = useQuery({
queryKey: ["data"],
queryFn: getDataFromServer,
});
```
At first it seems okay, but running this `isError` is true, but `error` is undefined. After hours of debugging I understood th... |
What next.js does behind the scenes when you call server actions inside client components? |
|reactjs|next.js13|react-query|app-router| |
I have spring boot BE running on port 8080 on my server with nginx and ssl cert.
I have forwarded ports on my router 80 and 443 to the server.
Also i have ddns in no-ip.
This all works correctly.
Now i started developing mobile app with React Native and Expo. When I try to call some endpoint on my BE it works cor... |
I have a npc class which has a method called `chase` that is referenced inside the `update` function. when `chase` is called it says its not a function or it's not defined. I have another method being referenced in the same way that works.
chase()
{
this.Phaser.Physics.moveToObject(NPC_spr,... |
I am looking for a quick and easy way to integrate PayPal in my website.
So far, I have searched many hours and also found tremendous information about it. (Most of them are out of date).
I know there are many options to go, but it also makes me confused about which way I should choose.
Now, what I want is that :
... |
If you want to use code inside `on***=""` tag
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<input type="text" onchange="{
console.log('anything');
}"
<!-- end snippet -->
You can just use {} brackets it be like a export default but yo... |
I wrote a small python package that does this for float32 arrays. **~2.3x speedup** compared to np.amax and np.amin.
Usage:
`pip install numpy-minmax`
```
import numpy_minmax
min_val, max_val = numpy_minmax.minmax(arr)
```
The algorithm is written in C and is optimized with SIMD instructions. The code re... |
Issue with Restricting Number Input Range in TextField using ParseableFormatStyle |
Then you are in the realm of undefined behaviour.
The C standard does not say in what order arguments are evaluated.
So on one compiler the right 'a' might be evaluated first, then ```a=a+5``` and then the first will be 15.
Then you'll get 15, 15, 10.
Another compiler will evaluate the other way around.
... |
> The APP explicitly states the collection and usage rules to users in the form of privacy policy pop ups. Without the user's consent, there is a behavior of collecting device MAC address, IMEI, and other information.
> [Test Action] Initiate privacy compliance detection
> Read the current running service
> Pop up p... |
How to prevent mapbox from reading the currently running service |
|android| |
null |
{"OriginalQuestionIds":[3450582],"Voters":[{"Id":4386427,"DisplayName":"Support Ukraine","BindingReason":{"GoldTagBadge":"c"}}]} |
## *JTOpen Lite* & *JTLite*
Instead of the libraries that you are trying to use, I recommend using IBM's *JTOpen Lite* and *JTLite* libraries, which are specifically designed for use on Android.
For more information, please see:
- IBM support page, [*JTOpen Lite and JTLite - enabling mobile devices which us... |
I'm creating a Vite, React project and using FCM.
I have a `src/firebase-messaging-sw.js` service worker file that accesses environment variables via `import.meta`. The FCM SDK attempts to fetch the `firebase-messaging-sw.js` file at the root level via `GET http://localhost:5173/firebase-messaging-sw.js`.
I trie... |
I am developing an Office Word add-in, and the frontend is built with Vue.js 2. I am facing challenges while implementing the login functionality. My goal is to open the default browser and redirect users to my website when they click the login button on the add-in. If the user is already logged into my website, I want... |
How to Implement External Website Authorization Login in an Office Add-in? |
|office-addins| |
null |
I have a handful of data objects floating around my code which have a large number of fields of the same type:
```
struct AsStruct {
mass: i32,
height: i32,
energy: i32,
age: i32,
radioactivity: i32,
}
```
(actual examples would have more fields - like 20+).
Sometimes but not always... |
I am curious about how major top social media apps updating their UI without user interaction. I want to implement same in flutter mobile app. I have gone through dynamic feature (On-Demand feature in android)
[Deferred Components][1]
[1]: https://docs.flutter.dev/perf/deferred-components
But, Don't know ... |
null |
I want to implement a Google Mobile Ads in unity, and I see [RegisterEventHandlers](https://developers.google.com/admob/unity/rewarded#listen_to_rewarded_ad_events) to handle some event for `RewardedAd` and `InterstitialAd`. I've seen their [example](https://github.com/googleads/googleads-mobile-unity/tree/main/samples... |
Basically exactly what is described here in the archived forum in this post from 2018!
https://developer.xero.com/community-forum-archive/discussion/70563025
It's been 6 years. Is there really still no way to edit an invoice with a $0 balance? What are some best practices to avoid this? Just create a new invoice?... |
Invoice API - Unable to edit Authorised $0 Invoices |
|xero-api| |
null |
Just check identifier not to be null and everything works fine. change `convertToSnakeCase` method as this:
private Identifier convertToSnakeCase(final Identifier identifier) {
if (identifier == null) {
return null;
}
final String regex = ... |
Serving service worker file in src in Vite dev mode |