Googlebot uses cookies

Featured Imgs 11

Google has always said that all of their bots do not use cookies.

I caught a screenshot on Google PageSpeed Insights that displayed a modal that I only have implemented for users with a specific cookie already set.

So there you have it, Googlebot uses cookies.

Implementing Promotion Bias Checks in Engineering

Featured Imgs 23

Perhaps the easiest way to reduce bias in promotions is to use a promotion bias spreadsheet

You can use this spreadsheet in promotion decision meetings to show, in real-time, who is getting promoted. This can help highlight bias, and result in better decision-making.

Is Your Email Security Built to Withstand Determined Intruders?

Featured Imgs 23

We take great care to safeguard our homes and valuable assets with numerous methods of defense. We employ layers of protection, with double locks on external doors, alarm sensors on windows, and strategically placed motion-activated cameras and signs in the yard to deter intruders.

Many of us place valuables in secure home safes, discreetly camouflaged from the casual observer and determined burglar. It’s just a common-sense inclination to protect our property and treasured possessions.

MSSP’s Mitigation Responsibilities Against Ransomware

Featured Imgs 23

The threat of ransomware is real and growing. To protect your organization, it’s essential to partner with a Managed Security Service Provider (MSSP) that can help you mitigate the risk. Because there are new ransomware variants and attacks every day, your MSSP must have a robust security program to protect you.

But have you ever thought about what MSSP means precisely? What are their responsibilities in regards to ransomware?

How to Use CSS Media Queries: A Complete Guide for Beginners

Category Image 052
how to use CSS media queriesIt’s been more than a decade since responsive web design became a household term, and it’s critical that all front-end developers know how to use CSS media queries in 2022. The basic syntax for a CSS media query isn’t difficult to remember, but it’s not as easy to recall all the different media features you have access to when building responsive websites.

Telegram native marketing

Featured Imgs 20

There is an opportunity to set up the marketing campaign on Telegram. I'm talking about the official native ads.

Does somebody know anything about telegram advertising opportunities? Are there any other options besides paying the deposit of 2 000 000?

JDBC Tutorial: Nice and Easy [Video]

Featured Imgs 23

Ever looked for a comprehensive intro to JDBC that is fun and entertaining at the same time? Then have a look at this brand-new episode of the "Marco Codes" YouTube channel: JDBC Tutorial: Nice and Easy.

In this video, you'll learn how to use JDBC, the basic API that every Java program uses to access databases. Understand what JDBC drivers are and where to get them, as well as learn how to use an embedded H2 database in addition to the usual suspects like MySQL or Postgres. Fire off SQL select, insert, update and delete statements from Java. Finally, learn about connection pools and the overall Java database framework/library landscape. By the end of the tutorial, there won't be many questions left when it comes to accessing databases with Java.

First Look At The CSS object-view-box Property

Category Image 091

Ahmad Shadeed — doing what he always does so well — provides an early look at the object-view-box property, something he describes as a native way to crop an image in the browser with CSS.

The use case? Well, Ahmad wastes no time showing how to use the property to accomplish what used to require either (1) a wrapping element with hidden overflow around an image that’s sized and positioned inside that element or (2) the background-image route.

But with object-view-box we can essentially draw the image boundaries as we can with an SVG’s viewbox. So, take a plain ol’ <img> and call on object-view-box to trim the edges using an inset function. I’ll simply drop Ahmad’s pen in here:

Only supported in Chrome Canary for now, I’m afraid. But it’s (currently) planned to release in Chrome 104. Elsewhere:

To Shared LinkPermalink on CSS-Tricks


First Look At The CSS object-view-box Property originally published on CSS-Tricks. You should get the newsletter.

How We Migrated Hundreds of Posts from Hugo to Webflow

Featured Imgs 23

We have recently completed the migration of Nebula Graph’s website from Hugo to Webflow, moving from a static website to a more interactive one. There were a number of reasons for this decision, but most notably it was the performance and the ability to do things like form submission and no-code design.

