2021 Design Systems (Survey/Courses)

Category Image 052

My friends at Sparkbox are doing a survey on design systems, as they do each year. Go ahead and fill it out if you please. Here are the results from last year. In both 2019 and 2020, the vibe was that design systems (both as an idea and as a real thing that real companies really use) are maturing. But still, it was only a quarter of folks who said their actual design system was mature. I wonder if that’ll go up this year.

In my circles, “design system” isn’t the buzzword it was a few years ago, but it doesn’t mean it’s less popular. If anything, they are more popular almost entering the territory of assumed, like responsive design is. I do feel like if you’re building a website from components, well, you’ve got a component library at least, which is how I think of design systems (as a dude who pretty much exclusively works on websites).

I’d better be careful though. I know design systems mean different things to different people. Speaking of which, I’d be remiss if I didn’t also shout out the fact that Ethan has a handful of totally free courses he’s created on design systems.

As you might have guessed from the titles, we’ve broadly organized the courses around roles: whether you’re a designer, a developer, or a product manager, we’ve got something for you. Each course focuses on what I think are the fundamentals of design systems work, so I’ve designed them to be both high-level and packed with information


The post 2021 Design Systems (Survey/Courses) appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

Square Bolsters Integration Ecosystem Via Snippets API

Featured Imgs 23

Today at Square Unboxed, the digital payment company’s fifth annual developer conference, the company has announced a collection of new developer tools that aim to help partners build engaging and interactive payment experiences. These announcements include early access to a new API that enables the creation of platform extensions that will be available in the Square Online community marketplace. 

#315: Support Success

Featured Imgs 23

Over the last year, almost every metric that you want to go up has gone up at CodePen. More users creating and doing more things. You’d think that customer support would go up at the same level. And if it did, we would have thought that was very normal and dealt with it. But customer support doesn’t have to be this static thing that just is the way it is forever. If you find that people have the same questions over and over, you can fix your app or documentation such to answer that question better. If people report bugs, you can fix them. In fact, if you do a lot of those things, you can reduce customer support even as the number of customers you support grows. That’s exactly what we did at CodePen.

The result is that our customer support went from a job nearly impossible to get all done in a day, or the point where it is a part-time endeavor for whoever is on support that day. Even while our time-to-respond to tickets has also dramatically dropped. We’re just over one hour right now, and of course hope to drop below that line. The truth is though, most tickets are half that, it’s just some tickets that slip between the cracks and take days that hurt our average.

Timejumps

  • 00:23 Support levels in 2021
  • 02:52 What’s changed
  • 06:13 …while still getting new users!
  • 11:11 Sponsor: Netlify
  • 12:15 Average response time to tickets
  • 15:12 Measuring the right thing is difficult
  • 20:32 COVID isn’t the main thing
  • 28:26 Focused on support tickets

Sponsor: Headless Commerce Summit

Netlify is throwing a totally free online conference: Headless Commerce Summit.

E-commerce is growing at an unprecedented rate, making everything from your site performance to your ability to iterate faster a critical business advantage.

Take have a day and go! Even if you aren’t currently literally building a headless site, it would be good to have in your brain how other people are doing it and what they are getting out of it.

The post #315: Support Success appeared first on CodePen Blog.

Find the smallest, largest and medium number by comparing 3 array list

558fe5180e0e8fc922d31c23ef84d240

How do I compare 3 Arraylist with each other and find the small, medium and large elements. I was thinking something like this but its not working.

ArrayList<interger> a = new ArrayList<ArrayList<interger> >(); 
a.add(1);
a.add(2);
a.add(7);
ArrayList<interger> b =new ArrayList<ArrayList<interger> >();
b.add(8);
b.add(9);
b.add(1);
ArrayList<interger> c = new ArrayList<ArrayList<interger> >();
c.add(5);
c.add(9)
c.add(8)

 for (int i = 0; i < ; i++) 
        {
            for (int j = 0; j < ; j++) 
            {
                for (int k = 0; k < ; k++) 
                {

        if () {}

        if () {}    

        if () {}
         }
      }}

