Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

General Hospital Comings & Goings: Mac Scorpio Is Back!

General Hospital comings and goings confirm John J. York is now back in the studio filming. And Mac Scorpio is officially on his way back to Port Charles on the ABC soap opera.

General Hospital Comings & Goings: John J. York Back to Work

GH casting news reports that John J. York’s back to work filming as Mac Scorpio after being on medical leave for about six months. John was diagnosed with two blood and bone marrow disorders — Myelodysplastic Syndromes and Multiple Smoldering Myeloma. 

He underwent chemotherapy and received a blood stem cell transplant and, thankfully, the treatment was a success. The Mac actor recently shared that he is currently filming new General Hospital episodes. So, that means we’ll see Mac back on the scene soon.

General Hospital Comings and Goings: Felicia Scorpio (Kristina Wagner) - Mac Scorpio (John J. York) - Cody Bell (Josh Kelly)
GH | ABC

Right now, he is away on police business but his wife, Felicia Scorpio, keeps giving updates, assuring everyone he’ll be coming home soon. Once he returns, the big question is, will he finally find out Cody Bell is his son?

GH Casting Changes: Mac Scorpio Comes Home

General Hospital updates see Mac Scorpio (John J. York) back home soon. He’s been away for months but he will be home shortly. GH films about six weeks out. So, we should see Mac on our screens again around mid to late June.

And the question on everyone’s minds is — will Cody Bell‘s (Josh Kelly) paternity finally come out? Currently, the only one who knows Cody is Mac’s son is Sasha Gilmore (Sofia Mattsson). Mac’s wifey, Felicia Scorpio (Kristina Wagner) had her suspicions.

She had a DNA test run at General Hospital. However, it seems someone rigged the test to say Cody is not Mac’s biological son  — which is what Cody wants. Because he lied about the original test results, he’s afraid Mac and the Scorpio family will never forgive him.

But, the truth will come out eventually and when it does, Mac will be in shock and likely a little angry. However, once he cools off, he’ll probably forgive Cody and be happy to have his son in his life.

General Hospital Casting Updates: Nicholas Chavez Out

In other GH casting changes, Spencer Cassadine actor, Nicholas Chavez, recently updated fans on his status. He loves his fans dearly and is beyond grateful for them. Furthermore, he believes his time on the soap is the reason he is so busy as an actor.

For now, there are no plans to bring him back to General Hospital as Spencer. But he would love to come back at some point and it appears the powers that be are open to the possibility.

Spencer’s body is still missing so he could easily come back from the dead. Indeed, the entire “Sprina” fanbase is eager for him to get back to his love, Trina Robinson (Tabyana Ali).

Hopefully, we will see him back sometime in the near future. GH is thrilling and full of drama. Don’t miss it to see the return of Mac Scorpio and if he’ll finally learn the truth about Cody on the ABC sudser.

Get all the latest General Hospital spoilers and casting updates daily from Soap Dirt.

The post General Hospital Comings & Goings: Mac Scorpio Is Back! appeared first on Soap Dirt.

Deploy Socket.IO, Express, Vue, Node.js using Docker

I am making a web application and planning to deploy it to AWS EC2 Instance using Docker (ECR -> ECS -> EC2).
In localhost, my Vue front-end is running on port 5173 and my back-end is running on port 5000.
This is how my app.ts in back end looks like:

import dotenv from 'dotenv';
dotenv.config();
import express from 'express';
import { createServer } from 'http';
import cors from 'cors';
import { Server } from 'socket.io';
import cookieParser from 'cookie-parser';
import path from 'path';

const app = express();
app.use(cors());
app.use(cookieParser());

const uri = process.env.MONGODB_URI!;
const port = process.env.PORT!;

app.use(express.static(path.join(__dirname, 'public')));
app.use(express.json());

app.get('*', (req, res) => {
    res.sendFile(path.join(__dirname, '../public/index.html'));
});

const server = createServer(app);

const io = new Server(server, {
    cors: {
        origin: 'http://localhost:5173',
        methods: ['GET', 'POST'],
        credentials: true,
    },
});

