StackOverflow.com

VN:F [1.9.22_1171]
Rating: 9.4/10 (10 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

How to create and return a nested object in Java Spring Boot?

16 May 2024 @ 2:10 pm

I'm working on a Spring Boot application and I'm facing an issue with handling nested objects within an entity. I have an entity called TopicEntity, which has a field topicContent defined as a Map<Integer, String>. This field is used to store key-value pairs of topic content, where the key represents the order index and the value represents the content. Now, I need to extend this functionality to support storing nested objects within topicContent. Each nested object contains a question, correct answer, and incorrect answers. Here's an example of the desired JSON structure: json structure I've tried changing the mapping of topicContent to Map<Integer, Object>, but I encountered these errors: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' Caused by: org.hibernate.MappingException: collection elem

Snowflake - final table with multiple dependencies

16 May 2024 @ 2:10 pm

I have a snowflake model in which a lot of source tables are loaded in different hours of each day. A standard processing with streams, tasks, etc. loads that data into 4 final tables, tx_1, tx_2, tx_3 and tx_4. Now the users are requesting that wants to create another final table that is loaded when all the previous 4 final tables are loaded through each process date (because they need to join this 4 tables). What i have so far is that i created and additional root task replacing the previous root tasks (one for each data source), this root task has the condition of, when any of the source tables streams has data (using OR condition), all the next level tasks are triggered, but how in one period of time, only one of this streams is going to have data, only one of those child tasks is going to proceed. Finally i added one final task that is triggered when all the previous final tasks are executed. I tested loading data and all of this "final" ta

AntD pagination pageSizeChanger need to select a larger number of elements without displaying the number in the selector

16 May 2024 @ 2:10 pm

I have a custom component of the ant design pagination. I need the table size selection options: 10, 20, 30, 50, All. When user is choosing All it need to set PageSize to 1.000.000. I figured out how to get around the restriction that it does not allow the use of words in the pageSizeOptions array, but there was a problem with the fact that when I select my "All" value, the value in the selector does not change and remains the previous one. I am attaching a part of the code that I wrote. <PaginationComponent disabled={disabled} showSizeChanger pageSize={pagination.perPage} pageSizeOptions={['10', '20', '30', '50', 'All']} onChange={onChangeHandler} onShowSizeChange={(page, pageSize) => onShowSizeChangeHandler(page, isNaN(pageSize) ? 1000000 : pageSize)} current={pagination.currentPage} total={pagination.totalCount} locale={{items_per_page: 'on page'}}/>;

RandomSearchCV and data leakage

16 May 2024 @ 2:09 pm

I'm looking for the best practice to avoid data leakage. I have 1 feature that requires mode imputation. The model is XGBoost Classifier. These are the steps that I planned: Split data in random 80% training set - 20% test set Apply mode imputation on training and test set independently Execute RandomSearchCV on the training set for hyperparameter tuning Train model on the whole training set using the best parameter set found Evaluate model on unseen test set Now, my doubt is: is it okay to perform the mode imputation on the whole training set and then perform RandomSearchCV? I thought that data leakage applies only when evaluating with the unseen test set. Or should I perform the imputation in each fold of RandomSearchCV to avoid data leakage? if so, how can I do it? I saw Sklearn pipes, but I cannot figure out how to apply the mode imputation only to the specific feature I need Thank you in advance!

Dependecy Matrix for Flutter Project

16 May 2024 @ 2:09 pm

I want to create a dependency matrix for a project developed in Flutter. I used Android Studio to develop this project but I noticed that Android Studio does not make it available in "Code" -> "Analyze Code" -> "Dependecy Matrix" as IntelliJ IDEA does. So I tried to create this matrix by opening the project on IntelliJ IDEA and, after several errors resolved, I get this massage "No Classes Found - No class files were found for the specified source files. DSM analysis can't be performed." (https://i.sstatic.net/eWw3R7vI.png)](https://i.sstatic.net/eWw3R7vI.png) What can I do? I can't figure out the problem and can't figure out if I can actually create the dependency matrix on a Flutter project. Does anyone know how I can do this or have any alternatives? The dependencies

first executing the code that returns a promise, performing operations on it and then awaiting at last

16 May 2024 @ 2:09 pm

class APIFeatures { constructor(query, queryString) { this.query = query; this.queryString = queryString; } filter() { const queryObj = { ...this.queryString }; const excludedFields = ['page', 'sort', 'limit', 'fields']; excludedFields.forEach(el => delete queryObj[el]); // 1B) Advanced filtering let queryStr = JSON.stringify(queryObj); queryStr = queryStr.replace(/\b(gte|gt|lte|lt)\b/g, match => `$${match}`); this.query = this.query.find(JSON.parse(queryStr)); return this; } const features = new APIFeatures(Tour.find(), req.query).filter(); const tours = await features.query; when we write Tour.find() it returns a promise which is saved to query variable of APIFeatures object. this variable maybe in promise pending state is used by filter function and a method find on the result is invoked. After that we are awaiting the features.query which gives the final result. Can anyone tell me why we are awai

How can I remove ads from my blogger page?

16 May 2024 @ 2:09 pm

I want to remove the ads from the page, but when I remove the ads code and delete the edit, it shows me an error. org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 52; Element type "b:include" must be followed by either attribute specifications, ">" or "/>". This is my page:https://samiqws1239.blogspot.com/2024/04/how-to-hack-android-device-with-adb.html I saw the line, but there was not the slightest error

Typescript type narrowing inside if does not work

16 May 2024 @ 2:08 pm

I have an issue with type narrowing and I can't get it to work. The type of event.data is { id: string; } | { progress: number; } and not { id: string; } Any idea what's wrong? Typescript Playground const events = ['event1', 'eve

Inconsistent result of ctypes - GetAsyncKeyState function

16 May 2024 @ 2:08 pm

import ctypes def mouse_released() -> bool: mouse_state = ctypes.windll.user32.GetAsyncKeyState(0x01) if mouse_state: while ctypes.windll.user32.GetAsyncKeyState(0x01): continue # is pressing else: print('released') return mouse_state != 0 # released return False while True: mouse_released() This program tells if the left mouse button was released. Problem: in general it works correctly. But sometimes at the very beginning it prints "released", even though nothing was pressed even a few seconds before. I tried to change the GetAsyncKeyState with GetKeyState. It seemed to solve the mentioned problem, but this way, the function indicates the button being pressed only every second time, which is a complete mistery to me.

When i edit same data twice in Blazor web Assembly using Entity Framework it gives me error

16 May 2024 @ 2:08 pm

The Error is "The instance of entity type 'Person' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using". public async Task<Person> GetPersonById(Guid Id) { return await _context.Person.AsNoTracking().Where(t => t.Id == Id).FirstOrDefaultAsync(); } public async Task<Guid> EditPerson(Person Updateperson) { if (Updateperson.Id != null) { Updateperson.ModifiedOn = DateTime.Now; Updateperson.ModifiedBy = Updateperson.CreatedBy; _context.Update(Updateperson); await _context.SaveChangesAsync(); return Updateperson.Id; } else { return Guid.Empty; } } In the blazor single page application when i edit same record twice without hard refresh it

jsfiddle.net

VN:F [1.9.22_1171]
Rating: 9.0/10 (2 votes cast)

A playground for web developers, use it as an online editor for snippets built from HTML, CSS and JavaScript. The code can then be shared with others, embedded on a blog, etc.

SmashingMagazine.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (6 votes cast)

Digital media magazine for designers and developers
Web design plus tips and tricks.

Transforming The Relationship Between Designers And Developers

15 May 2024 @ 10:00 am

Is there such a thing as harmony between designers and developers in the workplace, and if so, how can it be achieved? In this article, Chris Day explores the challenges of effective collaboration, outlines the key factors at play, and (hopefully!) empowers you to find the right solutions to help you and your team deliver to their full potential.

Why Designers Aren’t Understood

14 May 2024 @ 12:00 pm

How do we conduct UX research when there is no or only limited access to users? Here are some workarounds to run UX research or make a strong case for it. An upcoming part of [Smart Interface Design Patterns](https://smart-interface-design-patterns.com).

The Times You Need A Custom @property Instead Of A CSS Variable

13 May 2024 @ 8:00 am

Preethi Sam walks through an example that demonstrates where custom properties are more suitable than variables while showcasing the greater freedom and flexibility that custom properties provide for designing complex, refined animations.

The Modern Guide For Making CSS Shapes

10 May 2024 @ 1:00 pm

In this comprehensive guide, Temani Afif explores different techniques for creating common shapes with the smallest and most flexible code possible.

The Forensics Of React Server Components (RSCs)

9 May 2024 @ 1:00 pm

React Server Components (RSCs) combine the best of client-side rendering, and author Lazar Nikolov thoroughly examines how we got here with a deep look at the impact that RSCs have on the page load timeline.

How To Run UX Research Without Access To Users

7 May 2024 @ 12:00 pm

How do we conduct UX research when there is no or only limited access to users? Here are some workarounds to run UX research or make a strong case for it. An upcoming part of Smart Interface Design Patterns.

How To Harness Mouse Interaction Data For Practical Machine Learning Solutions

6 May 2024 @ 10:00 am

In this article, Eduard Kuric discusses mouse interaction data, what kind of magic can be done with it, and some of the hidden pitfalls to watch out for so you get a head start incorporating them in your solutions.

Combining CSS :has() And HTML &lt;select&gt; For Greater Conditional Styling

2 May 2024 @ 10:00 am

Amit Sheen demonstrates using `:has()` to apply styles conditionally when a certain `` in a `` element is chosen by the user and how we gain even more conditional styling capabilities when chaining `:has()` with other pseudo-classes, such as `:not()` — no JavaScript necessary.

Longing For May (2024 Wallpapers Edition)

30 April 2024 @ 1:00 pm

May is almost here, so what better occasion could there be for some fresh and inspiring desktop wallpapers? Created with love by artists and designers from across the globe, the wallpapers in this post come in versions with and without a calendar. Enjoy!

Lessons Learned After Selling My Startup

29 April 2024 @ 3:00 pm

Business acquisitions are common but often shrouded in mystery because they happen behind closed doors. In this article, Yaakov details the story of his company and the journey it took him on, shedding light on the process of selling a business and what he learned from the experience.

stackblitz.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (2 votes cast)

Create, edit & deploy fullstack apps — in just one click. From Angular to React or even just HTML, JS and CSS.

firebase.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (2 votes cast)

An on-line real-time database for your apps.

#FirebaserFriday: Frank van Puffelen

18 March 2022 @ 3:58 pm

Paulette McCroskey Social Media Manager, Advanced Systems Group, LLC

How Firebase Performance Monitoring optimized app startup time

9 March 2022 @ 4:58 pm

Viswanathan Munisamy Software Engineer

Using Machine Learning to optimize mobile game experiences

15 February 2022 @ 4:58 pm

Sachin Kotwani Senior Product Manager Elvis Sun Software Engineer Mobile app and game developers can use on-device machine learning in their apps to increase user engagement and grow revenue. We worked with game developer HalfBrick to train and implement a custom model that personalized the user's in-game experience based on the player's skill level and session details, resulting in increased interactions with

Accept Payments with Cloud Firestore and Google Pay

11 February 2022 @ 8:00 pm

Stephen McDonald Developer Relations Engineer, Google Pay Back in 2019 we launched Firebase Extensions - pre-packaged solutions that save you time by providing extended functionality to your Firebase apps, without the need to research, write, or debug code on your own. Since then, a ton of extensions have been added to the platform covering a wide range of features, from email triggers and text messaging, to image resizing, translation, and much more. Google Pay Firebase Extension We're now

Everything you need to know about Remote Config’s latest personalization feature

26 January 2022 @ 6:22 pm

Jon Mensing Product Manager An important part of turning your app into a business is to optimize your user experience to drive the bottom line results you want. A popular way to do this is through manual experimentation, which involves setting up A/B tests for different components of your app and finding the top performing variant. Now, you can save time and effort - and still maximize the objectives you want - with Remote Config’s latest personalization feature. Personalization harnesses the power of machine learning to automatically find the optimal e

What’s new at Firebase Summit 2021

10 November 2021 @ 5:31 pm

Kristen Richards Group Product Manager

Automate your pre-release testing with the App Distribution REST API

8 November 2021 @ 5:59 pm

Liat Berry Product Manager

Improving the Google Analytics dashboard in Firebase

5 November 2021 @ 6:03 pm

Sumit Chandel Developer Advocate If you’ve visited the Firebase console’s Analytics section recently, you might have noticed something new… an updated Analytics dashboard, a new Realtime view and a few other UI enhancements.

How to get better insight into push notification delivery

27 October 2021 @ 3:45 pm

Charlotte Liang Charlotte Liang Software Engineer

Pinpointing API performance issues with Custom URL Patterns

20 October 2021 @ 3:45 pm

Ibrahim Ulukaya Ibrahim Ulukaya Developer Advocate

bitbucket.org

VN:F [1.9.22_1171]
Rating: 8.4/10 (5 votes cast)

The alternative to Github, private and open git repositories.

Introducing 🥁 A new Bitbucket pull request experience

13 May 2024 @ 8:08 pm

Here at Bitbucket Cloud, we are focused on helping you and your teams have the best possible experience for code review.… The post Introducing 🥁 A new Bitbucket pull request experience appeared first on Bitbucket.

Bring more context to your code with Compass

9 May 2024 @ 11:17 pm

The context challenge Understanding and interacting with code repositories can be frustrating: you often don't get all of the information you… The post Bring more context to your code with Compass appeared first on Bitbucket.

Custom merge checks are now generally available

23 April 2024 @ 5:28 am

We're excited to announce the general availability (GA) of custom merge checks in Bitbucket Cloud. This new capability has seen amazing… The post Custom merge checks are now generally available appeared first on Bitbucket.

Introducing Dynamic Pipelines: A new standard in CI/CD flexibility

23 April 2024 @ 5:05 am

Bitbucket cloud is on a mission to become the world’s most extensible cloud SCM and CI/CD product, and we're thrilled to… The post Introducing Dynamic Pipelines: A new standard in CI/CD flexibility appeared first on Bitbucket.

Cloud Migration Trials are available for Bitbucket Cloud!

22 April 2024 @ 5:56 pm

We are excited to announce that cloud migration trials (CMTs) are now generally available for new Bitbucket Cloud workspaces. Cloud migration… The post Cloud Migration Trials are available for Bitbucket Cloud! appeared first on Bitbucket.

Evolving Bitbucket Pipelines to unlock faster performance and larger builds

16 April 2024 @ 7:16 am

Bitbucket Pipelines has seen amazing adoption over recent years, with millions of developers and teams using it to build better software… The post Evolving Bitbucket Pipelines to unlock faster performance and larger builds appeared first on Bitbucket.

Generate Bitbucket Cloud pull request descriptions with Atlassian Intelligence 🎉

11 April 2024 @ 8:20 pm

We are thrilled to announce that AI-assisted pull request descriptions is now available for all Bitbucket Premium users. Crafting clear, concise… The post Generate Bitbucket Cloud pull request descriptions with Atlassian Intelligence 🎉 appeared first on Bitbucket.

Uplevel your DevOps automation with new Bitbucket Cloud extensibility

3 April 2024 @ 5:11 am

Today, modern software organizations’ requirements for DevOps tooling has become more sophisticated and bespoke. We hear from many customers that they… The post Uplevel your DevOps automation with new Bitbucket Cloud extensibility appeared first on Bitbucket.

Upcoming changes to pull requests and merge check configuration

3 April 2024 @ 5:00 am

As part of the graduation of custom merge checks from open-beta to general availability (GA) that is planned for late-April 2024,… The post Upcoming changes to pull requests and merge check configuration appeared first on Bitbucket.

Automatically assign code owners as pull request reviewers

28 March 2024 @ 6:52 pm

As your team and products expand, expertise in various areas of your code base may become distributed among different team members,… The post Automatically assign code owners as pull request reviewers appeared first on Bitbucket.

tympanus.net/codrops

VN:F [1.9.22_1171]
Rating: 8.3/10 (6 votes cast)

Useful resources and inspiration for creative minds (html, css, javascript)

UI Interactions & Animations Roundup #43

15 May 2024 @ 10:53 am

Explore our latest motion design collection featuring the best shots from Dribbble to get your creativity flowing.

Collective #838

14 May 2024 @ 11:00 am

TypeSpec * Composability in design systems * Small laboratory of fine UI

Case Study: Vendredi Society

14 May 2024 @ 10:40 am

Being visible is just no longer enough. It’s all about leveraging attention. And then moving forward together. Synced.

How to Easily Create Lottie Animations With SVGator (Unlimited Free Exports)

13 May 2024 @ 2:31 pm

SVGator introduces Lottie file support, offering an easy-to-use platform for creating and exporting Lottie animations for free. Learn how to create, edit, and benefit from Lottie animations in this guide.

Design Finds: Creative Slideshows

13 May 2024 @ 12:56 pm

A small collection of creative slideshow designs and animations.

Collective #837

10 May 2024 @ 11:00 am

An alternative proposal for CSS masonry * Printing music with CSS Grid * CSS inheritance

A Selection of Fonts That Future-Proof Your Web Design

10 May 2024 @ 10:04 am

A small selection of fonts ideal for keeping your web design timeless and forward-looking.

Exploring a 3D Text Distortion Effect With React Three Fiber

8 May 2024 @ 2:20 pm

A quick tutorial on how to create a beautiful distorted text ring effect in React Three Fiber.

Collective #836

7 May 2024 @ 11:00 am

Cool queries * Endless Tools * Tiny World Map * Emission and bloom

Design Finds: Detail Hovers on Images

6 May 2024 @ 2:47 pm

A set of diverse image effects that reveal some more information on hover.

vercel.com

VN:F [1.9.22_1171]
Rating: 8.3/10 (3 votes cast)

Deploy your app with now.sh. Free CLI-based deployments.

heartinternet.co.uk

VN:F [1.9.22_1171]
Rating: 8.3/10 (3 votes cast)

Hosting packages for an initial web presence

Black Friday and Cyber Monday sale now on at Heart Internet

22 November 2022 @ 3:31 pm

You can now get up to 33% off the price of a cPanel-managed Web Hosting plan at Heart Internet.

Are your website fonts sending the right message?

3 November 2022 @ 10:18 am

Did you know that the fonts you use on your website can impact the way your customers perceive and interact with your brand?

10 of the best WooCommerce plugins

27 October 2022 @ 10:53 am

Including options for optimising your cart, boosting customer loyalty, and selling tickets.

9 creative alternatives to .com and .co.uk domains

5 October 2022 @ 2:37 pm

Discover the appeal of .ninja, .coffee, .guru and more - all available in our domain name sale.

Save up to 43% on WordPress Hosting in our latest sale

20 September 2022 @ 3:23 pm

We’ve just slashed the price of WordPress Hosting at Heart Internet.

What to do once you’ve bought a domain

7 September 2022 @ 12:48 pm

A guide to what to do next once you've chosen your perfect domain name.

Empowering quotes and motivational tips for entrepreneurs

25 August 2022 @ 8:33 am

Including quotes from Amelia Earhart and Barack Obama, to give you a little pick me up.

5 reasons we love cPanel

10 August 2022 @ 7:09 am

When browsing through hosting packages, you’ll often come across the word cPanel. But what exactly does this word mean and what are the benefits of buying a hosting package with cPanel included?

Four ways domains can help you protect your brand identity online

2 August 2022 @ 9:55 am

Did you know that domains can be so much more than a mere address or waymark? In this blog, we look at how they can be a powerful tool for online brand protection.

It’s World Wide Web Day so here are 5 reasons to get your business online

1 August 2022 @ 9:19 am

Celebrating World Wide Web Day by looking at why it's never been more important to have an online presence.

github.com

VN:F [1.9.22_1171]
Rating: 8.2/10 (5 votes cast)

GitHub is the best way to collaborate with others. Fork, send pull requests and manage all your public and private git repositories.

Securing Git: Addressing 5 new vulnerabilities

14 May 2024 @ 5:07 pm

Git is releasing several new versions to address five CVEs. Upgrading to the latest Git version is essential to protect against these vulnerabilities. The post Securing Git: Addressing 5 new vulnerabilities appeared first on The GitHub Blog.

Research: Quantifying GitHub Copilot’s impact in the enterprise with Accenture

13 May 2024 @ 6:27 pm

We conducted research with developers at Accenture to understand GitHub Copilot’s real-world impact in enterprise organizations. The post Research: Quantifying GitHub Copilot’s impact in the enterprise with Accenture appeared first on The GitHub Blog.

Say hello to the SPORTech collection

13 May 2024 @ 5:01 pm

Whether you’re a rookie coder or a seasoned pro, our new SPORTech shop collection is tailored for you. And here’s the kicker: we’re offering free delivery worldwide over $20 until May 20! The post Say hello to the SPORTech collection appeared first on The GitHub Blog.

GitHub Availability Report: April 2024

10 May 2024 @ 5:13 pm

In April, we experienced four incidents that resulted in degraded performance across GitHub services. The post GitHub Availability Report: April 2024 appeared first on The GitHub Blog.

How AI enhances static application security testing (SAST)

9 May 2024 @ 4:00 pm

Here’s how SAST tools combine generative AI with code scanning to help you deliver features faster and keep vulnerabilities out of code. The post How AI enhances static application security testing (SAST) appeared first on The GitHub Blog.

Just launched: Second cohort of the DPG Open Source Community Manager Program!

8 May 2024 @ 4:07 pm

Are you looking to have a positive impact in open source development? This program may be for you! Apply by May 30 to join. The post Just launched: Second cohort of the DPG Open Source Community Manager Program! appeared first on The GitHub Blog.

How we’re building more inclusive and accessible components at GitHub

7 May 2024 @ 5:00 pm

We've made improvements to the way users of assistive technology can interact with and navigate lists of issues and pull requests and tables across GitHub.com. The post How we’re building more inclusive and accessible components at GitHub appeared first on The GitHub Blog.

GitHub Copilot Chat in GitHub Mobile is now generally available

7 May 2024 @ 4:00 pm

With GitHub Copilot Chat in GitHub Mobile, developers can collaborate, ask coding questions, and gain insights into both public and private repositories anywhere, anytime–all in natural language for users on all GitHub Copilot plans. The post GitHub Copilot Chat in GitHub Mobile is now generally available appeared first on The GitHub Blog.

Create a home for your community with GitHub Discussions

6 May 2024 @ 6:43 pm

GitHub Community-in-a-box provides the tooling, resources, and knowledge you need to build internal communities of learning at scale with GitHub Discussions. The post Create a home for your community with GitHub Discussions appeared first on The GitHub Blog.

Dependabot on GitHub Actions and self-hosted runners is now generally available

2 May 2024 @ 4:30 pm

A quick guide on the advantages of Dependabot as a GitHub Actions workflow and the benefits this unlocks, including self-hosted runner support. The post Dependabot on GitHub Actions and self-hosted runners is now generally available appeared first on The GitHub Blog.