While the redesign of the website on Webflow was easy, since we have an amazing in-house design team and Webflow is also very friendly to designers, the difficult part is migrating more than 100 blog posts we already published from Hugo to Webflow’s Content Management System (CMS).

Troubleshooting Memory Leaks With Heap Profilers

Featured Imgs 23

After a system runs for a long time, the available memory may decrease, and some services may fail. This is a typical memory leak issue that is usually difficult to predict and identify. Heap profilers are useful tools to solve such problems. They keep track of memory allocations and help you figure out what is in the program heap and locate memory leaks.

This article introduces how to use heap profilers, and how widely-used heap profilers, such as Go heap profiler, gperftools, jemalloc and Bytehound, are designed and implemented. I hope this article can help you better understand and use heap profilers for your own projects. 

Writing Into a txt file using linked list. The code I have listed is for re

558fe5180e0e8fc922d31c23ef84d240

This is the code for reading from a txt file, but creating a code for writing into a txt file that goes along with this reading code is pretty difficult and am looking for any ideas that can help me in implementing this using linked list along with txt files

I want to create a code to write Into a text file that goes along with the read code that I have listed down all using linked list.
Any ideas would be a big help and appreciated

#include <iostream>
#include <string>
#include <fstream>
#include <iomanip>

using namespace std;

struct person_tag
{
    string name;
    string id;
};

struct course_tag
{
    string course_name;
    int no_of_units;
    int marks[4];
    double avg;
};

struct tutor_tag
{
    person_tag tutor_info;
    course_tag course_info;
    tutor_tag *next;
};

typedef struct tutor_tag Tutor_Tag;
typedef Tutor_Tag *Tutor_TagPtr;

Tutor_Tag *hptr;
Tutor_Tag *cptr;
Tutor_Tag *nptr;

//function protypes
void menu();
void read();
void display_tutors();

void
read()              //readfile function
{
    hptr = nptr = NULL;              //intialized to null
    string filename = "tutors.txt";
    ifstream inFile(filename);

    if (inFile.fail())               // if file doesnt open successfully
    {
    cout << "The File was not opened successfully\n";
    cout << "Please check that the file currently exists\n";
    exit(1);
    }
    while (true)         // until the end of the file
    {
    cptr = new Tutor_Tag;
    cptr->next = NULL;
    // Read the data into the new item
    inFile >> cptr->tutor_info.name;
    inFile >> cptr->tutor_info.id;
    inFile >> cptr->course_info.course_name;
    inFile >> cptr->course_info.no_of_units;
    for (int j = 0; j < cptr->course_info.no_of_units; j++) {
        inFile >> cptr->course_info.marks[j];
    }

    // Did you read it okay?
    if (inFile.fail()) {
        delete cptr;    // don't need it
        break;
    }

    // Okay, you read it. Add to the list
    if (hptr == NULL) {
        // First item in the list. Point hptr at it
        hptr = cptr;
    } else {
        // Not the first item, append it to the tail.
        nptr->next = cptr;
    }
    nptr = cptr;        // Move the tail pointer
    }
    inFile.close();              //close file
}

void
display()
{
    tutor_tag *ptr;
    ptr = hptr;
    while (ptr != NULL) {
    cout << "The Tutor Name: " << ptr->tutor_info.name << "  \n";
    cout << "The Tutor ID: " << ptr->tutor_info.id << "  \n";
    cout << "The course name: " << ptr->course_info.course_name << "  \n";
    cout << "Number of units " << ptr->course_info.no_of_units << "  \n";
    cout << " Rating recieved: \n";
    for (int j = 0; j < ptr->course_info.no_of_units; j++) {
        cout << ptr->course_info.marks[j] << "  \n";
    }
    cout << "The marks average is : " << ptr->course_info.avg << "  \n";
    ptr = ptr->next;
    }
}

int
main()
{
    read();
    cout << "The linked list is: ";
    display();
    return 0;
}

my update and delete button isa not working

Category Image 101
import net.proteanit.sql.DbUtils;

import javax.swing.*;
import javax.xml.transform.Result;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;

