instruction
stringlengths
0
30k
In my .NET 8 Core API app, when I run `dotnet run`, everything is working. But Im using a docker-compose, and there come the problems. When I run my app with `docker-compose up --build`, my IDE stops to resolve the NuGet packages installed in all the projects of my solution. And, important point : it builds well, I ...
I tried this solution and it's worked for me : import android.app.PendingIntent import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.os.Build import android.os.Bundle import android.telephony.SmsManager import and...
I am using googleapis in my node.js project. At first I was using raw api which was working, but when I switched to googleapis package, the list of people.connections.list is returning me an empty object, and I have some contact saved in my account, which was showing up when I was using raw apis. Here is the code th...
google people api is returning empty list of contacts
|javascript|node.js|google-api|
I know the function works for the button and it does get number, and I can print the `Num` variable but when I set it as the output string it seems to not show up in the output text. I'm guessing I'm doing something wrong with the output_str.set function or the `textvariable` function, but I can't figure out what exact...
It depends on what definitions are necessary in the header. Basically you may be able to use your own forward declarations of your own types. Otherwise you should typically use the PIMPL idiom, in this context also known as "compilation firewalling".
|php|wordpress|
null
How can I convert the Android BLE Code Lines to XCode Obj-C ???? public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enabled) { boolean bleRes = tstBluetoothGatt.setCharacteristicNotification(characteristic, enabled); BluetoothGattDescriptor descriptor = cha...
How to set Value the descriptor of iOS BLE in XCode Obj-C?
|ios|objective-c|xcode|bluetooth|
null
I'm learning C# and SQL databases, but mostly C#. I'm working in a project in which we need to write down some data into a SQL database. This is my connection string: ``` <configuration> <connectionStrings> <add name="conexionServidorHotel" connectionString="Data Source=DESKTOP-QG08OQQ\\SQLEXPRESS;Initial Ca...
Using Testcontainers, is it possible to make a request to an external REST API service?
> Regex Match a pattern that only contains one set of numerals, and not more I would start by writing a _grammar_ for the "forgiving parser" you are coding. It is not clear from your examples, for instance, whether `<2112` is acceptable. Must the brackets be paired? Ditto for quotes, etc. Assuming that brackets ...
**INTRO** I am writing a class `stalker<Obj>` that holds inside a variable of type `Obj`. I want `stalker<Obj>` to pretend that it is the same as `Obj` (from the user's perspective). Thus, I expect that `stalker<Obj>` is constructible like `Obj`. ```C++ template <typename Obj> class stalker { Obj obj; // ...
|x11|xdotool|
Python is kinda like english so when you say ```python while not name: input("Enter your name") ``` It basically says that it would repeat until it's not the name variable, which is None.. Summary: It says to repeat UNTIL the variable name is not None
I am working on a Java application where I need to execute a batch of SQL queries using JDBC's PreparedStatement. I have encountered an issue where the PreparedStatement seems to clear the batch every time it is initialized with a new query. Here is the relevant portion of my code: ```java @Transactional public int[...
Exception thrown: 'System.InvalidOperationException' in Microsoft.Data.SqlClient.dll
|c#|sql-server|exception|
null
Apple say "When the video zoom factor increases and crosses a camera’s switch-over zoom factor, this camera becomes eligible to set as the activePrimaryConstituentDevice." in this document: [Apple document][1] So if you want your app can switch to ultra.wide camera when move iPhone close and switch to Angle Camera w...
`read` by default trims leading and trailing whitespace and consumes backslashes. You can disable those by setting `IFS` to empty string and invoking `read` with the `-r` flag respectively. ``` $ echo ' \" ' | while read i; do echo ${#i}; done 1 $ echo ' \" ' | while IFS= read -r i; do echo ${#i}; done 4 ``` Not...
Use html.unescape(): import html print(html.unescape('l&#039;')) It works for me
{"Voters":[{"Id":446594,"DisplayName":"DarkBee"},{"Id":2571021,"DisplayName":"Dijkgraaf"},{"Id":1431750,"DisplayName":"aneroid"}],"SiteSpecificCloseReasonIds":[18]}
Apple say "When the video zoom factor increases and crosses a camera’s switch-over zoom factor, this camera becomes eligible to set as the activePrimaryConstituentDevice." in this document: [https://developer.apple.com/documentation/avfoundation/avcaptureprimaryconstituentdevicerestrictedswitchingbehaviorconditions][1]...
This error commonly occurs when the API request does not have the necessary permissions to verify ownership of the URL
In My case, worked for me when I signed out and signed back in from Visual Studio Code > Accounts. As previously I signed in for VSCode with my older github account on which copilot was not activated. [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/4wNFL.png
I am trying to solve a ML problem if a person will deliver an order or not. Highly Imbalance dataset. Here is the glimpse of my dataset ``` [{'order_id': '1bjhtj', 'Delivery Guy': 'John', 'Target': 0}, {'order_id': '1aec', 'Delivery Guy': 'John', 'Target': 0}, {'order_id': '1cgfd', 'Delivery Guy': 'John', 'Tar...
|bash|xterm|
I am trying to learn Dart language along with flutter. I have come across the following piece of code (taken from here: https://github.com/ppicas/flutter-android-background/blob/master/lib/counter_service.dart) : ``` import 'package:flutter/foundation.dart'; import 'counter.dart'; class CounterService { fa...
why do they instantiate the class and then throw that instance away?
|flutter|dart|service|
null
|javascript|reactjs|react-doc-viewer|
I want to make a layout in which pie chart also scrolls along with expandable list view just like an analysis and reports screen however with this layout only 1st item of expandable list view is visible and not able to scroll expandable list view tried: android:nestedScrollingEnabled="true" but this only enable...
Expandable scroll view not scrolling
|android|xml|android-layout|scrollview|expandablelistview|
|javascript|next.js|javascript-framework|
Finally, I got a solution: in Linux keep in mind the difference between forward slash '/' and backward slash '\' and instead of creating a folder inside the war file use any Linux directory like (/tmp or /opt), so the code will remain same as I mentioned above, the only thing I changed is the directory path and it work...
I'm using Riverpod with StateProvider for my app. The home page will change based on tabs clicked. When i click the ListTile tab to trigger the ref.read, it rebuild super fast: But when i click the leading IconButton in Appbar which trigger `ref.read(countProvider.notifier).state = 0;` it takes me fews seconds to...
Flutter Riverpod StateProvider having slow rebuild of widget when using watch
|flutter|riverpod|
null
|c|linux|xterm|
In case you are wondering how to have side by side columns in Wordpress gravity forms.
|php|wordpress|hook|gravity-forms-plugin|
null
|reactjs|react-hooks|
What makes it safe to use a reference? The reference must point to a valid object of the expected type. When would that cease to be the case? When the lifetime of the referred-to object ends, or when the object is otherwise invalidated (e.g. by being moved from). In your code none of the two are applicable. `foo`...
Managed to figure this issue out. It's the trigger that needs to be set to "Settings"->"General"->"Split On"->"On". This ensures that multiple items added to the list at once splits the entries into multiple runs instead of just one run. Had to remove the loops which took the output from the "When item is created". Now...
|r|for-loop|dplyr|tidyverse|
null
|x11|xterm|
Train and test split in such a way that each name and proportion of tartget class is present in both train and test
|python|machine-learning|scikit-learn|train-test-split|imbalanced-data|
Apple say "When the video zoom factor increases and crosses a camera’s switch-over zoom factor, this camera becomes eligible to set as the activePrimaryConstituentDevice." in this document: [https://developer.apple.com/documentation/avfoundation/avcaptureprimaryconstituentdevicerestrictedswitchingbehaviorconditions][1]...
I debug the code using `{{ dd($order->id) }}`, I got 100238 order id value. But when I type <form action="{{ route('admin.pos.update_order', ['id' => $order->id]) }}" method="post"> then its not working. Then I write this `{{ route('admin.pos.update_order', ['id' => 100238]) }}` its works great. I cannot ...
You need to provide a User-Agent HTTP header. For example: import requests import json url = "https://www.tablebuilder.singstat.gov.sg/api/table/resourceid" params = { "isTestApi": "true", "keyword": "manufacturing", "searchoption": "all" } headers = {...
I have tried run pipeline from last one week. But this is not working fine. Is there any issues here? Before last week this pipeline is working perfectly. Now this is stuck with this error. ``` > nx run web:test > NX Took longer than 3 seconds to hear from heartbeat process The heartbeat process may have not...
Gitlab pipeline stuck with nx cloud issue
|unit-testing|build|gitlab-ci|node-modules|nomachine-nx|
|php|wordpress|woocommerce|custom-fields|meta-boxes|
null
|php|wordpress|woocommerce|payment-gateway|cart|
null
Rohan Mehta's solution still works! To make this clear for other novices, this is an example that works: image_path <- "C:/..." #your path img<-magick::image_read(image_path) text <- ocr(img, engine = eng) Whereas this did not work: image_path <- "C:/..." #your path text <- ocr(img_p...
|php|wordpress|woocommerce|categories|cart|
null
In my python application I use child loggers for each module with propagate=False. (This is because I have a custom Formatter for each child logger objects, and since the the application is expected to write logs to the stdout and since I do not want duplicate logs I set propagate = False. So I explicitly set StreamH...
pytest LogCaptureHandler for child logger object with propagate = False
|python|logging|pytest|
|php|magento|
null
If you have permissions to use [Jenkins shared libraries][1] you can implement per job named counters slightly abusing [Hidden Parameter](https://plugins.jenkins.io/hidden-parameter/) plugin. Create a global variable named `vars/counter.groovy` in your shared library like the following: <!-- language: java --> ...
I am writing a class `stalker<Obj>` that holds inside a variable of type `Obj`. I want `stalker<Obj>` to pretend that it is the same as `Obj` (from the user's perspective). Thus, I expect that `stalker<Obj>` is constructible like `Obj`. ```C++ template <typename Obj> class stalker { Obj obj; // other variabl...
After Debugging in the V8 source code, I really cannot figure out what is the `MarkDependentCodeForDeoptimization();` which is called in function `MarkCompactCollector::ClearNonLiveReferences()` used for? I find it will clear the references of weak objects embedded in JIT optimized code. What is a `weak_object`...
What is 'MarkDependentCodeForDeoptimization()' used for in V8's Mark-Compact phase?
|garbage-collection|weak-references|embedded-object|deoptimization|
null
Your code might compile now, but it will not work as you expect. `INT_MIN`/`INT_MAX` are the min/max values for an `int`. It is typically **32 bit** and therefore the values that you used before were probably **–2147483648** and **2147483647** respectively (they could be larger for 64 bit integers). On the ot...
This is my DataFrame: import pandas as pd df = pd.DataFrame( { 'a': [10, 14, 20, 10, 12, 5, 3] } ) And this is the expected output. I want to create three groups: a 0 10 1 14 2 20 a 3 10 4 12 a ...
How can I create groups based on ascending streak of a column?
|python|pandas|dataframe|group-by|
I'm learning C# and SQL databases, but mostly C#. I'm working in a project in which we need to write down some data into a SQL Server database. This is my connection string: ``` <configuration> <connectionStrings> <add name="conexionServidorHotel" connectionString="Data Source=DESKTOP-QG08OQ...
|php|wordpress|
null
I want my `__new__` method to behave differently in some cases and wanted to split it into overloaded functions with `singledispatchmethod`. However this does not work, the overloading functions are never called. Why is that? ``` from functools import singledispatchmethod class Foo: @singledispatchmethod ...
Why does overloading __new__ with singledispatchmethod not work?
|python|initialization|functools|single-dispatch|
First check the image format. I was trying with .png format. Then suddenly I realised my images are in .jpg format. Also you can try below code if it's not working: ``` blob = bucket.get_blob(f'Images/{id}.png') if blob is not None: array = np.frombuffer(blob.download_as_string(), np.uint8) imgStudent...
``` class RagQAInput(TypedDict): question: str category: str language: Optional[str] docs_vectorstore = OpenSearchVectorSearch( opensearch_url=get_opensearch_url(), index_name="docs", embedding_function=embeddings_function, # vector_field="invoice_desc_vec", # text_field="inv...
{"OriginalQuestionIds":[35003008],"Voters":[{"Id":487892,"DisplayName":"drescherjm"},{"Id":12002570,"DisplayName":"user12002570","BindingReason":{"GoldTagBadge":"c++"}}]}
Is there a method in Java to ensure that when a user inputs a value, the subsequent output appears on the same line, directly adjacent to the input prompt, without moving to a new line? In other words, can we achieve a setup where the input and output are displayed on the same line? Expectations: Factorial of 5: ...
Input and output the same line in java
|java|
null
``` if ear < EYE_AR_THRESH: COUNTER += 1 if COUNTER >= EYE_AR_CONSEC_FRAMES: alarm_sound.play() else: COUNTER = 0 if distance > MAR: current_time = time.time() if current_time - start_time <= 20...