server.listen(port, () => {
    console.log(`Socket.io server is running on port ${port}`);
});

I have a socket.ts file beside the main.ts file in the front end which is used to connect the socket to the backend.

import { io } from 'socket.io-client';
const socket = io('http://localhost:5000');
export { socket };

I have set up the Dockerfile like this:

FROM node:latest as server
WORKDIR /srv/app
COPY ./server/package*.json ./
RUN npm install
COPY ./server .
RUN npm run build

FROM node:latest as client
WORKDIR /srv/app
COPY ./client/package*.json ./
RUN npm install
COPY ./client .
RUN npm run build

FROM node:latest as production
WORKDIR /srv/app
RUN mkdir /public
COPY --from=server /srv/app/dist ./
COPY --from=client /srv/app/dist ./public
ENV NODE_ENV=production
EXPOSE 5000
CMD ["node", "app.js"]

and compose.yml file:

services:
  app:
    container_name: app
    build: .
    env_file:
      - ./prod.env
    ports:
      - "5000:5000"
    expose:
      - 5000

How should I modify to get the socket.io working when deploy the docker image to AWS EC2 Instance?

lmdb read slow when file amout is a little larger

I installed lmdb from python:

python -m pip install lmdb

Then I write images into it, I have two settings, one is inserting 6800 images, and the other is 10000 images. All the images have size of 1024x2048, and they are in png format, and my memory size is 1T.

Here is part of the code piece with which I read images from it:

  def init_lmdb(self):
        self.env = lmdb.open(
                self.file_root,
                map_size=2**40,
                readonly=True,
                max_readers=512,
                readahead=False,
                )

    def get_bins(self, inds):
        im_bins = []
        with self.env.begin(write=False) as txn:
            for ind in inds:
                impth = self.im_paths[ind]
                im_bin = txn.get(impth)
                im_bins.append(np.frombuffer(im_bin, dtype=np.uint8))
        return im_bins

I used identical code to read from the two lmdb files, I found that the first lmdb with 6800 images needs about 9s to read 6400 images in random order, while the second lmdb with 10000 images requires 16s to read same amount of images in random order.

Would you tell me what is the cause of the difference ?

PS: I do not read images for only once. Actually, I read from only half of the images. For the lmdb with 6800 images, I only read from the 3400 of them. Also, for the lmdb with 10000 images, I only read from the subset of 5000 images. The images are read in random order, and images can be read more than one time. Until the total amount of read reaches 6400, I tested the time.

Can you hear the difference between Apple Music, Tidal and Spotify?

Focal Bowers and DALI headphones

It’s an age-old debate about music whenever new technologies come to the fore or whenever someone introduces a different way of listening to audio. Can you hear the difference?

When it comes to music streaming services that’s a question that’s frequently asked. You might expect all streaming services to sound the same, but we’d say that they are all different from one another.

We’d also assert that it’ll differ depending on your device, and what equipment you’re using too. Each chain in the link will have an effect.

Drivers have a bigger effect than the overall bit-rate

You’ll likely have heard a lot in the past few years about music providers trying to drive up the quality of audio, especially streamed audio.

Spotify still lags behind the rest with its 320kbps OGG Vorbis streams, which aren’t much higher in bit-rate than what iTunes was pumping out with its M4A streams at the turn of the century. Spotify Supremium should hopefully be coming soon to resolve this issue, but at the moment, Apple Music, Deezer, Qobuz, and Tidal all offer higher quality streams.

The marketing hook that’s been used to sell headphones is the uptake of higher quality Bluetooth codecs such as LDAC, aptX Apadative, and aptX Lossless (also known as Snapdragon Sound). This is all well and good, as Bluetooth does have a bandwidth problem and if you want to hear at the highest quality possible (say lossless audio), then that bandwidth pipe needs to be stretched open to allow more data through over a Bluetooth connection.

Dyson Zone angled drivers
Image Credit (Trusted Reviews)

