The Differences Between Bash, Source, “.”, and “./” Execution

Featured Imgs 23

While working on Linux, you probably run across some files that are not executing in the way you expected — for example, you might have a file in your current directory but it does not run when you enter its name. You get file_name.sh command not found, but actually, the file is there. The file does not work, even having execution permission, because when you write something on the shell and run it, your $PATH variable gets checked. If there is any command matching inside $PATH directories, such as /usr/bin, it will execute. Unless there is a matching command, you are going to get the error.

So you need to address the path to your file. Let’s create a simple Linux shell script and have execution permission on the script. The below examples are written in Bash Shell.

Google’s Spam Update

Featured Imgs 11

After google's spam update my websites' visitor decrease a lot. Even many of my backlinks has been broken. So what is need to improve to increase my website's visitor.

The WordPress Community Isn’t Ready to Leave Twitter

Category Image 006

Elon Musk has bought Twitter in a $44B deal that closed this week, tweeting “Let the good times roll,” on Friday after taking the helm. Musk fired top executives at the company and tweeted an appeal to Twitter’s advertisers to share his motivation in acquiring what is arguably the world’s most important social network:

“The reason I acquired Twitter is because it is important to the future of civilization to have a common digital town square, where a wide range of beliefs can be debated in a healthy manner, without resorting to violence,” Musk said. “There is currently great danger that social media will splinter into far right wing and far left wing echo chambers that generate more hate and divide our society.”

Musk also hinted at the importance of content moderation, saying “Twitter obviously cannot become a free-for-all hellscape, where anything can be said with no consequences!” The company is forming a council to discuss content moderation, but nobody knows what that will mean for the future of Twitter.

While some Twitter users have considered migrating to Tumblr, the structure and user base isn’t currently comparable to the Twitter experience. In response to Verge co-founder Nilay Patel’s provocative article titled “Welcome to hell, Elon,” Tumblr CEO Matt Mullenweg tweeted his support.

“This is an unfortunately good summary of why running a social network is so hard, as I’ve learned with Tumblr,” Mullenweg said. “I am wishing Twitter the best and also hope this doesn’t slow down Tesla or SpaceX, which I think are critical to the future.”

Patel aptly communicated the weight of the political challenges Musk will face in his commitment to steering Twitter away from becoming “a free-for-all hellscape,” which some think has already happened. If Musk decides to open the doors to unsavory characters who were banned in the past, it may drive the social network into the ground.

While the WordPress community has many online gathering places – various Slack workspaces, P2 blogs, and Facebook groups – it has always been Twitter that served as the place for both casual interactions and breaking news. It is the de facto social network for those working in tech. There are many who only use the platform for keeping up with WordPress news and the community.

“There’s nowhere else to really go!” WordPress product designer Mike McAlister said. “WordPress people are pretty much exclusively on Twitter it seems.”

Apart from the few optimistic souls who think Twitter will be better than ever, many community members expressed apprehension about losing the network they have built over the years. As the closing of the sale loomed, people threatened to leave Twitter on principle if Musk gained control. That day has arrived, but for the most part the WordPress community is not abandoning Twitter.

“Twitter has had too good of an impact on my life to just jump ship,” Edan Ben-Atar said. “I’ll stick around for as long as it makes sense. For now, nothing has changed from what is noticeable to the eye.”

WordPress designer Dustin Henrich says he is staying but also looking up the people he follows on other platforms.

“I’ve made too many good connections, enjoy reading about people’s tech and non tech lives, and learning from some wicked smart people,” Henrich said. “I’d truly be sad if this just all went away.”

Decentralized social networking, which has so far failed to gain much mainstream attention, is getting a second look in light of Twitter changing hands. WordPress agency owner Tom Finley is experimenting with using the Activity Pub plugin to set up his site as a private Mastadon server. It implements the ActivityPub protocol for WordPress so readers can see the site’s posts on Mastadon and other federated platforms (that support Activity Pub).

Some WordPress community members are flirting with joining Mastadon instances, or have already committed to posting in both networks, but we are not yet seeing a mass exodus flocking to the fediverse.

