on-internet

How to open Whatsapp group by clicking a button and getting its contact in a listview in android?

How to open any Whats App group at the click of a button and then get all the contact numbers in it in a list view? I am trying to open a group in whats app with the help of given code but when i click on this button nothing is showing. Intent intentWhatsapp = new Intent(Intent.ACTION_VIEW); String url = "https://chat.whatsapp.com/<link>"; intentWhatsapp.setData(Uri.parse(url)); intentWhatsapp.setPackage("com.whatsapp"); startActivity(intentWhatsapp); I think there can be two forms. 1- Either the WhatsApp group whose contacts we want to get is present in the WhatsApp in our mobile and we are a

Join the discussion →

Processing very large list of dataframes by chunks in R

Let's say I have a list of 1000 dataframes: 1000_dataframe_list And because of memory problems with spread(), I need to process this list by chunks. To process the whole list, I'm using: " out_df <- do.call(rbind.data.frame, 1000_dataframe_list) data_wide <- spread(out_df, Sample, expression) My idea is to process the list in chunks, then merge all chunks. As you can see, data_wide is a basically a matrix with the first column being rownames, but I don't think this matters very much. How can I process the 1000_dataframe_list in a way that I can divide it by any number of parts I need (10, 100,

Join the discussion →

How do I access a custom tag in a company's 10q filing?

My issue concerns how to access non us-gapp tagged company data in, for example, a 10-q for the ticker MSFT. See this 10q filing: https://www.sec.gov/ix?doc=/Archives/edgar/data/789019/000095017023054855/msft-20230930.htm Normally, I can just use the following code based on the us-gaap key to get the value: dep_amort_data = companyFacts.json()['facts']['us-gaap'].get('DepreciationDepletionAndAmortization', {}) However, some stocks, like MSFT, use custom tags for certain values: When substituting in 'msft' for 'us-gaap'(and the other language) in the previously stated code, no value is found, s

Join the discussion →

This exception was thrown because the response has a status code of 404 and RequestOptions.validateStatus was configured to throw for this status code

In flutter I tried to POST data using the DIO package, I posted some data: final response = await dio.post( "127.0.0.1/toko_grosir_api/create.php", data: { 'name': '${event.product.nameProduct}', 'price': '${event.product.priceProduct}', 'desc': '${event.product.descProduct}', 'stock': '${event.product.stockProduct}', 'date': '${event.product.dateProduct}', 'category': '${event.product.categoryProduct}' }, options: Options( contentType: Headers.formUrlEncodedContentType, ), ); and I am trying to receive data using PHP as Rest API with the following code: $nameProd = isset($_POST['name']) ? $_P

Join the discussion →

unable using C++23 with CMake+clangd+MSVC+VSCode

I'm using CMake generator and MSVC compiler with VSCode editor while programming C++, but something troubled me when I try to switch language support extension to clangd. It works correctly set CXX_STANDARD to C++20, but when I tried upgrading to C++23, CMake generates "-std:c++latest" instead of "-std:c++23" to compile_commands.json. In my source files, both macro __cplusplus and _MSVC_LANG equals to 201402L, not 2023xxL. (But I can normally compile C++23 features) Do CMake and clangd support c++23? I found that there was -std:c++23 support for Clang in its official documentation, But it eith

Join the discussion →

MessagePack: how to serialize without types information?

