instruction stringlengths 0 30k ⌀ |
|---|
|c#|constraints| |
null |
I have an issue with node fs.unlink
I have a function that writes files to disk storage extracts data from the these files then deletes the files
```js
const parseShpFile = async ({
cpgFile,
dbfFile,
prjFile,
qmdFile,
shpFile,
shxFile,
}) => {
// saving binary files to local machine
const dbfP... |
In Delphi, you can use the StringReplace function from the SysUtils unit to replace multiple spaces with a single space. However, StringReplace only works on one occurrence at a time. To remove all instances of multiple spaces without looping, you can use a regular expression with the TRegEx class from the System.Regul... |
Make the code in line 2 to:
int i = 0.00
As java needs a value beforehand when you create the variable.
I hope it works fine after that:) |
{"Voters":[{"Id":14122,"DisplayName":"Charles Duffy"},{"Id":4154375,"DisplayName":"pjh"},{"Id":9952196,"DisplayName":"Shawn"}]} |
I'm trying to insert a cylinder in the MCNP 6 code. I believe I defined the surfaces and planes correctly. What could be wrong?
Surfaces:
520 cz 435 1
5020 px 435
6020 px 450
Cells:
81 5 -1.2250E-3 (-520 5020 -6020)
99 5 -1.2250E-3 -3552 1050 -110
... |
This question is incomplete. We need to know what you use for styling in order to give you more guidance.
If you use css for it, you can have a look at the focus pseudo-class. It is generally triggered, when the user clicks or taps on an element or selects it with the keyboard's Tab key. [:focus][1]
<!-- begin sn... |
There are two different concepts for filtering:
1. hybrid search https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-knn-query.html#knn-query-in-hybrid-search https://opster.com/guides/elasticsearch/operations/elasticsearch-hybrid-search/#Hybrid-search-with-dense-models
2. kNN filtering
Hybri... |
Flutter bloc: state does not change after changing new event |
{"Voters":[{"Id":328193,"DisplayName":"David"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[13]} |
- In Desktop
(The emulator turns on automatically)
[npm start video](https://youtu.be/uUhNKguiao4)
[terminal(?) image](https://i.stack.imgur.com/k913N.png)
[emulator image](https://i.stack.imgur.com/GY4MG.png)
- On the laptop After turning on the emulator can activate the React-Native
Which progra... |
I'm a beginner in using selenium-cucumber, I was trying to automate a web application i have the page objects where i used findelements to get all the elements that is where i'm getting the Null pointer exception
I was having similar issue before as well any leads on this is much appreciated
This is my first ques... |
Node fs.unlink does not delete the files immediatly |
|javascript|node.js|backend|node.js-fs| |
I am looping through the records in the dataframe and need to convert each row to separate nested JSON
```
from pprint import pprint
pprint(pd.to_dict())
```
{'id':{0: 'A'},
'col1':{0: 'B'},
'address_id':{0: ['123','ABC']},
'address_1':{0: ['Street 123','Street ABC']},
'address_2':{0: [... |
Python convert Pandas to nested JSON |
|json|python-3.x|pandas| |
The embedding layer is defined with `input_dim=vocab_size`, but I don't see the definition of `vocab_size` in the code snippet you provided.
Try this:
```python
def build_model(hp):
model = keras.Sequential()
model.add(Embedding(
input_dim=vocab_size, # Make sure vocab_size is defined
... |
Suppose I have colmap camera poses, is it possible and how to obtain a new view of input image `I` (planar object) from a different viewpoint/camera pose using those poses?
Colmap camera poses has following data:
```
extr = cam_extrinsics[key]
intr = cam_intrinsics[extr.camera_id]
heig... |
Yes, you can do this to a limited degree with gmail.
Gmail allows you to define aliases for your account, and you can use those as from addresses in addition to the address you use for sign-in. In gmail, click the settings icon, and go to the "Accounts and import" tab. Click the "Add another email address" link and ... |
i am getting below error while trying to start my java application. i configured java 17 in intellij and in environment variable. So just wanted to know, what is the possible reason of this error.
Execution failed for task ':DemoApplication.main()'.
> Process 'command 'C:\Program Files\Java\jdk-17\bin\java.exe'' fi... |
Process 'command 'C:\Program Files\Java\jdk-17\bin\java.exe'' finished with non-zero exit value 1 |
|java|spring-boot|gradle|intellij-idea|java-17| |
{"Voters":[{"Id":476,"DisplayName":"deceze"}]} |
I’m working on developing a Teams tab app in Angular. I’m stuck at the authentication process. To summarize the problem, the Angular app itself is working fine and the authentication using Entra is working fine in the web app. I tried using loginPopup and loginRedirect from MsalService on the web app and that works wit... |
How to authenticate a Teams tab app built in Angular using Microsoft Entra |
|angular|microsoft-teams|microsoft-teams-js|microsoft-entra-id| |
null |
I am writing a request handler in a telegram bot. I am having difficulty processing the waiting for pressing the inline button, can you tell me if this can be implemented? I have a ticket monitoring start handler, get them in json, then process each ticket in the list.
```
class MonitoringStatus(StatesGroup):
... |
What you are suggesting is called "Command Guidance" but there is an easier, and better way.
The way that real missiles generally do it (Not all are alike) is using a system called Proportional Navigation. This means the missile "turns" in the same direction as the line-of-sight (LOS) between the missile and the ta... |
This should fix your problem if by 'disappear' you meant the paragraph to disappear, but not the button, as referred to in your code above.
Please check the code below. I hope it helps you.
const paragraph = document.getElementById("p1Text");
const button = document.getElementById("button");
butto... |
I'm having an application on Symfony 6.3.
I've created a Service, but I've always the error "Class "App\Service\DeclarationService" does not exist".
I don't understand where is the mistake.
DeclarationController :
namespace App\Controller;
use App\Service\DeclarationService;
use Symfony\Bundle... |
Getting NullPointerException when trying to use FindElements to read all elements |
|java|selenium-webdriver|nullpointerexception|webdriver|cucumber| |
null |
{"Voters":[{"Id":147356,"DisplayName":"larsks"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[13]} |
{"Voters":[{"Id":8496462,"DisplayName":"GuiFalourd"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":6463558,"DisplayName":"Lin Du"}]} |
# hardhat shows the below after running npx
npx hardhat init
sh: 1: hardhat: Permission denied
# I tried removing and installing the latest versions of node.js and still received the permission error after trying. Any assistance with setting up hardhat on WSL would be appreciated. |
Hardhat permission denied |
|node.js|npx|hardhat| |
null |
{"Voters":[{"Id":328193,"DisplayName":"David"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[13]} |
{"Voters":[{"Id":1191247,"DisplayName":"user1191247"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":6463558,"DisplayName":"Lin Du"}]} |
{"Voters":[{"Id":18309290,"DisplayName":"user18309290"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":6463558,"DisplayName":"Lin Du"}],"SiteSpecificCloseReasonIds":[13]} |
{"Voters":[{"Id":14853083,"DisplayName":"Tangentially Perpendicular"},{"Id":1974224,"DisplayName":"Cristik"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[18]} |
hello on my server clang 11.0.1 version is installed but my project is compiled with clang14, when I write the command " pkg install clang14 " I get an error like clang14 not found.
please help me solve this problem, thank you.
[enter image description here](https://i.stack.imgur.com/n6Vq0.png)
I tried to ... |
How can I switch from clang11 to clang14 on freebsd? |
|c++|clang|clang++|freebsd|pkg| |
null |
I am working on a C++ project with qml files. I have documented C++ files using doxygen but in the same project, I'm also having many .qml files. For documenting qml files, I instlaled doxyqml.
My requirement is C++ files and qml file should be documented separately. Issue I'm facing is, this project is having all ... |
Symfony 6.3 Class "App\Service\DeclarationService" does not exist |
|php|symfony| |
{"Voters":[{"Id":-1,"DisplayName":"Community"}]} |
Hi I am trying to update a database table rows with the same row ID using PHP for loop but it only updates all the rows in the database table with the last iteration data when i ECHO the update query it shows the correct update code in each iteration below i have included the code and necessary screenshots
PHP For... |
While running test classes using jest.spyOn my test is failing |
|jestjs|salesforce|phpunit|ts-jest|tooling| |
null |
I want to hold backspace button for several seconds then release it, but it only clicks 1 once (deletes a single character) Latest version of both modules
import pyautogui
import time
time.sleep(2)
pyautogui.keyDown('backspace')
time.sleep(5)
pyautogui.keyUp('backspace')
this is wh... |
Pyautogui malfunctions? |
|python-3.x|time|pyautogui| |
null |
you can use aggregation query for it.
```MONGODB
db.collection.aggregate([
{$match:{source:'here'},
{$addFields:{count:1}},
{$group:{_id:'$date'
,totalDocuments:{$sum:"$count"}}
}
])
``` |
I have a vectorised def:
def selection_update_weights(df):
# Define the selections for 'Win'
selections_win = ["W & O 2.5 (both untested)", "Win (untested) & O 2.5", "Win & O 2.5 (untested)", "W & O 2.5",
"W & O 1.5 (both untested)", "Win (untested) & O 1.5", "Win & ... |
python: Vectorised function does not apply when all conditions are met |
|python|pandas|dataframe|function| |
Imagine site is `https://www.example.com` and it maps to `/var/www/example.com/public`
I have a typical index.php router to feed any request within example.com through index.php:
```htaccess
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUES... |
php / htaccess - serve files from another directory outside directoryroot? |
|php|apache|.htaccess| |
I get a 403 while using Cypress custom commands to login into a webpage I'm testing.
If I log in manually, it doesn't returns any kind of error, but with Cypress I always get the same state:
> "403 Forbiden
>
> Login Failed: Unable to find a valid CSRF token. Please try again.
>
> Request ID: f88dd507-22e4-47... |
When loggin in with Cypress, I get a 403 error related to a CSRF token |
|javascript|authentication|cookies|cypress|csrf-token| |
null |
You need to mark the fields with the `transient` keyword. It will cause the default serialization mechanism to skip the marked fields.
```
public class MyClass implements Serializable {
private transient SampleClass sampleClass;
private transient MyService myService;
private transient OtherService ot... |
**No, the Telegram API does not allow you to directly access a user's camera. This is for security and privacy reasons.** |
New to lua.
On example i have multiple
```
local part1 = display.newImage("part1.png", 0, 0)
part1:scale ( 0.5, 0.5)
part1.isVisible = false
...
local part10 = display.newImage("part10.png", 0, 0)
part10:scale ( 0.5, 0.5)
part10.isVisible = false
```
How can i optimize it using array and for do?
Like exe... |
No labels on map using MapLibre GL JS angular |
streamlit : The term 'streamlit' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ streamlit run c:/Users/Zbook 15 G5/OneDrive/Desktop/main.py/streamlit .... |
path problem when i enter the streamlit run command in terminal |
|python|path|streamlit| |
null |
I want to implement gestures detector in appBar. When user click image or name and it direct to another page. But it display error `Found this candidate, but the arguments don't match.
GestureDetector({
^^^^^^^^^^^^^^^
Try again after fixing the above error(s).`
I was trying many things but I get only errors... |
I have been working with Flutter and I have a doubt.
I am trying to show overlay on top of my screen. That's why I am using [flutter_overlay_window][1]
In its [example][2] code I found this
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
@pragm... |
Does dart code of a different `@pragma(vm:entry-point)` runs in a separate isolate? |
|flutter|dart|dart-isolates|dart-vm| |
If you are new to the Ada ecosystem I recommend downloading a version of the GNAT compiler from https://www.adacore.com/download
Officially the recommended way nowadays is to use the Alire package manager. It’s also a user friendly way to get started if you are used to package managers. |
Update:
You can simply use `(name ='')` as order by clause which will return 1 if name is empty other wise 0.
select * from comments order by (name ='')
If you have `null` as well then you can use:
select * from comments order by (NULLIF(name,'') is null)
Here `NULLIF(name,'')` will convert empty... |
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_margi... |
Waiting for the inline button to be pressed from user in a loop from the aiogram 3.4 |
|aiogram| |
Getting a error while loading a model(.h5)
the error is below:-
Traceback (most recent call last):
File "C:\Ananconda\Lib\site-packages\keras\src\ops\operation.py", line 208, in from_config
return cls(**config)
^^^^^^^^^^^^^
File "C:\Ananconda\Lib\site-packages\keras\src\layers\convolutional\... |
Unable to load the teachable machine model |
|tensorflow|machine-learning| |
null |
looking for help in Prolog |
|prolog|prolog-findall| |
I have a Flask + SQLAlchemy + Marshmallow REST API with a MS SQL Server database. The tables are all system-temporal tables with [hidden row effective/expiration dates](https://learn.microsoft.com/en-us/sql/relational-databases/tables/temporal-tables?view=sql-server-ver16#hide-the-period-columns). I'm trying to fetch r... |
I have a firebase project.
I am calling an external api via cloud function in the hope the api key (stored in env variable) will be less discoverable.
While I have managed to get the following code working in the emulator, it doesn't work after deployment.
```
const {onRequest} = require("firebase-functio... |
how to add gesture in appbar |
|flutter|dart| |