“We’ve seen this attempted exodus to the promised land many times before,” Ross Wintle said in a post that explains why he isn’t optimistic about people successfully leaving Twitter. “Without a proper mass migration of people and organizations to another service, it doesn’t stick.

“You end up with people cross posting to multiple services to reach all the people that they want to reach. And then as a reader I’m checking multiple services and seeing the same things. The signal/noise ratio goes down. And most people get fed up and end up back where they were before.”

The most hopeful speculators ask if this could this be the return of blogs. At the moment blogs are not social enough, and there isn’t a critical mass of bloggers eager enough to adopt the protocols necessary to connect their sites in a stream of easily digestible, short updates.

Until Elon Musk makes more radical changes, many WordPress community members see no reason to leave Twitter.

“For now, I don’t see a reason to leave,” WordPress developer advocate Birgit Pauli-Haack said. “Block, Unfollow, Mute are my friends for curating my feed. I did cancel my subscription to Twitter Blue after 12 months. Being allowed to edit tweets is not worth it.”

Overall, most people are taking a “wait and see” approach regarding leaving Twitter.

“I haven’t found a viable alternative,” WordPress meetup organizer Sallie Goetsch said. “I do hang out in various WP Slack groups, but for the wider world…we’ll just have to see what happens here.”

One positive byproduct of this recent shake-up is that the WordPress community is considering a future where important conversations happen on another platform. As users explore other social networks, they may gain an affinity for a different type of social media culture with features that Twitter is lacking. Migrating and settling into a new social home on the web takes time.

“I’m not saying I wouldn’t love a mass migration to happen,” Ross Wintle said. “I’ve just seen so many attempts now and none seem to have been particularly successful, and I don’t see why this one would either.

“For a big change to happen, I think either the platform has to spontaneously combust itself or it falls out of fashion by a long period of attrition and fades from the public consciousness over time. Facebook may even be at the start of this. Time will tell.

“Perhaps, one day, we will look back and remember that thing we all used called Twitter the same way we remember Geocities and MySpace. But I struggle to see how that will be next week or next month. It will be in many years.”

Anti-Patterns in Incident Response That You Should Unlearn

Featured Imgs 23

It is important to invest time and effort in understanding why a system performs the way it does and how we can improve it. Companies continue with practices that yield successful results but ignoring anti-patterns can be far worse than choosing rigid processes. In this article, we will explore anti-patterns in incident response and why you should unlearn those.

Common Anti-Patterns in Incident Response 

Just Get Everyone on the Call 

Alerting everyone each time an incident is detected is not the best of practices. Sometimes notifying everyone is easier or adds value. For example:

Gutenberg 14.4 Introduces Distraction-Free Mode, Redesigns Pattern Inserter

Category Image 091

Gutenberg 14.4 was released today with long-awaited support for distraction-free editing, to the delight of content editors around the world. It hides all non-essential UI and clears the canvas for a focus on text-based content creation.

The mode can be toggled on in the options menu in the top toolbar. Distraction-free mode hides the top toolbar, any open sidebars, along with the insertion point indicator and the block toolbar.

source: Gutenberg 14.4 release post

The project to improve the editing experience for text-based content began with early explorations in February, which progressed into a PR that contributors have been refining for the last few months. This distraction-free mode is a monumental improvement over the days when users struggled to write with various UI elements popping in and out of view.

Another major update in 14.4 is the redesigned pattern inserter. It has been updated to show the categories before rendering the patterns, giving users a more fluid visual preview as they browse the pattern library. Patterns can be dragged and dropped from the preview pane into the canvas.

source: Gutenberg 14.4 release post

Other notable improvements users may notice include the following:

Performance benchmarks show an improvement in loading time for both the post and site editors. Check out the release post to see the full list of all the changes and bug fixes included in 14.4. This release will not be included in the upcoming WordPress 6.1 release next week, but users who are eager to adopt these new features can get them right now in the Gutenberg plugin.

How would you write this into pseudo code?

558fe5180e0e8fc922d31c23ef84d240

How would you write this into pseudo code

#include<cstdio>
#include<cstdlib>
#include<iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])

