instruction
stringlengths
0
30k
null
I've found a nice way to do this by resetting the autofocus on user tap event and it works really well. export default function CameraScreen({ route, navigation }: any) { const [isRefreshing, setIsRefreshing] = useState(false); const [focusSquare, setFocusSquare] = useState({ visible: false, x:...
Google Drive Service Account gets googleapiclient.errors.HttpError: 401 "Request is missing required authentication credential" when authenticating
|python|google-oauth|google-api-python-client|
I've encountered similar issues while using Jupyter Notebook, especially when running lengthy loops that iterate rapidly. One workaround I've found effective is to introduce a short sleep duration (less than a second) after every X iterations within the loop. This seemingly trivial delay can often make the interrupt...
I have installed (ver 2.2.6) npm i asciidoctor and run asciidoctor -b xhtml5 -a source-highlighter=rouge .\README.adoc I do get the web page , but the source code is generated flat .. this is how the the adoc file would display on my intellij IDE with the pluggin [![enter image description ...
Could you please tell me what is the purpose of `GetAll(){};` method. And, why when I change the name of method gives me an Error? Is it a type of reserved method, or how? I know that the method is dedicated to execute code so? why it does not execute code when I change it from GetAll() to anything()? ```php <...
PHP CodeIGniter 3
|php|codeigniter|continuous-integration|codeigniter-3|
null
i am currently using odoo 16, where i have created a custom field and trying to make that field readonly. The readonly field should appear only if a non-administrator user is logged in This is my initial code:- ``` <odoo> <data> <record id="product_template_only_form_view" model="ir.ui.view"> ...
When you use something like `ProvidePlugin` in the front-end world you are, by all intents and purposes from a semantic and useability perspective, providing a global. It suffers from almost all the disadvantages using a global does. You gained pretty much nothing from a code quality point of view over a global. If...
i have one blue container when double tap on this red container open. and the red container position is fix it is not change when blue container move that time if red container and blue container border same than not move to more this direction than another direction to move in flutter. i have one blue container whe...
How to container move around the small container in fluttter
|flutter|dart|flutter-container|
null
The `onKeyUp` event fires when the [key is released][1]. The fact that you see a lowercase in the event handler indicates that at the time you ***released*** the key you no longer had the shift key pressed. The fact that you see a capital letter appear in the input is a separate behavior. This is based on the key (...
I was looking at the same situation. I wanted to have a data/column header in first raw of my output datafile, even if data is being appended. So only if file doesn't exist, I will print the first line as column headers. I just opened the file in read option ("r"), and checked if it returned NULL. If NULL I will go for...
I have been working on a project where I am calling getProductList API which can have hundreds or thousands on data, I choose to use pagination (`infinite_scroll_pagination: ^4.0.0`). I tried apply it came up with the code mentioned below. the problem is that my function `productsPaginationKey.addPageRequestListener((p...
How to implement pagination on the custom dropdown item's in flutter
|flutter|api|dart|pagination|
I would like to create a method that returns an iframe's URL if the parent page is allowed to (because it is under the same domain), and return a falsy value if the parent page is not allowed to do so. I have the following code hosted by https://cjshayward.com: <!DOCTYPE html> <html> <head> ...
|google-apps-script|
null
According to the network diagram above, the connection from company A's pc0 to the server system including gmail and facebook is successful, but company B's pc6 and pc7 cannot ping the server system. I tried to give ip from dns but it didn't work. The system works normally, all devices are connected successfully, ca...
{"OriginalQuestionIds":[23088439],"Voters":[{"Id":10248678,"DisplayName":"oguz ismail","BindingReason":{"GoldTagBadge":"bash"}}]}
**Goal**: I'm trying to set up a telegram bot, which downloads pictures that are sent to it. After doing some manual playing with ```requests```, I'd rather like to _use the python-telegram-bot_ library. Yet unfortunately most examples outside the docs are written for some Version <20, the official docs are purely ...
{"Voters":[{"Id":2370483,"DisplayName":"Machavity"}],"SiteSpecificCloseReasonIds":[16]}
I am learning Spark, so as a task we had to create a wheel locally and later install it in Databricks (I am using Azure Databricks), and test it by running it from a Databrick Notebook. This program involves reading a CSV file (timezones.csv) included inside the wheel file. The file *is* inside the wheel (I checked it)...
I'm working on a React Native app that displays PDFs using a custom NativeModule written in Swift. The module successfully renders PDFs from a provided file URL. But, I'm struggling with a feature to highlight specific text within the PDF. I'm passing text to highlight, startOffset and endOffset, and Page No. from *...
Search and highlight text of current text in PDFKit Swift
|swift|react-native|pdfkit|ios-pdfkit|apple-pdfkit|
null
You can [choose which modules to export to the external code](https://stackoverflow.com/a/78251561/8138591). Additionally, u can *clearly* communicate the **intention** that a code exported from a file should only be used inside a package and not outside of it (**package scoped**). My solution is based on the idea f...
I have a small C++ program that writes a PWM period value to the following file on the BeagleBone Black: /sys/class/pwm/pwmchip5/pwm0/period The first time the program runs the file write succeeds. The file is opened with the O_WRONLY and O_NONBLOCK flags. The program closes the file descriptor before exiting...
Linux file write 1st time errors on 2nd try
|c++|linux|beagleboneblack|
I am having this error when I am installing yfinance via pip. Any solution on that? kevin@KevindeMacBook-Air test % pip install yfinance --upgrade --no-cache-dir Collecting yfinance Downloading yfinance-0.2.37-py2.py3-none-any.whl.metadata (11 kB) Requirement already satisfied: pandas>=1.3....
I need some brainstorming on this issue. So the problem is I have a list of urls and they are all news articles. I need to scrape the published date of the news articles. The problem is that only a few of them articles have a date written in date tag in html and most of them has date written in different tags. Now I am...
Scrape date from news articles
|python|web-scraping|
null
{"OriginalQuestionIds":[10671916],"Voters":[{"Id":11107541,"DisplayName":"starball","BindingReason":{"GoldTagBadge":"visual-studio-code"}}]}
I am new to Linux and I was intending to totally change my OS environment to Linux distros. I chose Ubuntu and downloaded 22.04: Jammy. Viber is the main communication channel of my work and I seriously needed it. I have been trying a few days for it to work on my Ubuntu. Still, no hope. So, could you please ...
I have to click on the button `Accepter et continuer` in this `div`, I copied the XPATH of the line on which is present the button I want to click, but it does not work <div class="disclaimer-buttons-place-holder"> <a class="btn btn-reverse" href="WEBSITE" data-event-zone="click" data-event="C" data-ev...
I am trying to download file on lick of notification button but when application is in background then api call is not working. Notification Code: func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () ->...
Actionable notification api call not working in background
|ios|swift|push-notification|actionable-notification|
null
You need to check if the list of values includes `this.value` : $(document).ready(function() { $("#range-slider").mousemove(function() { if (["1", "2", "3", "4", "5"].includes(this.value)) { $('.other-element').addClass('is--active'); } else { $('.other-element').re...
I recently started to use GetX and my architectural opinions changed. GetX called its state managers - `controllers`. Therefore, we have an obvious architectural pattern choice - **MVC**. Yes `GetControllers` are not exactly **Controller** in MVC, but who cares? Ergo, next folder structure: control...
Odoo 16 Make Fields Readonly Using XPath
|python|xml|odoo-16|
null
I have observed an issue while using the **Hyperband** algorithm in **Optuna**. According to the Hyperband algorithm, when **min_resources** = 5, **max_resources** = 20, and **reduction_factor** = 2, the search should start with an **initial space of 4** models for bracket **1**, with each model receiving **5** epochs ...
When I try to fetch from a query on a single table I get an associated array where Key is a name of column. But when I try to `JOIN` another table's columns on a query I get an array which only contains a key 'row' and a string value which looks like `(value1,value2,value3,...,valueN)`, without column names. How do...
PHP fetchAll on JOIN
|php|sql|join|fetchall|
null
You've used `struct Square` where you should have used `struct square` in the `Box` definition. Corrected: ```c typedef struct box { struct square** squares; /* array of Squares */ // ^ int numbers; int possible[9]; int solvable; struct Box* next; } Box; ``` Another option is to...
Shows Server is started at port 5500 but do not pop up the web browser. I tried every possible way to fix the problem but none helps out even gone through so many videos and tried but none worked. Please can any help me. your hints may help to resolve the problem.8
Live server extension in VS code works in background but do not pop the web browser
|html|visual-studio-code|web|path|settings|
null
<THIS IS NOT CODE, SO STOP COMPLAINING ABOUT INDENTING, EDITOR!> It would seem that a simple relationship exists between GPS and TG pages, given that some regions share numbering systems and some do not (Los Angeles + Orange Counties share, Riverside + San Bernardino Counties share but not with LA/...
For example, when the module includes a library that only works in the browser. Some times dynamic import can solve this issue. Take a look at the following example: import dynamic from 'next/dynamic' const DynamicComponentWithNoSSR = dynamic( () => import('../components/hello3'), { ssr: ...
The training and validation accuracies are as follows: Epoch 1/5, Training Accuracy: 0.9442, Validation Accuracy: 0.7626, Time: 27.09 seconds Epoch 2/5, Training Accuracy: 0.9631, Validation Accuracy: 0.7518, Time: 28.14 seconds Epoch 3/5, Training Accuracy: 0.9757, Validation Accuracy: 0.7914, Time: 27.54 seconds ...
The training accuracy and the validation accuracy curves are almost parallel to each other. Is the model overfitting?
|machine-learning|nlp|bert-language-model|
null
I have a list of classes/objects and I need to get a random item from the list. In a particular case, I need to take a random item from a specific range OR a specific index. Meaning it's not just a Item item = List[Random.Next(2,10)]; //take one random item between index 2 and index 9 (to make an example) but...
Random getting value from a range or a specific value
I wait until the page is loaded and use the "DOMContentLoaded" method to add eventhandlers on some p tags. This works until I open and close the modal, then the page/js freezes. Why does it freeze? ``` <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initi...
This is the pubspec.yaml. I defined the fonts that I am going to use and I copied the font file to fonts directory of my android project. ```yaml name: your_flutter_app description: A new Flutter project environment: sdk: ">=2.12.0 <3.0.0" dependencies: flutter: sdk: flutter math_expressions: ^2.0....
I have MySQL table similar to below table | id | Source | Destination | | -- | ------ | ----------- | | 1 | BLR | ATH | | 2 | ATH | BLR | | 3 | BLR | HKG | | 4 | HKG | BLR | | 5 | DEL | ATH | | 6 | ATH | DEL | | 7 | DEL | HKG | | 8 | HKG | DEL | | 9 | BLR | DEL ...
I came across a workaround that was suggested in an unofficial capacity by someone at AppDynamics during their local lab explorations. While this solution isn't officially supported by AppDynamics, it has proven to be effective for adjusting the log levels for both the Proxy and the Watchdog components within my AppDyn...
I'm trying to use Android Native Module on Flutter web(by WASM), and create Android module and imported on flutter app. It works on Android app but not on browser. `android/app/src/main/kotlin/com/example/flutter_application_1/MainActivity.kt` ```kotlin package com.example.flutter_application_1 import ko...
Viber is not working on Ubuntu 22.04 Jammy
|linux|ubuntu|ubuntu-22.04|wine|viber|
null
I am making an AR app using Vuforia engine and my project needs a greater FOV to track images. I figured if I access the wide angle camera of my android phone instead of low resolution one that Vuforia accessed by default, my goal would be accomplished. So is there any way by which I can access the wide angle camera?...
Looking to access wide angle camera of smartphone while making an AR application using Vuforia
|android|augmented-reality|virtual-reality|vuforia|
null
When I enter long text into my TextFormField A and jump to another widget (like another TextFormField) my TextFormField A sustains the cursor position at the end of the long text. I want the text to appear from starting position when I unfocus the widget. **situation** email field unfocused [![enter image desc...
I am trying to download file on lick of notification button but when application is in background then api call is not working. Notification Code: func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping (...
I am trying to download file on lick of notification button but when application is in background then api call is not working. Notification Code: func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () ->...
Check the version of your llama_index if you are using the current version, kindly use : from llama_index.core.node_parser import SimpleNodeParser
`publishDir` works by emitting items in the process `output` declaration to the path provided. You haven't provided an output declaration for either process, so it doesn't think there is anything to publish. Also, unless you're using it for checkpointing, you don't need the output from `FastQC` for `Trimmomatic`, y...
|macos|yarnpkg|yarn-v2|
This code compiles and runs and works fine as a hash for an array of ints : def hashValue(a: List[int]) -> int: return tuple(a) But I don't understand what's going on under the hood. Does py maintain an internal hash of the immutable tuple ?
I find it to be similar to Java, but with more C-style functionality. Which I guess makes it better, since you can have [unions](https://stackoverflow.com/a/126807/16217248) and pointers (though pointers can only be used in `unsafe` code) but both are a staple in most of my programming.
null
I am trying to setup a set of computers to connect over an ad-hoc network, or mesh (on top of adhoc) using batman-adv. The adhoc network is able to establish a station, but I can't ping one computer from another. When using batman-adv to create a mesh on top of the adhoc network, the bat0 device never seems to ha...
Code: @NoRepositoryBean public interface AbstractRepository <M extends AbstractModel> extends MongoRepository<M, String> { Page<M> findAll(Pageable pageable); Page<M> findAllByIsActive(boolean isActive, Pageable pageable); } And are other warning in findAll parameter: Mis...
The return type is incompatible with '@NonNull Page<M>' returned from PagingAndSortingRepository<M,String>.findAll(Pageable)
|java|spring|spring-data-jpa|non-nullable|pageable|
# 2024 March 30th > **Maximum layer size** = 52,000 mebibytes (54,525 megabytes) > > https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html
macOS: Command not found: corepack when installing Yarn on Node v17.0.1