instruction stringlengths 0 30k ⌀ |
|---|
|ios|swift|iphone|swift5|healthkit| |
null |
I want to create an app that can send data to computer.(data are int)
So, I found some youtube, post, and documents but I couldn't make app that works well.
All documents are so difficult to me and old that I couldn't understand.
I don't understand from connecting bluetooth to sending data, receiving data bet... |
java android: how to send data on Bluetooth between android and computer |
|java|android|bluetooth|send| |
null |
I have a numpy array and corresponding row and column indices:
```
matrix = np.array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
row_idx = np.array([0, 0, 0,
0, 0, 0,
0, 0, 0,])
col_idx = np.array([0, 1, 2,
0, 1, ... |
I am new to firebase cloud functions and I'm using cloud functions with express.js. I need to retrieve an access token after registering a new user. i am using the below method for that.
const { admin, db } = require("../util/admin");
exports.registerUser = (req, res) => {
const newUser = {... |
Instead of fiddling around with floats and positioning. I guess display:flex is a good option for such layouts
check this snippet
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
.imgContainer {
display: flex;
flex-wrap: wrap;
}
.secti... |
TypeScript isn't documented in such a way that it's indexed by *syntax*, so you can just look up "`in`" and find a complete list of everywhere it's used in the type system. Nor does it seem particularly enlightening to do something like this, since at best, you'd be collecting essentially unrelated features whose only ... |
Use the modulus operator `%`. It returns the remainder from division. `1 % 2` is 1, `2 % 2` is 0, `3 % 2` is 1... so if `x % 2` is true it is odd.
Then you can use a [`case`](https://www.w3schools.com/sql/sql_case.asp) to turn this into 'odd' or 'even'.
```
select
*,
case when EmpID % 2 then 'odd' else 'ev... |
when i am trying to open the downloaded pdf , it says We can't open this file ....Something went wrong.
Here is my code.....
String path = envString
+"MetalSpecActionServlet?source=search_eu.jsp&action=open_na2066&specno="
+na2066BO.getSpecNo()+"&specType=NA2066" ;
try {
... |
In MT5 you can now achieve this using Services. You can have your service run in the background and provide custom data to a custom symbol. You can check this article here with an example of feeding a custom symbol from inside a service: [www.mql5.com/en/articles/11826][1]
[1]: https://www.mql5.com/en/articles/1... |
For those running into this error, I did the following.
1. I removed the references to the deprecated nuget packages.
2. I added the following to my csproj file.
(Right click the project and select 'Edit Project File')
3. Rebuild your project.
<!-- begin snippet: js hide: false console: true babel: false --... |
|excel|vba|office365|excel-tables|listobject| |
Use the [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) API.
*Index.html*
```html
<div id="source">
Contenido de Usuario
</div>
```
*Users.html*
```html
<div id="target">
<!-- content will be inserted here -->
</div>
<script>
window.onload = function() {
f... |
{"Voters":[{"Id":1043380,"DisplayName":"gunr2171"},{"Id":4320665,"DisplayName":"ryanyuyu"},{"Id":4342498,"DisplayName":"NathanOliver"}],"SiteSpecificCloseReasonIds":[13]} |
I've created simple bookmarklet that unsets overflow and increases height of a few divs in order to enable screenshots that require scrolling the content.
There are two versions - depending on a version of Jupyter Lab (difference in name of one class, 2 occurrences):
Works with class *jp-WindowedPanel-outer*:
<!--... |
{"Voters":[{"Id":7730933,"DisplayName":"Vetri vendhan"}]} |
I want the command to run every minute after 9pm.
What should I do?
For testing, below schedule is not working.
1) not working
*/1 21 * * * date >> /opt/cron.log 2>&1
2) working
*/1 * * * * daet >> /opt/cron.log 2>&1
I want the command to run every minute after 9pm.
|
It shows the available space where the element can be expanded.
**Example:**
This is an example with just one character. It is possible to see the dashed area after the text. It means that it is the area where the text can possibly be expanded.
[![enter image description here][1]][1]
Now let's add more ... |
This is new to me and Im trying to learn so my terminology and code may be not be the best :).
I have code like below. createCustomer adds row to a table. My intention is if missing data then dont call the db function.
```
try {
if (!username ||
!password ||
!email ||
... |
new to express & js and trying to understand next |
|javascript|express|error-handling| |
null |
I have three Models: Deal, Zipcode, DealIncludeZipcode.
Now, the association looks like below:-
Deal Model:
class Deal < ActiveRecord::Base
has_many :deal_include_zipcodes, dependent: :destroy
has_and_belongs_to_many :zipcodes, dependent: :destroy
accepts_nested_attributes_fo... |
[here is what it looks like on the course](https://i.stack.imgur.com/nhFz4.png)
[Here is what it looks like for me](https://i.stack.imgur.com/jHI68.png)
How do I get it to not show the line "dayne@DESKTOP-323EO95 MINGW64 ~"?
Also, it would help if I could get an explanation as to why it displays this way. Than... |
I am using the bash terminal in VS Code, I am new to coding, and the terminal displays very differently, how do I get them to match? |
|bash|visual-studio-code|terminal|format|settings| |
null |
Creating a lambda in NodeJS that can parse parquet (version 2.0) files into JSON arrays. I have tried the following libraries which lead to failed results for various reasons:
- parquetjs, parquets, parquetjs-lite, node-parquet: Not maintained and their final versions dont support parquet version 2.0.
- @dnsp/parqu... |
Packages for reading parquets in NodeJS (2024) |
|node.js|lambda|parquet|duckdb|parquetjs| |
You could `paste` strings out of the diseases, e.g. `'121'` for patient 2. Then `grepl` in a temporary `.k` column for regex patterns `12|132` and `subset`. Use `ave` to do group by `ID`.
> df |>
+ transform(.k=ave(Disease, ID, FUN=\(x) grepl('12|132', paste(x, collapse='')))) |>
+ subset(.k == 1... |
{"OriginalQuestionIds":[43025661],"Voters":[{"Id":4342498,"DisplayName":"NathanOliver","BindingReason":{"GoldTagBadge":"c++"}}]} |
I am planning top use FCM with my react-native iOS / Android App. And I need to let my backend know that the user (or OS) kill the application, i.e that FCM won't be able to activate the application upon receiving a notification. In the FCM documentation it is said that FCM will be shutdown.
I could not find a way... |
I just have a question on the usage of the 'weight' argument in the route_to_gdf function. In https://osmnx.readthedocs.io/en/stable/user-reference.html, it says "weight (string) – if there are parallel edges between two nodes, choose lowest weight."
Based on this, I have some questions on OSMnx examples on https://... |
OSMnx route_to_gdf function |
|python|openstreetmap|osmnx| |
I am currently developing a program that utilizes long polling to perform periodic fetches.
However, I am frequently encountering timeout errors during the fetch process, despite having a stable internet connection. I have thoroughly verified that my internet connection is functioning properly, and the issue persist... |
For people who like code (code is truth!), here is the betterized version.
This is Java-14+, it can probably be tried out on one of those free online Java consoles if you don't have the tools locally.
Also, for those interested in the details as revealed by the [The On-Line Encyclopedia of Integer Sequences](htt... |
I think your code is a bit convoluted and creating some unnecessary temporary objects. I would try with a simple approach first that is use Pandas ExcelWriter so template code will be something like this. Are your files really big that its causing memory issue ??
# Don't like the dir_output name as its the fina... |
Render the `Header` component, and `Link` components by extension, ***inside*** the router component that provides the routing context the `Link` components (*and all other React-Router-DOM components and hooks*) need in order to function.
```jsx
import React from 'react';
import { BrowserRouter as Router, Routes,... |
{"Voters":[{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":368354,"DisplayName":"Lennart"},{"Id":1953515,"DisplayName":"julemand101"}]} |
I would like to create a system with servers that need time to set up before being ready to serve. The system starts to set up whenever enough 2 customers are in the queue.
When a batch (group of 2 customers) leaves the system, we check if there are a batch which is waiting to be served. If so, we keep the server r... |
In my ODI studio, I had a work repository named as `WORKREP1`. I created a new work repository `WORKREP2` (and by mistake, selected the option ***without keeping the existing contents of WORKREP1***).
This replaced my WORKREP1 and I can see only WORKREP2 now.
[![enter image description here][1]][1]
Please he... |
How to bring back WORKREP1 after creating WORKREP2 in ODI? |
|oracle-data-integrator| |
Hey guys I am trying to sum the values of the 100th row of a SAS data set ,I created using the randfun function this is the code i have ,am i doing something wrong?
Q1A=X[+,100];
print Q1A;
The log says ERROR: (execution) Invalid operand to operation. |
How to sum elements of a specific row? |
|sas| |
null |
I want to save the input text to a state and use handleSave to create an item, but when I run handleSave, the console only outputs {name: "",description: "",} before it is updated.
The console.log with useEffect outputs the updated state for each input, but I still cannot get the updated state with handleSave.
I woul... |
I'm attempting to establish a connection, but I'm encountering an error. Despite thorough research and exploring various solutions, none have been effective for me, including toggling the WireCrypt setting between Enabled and Disabled in the firebird.conf file. I've also tested this with `Firebird 5.0`, but the issue p... |
Hi Guys, (Error: Incompatible wire encryption levels requested on client and server) trying to connect node server with firebird 4.0 |
|node.js|database|connection|firebird| |
null |
I have a MariaDB table. One column has many records. However, the date is sometimes formatted incorrectly. So 1998-00-00 or 2024-00-00.
Why does mysql allow this and how can I find or correct/delete these records? |
MariaDB incorrect dates |
|date|mariadb| |
hello their
I have use an API for Gemini AI, this AI sends me a text with stars and tags for format the text like this:
```
**Knowledge and Information:**
**Answer questions:** Provide factual information and knowledge on a wide range of topics.
**Summarize text:** Extract and condense key points from writte... |
Auto style text in flutter |
|flutter|text|formatting|styles| |
null |
{"Voters":[{"Id":6022243,"DisplayName":"Roy"},{"Id":6243352,"DisplayName":"ggorlen"},{"Id":9214357,"DisplayName":"Zephyr"}]} |
When certain characters that need to be sent in a URL would otherwise break/invalidate the URL, you have one of 2 options:
1. Pass the individual URL component into the encodeURIComponent function (as suggested by @NickGris)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIC... |
null |
{"Voters":[{"Id":10024425,"DisplayName":"user246821"},{"Id":14171304,"DisplayName":"dr.null"},{"Id":16217248,"DisplayName":"CPlus"}]} |
I have a numpy array and corresponding row and column indices:
```
matrix = np.array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
row_idx = np.array([0, 0, 0,
0, 0, 0,
0, 0, 0,])
col_idx = np.array([0, 1, 2,
0, 1, ... |
{"Voters":[{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":1940850,"DisplayName":"karel"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[13]} |
{"Voters":[{"Id":10024425,"DisplayName":"user246821"},{"Id":14171304,"DisplayName":"dr.null"},{"Id":16217248,"DisplayName":"CPlus"}]} |
I am attempting to instantiate an object based on the role of setting the data. Here is my code.
```
<?php
// Incluye la definición de las clases CUsuario y CDocente
include_once('modelo/CUsuario.php');
include_once('modelo/CDocente.php');
// Verifica si el usuario está autenticado (aquí debes tener tu lógica... |
Some code,
```
typealias Brio = (String, String, String)
extension Brio {
static var divider: Brio {
return ("_", "_", "_")
}
static var isDivider: Bool {
return (self.0 == "_")
}
}
```
>Tuple extension must be written as extension of '(repeat each Element)',
>Tuple ... |
I am new to CakePHP 2.4 and I hope someone can help me with a problem I have.
I have the memory exhausted problem in my project - and I have debugged it and got everything to work with 2 GB of memory - but my webhosting company only allows 1 GB.
So I was wondering what made the MySQL use up so much RAM - it happe... |
I have a sample .twbx that demonstrates what this question is trying to ask but I cannot figure out how to upload it.
I have a Tableau dashboard where I have a dashboard action (menu) where the user can select one of three choices where I want to pass a value (1, 2, or 3) to a second worksheet based on the choice th... |
How can I use a defined menu type list for running a range of selections, i.e. conditionally tick off the selected items at once.
Conventionally, the configurator looks like this:
```shell
@echo off
chcp 1251 >nul
:begin
echo [1] Folder 1 [3] Folder 3
echo [2] Folder 2 [4] Folder 4
set /P op=Enter the nu... |
Early sorry for bad english, but i try it. Write load test in k6 browser. Now i need to start them in ci/cd (docker) in headless mode certainly. I get webgl error like this (image:node)
`Failed to obtain WebGL context\\n `
Сomputer specifications
`
Acer Swift
11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz ... |
How to convert scraped HTML document to a dataframe? |
|python|pandas|dataframe|web-scraping|beautifulsoup| |
I try to develop a block *WordPress* using *webpack*. In the *save.js* file, I try to get the with of the user’s screen to choose the content of the return
I used *screen.widh* or *window.innerWidth*. Both return a value without any link with the different devices
I tried also to use hooks that give the width wh... |
How do I find what version of spring security used in the spring-boot-starter-security in spring boot version 3.2.4?
It is very frustrating with all the outdated information out there in the web. Even spring.io document samples that marked deprecated.
Your time is appreciated. |
spring security version in spring-boot-starter-security |
|spring|security| |
I have a PHP script that is supposed to send an email. The script works fine on my local machine, but when I run it on an Amazon Linux server, it doesn't send the email.
$to = "someone@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@ex... |
The only solution is to make `regular_invocable` an alias of `invocable`, like the standard library does. No, it doesn’t implicitly check for equality preservation, the compiler can’t do that. See [here](https://stackoverflow.com/a/64739403). |
{"Voters":[{"Id":4294399,"DisplayName":"General Grievance"},{"Id":238704,"DisplayName":"President James K. Polk"},{"Id":22180364,"DisplayName":"Jan"}]} |
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.A)
{
if (pbMainBox.Location == PictureBox.Location)
{
// I leave this if blank because I don't want to do anything when I press A
}
else
... |
I have some picture box and I don't want my main character to touch it like to stop moving |
You have to follow just 2 steps. It's worked for me.
1. Rename **server.php** file to **index.php** in your Laravel project root directory.
2. Copy **.htaccess** file from **public directory**, and paste it into the project root directory. |
I would like to know, how to compare two numbers and push the result (true, false or 1, 0) onto the stack. I know about the `cmp` instruction, but it only sets the flags. I need something that will result in either 1 or 0.
Thanks! |
x86 - compare numbers and push the result onto the stack |
|x86|comparison-operators| |
```
typedef float float4 __attribute__((vector_size(16)));
float4 divvs(float4 vector, float scalar) {
return vector / scalar;
}
```
compiles to
```
// x86 gcc/clang -O3
shufps xmm1, xmm1, 0
divps xmm0, xmm1
// arm gcc/clang -O3
dup v1.4s, v1.s[0]
fdiv v0.4s, v0.4s, v1.4s
... |
Troubleshooting object instantiation based on role in PHP app |
{"Voters":[{"Id":20287183,"DisplayName":"HangarRash"},{"Id":1940850,"DisplayName":"karel"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[18]} |
Looking for some advice on a business order hypothetical. As per the attached image, a person orders some mobile phones and some N number of accessories. I'm looking to update the phones description based on quantity and what accessories have been orders for each order ID.
Eacher Order ID and Phone S/N are unique, a... |
I'm evaluating some Plan Cache behaviors and this is my scenario.
I'm running the following two queries separately:
```
SELECT TOP 10 *
FROM dbo.Countries CT
LEFT JOIN dbo.Continents CN ON CT.ContinentId=CN.ContinentId
WHERE CountryId='AR'
```
```
SELECT TOP 10 *
FROM dbo.Countries CT
LEFT JOIN dbo.Con... |
I'm trying to learn to use gui in java using eclipse ide.
When I run this code
```
import javax.swing.JOptionPane;
public class GUI {
public static void main(String[] args) {
String name = JOptionPane.showInputDialog("Enter your name");
JOptionPane.showMessageDialog(null, "Hello "+name);
}
... |
I was trying to predict some data with the tabular learner after building a model but i get an unexpected behavior when trying to do so: all the prediction are stuck on one value with a 100% confidence. This value changes randomly, but is always one and i don’t understand how i can solve this issue. As an example, this... |
FastAI predictions of the tabular learner don’t work |