//variables
string var, var1;
float cm, mile, kilometer, inch, meter, AU, fahrenheit, celsius, foot, quit, i;
//program
i = 1;
while (i <= 1000000000) 
    cout << "Enter the starting unit. For a list of all units and commands, type list. To exit, type quit. Please note that this program will only loop one billion times." << endl <<endl;
    cin >> var;
    cout << endl;

        if (var == "quit")

                return 0;

        //list of functions
        if  (var == "list")

            cout << "For cm to inch type centimeter. For inch to cm type inch. For miles to km type mile. For km to miles type kilometer. For meters to AU or feet type meter. For AU to meters type AU. For feet to meters type feet. For fahrenheit to celsius type fahrenheit. For Celsius to Fahrenheit type celsius then rerun the program." << endl << endl << endl;

        //inches to centimeters
        if  (var == "inch")

            cout << "Please enter the number of inches" << endl;
           cin >> inch;
            cm = inch * 2.54;
            cout << "Distance in centimeters:" << endl;
            cout << cm << endl;

        //centimeters to inches
        if  (var == "centimeter")

            cout << "Please enter the number of centimeters" << endl;
            cin >> cm;
            inch = cm / 2.54;
            cout << "Distance in inches:" << endl;
            cout << inch << endl;

        //miles to kilometers
        if  (var == "mile")

            cout << "Please enter the number of miles" << endl;
           cin >> mile;
            kilometer = mile * 1.609344;
            cout << "Distance in kilometers:" << endl;
            cout << kilometer << endl;

        //kilometers to miles
        if  (var == "kilometer")

            cout << "Please enter the number of kilometers" << endl;
            cin >> kilometer;
            mile = kilometer / 1.609344;
            cout << "Distance in miles:" << endl;
            cout << mile << endl;

        //meters to AU or feet
        if  (var == "meter")

            cout << "Please select which unit you would like to convert meters to out of Astronomical units and feet" << endl;
            cin >> var1;
            //AU
            if  (var1 == "AU");

                cout << "Please enter number of meters" << endl;
               cin >> meter;
                AU = meter / 149598000000;
                cout << "Distance in AU:" << endl;
                cout << AU << endl;

            //feet
            if  (var1 == "feet")

                cout << "Please enter number of meters" << endl;
                cin >> meter;
                foot = meter * 3.2808399;
                cout << "Distance in feet:" << endl;
                cout << foot << endl;

        //AU to meters
        if  (var == "AU")

            cout << "Please enter number of AU" << endl;
            cin >> AU;
            meter = AU * 149598000000;
            cout << "Distance in meters:" << endl;
            cout << meter << endl;

        //feet to meters
        if  (var == "feet")

            cout << "Please enter number of feet" << endl;
            cin >> foot;
            meter = foot / 3.2808399;
            cout << "Distance in meters:" << endl;
            cout << meter << endl;

        //fahrenheit to celsius
        if  (var == "fahrenheit")

            cout << "Please enter temperature in Fahrenheit." << endl;
            cin >> fahrenheit;
            celsius = (fahrenheit - 32) * (5 / 9);
            cout << "Temperature in celsius:" << endl;
            cout << celsius << endl;

        //celsius to fahrenheit
        if  (var == "celsius")

            cout << "Please enter temperature in Celsius." << endl;
            cin >> celsius;
            fahrenheit = (celsius * (9 / 5)) + 32;
            cout << "Temperature in Fahrenheit:" << endl;
            cout << fahrenheit << endl;

    i++;

system("PAUSE");

Where can I get a Website Done?

Featured Imgs 20

I've recently started off a Cupcake business for myself and I really need a website done as most of my customers are struggling to find my business on the web. I just need a website which can showcase the different sweets and everything I bake and maybe even a direct purchasing page. Anyone has any suggestions?

Gradle: Push to Maven Repository

Featured Imgs 23

If you are a developer sharing your artefacts is a common task, that needs to be in place from the start.

In most teams and companies a Maven repository is already set up, this repository would be used mostly through CI/CD tasks enabling developers to distribute the generated artefacts.

8 Ways to Identify and Fix Browser-Based Website Errors and Issues