However, this doesn’t matter as much as you think it does without high quality headphone or speaker drivers. Poor quality will ensure that detail, clarity, and overall resolution won’t make their way to your ears. Tracks may sound muddy or indistinct, even if they support tech like Snapdragon Sound because the drivers can’t pass through what’s in the signal.

The tuning of drivers will also have an effect on what you hear. Is it more of a neutral sound, a crisp, analytical performance or something that sounds warm and rich. These tuning decisions will have an effect too.

Really, it’s a combination of the driver, tuning, and technology used that will ensure a higher quality performance.

Each streaming service takes a different approach

Some may refute this point, but in our experience, each streaming service is tuned slightly differently in terms of how it sounds.

Qobuz is the clearest, most detailed sounding streaming service we’ve come across. Tidal sounds warmer than others, while Apple Music has a more neutral, if slightly dour tone that lacks the richness Tidal can offer. Spotify is similar, but its low bit-rate and compression also starves it of detail, definition, and dynamism.

Bowers Wilkins Panorama 3 Music app streaming
Image Credit (Trusted Reviews)

With Amazon Music, we’ve noticed that even when using the same equipment and listening to the same track, the bass can sound bigger. And there’s more to it than that, sometimes the soundstage is smaller (or bigger); other times a streaming service offers better top-end clarity. And listening on different platforms can also yield an effect. Qobuz and Tidal on an iPad sounded much more even, although Qobuz still bested its rivals in the detail and clarity stakes.

All of this is to say the quality of the streaming files, the signature of the streaming service, and how it’s delivered to your device of choice will have an impact.

It depends on the equipment you use

Do you use a portable DAC or a headphone amplifier? You’ll yield much better results with a device that can clean up and remove the noise from the signal before it passes through to your headphones.

Do you stream over Wi-Fi or Bluetooth, as that too can have an effect. The former often leads to higher levels of resolution, even with Spotify Connect, than you’d often find when streaming through Bluetooth.

And obviously if you’re using a music streamer, a higher quality one with premium parts will be able to do a better job than a cheaper one, but at some point you’ll hit a limit and it’ll become “much of muchness” in terms of how much you spend and how much performance you get back.

Cambridge CXN100 on mount
Image Credit (Trusted Reviews)

To hear the differences, every part of the chain needs to be strong without a weak link. Your source needs to be high quality, the connection between the source and the end device needs to keep the quality up and then whatever you’re listening through needs to make sure that what’s in the source at one end makes it all the way to your ears.

There are differences to be heard, some more nuanced than others. At the end of the day, it all depends on what you’re looking for. Is it an audiophile performance? Then that will guide you in one direction. Are you more a casual listener who’s not as interested in quality? Then that’s a different route too. In either case, if you like what you hear, that’s the most important thing.

Although it would be better if everyone listened in audiophile quality.

The post Can you hear the difference between Apple Music, Tidal and Spotify? appeared first on Trusted Reviews.

May 2024 Queer Romances

Bookshelves everywhere are getting ready for Pride Month, and these are just five of the glorious May Flowers that’ll get your spring blooming, if you know what I mean. (You know what I mean.)

Lavash at First Sight

Lavash at First Sight by Taleen Voskuni

Author: Taleen Voskuni
Released: May 7, 2024 by Berkley
Genre: , ,

Sparks fly between two women pitted against each other in this delectable new romantic comedy by Taleen Voskuni, author of Sorry, Bro.

Twenty-seven-year-old Nazeli “Ellie” Gregorian enjoys the prestige of her tech marketing job but is sick of the condescending Patagonia-clad tech bros, her micromanaging boss, and her ex-boyfriend, who she’s forced to work with every day. When Ellie’s lovingly overbearing parents ask her to attend PakCon—a food packaging conference in Chicago—to help promote their company and vie to win an ad slot in the Superbowl (no big deal), she’s eager for a brief change and a delicious distraction.

