instruction stringlengths 0 30k ⌀ |
|---|
Hi I was facing this Issue when i was using Bootstrap 5 & angular12
<button class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" type="button" id="dropdownMenuButton" aria-haspopup="true" aria-expanded="false">Dropdown button
</button>
**And in angular.js**
... |
The kernel I have used is the as a Laplacian kernel, which is commonly used for sharpening images. It enhances the edges and details in the image.
Secondly in the code for the TwoD_convolution I have made the following modifications:
1. I have tried normalizing the kernel, ensuring that the overall intensity of t... |
{"OriginalQuestionIds":[2960772],"Voters":[{"Id":523612,"DisplayName":"Karl Knechtel","BindingReason":{"GoldTagBadge":"python"}}]} |
Have a custom live search feature on our wordpress website, which only displays 20 products in the middle of the screen for any given search.
Would like to be able to remove this 20 limit, so that either 50 products, or unlimited products are shown.(Would like to try both options, to see which works best).
So far... |
How to integrate sinhala character recognition to Flutter application.
I want to convert image file to sinhala word file
I tried various way for do this.(Google's ML Kit for Flutter) but i cant reach to proper converting sinhala characters.
Please can you any help for this... |
sinhala character recognition to Flutter application |
|flutter|ocr| |
null |
I am observing a strange behaviour where GCC (but not clang) will skip a pointer-reset-after-free expression in the global destruction phase and with certain values of `-O?`. I can reproduce this with every version I tried (7.2.0, 9.4.0, 12.3.0 and 13.2.0) and I'm trying to understand if this is a bug or not.
The ph... |
{"Voters":[{"Id":2872922,"DisplayName":"Ron Rosenfeld"}],"DeleteType":1} |
I have written a code for finding prime numbers using sieve of Eratosthenes algorithm, but the problem is my code works as it tends to be, but for only some numbers. It shows like "entering upto-value infinitely" as the error and for some numbers it works perfectly. As I started recently studying C in-depth I couldn't ... |
I work with the Spring framework and I encounter problem with mapping set of roles from many-to-many table. Let me show you my classes.
```
public class Role {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@NonNull
private String authority;
@ManyToMany(mappedBy... |
To build a subset of a third-party C++ library like XLA as a static library with headers using Bazel, you need to properly define your BUILD file and ensure that the necessary targets are included. also,
Regarding the absence of the .a or .lo file in your bazel-bin directory, it's possible that Bazel is not actually b... |
i am using java big decimal. but still i am not getting expected result..
public class DecimalAdjustEx {
public static void main(String[] args) {
BigDecimal v1 = new BigDecimal("100");
BigDecimal v2 = new BigDecimal("75");
BigDecimal reminder = BigDecimalUtils.divide(v1,v2);
System.out.println(... |
How can I add a whole column of data as a row? |
|t-sql|sql-server-2012| |
I am trying to define path as
```js
{
path: '/:not-found(.*)',
name:'Not-Found',
component : NotFound
}
```
which is not working in vue 3, bit when I am trying to define same path as
```js
{
path: '/:notFound(.*)',
name:'Not-Found',
component : NotFound
}
```
it is ... |
It depends what you understand as "typical medium enterprise"
AWS offers their own MongoDB, they name it DocumentDB and it is compatible to MongoDB. However, AWS DocumentDB does not provide the full set of features as MongoDB does.
MongoDB Enterprise has two license models. The first model is based on the amount ... |
The answer in the following link explains it better than I ever could. The answer goes into all the different date/time classes in Java, as well as their relation to sql types.
https://stackoverflow.com/questions/32437550/whats-the-difference-between-instant-and-localdatetime/32443004#32443004
A short summary:
... |
You can approach this by pivoting the dataset to a long format, then summing the rows where the party matches the population, and then pivoting back to wide.
```
library(tidyverse)
df |>
mutate(country=row_number())|>
pivot_longer(cols=-c(PartyA, PartyB, country),names_pattern = "(.*)Pop") |>
group_by(c... |
null |
I am trying to make a CountDownTimer for my Android app, but every time I try to start it using just `timer.start()`, it starts multiple timers. I don't know why.
My code for this is:
```
val timer = object: CountDownTimer(5000, 1000) {
override fun onTick(millisUntilFinished: Long) {
println(milli... |
Your fairly "verbose" code can be written a lot shorter if you leave out all the repetitions:
<!-- begin snippet:js console:true -->
<!-- language:lang-html -->
A<button id="na">1</button>
B<button id="nb">1</button>
X<button id="nx">1</button>
Y<button id="ny">1</button>
Z<button id="nz">1</button>
<div id="... |
I think if you just explicitly capture both `chatForView` and `chatUser`, it should work:
```
.fullScreenCover(isPresented: $shouldNavigateToChatView) { [chatUser, charForView] in
if let user = chatUser {
ChatView(oppUser: user)
} else if let chat = chatForView {
ChatView(chat: chat)
... |
why Java BigDecimal giving Precision Errors |
|java|bigdecimal|arbitrary-precision|fault-tolerance| |
null |
{"OriginalQuestionIds":[9003969],"Voters":[{"Id":295783,"DisplayName":"mplungjan","BindingReason":{"GoldTagBadge":"html"}}]} |
Error WebMock::NetConnectNotAllowedError in testing with stub using minitest in rails (using Faraday) |
|ruby-on-rails|testing|minitest|faraday|webmock| |
I am trying to connect below spark connectors from Databricks to Snowflake.On the snowflake side i can access the account using "Login via AzureAD" which is my own azure account credentials.
But while trying to provide the same in spark connectors for snowflake is not working.
options = {
"sfUrl": url,
"... |
Spark connectors from Azure Databricks to Snowflake using AzureAD login |
|azure|apache-spark|snowflake-cloud-data-platform|databricks| |
You could rewrite `(?<=^| )` as `(?:\s|^)` and keep that match in the replacement instead of using `\K` which is not supported in JavaScript.
You could write the pattern as:
((?:\s|^)([a-z])\2+)(?=\s|$)|([a-z])(?=\3)
The pattern matches:
- `(` Capture **group 1**
- `(?:\s|^)` Match either a whitespac... |
In the realm of computer programming and system administration, efficiency and precision are paramount. Command-line interfaces (CLIs) have long been the go-to tool for professionals seeking to interact with computers at a granular level. At the heart of many CLI operations lie command-line arguments, powerful tools th... |
Fixed it. It works if I create the ```.gitignore``` using Windows Subsystem for Linux (Ubuntu). It does not work if created through Windows 10 VS Code editor. A similar thing is also mentioned in this [solution][1]. It also worked when I created the ```.gitignore``` file using echo in Git Bash which is a Linux environm... |
I am trying to simulate a web site access via C# code. The flow is
1) HTTP Get the the login Page. This succeeds.
2) HTTP Post to login page. This returns status 302, I disabled auto redirect in HttpClientHandler. Validated the cookie returned, it has the login cookie.
3) HTTP Get the actual content page. Returns s... |
I have two dataframes.
df1
col1 var1 var2 var3
X11 NA (for var3)
X12 NA (for var2)
X13 NA (for var1)
df1 has a few columns (float64 type representing some categories) like var1, var2, var3 with values between 1-5 for each and some missing values for the categories.
I want to fill in the... |
{"Voters":[{"Id":21625319,"DisplayName":"TraderInTheMaking"}],"DeleteType":1} |
Is the following of any help? The basic paradigm is to put your read sockets to a list, then do a select and then check which socket has data available and then act on the data.
#!/usr/bin/python3
import time
import socket
import select
import threading
glob_control_rea... |
I use expo go and expo 48 on the frontend and firebase admin sdk on the backend. using cloud functions I push notifications like
[![expo API sending notifications from the server][1]][1]
When I send the body, everything works fine but when I try to send the data object nothing happens. I sometimes don't receive t... |
explian the line command argument |
|python|python-3.x|linux|command|command-line-arguments| |
null |
Rust cannot borrow as mutable |
Based on the answer given by phd, I decided to tweak it a bit and write a script that automatically fixes the tab width based on pressing `2<Tab>` for going from 2 to 4 tabs, as well as being able to fix intermingled tab/4-space indentation by pressing `4<Tab`. It makes use of a global variable to prevent the command f... |
Here is a regex that will match any phone number for every country in the world regardless of the number of digits. It matches formatted and unformatted national and international phone numbers.
```js
// This will match any phone number in a file
const pattern = /(\+)?(\(?\d+\)?)(([\s-]+)?(\d+)){0,}/g
// If you... |
I suspect the reason is that you've defined the 'status' field as text in the index's schema. The text type is used for free-text searches, and as such has the notion of "stop words" - common words that are ignored - and "on" is probably there.
You should use a tag field instead. |
I was trying to run my assembly language program and it is when i try to enter the 2nd input, the cursor freezes and the DOSbox emulator would crash after a few seconds of delay.
I've tried running other assembly language programs and they seem to be working fine. Im not sure of the reason behind this, could it be a... |
DOSbox automatically freezes and crashes without any prompt warnings |
|assembly|dosbox| |
null |
I am trying to do a transparent background for my MatDialog component. Here is the code:
*parent.component.html*
openDialog(){
const dialogConfig = new MatDialogConfig();
dialogConfig.width = '340px';
dialogConfig.height = '476px';
dialogConfig.autoFocus = false;
d... |
First make sure you are using the latest version of UMP SDK inside your dependencies and don't rely on the version embedded with `play-services-ads`, that version could be outdated.
```gradle
dependencies {
implementation("com.google.android.gms:play-services-ads:22.6.0")
implementation("com.google.android.... |
I could do it with possible hack, i don't know its right solution but it works.
I took 4 different radio buttons and HBox
widgets.HBox([radio1,radio2,radio3,radio4])
Then after selecting one radio button i m de-selecting the other radio button which is selected.
Here how i done :
import ipywidgets as widge... |
"https://exp.host/--/api/v2/push/send" api doesn't work when sending the data object |
|react-native|expo|expo-notifications| |
According to the [docs][1], to be on the safe side you should append the absolute path of the image or directory you want to serve.
app.use('/uploads', express.static(__dirname + '/uploads'))
[1]: https://expressjs.com/en/starter/static-files.html#:~:text=const%20path%20%3D%20require(%27path%27)%0Aapp.use... |
# bollingers bands always give the same value and give the same value in each symbol there is no error in the code sequence but there is a logical error can you help
\`
#property copyright "Copyright 2024, MetaQuotes Ltd."
#property link "https://www.mql5.com"
#property version "1.00"
... |
mql4 bollingers bands always give the same value |
|mql4|mql5|mql| |
null |
I am trying to make a CountDownTimer for my Android app, but every time I try to start it using just `timer.start()`, it starts multiple timers. I don't know why.
My code for this is:
```
fun DissapearSkip(){
skipTimeButton.visibility = View.VISIBLE
exoSkip.visibility = ... |
I'm new at ReactJs and trying to learn ContextAPI but I'm having this error. I read titles about this situation but I can't reach to solution. Firstly I tried to re-install react as a old version but it didn't changed. I tried to wrap App inside of app.js instead of index.js but I had same result as it happens right no... |
|javascript|reactjs|jsx|react-dom| |
I'm currently developing my first project, a simple paint application using Java Swing and AWT. While implementing the painting functionality, I encountered an issue with accurately capturing mouse movements, especially when moving the mouse quickly.
I've designed the application to update the drawing coordinates in... |
I am trying to simulate a web site access via C# code. The flow is
1) HTTP Get the the login Page. This succeeds.
2) HTTP Post to login page. This returns status 302, I disabled auto redirect in HttpClientHandler. Validated the cookie returned, it has the login cookie.
3) HTTP Get the actual content page. Returns s... |
I followed Herb Sutter's [NVI idiom][1] on my class design because of its benefits. My abstract class is as follows in short.
class Communicator {
public:
bool Connect(void) {
// some preoperations
return DoConnect();
}
// 3 more similar public member fun... |
Mocking problem on Non-Virtual functions with NVI Idiom |
|c++|c++20|googletest|googlemock|non-virtual-interface| |
You can send the token as part of the request body, headers, or query parameters using an HTTPS request.
const express = require('express');
const jwt = require('jsonwebtoken');
const app = express();
const jwtSecret = process.env.JWT_SECRET;
app.post('/fetchElement', (req, res) => {
... |
I have been accustomed for years to using the shortcut `Ctrl + Shift + F` to find similar words in Android Studio. The results have always brought me all the similar words, but suddenly, there are similar texts that are not included in the search. Why is this happening?
[![enter image description here][1]][1]
... |
If the linked server is not available for editing, you can always use cast(RogueCol as text) in OPENQUERY
SELECT
RogueCol
FROM OPENQUERY([LinkServer],
'
SELECT
cast (RogueCol as text) as RogueCol
FROM public.MyTbl
') |
I am discovering the concept of source generators.
In order to execute some logic with a source generator on some files (image files more precisely) based on the folders structure of the targeted/referencing project, I need to:
- Get the path/Directory of the targeted/referencing project.
### First approach
```... |
Source generators get the referencing project path - retrieve useful value from IncrementalValueProvider<string> |
|c#|msbuild|roslyn|sourcegenerators|csharp-source-generator| |
i am using following endpoint to get response from API using paid version:
https://api.aviationstack.com/v1/flights?access_key=fi324rkjn32e2e44%20flight_status=active
also tried this:
https://api.aviationstack.com/v1/flights?access_key=fi324rkjn32e2e44
but I am getting null in "live" and "aircraft":
```
{
... |
Not getting Live data from Aviationstack api |
|api|null|fetch|response|live| |
null |
In addition to adding code, you can also add a module, user form, or class module. I think the reason for that is that VBA needs one of those four things to determine that a file is a macro-enabled workbook. My guess is that this was done to distinguish between files that contain macros (and therefore have to be enable... |
[Screenshot][1]
app theme: Theme.Material3.DayNight.NoActionBar
this id manifest:
<activity
android:name=".ui.activities.BaseActivity"
android:exported="false"
android:label="@string/title_activity_base"
android:theme="@style/AppTheme" />
... |
In EF terms it seems like it could just be:
var d = db.Users
.OrderByDescending(u => u.Xp)
.AsEnumerable()
.Select((u, i) => new { Rank=i+1, User = u })
.ToDictionary(at => at.Rank, at=>at.User);
You list all your users out of the DB in order of XP, and you use the overload of `Sel... |
I am trying to do pip install the OpenAI library and I get this error. I tried Windows shell in Visual Studio Code and I have Visual Studio C++ installed.
I uninstalled and reinstalled Python three separate times. The Windows console output is below. I have made sure I installed Visual Studio C++. My old c... |
I think this is what `Array.flat` does, but I like to use the spread `...` operator to spread arrays so then I can join them again.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
var arr1 = [{
"a": "1"
}]
var arr2 = [{
"b": "2"
}]... |
I am kind of confused on how to find the number of cycles. Although it appears to be pretty simple.
Is it supposed to be number of cycles = (Clock Rate) * (CPI) * (Time)
or
number of cycles = (Clock Rate) * (Time)
[image shows required information ](https://i.stack.imgur.com/vsBTk.png)
This is the ques... |
Unresolved Similar Texts: Anomalies in Android Studio's Ctrl + Shift + F Search Results |
|android-studio| |
Karate uses [Gatling][1] under the hood hence you need to compare Gatling versus JMeter, not Karate versus JMeter and the questions you need to answer are:
1. [Network protocols][2] supported. JMeter out of the box supports more and even more protocols are available via [JMeter Plugins project][3]
2. Distributed... |
I am playing with Scrapy and I am able to scrape with it data from different URLs. One thing I am trying to obtain, and so far unsuccessfully, is stats data, particularly `finish_reason` and `elapsed_time_seconds`.
My `testspider.py`'s structure looks pretty standard:
class TestSpider(scrapy.Spider):
... |
Can't start complete colima & docker engine as x86_64 on arm64 |
|x86-64|arm64|docker-engine| |
null |
## A leaky abstraction
ActiveRecord tries to cross the chasm between the table based world of your database and objects in your application and stumbles like any ORM. `update_all` is one of the methods that operates in the SQL world instead of on objects like `update` does. While it can take a hash and translate it ... |
The [bash manpage](https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html) says that the variable **`OSTYPE`** stores the name of the operating system:
> `OSTYPE` Automatically set to a string that describes the operating system on which bash is executing. The default is system-
d... |
null |
|php|wordpress|permissions|comments| |
null |
# bollingers bands always give the same value and give the same value in each symbol there is no error in the code sequence but there is a logical error can you help
\`
property copyright "Copyright 2024, MetaQuotes Ltd."
property link "https://www.mql5.com"
property version "1.00"
p... |
I am trying to use the POST method to insert some data from a person with JSON. I am using the code from JS to construct, but when i start the transformation, it sends me:
> "ERROR: invalid character ' ' in literal true (expecting 'e')".
Does anyone know how to solve it?
<!-- begin snippet: js hide: false con... |