Featured Imgs 03

No one is perfect, and that goes for website owners as well. Even the best, most well-coded and thoughtfully put together websites will experience errors and issues at some point – it’s simply unavoidable. In fact, part of the process of owning a website is being able to identify and fix an error as it comes up.

Often, you’ll find issues occur after switching hosts, updating plugins or themes in WordPress, or adding code snippets to existing designs. It doesn’t take much to break a site and prevent it from interacting with browsers properly.

However, not all errors or issues are the same. Some are relatively minor and can be fixed with ease; others may require more time and effort on your part.

That’s why in this article, we’ll outline 8 different types of browser-based website errors and issues you may encounter, along with tips on how to identify and fix them on the spot.

Your Web Designer Toolbox

Unlimited Downloads: 500,000+ Web Templates, Icon Sets, Themes & Design Assets Starting at only $16.50/month!

Page Not Found (404) Error

This is perhaps the most common type of error you’ll encounter. A 404 error occurs when a user tries to access a page that doesn’t exist on your website. There can be a number of reasons why this might happen, but usually, it’s because the page in question has been moved or deleted.

Page Not Found (404) Error

In any case, if a user encounters a 404 error on your website, it’s important to have a custom error page set up. This should include a brief message explaining the error, along with links to other pages on your website that the user may find helpful.

Connection Timeout Error

A connection timeout error occurs when a user’s browser is unable to establish a connection with your server. This can happen for a number of reasons, but usually, it’s due to heavy traffic on your website or an issue with your server itself.

If you’re encountering this error frequently, it may be a sign that you need to upgrade your hosting plan to one that can accommodate more traffic. Alternatively, if the issue is with your server, you may need to contact your host or web developer for assistance.

Internal Server Error

An internal server error is similar to a connection timeout error, in that it’s also caused by an issue with your server. However, this error is typically more serious and can be caused by more pressing issues like a corrupt file or database.

Should this error occur, the first thing you should do is access your server directly in order to identify and fix the issue via an FTP client like FileZilla or Cyberduck.

Internal Server Error

Potential solutions include:

  • Checking (and adjusting) your file permissions
  • Clearing your website’s cache
  • Running a malware scan
  • Upgrading your hosting plan

Maintenance Mode Error

If you’re in the process of making changes or updates to your website, you may want to put it into maintenance mode. This essentially means that your website is only accessible to you and other administrators; regular users will see a custom error page explaining that the website is down for maintenance.

Putting your website into maintenance mode is a relatively simple process, but it’s important to remember to take it out of maintenance mode when you’re finished making changes. Otherwise, your regular users will continue to see the error page and may become frustrated.

DNS Error

A DNS, or Domain Name System, error occurs when a user’s browser is unable to resolve your website’s domain name. This usually happens due to an issue with your DNS settings.

Here’s how to adjust your DNS settings to resolve this error:

  1. Log in to your domain name registrar and select the DNS management tool.
  2. Find the A record for your website’s domain name and make sure the IP address is correct.
  3. If there is no A record for your website’s domain name, you’ll need to create one.
  4. Make sure your www CNAME record is pointing to your website’s domain name.
  5. Save your changes and wait for the DNS to propagate (this can take up to 24 hours).

SSL Certificate Error

An SSL, or Secure Sockets Layer, certificate is a type of security certificate that helps to encrypt data being transmitted between a user’s browser and your website. If you have an SSL certificate installed on your website, you may encounter an error if it expires or is not properly configured.

SSL Certificate Error

If you’re encountering an SSL certificate error, the first thing you should do is check the expiration date on your certificate. If it has expired, you’ll need to renew it.

If your certificate is still valid, but you’re encountering an error, the issue may be with your configuration. To fix this, simply follow these steps:

  1. Log in to your domain name registrar and select the SSL/TLS certificates tool.
  2. Find the SSL certificate for your website’s domain name and make sure the details are correct.
  3. If there is no SSL certificate for your website’s domain name, you’ll need to create one.
  4. Save your changes and wait for the SSL to propagate (this can take up to 24 hours).

Browser Compatibility Error