public class EmployeeRegistriation {
    private JPanel Main;
    private JTextField txtName;
    private JTextField txtSalary;
    private JTextField txtMobile;
    private JButton saveButton;
    private JTable table1;
    private JButton updateButton;
    private JButton deleteButton;
    private JButton searchButton;
    private JTextField txtId;
    private JScrollPane tabla_1;

    public static void main(String[] args) {
        JFrame frame = new JFrame("EmployeeRegistriation");
        frame.setContentPane(new EmployeeRegistriation().Main);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }
    Connection con;
    PreparedStatement pst;

     public void connect()
    {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            con = DriverManager.getConnection("jdbc:mysql://localhost/johnrichescompany", "root", "");


            System.out.println("Success");


        }
        catch (ClassNotFoundException ex)
        {
            ex.printStackTrace();

        }
        catch (SQLException ex)
        {
            ex.printStackTrace();
        }
    }

    private void forName(String s) {
    }


    public EmployeeRegistriation() {
        connect();
        table_load();

        saveButton.addActionListener(new ActionListener() {

            /**
             * Invoked when an action occurs.
             *
             * @param e the event to be processed
             */
            @Override
            public void actionPerformed(ActionEvent e) {

                String empname, salary, mobile;


                empname = txtName.getText();
                salary = txtSalary.getText();
                mobile = txtMobile.getText();


                try {
                    pst = con.prepareStatement("insert into employee_registration(empname,salary,mobile)values(?,?,?)");
                    pst.setString(1, empname);
                    pst.setString(2, salary);
                    pst.setString(3, mobile);
                    pst.executeUpdate();
                    JOptionPane.showMessageDialog(null, "Record Added!!!");
                    table_load();
                    txtName.setText("");
                    txtSalary.setText("");
                    txtMobile.setText("");
                    txtName.requestFocus();
                } catch (SQLException ex) {
                    ex.printStackTrace();
                }

            }
        });
        searchButton.addActionListener(new ActionListener() {
            /**
             * Invoked when an action occurs.
             *
             * @param e the event to be processed
             */
            @Override
            public void actionPerformed(ActionEvent e) {
                try {
                    String employeeid = txtId.getText();

                    pst = con.prepareStatement("select empname, salary, mobile from employee_registration where employeeid = ?");
                    pst.setString(1, employeeid);
                    ResultSet rs = pst.executeQuery();

                    if (rs.next() == true) {
                        String empname = rs.getString(1);
                        String salary = rs.getString(2);
                        String mobile = rs.getString(3);


                        txtName.setText(empname);
                        txtSalary.setText(salary);
                        txtMobile.setText(mobile);


                    } else {
                        txtName.setText("");
                        txtSalary.setText("");
                        txtMobile.setText("");
                        JOptionPane.showMessageDialog(null, "Invalid Employee Id");
                    }
                } catch (SQLException ex) {
                }
            }
        });
        updateButton.addActionListener(new ActionListener() {
            /**
             * Invoked when an action occurs.
             *
             * @param e the event to be processed
             */
            @Override
            public void actionPerformed(ActionEvent e) {

                String employeeId, empname, salary, mobile;


                empname = txtName.getText();
                salary = txtSalary.getText();
                mobile = txtMobile.getText();
                employeeId = txtId.getText();


                try {
                    pst = con.prepareStatement("update employee_registration set empname = ?,salary + ?,mobile = ? where employeeId =?");
                    pst.setString(1, empname);
                    pst.setString(2, salary);
                    pst.setString(3, mobile);

                    pst.executeUpdate();
                    JOptionPane.showMessageDialog(null, "Record Updated!!!");
                    table_load();
                    txtName.setText("");
                    txtSalary.setText("");
                    txtMobile.setText("");
                    txtName.requestFocus();


                } catch (SQLException e1) {
                    e1.printStackTrace();
                }


            }
        });
        deleteButton.addActionListener(new ActionListener() {
            /**
             * Invoked when an action occurs.
             *
             * @param e the event to be processed
             */
            @Override
            public void actionPerformed(ActionEvent e) {
                String employeeid;



                employeeid = txtId.getText();




                try {
                    pst = con.prepareStatement("delete from employee_registration where employeeid = ?");
                    pst.setString(1, employeeid);
                    JOptionPane.showMessageDialog(null, "Record Deleted!!!");
                    table_load();
                    txtName.setText("");
                    txtSalary.setText("");
                    txtMobile.setText("");
                    txtName.requestFocus();

                }
                catch (SQLException e1) {
                    e1.printStackTrace();
                }








            }
        });
    }

    void table_load() {
            try {
                pst = con.prepareStatement("select * from employee_registration");
                ResultSet rs = pst.executeQuery();
                table1.setModel(DbUtils.resultSetToTableModel(rs));
            }
            catch (SQLException e)
            {
                e.printStackTrace();
            }












    }




}

