instruction
stringlengths
0
30k
null
I have a well built application in react native, it works fine both at web and mobile platforms. Except one thing I always have to comment one of the imports `import LokiJSAdapter from '@nozbe/watermelondb/adapters/lokijs';` or `import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite';` depending ...
cmake and g++ cross compilation looking for library in host sysroot path instead of target sysroot
|cmake|linker|g++|cross-compiling|ros|
null
We just deploy our web gaming platform and starts ads in Facebook and Google. Per day facebook send us 10k users. We use a tool call mouseflow to check user behaviours and we have around 9k users. But Google analytics visitors is 116. We don't really what to do. Our configuration is simple. We just copied and p...
** Problem overview ** I need to combine several .xlsx files into sheets, where each sheet name must be the file name. ** Current issue ** The code below, becomes slow and spends a lot of memory after a few files. ** Attempted solution ** Closing excel file and deleting dataframe and running gc manually, do...
Much has changed in the last 8 years. The syntax to do what is asked in this question is as follows: ```c# await using var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 16384, FileOptions.Asynchronous); using var reader = new StreamReader(stream); string fileContent = awai...
I have a UDF function defined as ``` %flink.pyflink from pyflink.datastream import StreamExecutionEnvironment from pyflink.table import StreamTableEnvironment, DataTypes from pyflink.table.udf import udf @udf(result_type=DataTypes.FLOAT(), input_types=[DataTypes.STRING(), DataTypes.FLOAT()]) def calculate_...
Apache Flink (AWS) does not recognize saved temporary function
|apache-flink|
I created a file named `types.d.ts` in my `src` folder, which is included in the `"include"` key in `tsconfig.json`. If I create a type alias in the `types.d.ts` file as follows: type money = number; and in a `.ts` file in the project I use it as follows: let total: money = 100.00; when I hover m...
|typescript|visual-studio-code|
I've been experiencing issues with the `wxMediaCtrl` control causing an "Access Read Violation" and some other exceptions when calling `wxMediaCtrl->Load();` I'm fairly new to wxWidgets having only built one project before this one. This is what I am attempting: ``` Main::Main() : wxFrame(nullptr, wxID_ANY, "MainFra...
For a sample array of integers: In [225]: arr = np.arange(90); x=rolling_sum_with_reset(arr,3) In [226]: x Out[226]: array([ 0., 1., 3., 3., 7., 12., 6., 13., 21., 9., 19., 30., 12., 25., 39., 15., 31., 48., 18., 37., 57., 21., 43., 66...
I've been following this video tutorial (https://www.youtube.com/watch?v=1wfeqDyMUx4&t=811s&ab_channel=OnlineTutorials) on how to make a parallax website. Everything was going well until I got to the line 44 of my index.html file: moon.style.left = value * 1.05 + 'px'; There was no error code, it just didn't do what it...
How to correctly implement a parallax effect based on the scrolling of the user?
|javascript|html|css|
null
Although setting the pandas option to view all columns is one option, the printed table isn't pretty. Hence, I'll recommend the use of the tabulate package. Method 1: Print all columns after enabling the pandas option: import pandas as pd pd.set_option('display.max_columns', None) print(result) ...
|google-wallet|
Description: I am encountering an issue with both Command Prompt and PowerShell in Visual Studio Code. Whenever I attempt to open either the Command Prompt or PowerShell terminal within Visual Studio Code, the terminal window closes automatically after a few seconds, and I receive an error message. For PowerShell, ...
Command Prompt/PowerShell Closing Automatically with Error -532462766/-1 in Visual Studio Code
|powershell|visual-studio-code|terminal|command|command-prompt|
null
# 2 search bars with dropdown suggestions, selectable by both mouse and arrow keys (TypeScript) ```css li.cursor { background: yellow; } #Item\ 1, #Item\ 2 { font-weight: bold; font-size: 40px; } ``` ```tsx import { StateUpdater, useState } from "preact/hooks"; const list1 = ['rabbits', 'rac...
Thru trial and error, I was able to load C:\Program Files\MyServer\fips.dll by specifying a relative path such as OSSL_PROVIDER_set_default_search_path(fips_libctx,"./")
ok, heres whats wrong with your code 1. after assigning the srcObject of a video element you have to call play 2. in the setInterval function you get the image data in your let statement but you havent drawn anything to the canvas yet, although it would be available in the second iteration 3. when you actua...
Silly me, the answer appear during some insomnia. The HOME environment variable was set by the contain's operating system itself and therefore Jenkins and its shared library could not know what it was. The /etc/passwd and setting of `USER` in the image's Dockerfile determines HOME. Any profile or rc files in HOME ...
It doesn't work because it should be `__return_false`, not `_return_false` - the prefix has two underscores. `__return_false()` is just a function defined by WordPress in `wp-includes/functions.php`.
I've been looking at the documentation and relevant tutorials on permutation importance and nobody seems to have a clear idea on what they are actually permuting. Just to clarify, would the step by step process be as follows: 1. Split dataset into X_train, X_val and X_test 2. Train data on X_train, using X_val...
Algorithm becomes slow after a few excel files
|python-3.x|pandas|
You are printing the *manager* not a `QuerySet`, hence the `None`, you can print this with: <pre><code>from django.shortcuts import get_object_or_404 class ProductDetail(APIView): def get_object(self): return get_object_or_404( Product, category__slug=self.kwargs['categor...
could someone tell me why my frame is showing up super small/minimized? I thought I just had to pack my frame to resolve the issue but packing my frame does not seem to have any effect on the outcome. [small frame / frame not showing up properly][1] [1]: https://i.stack.imgur.com/MbpjH.png Here's my code: ...
Frame showing up super small Java Swing
|java|swing|jframe|jpanel|jcomponent|
I have a NextJS app with a login page. If the user enters a email that is not linked to an existing account, I want to show a button to redirect the user to the signup page. Ideally, I would like the email and password entered in the login page to be pre-filled in the signup page. I currently show a link: ``...
I'm trying to extract a string from a longer string. The capture group may be followed by an underscore or by nothing. Here's an example: ``` id <- "begin_station1" id <- "begin_station2_end" sub(".*station(.+)_?.*", "\\1", id) ``` unfortunately the ```?``` does not seem to work like this. For using the first id...
in R regex use optional charater behind a capture group
|r|regex|
This is not possible, see [issue #106](https://github.com/asomers/mockall/issues/106). The closest thing you can do, as suggested in this issue, is to return a second `MockCmd` and set expectations on it. This does imply a specific order in which you expect the methods to be called, though. If this is not good enough f...
How to increase the length at which the line is wrapped?
I have simple project on Laravel, which is hosted on ECS using Nginx Unit baked in Docker. The only logs I get are from nginx unit: ``` 2024/03/28 14:41:10 [notice] 55#55 module: php 8.2.16 "/usr/lib/unit/modules/php.unit.so" 2024/03/28 14:41:10 [info] 1#1 controller started 2024/03/28 14:41:10 [notice] 1#1 proc...
Can't get logs from Laravel in Docker with Nginx Unit
|php|laravel|docker|nginx-unit|
null
I'm trying to use jsonwebtokens and jwtdecode in my login logic for a portfolio project im working on as a newer coder and i cant figure out whats wrong. I used console logs to find out that its something in my try catch block in my login logic but at this point i dont know if its my authorization utils that arent work...
today I would like to ask you a question that for days I haven't been able to understand what kind of logic to approach to obtain the expected result. After making some calls to an API, filtering the data and cleaning the values that are not needed, I obtain a dataframe of this type: | timestamp_utc | ...
Nesting dataframe using Pandas
|python|pandas|
null
I recently adjusted the location of media files when I was presented with this error: `[Errno 2] No such file or directory: '/tmp/tmp1d93dhp7.upload.mp4'` in Django. So far I've checked for typos in my file location code in my settings, views and models. The website works by simply storing user uploaded media files ...
I have a data set (csv file) of arms exports that consists of the following variables called `arms1993`: `countryA`, `countryB`, `year of arms trade`, and the `value of the arms export from country A to B in each year`. Here's some actual data from my data set: |countryA|countryB|year|value| |--------|-------...
Just in case anyone else ends up in ToolStripManager hell, here's my solution. Basically, it circumnavigates using ToolStripContainer and ToolStripManager entirely and persists the ToolStrip states (location and visibility) via a user setting and a custom control that inherits ToolStripPanel (placeable via VS Designer)...
Dispatch and Swift Concurrency is incompatible. During compile time, the compiler can only make a best effort to figure out whether code executes on the main thread when Dispatch is involved. Anyway, I would suggest you refactor your class `ProfileViewModel` so that the class as a whole becomes MainActor isolated. ...
I have a class that has about 20-some methods in it. Each one does some web service message processing. I just had to make a change to it, and realized that every one of these methods has the exact same try/catch around it: try { /* *** actual processing specific to each method goes here *** */ } catch (Fa...
I have a file with lines I need to extract from the JSON-like syntax. My regex works good in most cases. It extracts desired symbols into a second capture group. But I noticed sometimes my desired text is optionally can be enclosed by some tags which I want to ignore. **Sample file:** ``` {"title_available" "tex...
I'm very new to Unity and Vuforia, and I wanted to make make an android app where you press a UI button on screen and an animation will play with the AR model. I looked at tutorials but I can't find ones that use mid air targets instead of image targets. Do animations just not work on mid air targets? Or am I missing s...
null
- Using `TableRange2.Rows(5)` to determine the the 2nd row of header is not reliable. It depends on how many page fields on your pvt table. - `TableRange1` represents the range containing the entire PivotTable range, but doesn't include page fields. _Microsoft documentation:_ > [PivotTable.TableRange1 property...
I tried running the following fork bomb in Python 3, designed to trawl through every directory on my computer and every file in that directory, and open all the files: ``` from more_itertools import collapse from os import scandir, walk, system from os.path import exists for dir in set(filter(lambda item: exists(i...
Conditional Synchronous Import in JavaScript, to export a simple object and not promise, possible?
|javascript|asynchronous|import|export|
Refer to this: https://www.npmjs.com/package/tailwindcss-scoped-preflight This lets you define `isolationStrategy`, where you can pace a single selector or an array of selectors(inside your tailwind.config.js): plugins: [ scopedPreflightStyles({ isolationStrategy: isolateInsideOfCont...
You can trade your `select` for an [`update..returning`][1] that targets the same row, but updates it based on your conditions, then returns the new values: ```pgsql WITH t AS ( UPDATE task_pool SET status=case when status=0 then 1 else status ...
|laravel|aws-lambda|amazon-sqs|laravel-queue|laravel-vapor|
null
From what I read, you need to add the following NuGet package to your project: https://www.nuget.org/packages/Xamarin.AndroidX.Collection.Jvm Try installing the latest see if that works out
I have a Dataframe consisting of a time series of symbolic (categorical) values. It looks similar to this: ```none idx symbol partition 0 A 0 1 C 0 2 B 0 3 C 0 4 A 0 5 C 1 6 B 1 7 D 1 8 C ...
The stockstats.StockDataFrame is a subclass of pd.DataFrame. This implies there is no need to do a merge in the end. After making sure the "datetime" column in the original df contains no duplicates, you could define the `st` dataframe as ``` st = stockstats.wrap(df, index_column="datetime") ``` So, passing...
I have this multi-parameter JSON array: ``` public courseList:any=[ { id:1, cName: "Angular", bDesc: "This is the basic course for Angular.", amt: "$50", dur: "120 Hours" }, { id:2, cName: "React", bDesc: "This is the basic...
How to perform get, update, add and delete operation in a multi-parameter JSON array just like an API in Angular
|arrays|angular|typescript|frontend|angular-reactive-forms|
null
On the sheet "Telefon" I calculate values to generate invoices from. To have an overview of the calculated values, there are querys in E6, H6 and K6. Unfortunately, I can't manage to count the blank values so that the values are displayed in the correct row. ![enter image description here](https://i.stack.imgur.c...
Our email verification service encounters an error when testing with Yahoo email addresses. The error message we receive is: 553 5.7.2 [TSS09] All messages from 106.196.118.124 will be permanently deferred; Retrying will NOT succeed. See https://postmaster.yahooinc.com/error-codes This error indicates that Y...
Error 553 5.7.2 [TSS09] When Sending Emails to Yahoo and Outlook
|email|outlook|verification|yahoo|
null
I can't find docs that clearly describe the mechanism here so just want to try to understand and learn best practices. For tasks created by `asyncio.create_task`, they seem to be cleaned up at program end without generating any `CancelledError` or requiring a call to explicitly cancel the task. **Do we need to cancel t...
I need to execute a command on every windows computer for an April fools joke, but I can't get PsExec to work without authentication Here is my command: `C:\PsTools\psexec \\192.168.1.6 -accepteula -nobanner powershell -Command "Add-Type -AssemblyName PresentationFramework; [System.Windows.MessageBox]::Show('Happy A...
April fools - PsExec (PsTools)
|powershell|connection|psexec|
null
{"Voters":[{"Id":7329832,"DisplayName":"jps"},{"Id":1007220,"DisplayName":"aynber"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"}],"SiteSpecificCloseReasonIds":[18]}
Go to File -> Preferences -> Keyboard Shortcuts and search for: "cursorWordPartLeft" and "cursorWordPartRight" and bind them to any key that you want. They should do what you want Mac example of swapping the word and word part behaviors: [![screenshot of the Keyboard Shortcuts settings panel with keys reassigned]...
I am working on a backend team which is handling HTTP requests routed through app gateway into a microservice from an embedded device. The device is making requests every half second roughly, and to the best of my understanding should be keeping the connection alive. Both the backend team and the embedded team h...
The above options did not suit me, because the selection of the list item was incorrectly processed. Implemented a double tap through tracking the timer period (0.5 seconds). In xaml. <ListView x:Name="Target_listview" ItemsSource="{Binding}" ItemTapped="Target_listview_ItemTapped"> In cs. private Tim...
Sublime Text causing computer to crash (mouse being frozen and keys not being logged) due to fork bomb
|python|macos|sublimetext3|
null
You can simply replace a `1` which is followed by another `1` with a `0`: ``` data = "0100010000101111101101001011010000101110111101111110111110111111111000000000001" data = re.sub(r'1(?=1)', '0', data) print(data) ``` Output: ``` '0100010000100000100101001001010000100010000100000010000010000000001000000000001'...
I am new to writing functions and loops in R, and am wanting to iterate a chunk of code across columns in a dataframe, to create a new matrix of results. I am getting stuck with how to iteratively create new objects and matrices using/named after values in a certain column (Site) in my dataframe, to then pass through t...
Iterate code through dataframe R - name new objects/matrices/columns after existing data values/columns and pass to following lines of code
|r|loops|for-loop|dplyr|
null
I don't know if you're using it, but you could use `custom_exception_handler` to transform any exceptions raised to the format you provide. Here is an example: def custom_exception_handler(exc, context): response = exception_handler(exc, context) if response is not None: response.data[...
Use (hidden) URL query parameters to re-use the email and password in the signup page?
|javascript|reactjs|next.js|