MySQL SELECT query in CodeIgniter WHERE a comma-separated column contains a...
This is my mysql query:$acountry = 1;$this->db->where_in('varcountry', $acountry);$val = $this->db->get('tblagencies')->result();In database table the varcountry filed is stored like...
View ArticleClang-format style rules for parentheses and access modifier
I trying to write my own clang-format style file. There are two aspects I cannot get them right.How do I let it keep an empty line after public:, private:, protected:? For example, I would like to...
View Articlehow to loop through files that match a regular expression in a unix shell script
I want to be able to loop through a list of files that match a particular pattern. I can get unix to list these files using ls and egrep with a regular expression, but I cannot find a way to turn this...
View Articleheaders not working at a kernel level on eBPF code
So I'm developing something on eBPF.I needed to use the unistd.h header because I wanted to use sleep function. However, I realized that when I type in#include <unistd.h>these headers don't get...
View ArticleHow do I increase the font for Visual Studio 2022 Search Screen
When I hit CTRL + F, the following window for search pops up, but the font is relatively very small to the main window. How do I fix this?
View ArticleC# json.deserialize a json with a value that is sometimes a string, sometimes...
I receive a series of json files which are not standarized, and a specific field is always a number, but sometimes quoted and sometimes unquoted.e.g: sometimes:{"skinname": "Classic Red","drivername":...
View ArticleHow to Set Up ESLint, Prettier, and TypeScript in React Native - Initial...
I would like to ask about the initial setup for ESLint, Prettier, and TypeScript in React Native. Currently, I am using absolute paths to specify components. Could you please confirm if I am using this...
View ArticleHow to "fix" code search in VS2022 V17.8? (I want the old search back)
For years when I typed CTL+, I could search for a file and if I typed most of it's name then it'd be the first item in the list and I could hit enter and I'm looking at the code.But just recently...
View ArticleWhy beforeLoad is not getting the updated context value in tanstack router?
I have a file structure like this:.📂 routes/├──📂 _authenticated/│├──📂 projectManager/││├── addClient.tsx││└── addProject.tsx│└── _projectManager.tsx├──📂 _authentication/│├── login.tsx│└── signUp.tsx├──...
View ArticleASP.NET MVC and Razor to not display anything if current year
I have this code in a .cshtml file@if (Model.YearsInBusiness > 1){<div class="in-business mt15" style="width:100%; float:left"><span class="badge" style="color:white;...
View ArticleMAUI Android Fine location permission is not asked even though...
I have a MAUI mobile app that needs fine location and background location permissions. I have added all required entries to AndroidManifest.xml including ACCESS_FINE_LOCATION. But when I request...
View ArticleCORS problem while sending request to netlify dev server
I'm working on a chrome devtools panels extension. In it I have:const toDbBtn = document.getElementById("toDbBtn");toDbBtn.addEventListener("click", async () => { const dbName =...
View ArticleHow to give a fixed width to one row's table cell, with the other cell being...
I have the following table:-<html><table style="table-layout: fixed; width: 100%; color: black; bgcolor='#e6f8d6';" border="1" cellpadding="4" cellspacing="4"><tbody><tr><td...
View Articlehow to use jinaai/jina-embeddings-v2-base-en with trust_remote_code=False
I am using jinaai/jina-embeddings-v2-base-en model to generate embeddings for vector search. Following is my code to generate embeddings using the jinaai model:from transformers import AutoModelimport...
View ArticleWhy doesn't JavaScript's garbage collector clean up global variables?
I've been reading an article about memory management in JavaScript, and it says that the global scope objects don't get cleaned from the memory.If a global variable is not being referenced anywhere...
View ArticleCannot pickle local function when sending callable Filter objects via...
Problem DescriptionI'm developing a FilterBroker class that manages callable filters for subscriber processes. The broker receives functions wrapped in a Filter object via a message queue. However, I'm...
View Articleawk to extact a block of text
I am trying to figure out an awk command/script to extract a block of text from a large file. The file subsection I am interested in is this: Board Info: #512 Manufacturer: "Dell Inc." Product:...
View ArticleASP.NET Core Web API authorization
I am working through a book on ASP.NET Core Web API and I am trying to implement authorization.Here is my Program.cs:var builder = WebApplication.CreateBuilder(args);var connString =...
View ArticlePostgres CTE with insert and update of same row
I have a table with auto generated id like below :CREATE TABLE wf_policy( id BIGSERIAL PRIMARY KEY, name TEXT NOT NULL, time BIGINT, ver BIGINT );I want to insert a new entry in this table and then...
View ArticleCan't automate writing an image from my Tektronix MSO24 Oscilloscope to my...
I am working on an automation script in python and I am trying to take a screenshot of my oscilloscope then transfer it over to my PC. I have gotten to the point where I am able to take a screenshot on...
View ArticleHow can I use data from 1 table and then INSERT into a second using data as a...
I am trying to build queries to take data from table_1:idpathcurr_value1nameCompany ABC2address123 Main St3nameCompany 123And use it as the value AND column header for table_2 in SQL.Please note,...
View ArticleHow to handle different Node.js versions between Docker and the local machine...
I have a Next.js project dockerized for local development, but the Node version inside the Docker container differs from the one on my local machine. The image contains Node 18, while my local machine...
View ArticleHow can I sort order of index based on my preference in multi-index pandas...
I have a pandas dataframe df. It has multi-index with Gx.Region and Scenario_Model.The Scenario_Model index is ordered in alphabetical order des, pes, tes. When I plot it, it comes in the same order....
View ArticleHow do I get a list of stored procedures from a linked server?
I am trying to do a backup of all stored procedures and tables from one database server to another. I want to get a list of stored procedures and tables that exist in the destination database so I can...
View ArticleApplying back pressure while receiver and consumer are differen threads...
I am struggling to implement something and am hoping to get some guidance here.We are switching to ASB and need to fit our incoming message processing into an existing framework.Our requirements are...
View ArticlePage that includes a list not not updating state while using...
I am building an app that scans a barcode and after scanning the barcode it routes to another page where it displays the results. It also updates those results to a list. The scan page is set up in...
View ArticleHow to get MUI TextField to automatically Unicode-normalize input text?
I work with linguistics software, and it's important for me to be able to normalize (usually with NFC or NFD) all text inputs from a user session. Is there a simple way to force all Material UI...
View Articlegoogle.api_core.exceptions.PermissionDenied: 403 Not allowed, access denied...
I am trying to create a Cloud Run Function - it reads csv file from GCS Bucket, call DLP API to de-identify the columns and then save it to Bigquery.File size is not big, it is only few mbs and memory...
View Articleionic ios - build works fine from xcode but not via cli
I'm trying to build my Ionic Cordova app.Building it from Xcode 16.3 with iOS SDK 18.4 works fine when I set these parameters:Build Active Architecture Only => YESExcluded Architectures =>...
View ArticleTask code being called twice for revenuecat code
I have the following code. The self.purchase code inside the Task {} is being called twice. Even though the rest of the code above is called once. Can someone please help?@MainActor func...
View Article