New Video Explores Site Building Progress From WordPress 5.0 to 6.0

Typography Definitions Cover

Do you remember what it was like to use WordPress 5.0? Three years and ten major releases have radically changed the site building experience, but it’s not always easy to see recognize when focused on some of the smaller, iterative changes that slowly add up. Anne McCarthy, WordPress product liaison at Automattic and co-release coordinator for 6.0, has created a short 13-minute video that shows the immense amount of progress contributors have made on site building features.

McCarthy takes viewers back in time to WordPress 5.0, released in December 2018, which introduced the block editor and the Twenty Nineteen default theme through the work of 400+ contributors. She demonstrates using the Customizer with the default theme. These were simpler days and it’s clear now how limited the Customizer was for implementing the most basic changes.

The video contrasts that experience with the upcoming 6.0 release, which features the work of 500+ contributors on features that didn’t exist three years ago.

McCarthy quickly demonstrates the 6.0 site editing experience, swapping out template parts, and showcasing the breadth of the customization available for images, colors, typography, controlling the posts that are displayed, style variations, and the impressive array of design tools available.

Ten major versions later, nearly every Aspect of a WordPress site is customizable through the site editor. For those who have not yet made the leap into full-site editing – it’s essentially like the old Customizer but with super powers, better instant previews, and the interface is a panel on the right. At this point, I don’t think the usability is at a level where someone can just get in there and immediately know what they are doing. It takes a little bit of exploring, but it’s moving in the right direction.

Videos like this one show what is possible and just how far WordPress has come since it first introduced the block editor. It also indirectly answers Joost de Valk’s recent claims that the full-site editing project not being done yet is partially to blame for WordPress’ recent decline in market share.

While WordPress remains the uncontested market leader among CMS’s, some say this small percentage of a decline is inconsequential. Matt Mullenweg has stated in previous interviews that he views market share stats as a “trailing indicator” in the quest to create the best possible experience for users and developers. A growing market share, in that sense, is a signal of user satisfaction.

WordPress jumped into the block paradigm at the right time, just as many other apps began adopting the concept of composable blocks for creating content and designs. Full-site editing is the extension of that vision but it takes time to make it something polished and delightful to use. McCarthy’s video is a good reminder of the limitations that users previously labored under while trying to edit their sites, and the “why” behind all the effort going into FSE.

“As someone who’s currently on the WordPress 6.0 Release Team, I can attest that the project needs more contributors,” WordPress contributor Nick Diego said in response to the recent market share discussion. “The fact that FSE has taken so long is not a lack of effort. There are many contributors pouring their hearts and souls into the project. We just need more help.”

Taking Your App Offline with the Salesforce Mobile SDK

Featured Imgs 23

Last year, my wife and I gained the first-time experience of building a brand-new home. The process was fun and exciting, but we also experienced the unexpected internet service interruptions that often accompany new home subdivisions.

While these outages impacted my family’s ability to stream services, such as Amazon Prime, Hulu, and Netflix, I continued working on my current project, due to the intentional design of being able to work in an isolated (or offline) state. This has always been helpful during airline travel when I work from Nevada and Florida during the year.