output:
small =1,2,1
medium = 5,9,7
large = 8,9,8

parse string for integers and add to an integer array

558fe5180e0e8fc922d31c23ef84d240

i have a script in clojure that can read a string of integers separated by commas from a file..the scrip is succesful and reads the line from the file as astring,all i want is some clojure loop to scan the string for integers and add to an integer array
here is the code

(ns Files.myfile)
(defn hello-world []
  (println "Hello World"))
 (hello-world)
(def s (slurp "integers.txt"))
  (println s)
(s)

##integers.txt contains random integers separated by commas

Calculating distance with arraylist

558fe5180e0e8fc922d31c23ef84d240

I would like to calculate the distance in 4d I have 2 arraylist that have all of my elements in it. How do make the formula i have this but its not calculating correctly the distance. List has diferent coordinates every time and t always has the same coordinates.

        double w = 0.0;

        for (int i = 0; i < List.size(); i++)
        {
            for (int j = 0; j < List.get(i).size(); j++)
          {
           w =   Math.sqrt(Math.pow(List.get(i).get(j) - t.get(j), 2)+Math.pow(List.get(i).get(j) - t.get(j), 2)+Math.pow(List.get(i).get(j) - t.get(j), 2)+Math.pow(List.get(i).get(j) - t.get(j), 2));
          }
        System.out.println(w);

Parse error: syntax error, unexpected ‘if’ (T_IF) in C:\xampp\htdocs\web\co

558fe5180e0e8fc922d31c23ef84d240
<?php
$firstname = $_POST{'firstname'};
$username = $_POST{'username'};
$emailaddress = $_POST{'emailaddress'};
$password = $_POST{'password'};
$contact = $_POST{'contact'};

//Database connection
$conn =new mysqli('localhost','root','','registration');
if ($conn->connect_error) {
    die('connection failed : '.$conn->connect_error)
}else{
    $stmt = $conn->prepare("insert into users(firstname, username, emailaddress, password, contact)
        vlaues (?, ?, ?, ?, ?)")
    $stmt-> bind param("ssssi",$firstname, $username, $emailaddress, $password, $contact)
    $stmt->execute();
    echo "Submitted Succesfully...";
    $stmt->close();
    $stmt->close();
}

?>

MotoPress Easy WordPress Appointment Booking

Featured Imgs 14

MotoPress WordPress Appointment Booking PluginIf you run a service-based business, you’ll agree that booking appointments can and is a nightmare. There are too many moving parts that it’s easy to miss important appointments. That, plus you’re already running other Aspects of your business, which just adds to your plate. Alongside some other administrative tasks, booking appointments is a repetitive […]

The post MotoPress Easy WordPress Appointment Booking appeared first on WPExplorer.

Next Gen CSS: @container

Category Image 091

Chrome is experimenting with @container, a property within the CSS Working Group Containment Level 3 spec being championed by Miriam Suzanne of Oddbird, and a group of engineers across the web platform. @container brings us the ability to style elements based on the size of their parent container.

The @container API is not stable, and is subject to syntax changes. If you try it out on your own, you may encounter a few bugs. Please report those bugs to the appropriate browser engine!

Bugs: Chrome | Firefox | Safari

You can think of these like a media query (@media), but instead of relying on the viewport to adjust styles, the parent container of the element you’re targeting can adjust those styles.

Container queries will be the single biggest change in web styling since CSS3, altering our perspective of what “responsive design” means.

No longer will the viewport and user agent be the only targets we have to create responsive layout and UI styles. With container queries, elements will be able to target their own parents and apply their own styles accordingly. This means that the same element that lives in the sidebar, body, or hero could look completely different based on its available size and dynamics.

@container in action

In this example, I’m using two cards within a parent with the following markup:

<div class="card-container">
  <div class="card">
    <figure> ... </figure>
    <div>
      <div class="meta">
        <h2>...</h2>
        <span class="time">...</span>
      </div>
      <div class="notes">
        <p class="desc">...</p>
        <div class="links">...</div>
      </div>
      <button>...</button>
    </div>
  </div>
</div>

Then, I’m setting containment (the contain property) on the parent on which I’ll be querying the container styles (.card-container). I’m also setting a relative grid layout on the parent of .card-container, so its inline-size will change based on that grid. This is what I’m querying for with @container:

.card-container {
  contain: layout inline-size;
  width: 100%;
}

Now, I can query for container styles to adjust styles! This is very similar to how you would set styles using width-based media queries, using max-width to set styles when an element is smaller than a certain size, and min-width when it is larger.

/* when the parent container is smaller than 850px, 
remove the .links div and decrease the font size on 
the episode time marker */

@container (max-width: 850px) {
  .links {
    display: none;
  }

  .time {
    font-size: 1.25rem;
  }

  /* ... */
}

/* when the parent container is smaller than 650px, 
decrease the .card element's grid gap to 1rem */

@container (max-width: 650px) {
  .card {
    gap: 1rem;
  }

  /* ... */
}

Container Queries + Media Queries

One of the best features of container queries is the ability to separate micro layouts from macro layouts. You can style individual elements with container queries, creating nuanced micro layouts, and style entire page layouts with media queries, the macro layout. This creates a new level of control that enables even more responsive interfaces.

Here’s another example that shows the power of using media queries for macro layout (i.e. the calendar going from single-panel to multi-panel), and micro layout (i.e. the date layout/size and event margins/size shifting), to create a beautiful orchestra of queries.

Container Queries + CSS Grid

One of my personal favorite ways to see the impact of container queries is to see how they work within a grid. Take the following example of a plant commerce UI:

No media queries are used on this website at all. Instead, we are only using container queries along with CSS grid to display the shopping card component in different views.

In the product grid, the layout is created with grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));. This creates a layout that tells the cards to take up the available fractional space until they hit 230px in size, and then to flow to the next row. Check out more grid tricks at 1linelayouts.com.