At the conference, she meets witty, devil-may-care Vanya Simonian. Ellie can’t believe how easy it is to talk to Vanya and how much they have in common—both Armenian! From the Bay Area! Whose families are into food! Their meet-cute is cut short, however, when Ellie’s parents recognize Vanya as the daughter of the owners of their greatest rival, whose mission (according to Ellie’s mother) is to whitewash and package Armenian food for the American health-food crowd.

Sworn as enemies, Ellie and Vanya must compete against each other under their suspicious parents’ scrutiny, all while their feelings for each other heat to sizzling temps.

Voskuni won me over with her witty, chemistry-filled debut and its unique homage to Armenian culture, so I’ve been anxiously awaiting the follow-up, and am delighted to see it promising many of the same vibes.

Add to Goodreads To-Read List →

You Should Be So Lucky

You Should Be So Lucky by Cat Sebastian

Author: Cat Sebastian
Released: May 7, 2024 by Avon
Genre: , ,

An emotional, slow-burn, grumpy/sunshine, queer mid-century romance about grief and found family, between the new star shortstop stuck in a batting slump and the reporter assigned to (reluctantly) cover his first season—set in the same universe as We Could Be So Good.

The 1960 baseball season is shaping up to be the worst year of Eddie O’Leary’s life. He can’t manage to hit the ball, his new teammates hate him, he’s living out of a suitcase, and he’s homesick. When the team’s owner orders him to give a bunch of interviews to some snobby reporter, he’s ready to call it quits. He can barely manage to behave himself for the length of a game, let alone an entire season. But he’s already on thin ice, so he has no choice but to agree.

Mark Bailey is not a sports reporter. He writes for the arts page, and these days he’s barely even managing to do that much. He’s had a rough year and just wants to be left alone in his too-empty apartment, mourning a partner he’d never been able to be public about. The last thing he needs is to spend a season writing about New York’s obnoxious new shortstop in a stunt to get the struggling newspaper more readers.

Isolated together within the crush of an anonymous city, these two lonely souls orbit each other as they slowly give in to the inevitable gravity of their attraction. But Mark has vowed that he’ll never be someone’s secret ever again, and Eddie can’t be out as a professional athlete. It’s just them against the world, and they’ll both have to decide if that’s enough.

Cat Sebastian, man. She is just so good at what she does. You cannot forget for a moment exactly what era you’re in when reading, to the extent I swear sometimes I feel like I’m on a movie set when I’m reading her work, it’s so immersive and consuming. This was a great followup to We Could Be So Good (with some lovely cameos!); I loved experiencing the ways both protagonists moved forward to forge a new future in the wake of unforeseen circumstances, wrapped up in a story of grief, journalism, and of course, baseball. Another home run from Sebastian, for sure.

 

Add to Goodreads To-Read List →

Second Night Stand

Second Night Stand by Karelia Stetz-Waters

Author: Karelia Stetz-Waters
Released: May 21, 2024 by Forever
Genre: , ,

One hook-up is about to become one seriously hilarious situationship in this vibrant and lively romantic comedy about taking chances . . . and breaking the rules.

Prima ballet dancer Lillian Jackson is all about control—on stage and in bed. Which is precisely why she keeps her hook-ups to one night, and one night only. No strings. No phone numbers. No scones in the morning. There’s no room for mistakes, especially now that her dance company’s survival depends entirely on winning a million-dollar cash prize in one of America’s biggest reality competitions. That is, until one night with a certain curvy, blue-haired siren changes everything . . .

As burlesque dancer “Blue Lenox,” Izzy Wells is the queen of on-stage seduction. Almost no one knows that she’s close to losing everything—her theater, her home, and her troupe—unless she wins this competition. Now she’s going toe-to-toe with a gorgeous ballerina in front of the world. The chemistry between them is hot, but even more distracting are the feelings they’re starting to develop. There’s no way Lillian can fit Izzy into her life, and Izzy knows better than to fall for someone who can’t put her first. But if they can make it through the show with their hearts and dreams intact, they just might win the biggest prize of all.