Browser compatibility errors occur when a user’s browser is not compatible with the code used to build your website. This can happen for a number of reasons, but usually, it’s because the user is using an outdated or unsupported browser.

If you’re encountering this error, the first thing you should do is check to see if the browser you’re using is supported or up-to-date. If not, you may need to update your browser or switch to a different browser to view the website properly.

It can also be helpful to create a notice on your website that indicates its browser compatibility clearly — especially if your site has a very new feature or attribute that isn’t universally supported yet.

Malicious Website Errors

If you’re encountering an error that says your website has been flagged as malicious, it’s likely because your website has been hacked. This can happen for a number of reasons, but usually, it’s because the hackers were able to exploit a security vulnerability on your site.

If you believe your website has been hacked, the first thing you should do is change all of your passwords — especially if you think the hackers may have access to them. You should also run a security scan on your website to check for any malicious code or files that may have been injected. If you find any, you’ll need to delete them and then update your website to the latest version to patch the security vulnerability.

Don’t Let Browser Issues Halt Site Progress

Website errors that show up in browsers can be frustrating, but luckily, most of them are relatively easy to fix. By following the steps outlined in this article, you should be able to identify and fix any browser-based website errors and issues you encounter.

State Of CSS Survey: Influence The Future Of CSS

Category Image 052

This year, I joined the team and helped design the survey together with the community which led to a number of improvements. If you write CSS frequently, investing a few minutes to fill it in could come back to you hundredfold, since implementers make decisions on what to work on based on the developer pain points identified through the survey every year. In fact, Chrome is funding work on the survey for this very reason.

Past Surveys

So, how did past surveys help web developers? Let’s look at the impact in Chrome, as described to us by Nicole Sullivan, Product Manager for Chrome at Google:

“I showed the ‘Missing features’ section to my team before the pandemic and we got to work on it. Several things on that list are underway.”

Indeed, literally everything in that list is now being worked on or finished unless there was no (stable) specification for it:

  • Container queries
    Size queries have shipped in Chrome 106 , style queries behind a flag.
  • Parent selector/:has selector
    Shipped in Chrome 105.
  • Nesting
    Currently underway, delayed a bit due to discussions in the CSS Working Group about last minute changes to the syntax.
  • 🟡 Functions
    No specification to implement yet, but is being worked on in the CSS WG.
  • Scoping
    Experimental implementation in Chrome 105 behind a flag.
  • 🟡 Mixins
    No specification to implement yet, but ideas are being explored in the CSS WG.
  • Subgrid
    Implementation underway.

Let’s look at the corresponding section in the 2020 results. A lot of overlap, but some additional items:

The 2021 corresponding section includes roughly the same items, with one new thing: color functions. And lo and behold, the color functions for which there is a stable specification are being implemented in Chrome as we speak, and Chrome has funded specification work on the rest.

And it’s not just Chrome. The focus of Interop 2022 was largely shaped by these results.

What’s Next?

We’re taking on the world of styles and selectors to try and identify upcoming trends, and figure out what featurs and tools to learn next. What’s more, the survey results will also help browser vendors prioritize their roadmaps and work towards better compatibility between browsers.

What do you want to see more of in CSS? Better typography? New responsive layout features? New features to improve maintainability? Layout? Components? Something else? The sky is the limit! Make sure to share your CSS dreams with us in the survey, and they may well start coming true.

7 Redis Interview Questions Job-Seekers Should Be Ready to Answer

Category Image 101

The job youre applying for says, Redis experience required. Are you ready for the questions a hiring manager is likely to ask? Heres how to prepare for the job interview... as inspired by Lord of the Rings.

Nominally the article is written for someone getting answers ready for Redis-specific questions, but I think they'd apply for any database-related job. Especially if you have experience with one tool and the job asks for experience with another.

How to Calculate OHLC Bars in DolphinDB

Featured Imgs 23

OHLC bars can be efficiently calculated in various scenarios in DolphinDB. This tutorial will introduce how to calculate OHLC bars with historical data and real-time data. 

  • With historical data

We will explain how to calculate OHLC bars with batch calculation for the following scenarios: