Can someone help me make this work?
My program worked earlier this year before Windows 10 put and update and suddenly it doesn't work anymore. I have a separate laptop that didn't get the update and it works perfectly. Can someone please tell me what I need to do to get it to work? Ive tried everything I could think of and nothing works.
string[] music = Directory.GetFiles(@"C:\Users\Robert\Documents\C# stuff\Skynet\Skynet\bin\Debug\Music file", "*.mp3");// this is the original path
WMPLib.IWMPPlaylist Classicalplaylist = mplayer.playlistCollection.newPlaylist("classicalplaylist");
foreach (string file in music)
{
WMPLib.IWMPMedia media = mplayer.newMedia(file);
Classicalplaylist.appendItem(media);
}
mplayer.currentPlaylist = Classicalplaylist;
Bye Bye, Regular Dev [Comic]
Hate Losing? It’s To Download Valorant Cheat Now
No one would like to spend hours on a game that they keep losing, right? But when a game is as interesting and exciting as Valorant, staying away from it is not easy. So how...
The post Hate Losing? It’s To Download Valorant Cheat Now appeared first on 85ideas.com.
Some Best-Ofs
Our Top Pens of 2022 has been out a few weeks now and it’s loads of fun.
We tweeted and tooted the Top 10 to show them some extra love.
I noticed Steve Gardner has put together a Hall of Fame Collection with some of the greatest Pens of All Time, and I gotta say I agree with him on this list.
There are so many more, though! There are some massive heavy hitters. isladjan’s Parallax scroll animation has the most hearts of all time as I write. And there are unusual ones, like the freeCodeCamp test template, which is nothing to look at but has helped a zillion learners.
And speaking of curated best-of lists, GreenSock put together their favorites of 2022 — of Pens that use the GSAP framework. Really unbelievably beautiful interactive stuff in there, and of course, presented in a beautifully interactive way.
The web is cool.
More Real-World Uses for :has()
The :has()
pseudo-class is, hands-down, my favorite new CSS feature. I know it is for many of you as well, at least those of you who took the State of CSS survey. The ability to write selectors upside down gives us more superpowers I’d never thought possible.
I say “more superpowers” because there have already been a ton of really amazing clever ideas published by a bunch of super smart people, like:
- Using
:has()
as a CSS Parent Selector and much more by Jen Simmons - Quantity Queries for “islands of elements” with the same class, thanks to CSS
:has()
by Bramus - Style a parent element based on its number of children by Bramus
- Using combinators in
:has()
by Manuel Matuzović - 4 ways CSS
:has()
can make your HTML forms even better by Austin Gil - Video: Practical Use Cases for
:has()
Pseudo-Class by Zoran Jambor :has()
: the family selector by Jhey Tompkins
This article is not a definitive guide to :has()
. It’s also not here to regurgitate what’s already been said. It’s just me (hi 👋) jumping on the bandwagon for a moment to share some of the ways I’m most likely to use :has()
in my day-to-day work… that is, once it is officially supported by Firefox which is imminent.
When that does happen, you can bet I’ll start using :has()
all over the place. Here are some real-world examples of things I’ve built recently and thought to myself, “Gee, this’ll be so much nicer once :has()
is fully supported.”
Avoid having to reach outside your JavaScript component
Have you ever built an interactive component that sometimes needs to affect styles somewhere else on the page? Take the following example, where <nav>
is a mega menu, and opening it changes the colors of the <header>
content above it.
I feel like I need to do this kind of thing all the time.
This particular example is a React component I made for a site. I had to “reach outside” the React part of the page with document.querySelector(...)
and toggle a class on the <body>
, <header>
, or another component. That’s not the end of the world, but it sure feels a bit yuck. Even in a fully React site (a Next.js site, say), I’d have to choose between managing a menuIsOpen
state way higher up the component tree, or do the same DOM element selection — which isn’t very React-y.
With :has()
, the problem goes away:
header:has(.megamenu--open) {
/* style the header differently if it contains
an element with the class ".megamenu--open"
*/
}
No more fiddling with other parts of the DOM in my JavaScript components!
Better table striping UX
Adding alternate row “stripes” to your tables can be a nice UX improvement. They help your eyes keep track of which row you’re on as you scan the table.
But in my experience, this doesn’t work great on tables with just two or three rows. If you have, for example, a table with three rows in the <tbody>
and you’re “striping” every “even” row, you could end up with just one stripe. That’s not really worth a pattern and might have users wondering what’s so special about that one highlighted row.
Using this technique where Bramus uses :has()
to apply styles based on the number of children, we can apply tble stripes when there are more than, say, three rows:
What to get fancier? You could also decide to only do this if the table has at least a certain number of columns, too:
table:has(:is(td, th):nth-child(3)) {
/* only do stuff if there are three or more columns */
}
Remove conditional class logic from templates
I often need to change a page layout depending on what’s on the page. Take the following Grid layout, where the placement of the main content changes grid areas depending on whether there’s a sidebar present.
That’s something that might depend on whether there are sibling pages set in the CMS. I’d normally do this with template logic to conditionally add BEM modifier classes to the layout wrapper to account for both layouts. That CSS might look something like this (responsive rules and other stuff omitted for brevity):
/* m = main content */
/* s = sidebar */
.standard-page--with-sidebar {
grid-template-areas: 's s s m m m m m m m m m';
}
.standard-page--without-sidebar {
grid-template-areas: '. m m m m m m m m m . .';
}
CSS-wise, this is totally fine, of course. But it does make the template code a little messy. Depending on your templating language it can get pretty ugly to conditionally add a bunch of classes, especially if you have to do this with lots of child elements too.
Contrast that with a :has()
-based approach:
/* m = main content */
/* s = sidebar */
.standard-page:has(.sidebar) {
grid-template-areas: 's s s m m m m m m m m m';
}
.standard-page:not(:has(.sidebar)) {
grid-template-areas: '. m m m m m m m m m . .';
}
Honestly, that’s not a whole lot better CSS-wise. But removing the conditional modifier classes from the HTML template is a nice win if you ask me.
It’s easy to think of micro design decisions for :has()
— like a card when it has an image in it — but I think it’ll be really useful for these macro layout changes too.
Better specificity management
If you read my last article, you’ll know I’m a stickler for specificity. If, like me, you don’t want your specificity scores blowing out when adding :has()
and :not()
throughout your styles, be sure to use :where()
.
That’s because the specificity of :has()
is based on the most specific element in its argument list. So, if you have something like an ID in there, your selector is going to be tough to override in the cascade.
On the other hand, the specificity of :where()
is always zero, never adding to the specificity score.
/* specificity score: 0,1,0.
Same as a .standard-page--with-sidebar
modifier class
*/
.standard-page:where(:has(.sidebar)) {
/* etc */
}
The future’s bright
These are just a few things I can’t wait to be able to use in production. The CSS-Tricks Almanac has a bunch of examples, too. What are you looking forward to doing with :has()
? What sort of some real-world examples have you run into where :has()
would have been the perfect solution?
More Real-World Uses for :has() originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
Create a Drop Down Menu with Search Box in CSS3 and HTML
This post is originally published on Designmodo: Create a Drop Down Menu with Search Box in CSS3 and HTML
Topic: CSS3 Difficulty: Intermediate Estimated Completion Time: 45 min In this tutorial, we will be creating a flat style navigation with a search box and dropdown menu from the Square UI. Slides: HTML Static Website Builder Search Bar with Dropdown …
For more information please contact Designmodo
Elementor Review: From an Actual Power User’s Perspective
Iptables Basic Commands for Novice
While working with customers or while reproducing scenarios where I would have to allow or drop connectivity to certain ports in Linux OS, I have always found iptables command very helpful.
This article is for users who don't have insights into networking or, specifically, iptables command. This article would help such users quickly get a list of all rules and drop or allow traffic to ports.
How To Increase Profit Margins For Amazon Sellers?
Is your Amazon company a profit-leaching sieve? Do you wish to learn the main causes of your inability to KEEP as much money as you would like? Lets now discuss the various ways in which your company can lose money and how to make up for it. I want to offer a few eye-opening lessons, including how to conserve money and figure out what is truly important. Hiring A amazon marketing consultant is make your task easier
What More?
How do you know how your profit is doing? When we first begin selling a product, we normally examine its profit. However, as the years pass, it often takes us a while to notice when a product starts to lose money. You might believe that a product needs to be killed off, but perhaps all thats needed is a change in your approach. To start, ponder the following inquiries:
Am I effective?
If not, why not?
Can I increase my margins of profit?
Almost usually, you can increase your profitability. Lets discuss how.
Simple Ways To Boost Profit Margins
You should start by thoroughly examining your expenditures over the previous four months and analyzing all of your expenses. Examine your bank and credit card statements carefully, ascertain where each dollar has been going, and average your spending. There are usually recurrent monthly fees and expenses that you can readily account for, and then there are items like office and travel costs that are perhaps not always legitimate.
According to Amazon consulting services providers, you can calculate your average monthly cost, but keep in mind that you also have annual charges. Your estimate of how much will be incorrect if you dont take into account your yearly expenses.
Increase Profit Margins By Simplifying Inventory
Inventory that is kept in excess costs money each and every month. And if it costs you money each month, the longer the product remains unsold, the less money you will make from it.
Lets imagine, for illustration purposes, that your order lasts for four months. Your profit on that inventory will decrease month after month. Sending out smaller orders more frequently might make sense. You might want to compare the price of storing goods versus the price of shipping those more frequent, smaller orders.
There is also a stocking out. In addition to the obvious stockout costs, there are also less obvious costs that go unmentioned. If you hadnt pushed the marketing so aggressively and instead employed full-price sales, you might have stayed in stock. One of the main causes of stockouts is a lack of coordination between marketing and inventory, which you come to realize costs businesses a lot of money. And this is one of the reasons we keep bringing up inventory-focused marketing. Stocking out typically occurs as a result of merchants marketing too aggressively without thoroughly reviewing and integrating their inventory planning with their marketing strategies. The health of your company depends on you taking the time to conduct these evaluations.
Benefits Of Increasing Profit Margins
Your bank and merchant fees are the next thing you should examine. Paying wire fees is one of the things that annoys me the most It seems like a necessary evil, but it doesnt have to be! We discovered a bank that provides free, no-fee wire transfers, including international wires, while launching your business. The Best Amazon Consultant helps you to guide properly
Conclusion
There is usually a way to increase profits. Calculate smaller, more regular shipments to prevent overstocking. By lawfully re-coding your HTS codes, you can lower your delivery costs (with professional guidance). Make sure your warehouse isnt charging too much or adding extra expenses. Utilize a refund tool or service to reduce Amazon fees. To receive significant benefits, such as avoiding Stripe fees, think about using Brex and Passport. If you struggling for making a profit but are failing then you must hire an Amazon consulting services provider
Amazon Sellers
Amazon Selling Tips
Amazon Marketing
How to Develop a Portrait Retouching Function
Portrait Retouching Importance
Mobile phone camera technology is evolving—wide-angle lens and optical image stabilization to name but a few. Thanks to this, video recording and mobile image editing apps are emerging one after another, utilizing technology to foster greater creativity.
Among these apps, live-streaming apps are growing with great momentum, thanks to an explosive number of streamers and viewers.
Chris’ Corner: Relatively Recent Great CSS Writing
Chen Hui Jing, So your designer wants stuff to overlap
Love that title. Elements in HTML don’t just overlap each other by default. In fact, they intentionally push other elements around so that they don’t. You’ll need CSS to force elements to overlap if you need them to. The traditional ways:
- negative margins
- transform translate
- absolute positioning
But Chen Hui Jing makes sure we don’t forget about grid! It might not come to mind immediately as we mostly think about making a grid and placing individual elements in individual grid cells. But grid cells don’t care! You can put as many elements as you want in a grid cell (or multiple grid cells). They are really just placement coordinates, not slots that only take one element.
Michelle Barker, Quick Tip: Negative Animation Delay
This is one of my favorite classic CSS tricks because it’s so obvious… but only after you’ve learned it. The point is mainly staggered animations. If you want animations to all be at different points along the same animation when they start animating, you can use animation-delay
. But if you use a positive time value, the animation won’t start for the first time until that delay (duh). So instead, you use a negative value. The animation starts immediately, but backed up to where it needs to be to have the beginning of the animation hit once the negative delay elapses.
Charlotte Dann, Fancy Frames with CSS
Awesome research from Charlotte, covering lots of ways to make interesting “framed” shapes like these:
So is there one obvious clear best path forward to do this in CSS (and friends)? No — haha. Charlotte explores using 1️⃣ multiple gradient backgrounds (very complicated to construct, limitations with transparency), 2️⃣ border-image
(one of the weirder CSS properties, but does help with placing gradients, or SVGs), 3️⃣ mask-border
which I’m not sure I’ve ever even looked at in my life (no Firefox support), and finally, 4️⃣ Houdini which has no Firefox or Safari support, but does bring interesting JavaScript-powered opportunities into the mix.
Just to throw another one in the mix here… I happened to be playing with Open Props the other day and it has a “Mask Corner Cuts” section. It just uses mask
(or -webkit-mask
, as apparently the vendor-prefixed version alone gets the best support).
Scott Vandehey, The Power of CSS Blend Modes
Scott is inspired by other-Scott’s Pen (which happens to be #91 on the Top Pens of 2022 list) and breaks down exactly how it works. It’s a combination of filtering and blending layers. that’s just cool as heck.
You gotta go check out the article to see how Scott was able to stretch the idea to other effects, like a halftone filter.
Kate Rose Morley, Tree views in CSS
This is entirely doable in just semantic HTML and CSS alone:
The trick is putting all the list items that have a sub-list with a <details>
element. The text of that <li>
becomes whatever the <summary>
is. Then you can style the ::marker
of the details elements to have the plus-and-minus look rather than the default triangle. I appreciated Kate’s usage of :focus-visible
too which keeps the focus styles away from mouse clicks.
397: User-Generated Content Saftey
I was asked about the paradoxical nature of CodePen itself recently. CodePen needs to be safe and secure, yet we accept and gleefully execute user-authored code, which is like don’t-do-that 101 in web security. Marie and I hop on the show to talk this through as an update from quite a long time ago. It’s wonderfully-terribly complicated. Part of what complicates it is that there are many different kinds of worrisome code, from malicious, to distasteful, to spam, and they all need different treatment. This is a daily and never-ending war.
Time Jumps
Sponsor: Notion
Notion is an amazing collaborative tool that not only helps organize your company’s information but helps with project management as well. We know that all too well here at CodePen, as we use Notion for countless business tasks. Learn more and get started for free at notion.com. Take your first step toward an organized, happier team, today.
The post 397: User-Generated Content Saftey appeared first on CodePen Blog.
Efficiently Computing Permissions at Scale: Our Engineering Approach
A few weeks ago, we introduced a new Role-based Access Management (RBAC) feature in the GitGuardian Internal Monitoring platform. This release resulted from several months of hard work where we had to thoroughly review our data model and implement a very resource-efficient permissions calculation mechanism. Therefore, I thought this was the perfect opportunity to offer a deep dive into the research, problems, and dead-end roads we encountered on this journey.
Disclaimer: I’ll be using Django in my code examples, but the ideas can be generalized; however, a relational database is a stronger requirement.
Pros and Cons of WordPress: What Are the Main Ones in 2023?
Different Ways to Search Database Objects
This article explains different methods to find the database objects in a SQL Database. We can use any of the following methods to search a database object.
- Find database objects using system catalog views.
- Find the database object using the filter option of SQL Server management studio.
- Find database objects using dbForge SQL Search.
Search Database Objects Using System Catalog Views
You can view the list of the database objects from the SQL Server system catalog views. The system catalog views are used to show the information of the database engine. The catalog views can be used to display the meta-data of the SQL Server database. The catalog views inherit the information from the SQL Server metadata tables. For example, sys.tables view inherits the data from sys.objects catalog view.
2022 in Retrospective
2022 is over, and not a moment too soon. I'll never forget it: some of my friends had to flee their own country; others are fighting for their freedom as I write this post. I hope they will be safe and that their wishes will come true in 2023.
On the personal and technical side, here's a summary of the past year from my perspective.
Simulating and Troubleshooting StackOverflowError in Kotlin
In this series of simulating and troubleshooting performance problems in Kotlin, let’s discuss how to simulate StackOverflow
errors. StackOverflow
error is a runtime error, which is thrown when a thread’s stack size exceeds its allocated memory limit.
Video: To see the visual walk-through of this post, click below: