Random snippets of all sorts of code, mixed with a selection of help and advice.
Mapperly from Linq join ignores subsequent object property mapping
3 June 2026 @ 2:38 pm
I am having trouble with Mapperly mapping a DTO whose source is a JOIN of two objects.
public class A
{
public int Id { get; set; }
public string AA { get; set; }
}
public class B
{
public int AId { get; set; }
public string BB { get; set; }
}
public class TheDTO
{
public string AA { get; set; }
public string BB { get; set; }
}
[Mapper]
public partial class TheDtoMapper
{
public partial TheDTO Map(A a, B b);
}
And then I call the mapping as follows:
List<A> AA = new List<A> {
new A { Id = 1, AA = "alpha" },
new A { Id = 2, AA = "beta" }
};
List<B> BB = new List<B> {
new B { AId = 1, BB = "gamma" },
new B { AId = 2, BB = "delta" }
};
var mapper = new TheDtoMapper();
var result = AA
.Join(BB, (a) => a.Id, (b) => b.AId, (a, b) =>
Issue with initState() in flutter
3 June 2026 @ 2:28 pm
Issue with the build method when using Widget? to declare activeScreen
I get the error as follows - A value of type 'Widget?' can't be returned from the method 'build' because it has a return type of 'Widget'. I'm learning flutter at the moment and trying to figure out how to lift state up and render content conditionally.
Please advise what am I missing here. My code base is as below -
import 'package:adv_basics/home_screen.dart';
import 'package:adv_basics/questions_screen.dart';
import 'package:flutter/material.dart';
class QuizPage extends StatefulWidget {
const QuizPage({super.key});
@override
State<QuizPage> createState() {
return _QuizPageState();
}
}
class _QuizPageState extends State<QuizPage> {
Widget? activeScreen;
@override
void initState() {
super.initState();
activeScreen = HomeScreen(switchScreen);
}
void switchScreen() {
setState(() {
activeScreen = const QuestionsScreen();
});
How to make PublicClientApplication from @azure/msal-browser perform a successful loginPopup in Angular v20+
3 June 2026 @ 2:17 pm
Does someone have ever managed to make PublicClientApplication from @azure/msal-browser perform a successful loginPopup in Angular v20+ ? Whatever I've tried so far, it opens the popup, successfully authenticates and redirects popup window with the access code in location.hash , but the popup never closes, as if MSAL was unable to read it from main window.
My case: I don't need MSAL to perform my main API authentication, nor route protection. I only need to retrieve some information using Microsoft Graph API for a specific functionality inside my Angular App. So I don't need all the bells and whistles of @azure/msal-angular.
What I did so far:
I initialized an Angular Application with these dependencies in package.json:
"@angular/cdk": "^21.2.13",
"@angular/common": "^21.2.0",
"@angul
Opinion about Le Wagon
3 June 2026 @ 2:15 pm
Could anyone share their experience or opinion about Le Wagon's online courses?
I am particularly interested in the Data Analyst track and would love to hear some real feedback from alumni of this program.
I have a few specific questions:
1.How effective is the online learning format? Is it well-structured, and do you get enough hands-on practice and feedback from the mentors?
2.Does the bootcamp actually provide strong career support and help with job placement (e.g., CV building, interview prep, connecting with partner companies)?
3.Realistically, how quickly do graduates manage to land their first job in the field after finishing the course?
I would really appreciate your honest opinions and any pros and cons you personally experienced! Thanks in advance!
Unable to get a valid response from Sailpoint Identities API endpoint
3 June 2026 @ 2:10 pm
I have API credentials created with the scopes idn:identity:read and idn:identity:manage. I'm able to get the Bearer token by accessing the tenant's endpoint (https://<tenant>.api.identitynow.com/oauth/token).
But when I access the list identities endpoint (https://<tenant>.api.identitynow.com/v2026/identities) using this Bearer token, I get the below response:
{
"detailCode": "403 Forbidden",
"trackingId": "<trackingid>",
"messages": [
{
"locale": "en-US",
"localeOrigin": "REQUEST",
"text": "The server understood the request but refuses to authorize it."
},
{
"locale": "en-US",
"localeOrigin"
Run Konsole, Split, and Focus with one shortcut
3 June 2026 @ 2:03 pm
I am using Fedora KDE Plasma Wayland. I am very new to this. In Fedora 43, I was on X11 and the script below worked perfectly.
The thing I am trying to accomplish is when I hit Meta + Return;
- If Konsole not running, launch
- If Konsole running in background, focus
- If Konsole running in focus, run split automatically function which has a default shortcut of ctrl + *
#!/usr/bin/env bash
set -euo pipefail
split_key='ctrl+KP_Multiply'
# Görünür herhangi bir Konsole var mı?
if xdotool search --onlyvisible --class konsole >/dev/null 2>&1; then
active="$(xdotool getactivewindow 2>/dev/null || true)"
active_class="$(xdotool getwindowclassname "$active" 2>/dev/null || true)"
if [[ "$active_class" == "konsole" ]]; then
# Zaten Konsole odakta -> split
xdotool key --window "$active" --clearmodifiers $split_key
else
# Konsole var ama odakta değil
If you had to learn JavaScript again from absolute scratch, what would be the fastest path to becoming highly skilled in record time?
3 June 2026 @ 1:45 pm
I'm currently learning JavaScript and my goal is not only to learn the syntax, but to develop a deep understanding of how the language works and become a highly skilled developer as efficiently as possible.
There is a huge amount of content available online, and many learning roadmaps seem to focus on frameworks and tools before covering some of the language fundamentals in depth.
If you had to start over today and learn JavaScript from scratch, what topics would you study first, and in what order?
Some questions that might help guide your answer:
Which JavaScript concepts provide the highest return on investment early on?
What fundamentals should be mastered before moving on to frameworks like React, Vue, or Angular?
Which advanced topics are essential for becoming a strong JavaScript developer?
What common mistakes do beginners make when learning JavaScript?
How much time would
How do I generate SEO-friendly meta tags in React?
3 June 2026 @ 1:40 pm
I'm developing a React-based website and want to improve its SEO performance. Since React applications often render content on the client side, I'm looking for the best way to manage dynamic meta tags for different pages.
Specifically, I need to:
Set unique page titles for each route.
Add dynamic meta descriptions.
Configure Open Graph and Twitter Card tags for social sharing.
Ensure search engines can properly crawl and index the pages.
I've seen solutions such as React Helmet and server-side rendering frameworks like Next.js, but I'm not sure which approach is recommended for modern React applications.
Could someone explain the best practices for implementing SEO-friendly meta tags in React and provide an example of how to do it effectively?
XmlSerializer does not serialize a derived value
3 June 2026 @ 1:25 pm
(Code example is in .NET 8)
I have an XmlSerializer which is supposed to give a formatted version (only 2 decimal digits) of a decimal. But when I run the code shown here, the fields IAmString and IAmAlsoString are completely ignored. For completeness' sake: removing the "c2" in the ToString() does not change the result.
using System.Xml;
using System.Xml.Serialization;
namespace ConsoleApp3;
[XmlRoot(Namespace = "urn:iso:std:iso:20022:tech:xsd:pain.008.001.08")]
public class DecimalTestCase
{
[XmlElement("IAmDecimal")]
public decimal Value { get; set; }
[XmlElement("IAmString")]
public string AmountAsString => Value.ToString("c2");
[XmlElement("IAmAlsoString")]
public string AnotherTry
{
get
{
return Value.ToString("c2");
Architecture best practice: Pre-defined quick-expor vs dynamic user selected column export for excel in laravel
3 June 2026 @ 12:48 pm
i am building an export-to-excel feature for an admin panel using laravel and ui with tailwind css.
i am debating between two different architecture approaches for user experience and backend query design
Approach 1: The "Quick Export" (Pre-defined Schema)
How it works: The system automatically exports a curated, highly relevant subset of data fields determined by the developer.
Pros: Very fast to implement, predictable database queries, and consistent payload sizes.
Cons: Inflexible. If an admin needs a specific niche column that wasn't included, they cannot access it without a code change.
Approach 2: The "Dynamic Export" (Admin-Defined Schema)
How it works: The frontend features a Tailwind-styled modal or multi-select dropdown allowing the admin to check/uncheck columns before firing the export