I have such a soft spot for real-life couples writing together, but I’m not sure I’ve ever felt the actual love bleeding from the pages the way I did reading this first collaboration between the Stetz-Waters duo. The pairing of Lillian and Izzy is Opposites Attract to the max, but in the most “You complete me” way imaginable that has you knowing that when one of them has a bad day, she’s going to sink into the other’s arms and it’ll make it all better. Yes, this book made me sappy, and I am not ashamed.

Add to Goodreads To-Read List →

Nearlywed

Nearlywed by Nicolas DiDomizio

Author: Nicolas DiDomizio
Released: May 21, 2024 by Sourcebooks Casablanca
Genre: , ,

An engaged couple’s compatibility is put to the test during their ill-fated early honeymoon in this smart, dazzling, and provocative summer comedy perfect for fans of People We Meet on Vacation.

5 Signs You and Your Fiancé Might Be Secretly Incompatible…and #3 Will Shock You!

Ray Bruno and Kip Hayes are horrible on paper. Ray is a chaotic millennial ex-clickbait-writer who’s been oversharing his every thought online since he was a teenager, and Kip is a pragmatic Gen X doctor who values privacy above all else.

But somehow it all manages to work…until Ray convinces Kip to join him for an early honeymoon at a famous lux resort in Ray’s coastal New England hometown, eschewing the tradition of bachelor parties and hoping to recharge before their end-of-August wedding. When a surprising encounter with another couple at the resort leads to a series of escalating mishaps and miscommunications, Ray and Kip are forced to look at their many differences in a stark new light, turning the trip into less of a vacation and more of a test: will they be able to work through their issues in time for the big day? Or is this marriage over before it begins?

You generally know a book by Nicolas DiDomizio is going to result in some literal LOLs (and this one definitely did), but I think this is also the first standalone romance I’ve ever read where the couple is committed to each other before the book begins. I’ll admit I went in a little skeptical; it’s hard to make readers care about a couple when you didn’t see them get together, and harder to have a plot that doesn’t revolve around wild, unbelievable miscommunications. But DiDomizio handles both with aplomb, centering communication issues on the characters themselves, and the way both their pasts and their respective generations’ (Millennial and Gen X, in this case) experiences of queerness have shaped them.

Add to Goodreads To-Read List →

A Little Kissing Between Friends

A Little Kissing Between Friends by Chencia Higgins

Author: Chencia Higgins
Released: May 28, 2024 by Carina Adores
Genre: , ,

Music producer on the rise Cyn Tha Starr knows what she likes, from her sickening beats in the studio to the flirty femmes she fools around with. Her ever-rotating roster has never been a problem until her latest fling clashes with Jucee, her best friend and the most popular dancer at strip club Sanity.

It makes Cyn see Jucee in a different light. One with far fewer boundaries and a lot more kissing.

Juleesa Jones makes great money dancing the early shift and spends most evenings with her son, her Sanity family or at Cyn’s house. Relationships are not high on the priority list—until she’s forced to admit that maybe friendship isn’t the only thing she wants from her bestie.

But hooking up with your ride-or-die is risky. Jucee isn’t just Cyn’s best friend—Jucee is her muse. When Cyn lays down her beats, it’s Jucee she imagines in the club throwing it back to every note. If they aren’t careful, this could crash and burn…but isn’t real love worth it?

Higgins’ followup to the much-beloved D’Vaughn and Kris Plan a Wedding looks absolutely delightful. Best friends with benefits turned best friends to lovers between a music producer and a dancing single mom? The stakes are real, and so’s the potential for something serious. Something tells me this is gonna be the kind of romance novel that makes you do that little squeal with your legs kicking in the air.

Add to Goodreads To-Read List →

Microsft Visual Studio window doesn't show up

Image link

So I've just installed Microsoft Visual Studio to my new computer, now that I've opened it for the first time I can't see the main window where you're supposed to write code in!

I've opened multiple type of projects and the thing doesn't work either, I'll leave an image over this. After the installer finished installing, it gave an error -2146233033, as the package installer data was corrupted it said, but after going to the installer again to reinstall what I needed, the notice disappeared, thought I don't know how much influenced and if that's why the main code window doesn't appear.