Then, we have a container query that styles the cards to take on a vertical block layout when they are less than 350px wide, and shifts to a horizontal inline layout by applying display: flex (which has an inline flow by default).

@container (min-width: 350px) {
  .product-container {
    padding: 0.5rem 0 0;
    display: flex;
  }

  /* ... */
}

This means that each card owns its own responsive styling. This yet another example of where you can create a macro layout with the product grid, and a micro layout with the product cards. Pretty cool!

Usage

In order to use @container, you first need to create a parent element that has containment. In order to do so, you’ll need to set contain: layout inline-size on the parent. You can use inline-size since we currently can only apply container queries to the inline axis. This prevents your layout from breaking in the block direction.

Setting contain: layout inline-size creates a new containing block and new block formatting context, letting the browser separate it from the rest of the layout. Now, we can query!

Limitations

Currently, you cannot use height-based container queries, using only the block axis. In order to make grid children work with @container, you’ll need to add a wrapper element. Despite this, adding a wrapper lets you still get the effects you want.

Try it out

You can experiment with the @container property in Chromium today, by navigating to: chrome://flags in Chrome Canary and turning on the #experimental-container-queries flag.


The post Next Gen CSS: @container appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

A balanced tree

Category Image 101

A balanced tree is one of the data access techniques in a database. How does it work? How
data can be inserted in. How data can be deleted from it; how data can be updated? And
how data can be reviewed? By giving an example explain all of them. Your report must
be prepared as seen in the following template.
Here is the template of the report:
Steps Actions
1 Name of the report and date
2 Author of the report
3. Literature review
4. Your contribution
5 Explanation of each process as detail as much on figures.
6 Summary
7. Future advice
8. References

Divide arraylist of 750 into 150 sub arraylist

558fe5180e0e8fc922d31c23ef84d240

I have an ArrayList of 750 elements I would like to divide that ArrayList into 150 subarraylists so 5 elements to each subarraylist.

I have this code but it not working

while (scanner.hasNextLine()) {
            String t = scanner.nextLine();
            String[] ar = t.split(",");

            for (int i = 0; i < ar.length; i++) 
            {
                add.add(Double.parseDouble(ar[i]));
            }