I try to serialize an object which contains a lists of another objects. I would like to send serialized data to front-end part of my application using SignalR. For serialization I use MessagePack library as a nuget package. My application is written in NET 8 (backend) and frontend uses ReactJS. I have tried serialize some data this way: var serializedData = MessagePackSerializer.Typeless.Serialize(graphic); But when I send this data over SignalR and in my browser I could see names of classes inside binary data like on the image below: (https://i.sstatic.net/qnmEM.png) In this image you could s

Join the discussion →

How to remove automatic highlighting of messages for reply in a telegram bot

After the dialogue with the bot is completely completed in a telegram conversation, the message from the bot is automatically highlighted for an answer. How to fix this? I use Python telebot library def screenshot_request(message, bot, problem, userstate, buttons): if message.text.lower() == 'да': bot.send_message(message.chat.id, 'Отлично! Отправьте фото скриншота:') bot.set_state(message.from_user.id, userstate.with_screen, message.chat.id) elif message.text.lower() == 'нет': problem_message = '\n'.join( [f"{key}: {value}" for key, value in problem.items()]) markup = buttons() bot.send_messa

Join the discussion →

WordPress URL rewriting; How to match URL parameters

I have URL: https://www.example.com/articles?page=2. I need to rewrite it to WordPress format: https://www.example.com/index.php?category_name=articles&paged=2. I tried with rewrite rule like this: add_rewrite_rule('^(.+?)\?page=([0-9]+)$', 'index.php?category_name=$matches[1]&paged=$matches[2]', 'top'); However this does not work. I have legacy CMS that I try to migrate to WP and I need to keep old URL structure. Suggestions?

Join the discussion →

python list.append with for loop

I was wondering if it is possible to add a for loop in a append function. used code now: for Master_ii in ExcelSheet_IO.iter_rows(min_row=3): if Master_ii[0].value != '': #Collect column A to S from excel in to Imported_Variables (A=[0]-X=[18]) Imported_Variables.append([Master_ii[0].value,Master_ii[1].value,Master_ii[2].value,Master_ii[3].value,Master_ii[4].value,Master_ii[5].value,Master_ii[6].value,Master_ii[7].value,Master_ii[8].value,Master_ii[9].value,Master_ii[10].value,Master_ii[11].value,Master_ii[12].value,Master_ii[13].value,Master_ii[14].value,Master_ii[15].value,Master_ii[16].valu

Join the discussion →

Pytrends Not working in 2024 using in Python

Currently I´m working in a project involving use of pytrends for extract data from google trends. Last month it worked fine but now It gets all times I tried the same error. pytrends.exceptions.TooManyRequestsError: The request failed: Google returned a response with code 429 The code for testing this is following one: from pytrends.request import TrendReq import pandas as pd # import plotly.express as px import time import json # Create pytrends object pytrends = TrendReq(hl='de-DE', tz=360) # 'De' means consider Germany as the search area # Set your keyword and time frame keyword = ['Analyti

Join the discussion →

ModuleNotFoundError: No module named 'aiogram'

I work in VS Code and I was asked to change the telegram bot script from python-telegram-bot library to aiogram. I've installed that via 'pip install aiogram' and still getting errors like ModuleNotFoundError: No module named 'aiogram' and I don't know what to do. import logging from aiogram import Bot, Dispatcher, types from aiogram.types import ParseMode from aiogram.utils import executor import requests TELEGRAM_BOT_TOKEN = 'XXXXXXXX' COINGECKO_API_KEY = 'XXXXXXXX' logging.basicConfig(level=logging.INFO) bot = Bot(token=TELEGRAM_BOT_TOKEN) dp = Dispatcher(bot) # Function to get token price

Join the discussion →

Is transatlantic or transpacific freighter travel still possible?

Before 2020, a small number of companies would offer a small number of passenger seats on freighters, including on transatlantic and transpacific routes. Have any returned post-pandemic or are they all permanently defunct? As of 2024: freightercruises.com notes that the only large-pre-covid provider has decided to permanently cease passenger services, langsamreisen.de notes that passenger transport on cargo ships is unfortunately still limited to a few active routes (between Europe and Africa or within Polynesia), zylmann notes only routes within Europe or between Europe and Africa, grimaldi n

Join the discussion →

Error "was named in package.xml, but was not found in zipped directory" on salesforce deployment

anyone here experienced facing this following issue on salesforce deployment process: ⁠An object '....' of type '.....' was named in package.xml, but was not found in zipped directory Already looking the answer from internet but still didn't found clear solution. And I got totally almost 1000 error like that hope anyone can help me to fix this. Thanks in advance ⁠

Join the discussion →

How to stop onclick action in JavaScript?

When the button is clicked, I want the spiners to appear for 3 seconds and then disappear. I can make it visible but I can't make it invisible again. function stoploading() { document.getElementById('loading').style.visibility = 'visible'; } <button class="btn btn-danger d-inline-flex align-items-center" type="button">ATTACK</button> <div class="col text-white m-5 px-5"> <div id="loading" class="spinner-border text-primary load_icon" role="status"> <span class="visually-hidden">Loading...</span> </div> </div> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bo

Join the discussion →

Visa on arrival in Egypt

We are travelling to Egypt on Sunday. My Wife is a Canadian/British citizen with a Canadian passport, but has the indefinite right of entry in it. Will she be able to get a visa on entry in Sharm El-Sheikh?

Join the discussion →

Getopt::Long, Optional Arguments, and Greediness

I'm trying to write a program that has an option that takes an optional argument, in such a way that it accepts options in the same fashion with the exact same behavior as perl -i or git --color. Unfortunately Getopt::Long doesn't exactly work that way and I can't get it to. Allow me to explain. Example #1: If you run perl -i .bak, it does not use .bak as a backup file extension for editing in-place, as perl -i.bak would. Example #2: If you run git diff --color always, it does not specify always for the --color option; for that you must use --color=always. I call that "non-greedy". I cannot fi

Join the discussion →

warning C5050 incompatible environments - _UTF8 defined in C++ 20 modules Qt project

I am working on a small project to get used to C++20. For the GUI I use Qt 6.5 and I split parts into hopefully meaningful modules. When building I get multiple warnings of the same kind and currently I am trying to clean up the code. But I realized I don't really understand how to fix the problem yet. The warning is warning C5050: Possible incompatible environment while importing module 'b3m.common': _UTF8 is defined in current command line and not in module command line And as I said, many of these are for every module consumed (some self-defined and some without a name, I assume these are t

Join the discussion →

401/Unauthorized while doing REST vs Coinbase Advanced Trade API/Javascript

I am querying coinbase advancedTrade using node/javascript, using their most recent v3 api. They recommend using axios, then implement an authentication scheme using jsonwebtoken. I have created an api token on coinbase, with appropriate trading permissions (a trading token), then I store it on a USB. This creates an appropriate Bearer token, as far as I can see. My definitions of secret and key names are ok, but I get a 401/Unauthorized. Here is my authentication routine and REST request, with an ensuing response. Code I am using, doing authentication before RESTful call. const axios = requir

Join the discussion →

Publish ASP.NET Core Razor Pages

Can't find a way to just publish a single cshtml page (no code-behind cshtml.cs involved). It feels like I'm missing something. This should be a super common thing to do. So, when I choose to publish single file option from VS, it deploys both cshtml and cshtml.cs files. But for Razor Pages, it all compiles to dll. There aren't actual pages after publish. So, it's possible to achieve this instead of publishing the whole project for small html changes? Thank you. Please see the screenshot

Join the discussion →

Stable Diffusion ComfyUI Problem with IPAdapter and Clip_vision

It has to be some sort of compatibility issue with the IPadapters and the clip_vision but I don't know which one is the right model to download based on the models I have. I located these under clip_vision and the ipadaptermodels under /ipadapter so don't know why it does not work. Error: Error occurred when executing IPAdapterApply: 'NoneType' object has no attribute 'encode_image' Error occurred when executing IPAdapterApply: 'NoneType' object has no attribute 'encode_image' File "C:\Users\Valknut\Documents\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute output

Join the discussion →

Unable to run haarcascade_frontalface_default.xml in docker

I have made a simple scala application that uses OpenCV-4.8.0 that extract face from image via Haar-Cascade (haarcascade_frontalface_default.xml). The above functionality working fine on local machine. Now I'm trying to achieve same functionality through dockerization, for this I've followed, following steps. Here is the build.sbt, in which we are creating an Image via sbt-native-packager and then installed OpenCV-4.8.0 via dockerCommands. import com.typesafe.sbt.packager.docker._ ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / scalaVersion := "2.13.4" lazy val root = (project in file(".")

Join the discussion →

ojAlgo MatrixR032 creation from string, normalization, and cosine similarity calculation

I have two comma delimited strings containing embeddings. Each index should be able to fit into a float and they are 128 elements long. I am following this linear algebra intro in the ojAlgo library. I'd like to convert the two strings to ojAlgo matrices, normalize them, and then compute their cosine similarity. I am testing with a single matrix first - I expect when I compute its cosine similarity it should be 1.0. PhysicalStore.Factory<Double, Primitive32Store> storeFactory = Primitive32Store.FACTORY; String dummyMatrixValues = "0.47058824,0.5647059,0.54901963,0.54509807,0.54901963"; Primiti

Join the discussion →

Windows 11, native 7zip support

Since win11 recently (in 23H2) added native support for rar/7zip/etc. is there any API to use those from c++ ? (Or it's just explorer thingy, that cannot be used by app) I need this for demoscene related purposes.

Join the discussion →

Oracle Java Platform Extension for Visual Studio Code : "Oracle Java SE Language Server not enabled!" error message

I installed on VSCode (Version: 1.85.0 - MacOS Ventura) the Oracle Java Platform Extension for Visual Studio Code and following the instructions I added to settings.json "jdk.jdkhome": "/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents" (using the provided JDK downloader) and "jdk.userdir": "global" then I restarted VSCode and tried the Java: New Project command. I am getting in the Output the following: Initiating server activation Request to kill LSP server. Cannot kill: current process is None Launching Oracle Java SE Language Server with /Library/Java/JavaVirtualMachines/zulu-11.jdk/C

Join the discussion →

GCP Dataform - Can't connect repository to Github via SSH

I have a working ssh key and when I try to connect Dataform to Github with it, I get the error "We are unable to connect to your Git provider with the configured credentials". There's no other information about the error. If there is, I'm not sure where to look. What I've done so far: Created a secret in GCP with the file selection left empty, and set the secret value as the private ssh key like the following: -----BEGIN OPENSSH PRIVATE KEY----- private_key -----END OPENSSH PRIVATE KEY----- Bound the secret to Dataform repository, and set the "Host public key" value as the following: ssh-ed255

Join the discussion →

Speeding up partition_point-based search

I've been recently doing a collection of lookups of indices that satisfy a given criterion as follows, some_vector.partition_point(|x| x < &el) In a loop that does millions of lookups for el in elements { let iloc = some_vector.partition_point(|x| x < &el); some_other_vec.push(iloc); } This works rather fine, however, it seems there might be a faster way to perform the iloc lookups still. What am I missing here? The some_vector is ordered. Note: using the partition point to find the amount of elements that satisfy a given criterion (= what is the bin that holds a given float el) - there might

Join the discussion →

django.db.utils.ProgrammingError: relation " " does not exist when running pytest

I am experiencing a very funny bug in Django. I have gone every way possible including resetting migrations. I have written a pytest for a Django project however the above error occurs when running. Accounts model class Account(AbstractBaseUser): email = models.EmailField(unique=True, verbose_name='email', max_length=255) phone = models.CharField(max_length=100, verbose_name='phone') first_name = models.CharField(max_length=100) last_name = models.CharField(max_length=100) id_number = models.CharField(max_length=100) role = models.CharField(max_length=100) date_joined = models.DateTimeField(au

Join the discussion →
Older stories