Mouse Hovering/Mouse Clicked over image p5.js

I am trying to create the experience of playing a hand drum. The idea is that the user picks up the drum mallet, hovers it above the drum, and if the user clicks again the drum plays the audio. Is this possible? I have found a lot of resources about shapes, specifically ellipses, but not a lot of information about images.

var drum, mallet;
var x, y, w, h; // Location and size
let dragging = false;
let rollover = false;
let img;
let vel;
let pos;

function preload(){
  
  strike = loadSound('HandDrum.mp3');
  drum = loadImage('handdrum2.png');
  mallet = loadImage('drumMallet.png');
  
 
  
}
function setup() {
  createCanvas(750, 500);
  

  //Dimensions for Moving Stuff
  x = 400;
  y = 100;
  w = 300;
  h = 300;


}

function draw() {
  
  background(220);
  
  tint(219,69,69,250);
  image(drum,125,95,400,400);
  tint(82,217,198);
  //image(mallet,350,100,width/2,height/2);
  
   
  if (mouseX > x && mouseX < x + w && mouseY > y && mouseY < y + 2) {
    rollover = true;
  } else {
    rollover = false;
  }
  // Adjust location if being dragged
  if (dragging) {
    x = mouseX + offsetX;
    y = mouseY + offsetY;
   
  }
  image(mallet, x, y, w, h);
  
}
 

function mousePressed() {

  if (mouseX > x && mouseX < x + w && mouseY > y && mouseY < y + h) {
    dragging = true;
    offsetX = x - mouseX;
    offsetY = y - mouseY;
  }
}
function mouseReleased() {
   //Quit dragging
   dragging = false;

}

[![drum mallet image][1]][1] [![Handdrum Image][2]][2] [1]: https://i.sstatic.net/37AZH5lD.png [2]: https://i.sstatic.net/Im5H1nWk.png

Dependency alias 'androidx-material3-adaptive-navigation-suite' is not used in build scripts

I'm trying to implement the Navigation Suite library provided by Material Design 3 for my Jetpack Compose Project but after several gradle syncs, a warning won't go away.

build.gradle.kts (:app)

plugins {
    alias(libs.plugins.androidApplication)
    alias(libs.plugins.jetbrainsKotlinAndroid)
}

android {
    namespace = "com.plaireapps.demonavigationsuite"
    compileSdk = 34

    defaultConfig {
        applicationId = "com.plaireapps.demonavigationsuite"
        minSdk = 30
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary = true
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.1"
    }
    packaging {
        resources {
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }
}

dependencies {

    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.lifecycle.runtime.ktx)
    implementation(libs.androidx.activity.compose)
    implementation(platform(libs.androidx.compose.bom))
    implementation(libs.androidx.ui)
    implementation(libs.androidx.ui.graphics)
    implementation(libs.androidx.ui.tooling.preview)
    implementation(libs.androidx.material3)
    testImplementation(libs.junit)
    androidTestImplementation(libs.androidx.junit)
    androidTestImplementation(libs.androidx.espresso.core)
    androidTestImplementation(platform(libs.androidx.compose.bom))
    androidTestImplementation(libs.androidx.ui.test.junit4)
    debugImplementation(libs.androidx.ui.tooling)
    debugImplementation(libs.androidx.ui.test.manifest)
}

libs.versions.toml

[versions]
agp = "8.3.2"
kotlin = "1.9.0"
coreKtx = "1.13.0"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
lifecycleRuntimeKtx = "2.7.0"
activityCompose = "1.9.0"
composeBom = "2024.04.01"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-material3-adaptive-navigation-suite = { module = "androidx.compose.material3:material3-adaptive-navigation-suite-android", version = "1.0.0-alpha06" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }

Warning returned

Dependency alias 'androidx-material3-adaptive-navigation-suite' is not used in build scripts

How to use gRPC with cloudflare+nginx+fabio?

I have a gRPC Java app and I configured Fabio to balance the load (I will be running 2+ instances of app) and CloudFlare for proxy.

What I have done so far:

Nginx reverse proxy setup

