EF Core expression with object instead of generic parameter

I have a method which searches for an entity, and optionally loads navigation properties: public async Task<Person?> FindPerson<TProperty>(string name, params Expression<Func<Person, IEnumerable<TProperty>>>[] includes) where TProperty : class { var person = await Find(name); if (person != null) { foreach (var include in includes) await _context.Entry(person).Collection(include).LoadAsync(); } } (Note that is a very simplified version of … Read more

How to customize SwiftUI’s Menu Buttons?

iMessage has this Menu if you tap on the More Button. How to make something similar in SwiftUI? I tried using ControlGroups and Custom ControlGroup style but I just can’t make it work properly. Any help would be appreciated! I’ve tried this: struct CustomControlGroupStyle: ControlGroupStyle { func makeBody(configuration: Configuration) -> some View { HStack { … Read more

Blazor Server : How do i generate href dynamically

I am using Blazor Server Project with .net 7. I want to render the following link in my grid grows. Here the need is that only when user click the button, i want to run the code that will compose SAS token with URL and the it should open this dynamically generated URL, which has … Read more

How can I get more than 4GB for my macOS application?

I am coding in C using Xcode on a MacBook. The following program runs fine with n=1073741823 and gives EXC_BAD_ACCESS (code=1, address=0x200007ffc), if I increase the value of n by 1. #include <stdio.h> #define n 1073741823 int array[n]; int main(int argc, const char * argv[]) { printf(“\n Size of array = %lu\n”, (unsigned long) n*sizeof(int)); … Read more

Google map embed Iframe is not working ?? 2023

The embed is not showing the virtual tour its is instead showing the map of the entire world.this problem started on 10th November 2023 ,can any one give me any update in this please click to see the problem is it a problem with google maps or am i doing something wrong in the embed, … Read more

How to shorten ‘Decimal’ typename to ‘D’ on the output

For example, if I have a lot of type Decimal elements: from decimal import Decimal D = Decimal # Generating a very log list of Decimal numbers very_long_generated_list = [D(‘1.0’), D(‘2.9’), D(‘3.8’)] print(very_long_generated_list) Will produce: [Decimal(‘1.0’), Decimal(‘2.9’), Decimal(‘3.8’)] Visually parsing output with all those “Decimal” strings is quite tedious, especially if there are mathematical operations, … Read more

Could not execute CreateTable in path `en_catalog`.`flinkdb`.`en_trans` java.lang.UnsupportedOperationException

I am trying to use JDBCCatalog for durable catalog, but i’ve gotten error while creating table. I am just trying to have durable table whenever login to sql client session, it’s link to my previous issue which advised by them CREATE CATALOG tadika_catalog WITH( ‘type’ = ‘jdbc’, ‘default-database’ = ‘flinkdb’, ‘username’ = ‘flink’, ‘password’ = … Read more

How to conditionally modify exports from an ES6 Javascript module

I’m wondering if it’s possible to somehow still access the module exports of an ES6 module from within the module, like you do in CommonJS with module.exports. For clarity, I have a js module (Config.js) that I use to export all of my config variables like so. export const DatabaseName = “myDbName”; export const DatabasePort … Read more

Compressed std::expected

std::expected is a discriminated union introduced in C++23 that can be seen as a generalization of std::optional in that it stores an error value when std::optional would be empty. Now, I figure that a lot of types already have unused storage when they are invalid or empty. A simple example would be std::span, which stores … Read more

SAS Macro Dereferencing

Following macro variables are declared: %let x=2; %let y=3; %let x3=4; %let y2=5; %let x2=6; %let y3=7; %let m=x; %let n=y; What will following dereferencing evaluate to : i.&&&m&y – &&&n&y ii.&&&m&x&&&n&y What do you get when you run it? –  1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 68 69 %let x=2; 70 %let y=3; 71 … Read more