server {
    listen [::]:443 ssl http2 ipv6only=on;
        listen 443 ssl http2;

    server_name grpc.example.com;

    location /{
        grpc_pass grpc://127.0.0.1:9999;
    }
        ssl_certificate /etc/letsencrypt/live/grpc.example.com/fullchain.pem; 
        ssl_certificate_key /etc/letsencrypt/live/grpc.example.com/privkey.pem;
        include /etc/letsencrypt/options-ssl-nginx.conf;
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

}

CloudFlare setup:
Grpc is enabled

Subdomain configuration for domain (IP is random in picture)
subdomain

Fabio setup
gRPC app runs in a Docker container

running app

When I connect to this server using gRPC client, I get nginx error "502 Bad Gateway".

I can see from access.log that request actually reaches with http/2.0 but I am confused and I don't know where to look for problem.

Also error.log shows this for requests:

2022/12/12 23:38:45 [error] 506072#506072: *1020 upstream sent too large http2 frame: 4740180 while reading response header from upstream, client: 61.142.22.151, server: grpc.example.com, request: "POST /Syncer/doUpdate HTTP/2.0", upstream: "grpc://127.0.0.1:9999", host: "grpc.example.com:443"

RStudio Cannot Knit

(https://i.sstatic.net/K77BkeGy.png)

I switched from an Intel Mac to an M3-pro Mac a couple of weeks ago. I migrated everything from the old laptop to this new one, including R and RStudio. Knitting worked perfectly fine on the old laptop, and, however, does not work at all on my new laptop.

I keep getting the error message as shown in the image attached. I have tried reinstalling R and RStudio but neither works.

Could somebody please help look at this? I couldn't find anything related to this error message online.

output file: Homoework-8.knit.md

! Undefined control sequence. \tl_trim_spaces:e {__keys_remove_equals:n { }} l.266 \edef \Gin@driver{\Gin@driver} Error: LaTeX failed to compile Homoework-8.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Homoework-8.log for more info. Execution halted

How to yield control back to the event loop

import asyncio

async def long_running_task():
    try:
        while True:
            # Your long-running processing
            if asyncio.current_task().cancelled():
                raise asyncio.CancelledError
    except asyncio.CancelledError:
        print("Task was cancelled")

async def main():
    task = asyncio.create_task(long_running_task())
    await asyncio.sleep(5)  # Let the task run for 5 seconds
    task.cancel()  # Cancel the task
    print("cancelled")

asyncio.run(main())

task.cancel() never gets called because it is single threaded and long_running_task() never awaits anything.

(In my real problem, I have a blocking calls, which I don't want to run if the task is already cancelled. But the task never gets cancelled, because they are running).

How do I make this concurrent?

Why can't I make a get-request with aiohttp: Expecting value: line 1 column 1 (char 0)?

Why do I see an error

Error while making request to https://data.similarweb.com/api/v1/data?domain=httpbin.org: Expecting value: line 1 column 1 (char 0)

with aiohttp while requests.get returns the correct json?

import aiohttp
import asyncio
import nest_asyncio

nest_asyncio.apply()

async def fetch(session, url):
    try:
        async with session.get(url, headers=headers) as response:
            return await response.json(content_type=None)
    except Exception as e:
        print(f"Error while making request to {url}: {str(e)}")

async def fetch_all(urls):
    async with aiohttp.ClientSession() as session:
        tasks = []
        for url in urls:
            tasks.append(fetch(session, url))
        responses = await asyncio.gather(*tasks, return_exceptions=True)
        return responses

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
}

urls = ['https://data.similarweb.com/api/v1/data?domain=' + 'httpbin.org']

responses = asyncio.run(fetch_all(urls))

httpbin.org/headers returns exactly the same headers with the only difference in X-Amzn-Trace-Id value.

How to turn on higher quality LDAC streaming on Nothing Ear

Nothing Ear A on table listening to music
Nothing Ear A on table listening to music

Nothing has produced several excellent sets of wireless earbuds, and this guide will ensure you’re getting the best audio possible.

A number of the Ear models, including the Ear (a) and Ear, have support for LDAC, a Sony-developed audio codec that allows for higher-res streaming than traditional Bluetooth.

This isn’t on by default, but it’s easy to enable it, and all the steps are detailed below.

What you’ll need: 

  • Nothing Ear, Ear (2) or Ear (a)
  • A supported Android device

The Short Version 

  • Open the Play Store
  • Download the Nothing X app
  • Open Nothing X
  • Ensure your buds are connected
  • Tap the Settings icon
  • Toggle on High-Quality Audio
  • The buds will reboot
  1. Step
    1

    Open the Play Store

    to begin, you’ll need to find the Nothing X app. Open up the Play Store on your Android phone and search for Nothing X. You might also get a nudge to get the app the first time you connect the buds.Nothing Ear how to step 1

  2. Step
    2

    Download the Nothing X app

    Once you’ve found the app, download and install it.Nothing Ear how to step 2

  3. Step
    3

    Open Nothing X

    All the sound options are inside the app, so open it up once it has been downloaded and installed.Nothing Ear how to step 3

  4. Step
    4

    Ensure the buds are connected

    You’ll need to make sure your Nothing buds are connected, you can do this by opening the case or popping them in your ears.Nothing Ear how to step 4

  5. Step
    5

    Tap the Settings icon

    Tap the Settings icon inside the Nothing X app – the cog signifies this.Nothing Ear how to step 5

  6. Step
    6

    Toggle on High-Quality Audio

    There are numerous options here, but we’re looking for the one called High-Quality Audio. Toggle the option on. Nothing Ear how to step 7

  7. Step
    7

    The buds will reboot

    Once the above option has been toggled, the buds need to be rebooted. After this, they are ready to use.Nothing Ear how to step 8

Troubleshooting

How can I check if my phone supports LDAC?

Our guide on ensuring LDAC is enabled on your Android 8 device or newer will let you know how to make sure it’s enabled.

Does this work on the Nothing X app for IOS?

Nope, this option is only supported on Android devices.

The post How to turn on higher quality LDAC streaming on Nothing Ear appeared first on Trusted Reviews.

How to register a user in agora chat service and generate token with authentication?

please help me for how to register a user for flutter in agora chat

I am trying to integrate messaging/chat in my application, using Agora Chat.

The frontend is made in flutter. The backend is made in NodeJS and I struggle with the NodeJS part.

As I understand it, I must first register my users in Agora Chat and then, they will be able to exchange messages.

There is the Restful API explaining how to do that. But curiously, Agora does not seem to provide a ready-to-use client for the backend part. At least, not in NodeJS, which I find weird. Did I miss something? I am not the first to have this problem.

Download multiple azure blobs asynchronously

I am trying to improve the speed of downloading blobs from Azure. Using the package examples from azure, I have created my own example. However, it only works for a single file. I want to be able to pass in multiple customers in the form of a customer_id_list(commented out below) so that the files can be downloaded at the same time. However, I am unsure how to scale the aiohttp code to achieve this.

import asyncio
from azure.storage.blob.aio import BlobServiceClient

async def download_blob_to_file(blob_service_client: BlobServiceClient, container_name, transaction_date, customer_id):
    blob_client = blob_service_client.get_blob_client(container=container_name, blob=f"{transaction_date}/{customer_id}.csv")
    with open(file=f'{customer_id}.csv', mode="wb") as sample_blob:
        download_stream = await blob_client.download_blob()
        data = await download_stream.readall()
        sample_blob.write(data)


async def main(transaction_date, customer_id):
    connect_str = "connection-string"
    blob_serv_client = BlobServiceClient.from_connection_string(connect_str)

    async with blob_serv_client as blob_service_client:
        await download_blob_to_file(blob_service_client, "sample-container", transaction_date, customer_id)

if __name__ == '__main__':
    transaction_date = '20240409'
    customer_id = '001'
    # customer_id_list = ['001', '002', '003', '004']
    asyncio.run(main(transaction_date, customer_id))

❌
❌