teleren/devto huggingface dataset:
Can you build an application with only GitHub Copilot?
Tags: discuss, programming, beginners
Published: 2022-08-18 10:47:57

With Copilot’s capabilities, I wanted to challenge myself to build a small application using only Copilot. For this challenge, I wanted to create a simple random quote application that also displays the sentiment of the quote.

To do this, I had a few rules to follow to see how much benefit I could receive from Copilot.

First, I could not search the internet if I encountered a problem, including using Stack Overflow or documentation. This let me see whether it was possible to solely rely on Copilot’s suggestions to create working code.

The second rule was that I could not write any new code myself. I could, however, write comments, variables, names, and function names to trigger Copilot’s suggestions. Similarly, I could also make small edits to the suggested code.

And finally, I could trigger the list of Copilot suggestions and accept one, since this is a built-in feature.
Yibao officially joined the openGauss community
Published: 2022-08-18 10:44:28

On August 15th, Yibao signed CLA (Contribution License Agreement) and officially joined the openGauss community.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ofnrd7t85qv9sryn6vsz.png)

About Yibao
Yibao is a leading technology company in China, with five main businesses, including software services, Yibao Intelligence, Yibao Design, Yibao Education, and Yibao Industry, covering new retail, finance, smart city, communications, Internet of Things, aviation, government and other industries. Since its establishment in 2000, Yibao has set up 14 branches and 8 R&D centers across the country, relying on the three advantages of professional talents, agile services and global design and six major competence centers (big data, artificial intelligence, mobile terminal, cloud Application and data enablement, Internet of Things, design center), and become an information technology service expert for customers in high-tech, Internet, finance and e-commerce industries.



Join hands with the openGauss community

This time, with the openGauss community, ePro's professional database team will carry out more cooperation in database operation and maintenance, data migration, data security, data collection, data governance, data storage, data computing, etc., and will build intelligent intelligence for more industries in the future. The model uses massive data to mine data value for customers and promote digital transformation.
Open Close Store Hours for WooCommerce
Tags: woocommerce, open, close, plugin
Published: 2022-08-18 10:35:47

Open and Close your WooCommerce store automatically during business hours and holiday with [WooCommerce open close plugin](https://woocommerce.com/products/open-close-store-hours-for-woocommerce/). You can also hide the “Add to Cart” button to prevent taking orders in off-hours. 

Key Features of this plugin are

1. Setup Store routine such as business days, and working hours
2. Schedule Breaks in Working Hours
3. Display a store closure message in a bar or popup
4. Hide ‘Add to Cart’ option
5. Exclude products or categories
6. Temporary close your store for an event
7. Close your store straightaway manually
8. Customize store closure popup and bar
9. Display popup or bar on various pages
10. Personalize upcoming closure notifications
11. Set time zone based on your Location

**For more information** https://woocommerce.com/products/open-close-store-hours-for-woocommerce/
How to drive traffic to your website?
Tags: webdev, beginners, tutorial, seo
Published: 2022-08-18 10:35:47

That’s a wrap! Here’s how to increase website traffic:

1. Have a business blog
2. Focus on evergreen topics
3. Write irresistible headlines
4. Invite others to guest blog on your site
5. Create awesome visuals
6. Incorporate video
7. Have a resource center
8. Target keywords & long-tail keywords
9. Place your keywords strategically
10. Optimize your SERP appearance
11. Link internally
13. Improve your page speed
14. Make your site responsive
15. Implement Schema markup
16. Get backlinks
17. Regularly refresh old content
18. Promote your content on social
19. Add hashtags
20. Target amplifiers
21. Post native LinkedIn articles
22. Interview industry thought leaders
23. Add social share buttons
24. Research the competition
25. Post at the right time
26. Host webinars
27. Optimize your business listings
28. Start an online community
29. Participate in forums
30. Attend conferences
31. Submit your content to aggregator sites
32. Start an email newsletter
33. Reach out to email newsletters
34. Create a free tool
35. Advertise
36. Track SEO metrics with Google Analytics
37. Identify queries with Google Search Console
38. Analyze the SERP with SEO tools
39. Audit your site with website graders
💪 Bypass SMS 160 chars limits and send Star Wars intro as a single concatenated 📜
Tags: showdev, news, java, ux
Published: 2022-08-18 10:33:00

## ❔ About

Many `SMS` services and gateways support **_"concatenated SMS"_ ** (messages or messages over 160 characters).

This time, we'll show how our Java (`picocli` & Spring Boot) based `cli`, thanks to a nicely designed API make the sending of (very) long SMS look like a piece of 🍰.

## 📑 Existing services and gateways

In the wild, we can find two famous SMS API services : 

[Jasmin SMS](https://www.jasminsms.com/) is one of them... and it supports "Long Messages" :

> "Supports concatenated (multipart) SMS contents (long SMS)"

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vmxybar0vj1dxy8996zm.png)](https://docs.jasminsms.com/en/latest/)
 
So does [Twilio](https://www.twilio.com/messaging/sms), still providing [some best practices guidelines](https://support.twilio.com/hc/en-us/articles/223181508-Does-Twilio-support-concatenated-SMS-messages-or-messages-over-160-characters-) : 

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mxq1lzhx3f1wctm94n8v.png)
](https://support.twilio.com/hc/en-us/articles/223181508-Does-Twilio-support-concatenated-SMS-messages-or-messages-over-160-characters-) 

## 🍿 `cli` Showtime ✨

`OPT-SMS` is a `cli` which aims is to simplify integrations & sms batch sending easier for any user who has an access to the API.

Our `cli` does not required any technical skill to perform usually not that easy tasks, for any kind of user on any kind of platform as it is a (Spring boot) Java based project.

{% youtube WjQgS7aNgGc %}
EBC - Everything but code
Tags: beginners, codenewbie, programming
Published: 2022-08-18 10:32:00

## Welcome to Everything But Code!

This is going to be a series of posts covering what I feel are the most important/useful topics in programming that aren't writing the actual code. 

### But surely the code is the most important thing?

True! Having the slickest workflow means nothing if the code you end up writing doesn't work. But I think that having a good setup can help you to write code more efficiently and accurately, which will ultimately lead to better code!

### Ok, but I already have a setup, why should I read this?

It is easy to get comfortable with a particular way of coding, and you may think it won't be worth the time adjusting to a new system, especially if you don't know for certain that it will lead to an improvement. I would encourage you to give any concepts you read here a long think before trying so that you spend that precious time on solutions you do feel could improve your coding. 

### Yeah, but, I know I have the best setup, I spent ages researching it 4 years ago!

You are probably right that your setup was the best for you ... 4 years ago. But in the four following years not only will new systems and technologies have been created, but you will also have changed. I feel that it is worth having a look at your setup every so often to ensure it is still the best for you that it possibly can.

### Hold up, I'm a complete newbie, can we slow down?

Absolutely! Several of the posts in this series may be discussing things that you have never heard of before. Don't expect yourself to read through everything in one weekend and come out with the best setup ever; take your time and slowly introduce things to your workflow over time. This will allow you to adjust much more easily to each thing you introduce and give you the time and space to make sure you understand how each new introduction works with the systems you already have in place.
Text to CSV using Javascript (JS)
Tags: javascript, programming, tutorial, node
Published: 2022-08-18 10:31:00

## **What we will be looking at?**
In this tutorial we are going to see how we can convert our data from text to csv and export it.

## Steps:-
1. Install node (`npm init -y`)
2. Install packages (`npm i fs`)
3. Create ont .js extension file and open it in your favorite editor.

## Code Explanation
`const fs = require("fs");` Here we will be importing fs which we install. It will be used for exporting the file.

Here we have a dummy text data which we will be converting to CSV.
`let s = `This is my file
showing some data
data1 = 12
data2 = 156`;`

Here we have define a function that will take care of the conversation from text to csv.
`const textToCSV = () => {
  // 1. Split the lines
  // 2. Split each words using spaces and join them using coma(,)
  // 3. Rejoin the lines
  let text = s
    .split("\n")
    .map((line) => line.split(/\s+/).join(","))
    .join("\n");
  // Save the data in csv format
  fs.writeFileSync("dataNew.csv", text);
  // Print Task completion
  console.log("Task Completed");
};
`

Text has been converted to csv.
`textToCSV();`

## Whole code
`// Import module
const fs = require("fs");

// Text to be stored in csv file
let s = /`This is my file
showing some data
data1 = 12
data2 = 156/`;

// Function to create text to csv
const textToCSV = () => {
  // 1. Split the lines
  // 2. Split each words using spaces and join them using coma(,)
  // 3. Rejoin the lines
  let text = s
    .split("\n")
    .map((line) => line.split(/\s+/).join(","))
    .join("\n");
  // Save the data in csv format
  fs.writeFileSync("dataNew.csv", text);
  // Print Task completion
  console.log("Task Completed");
};

textToCSV();`
android - Get root view from current activity
Tags: android
Published: 2022-08-18 10:19:20

Question from [androidandrey](https://androidandrey.com/):
I know how to get the root view with View.getRootView(). I am also able to get the view from a button's onClick event where the argument is a View. But how can I get the view in an activity?


Solution 1:

If you need root view of your activity (so you can add your contents there) use

findViewById(android.R.id.content).getRootView()
Also it was reported that on some devices you have to use

getWindow().getDecorView().findViewById(android.R.id.content)
instead.

Please note that as Booger reported, this may be behind navigation bar (with back button etc.) on some devices (but it seems on most devices it is not).

If you need to get view that you added to your activity using setContentView() method then as pottedmeat wrote you can use

final ViewGroup viewGroup = (ViewGroup) ((ViewGroup) this
            .findViewById(android.R.id.content)).getChildAt(0);
But better just set id to this view in your xml layout and use this id instead.

Solution 2:

This is what I use to get the root view as found in the XML file assigned with setContentView:

final ViewGroup viewGroup = (ViewGroup) ((ViewGroup) this
            .findViewById(android.R.id.content)).getChildAt(0);
Solution 3:

I tested this in android 4.0.3, only:

getWindow().getDecorView().getRootView()
give the same view what we get from

anyview.getRootView();

com.android.internal.policy.impl.PhoneWindow$DecorView@#########
and

getWindow().getDecorView().findViewById(android.R.id.content)
giving child of its

android.widget.FrameLayout@#######
Please confirm [here](https://androidandrey.com/howto/57/android---Get-root-view-from-current-activity).
Best Free Web Design Software
Tags: webdev, beginners, design
Published: 2022-08-18 10:16:24

1. CMS Hub: Best All-in-One Web Design Software for Beginners
2. WordPress: Best Free Blog Design Software for Beginners
3. Figma: Best Free Collaborative Wireframing Tool for Beginners
4. Sketch: Best User Interface Design Tool for Mac Users
5. Lunacy: Best Free User Interface Design Tool for Windows Users
6. Adobe XD: Best Prototyping Software for Adobe CC Users
7. Origami: Best Free Web Design Tool for Animations
8. InVision Studio: Best Free Mobile Responsive Prototyping Software
9. FluidUI: Best Simple Web Design Tool for Prototyping
10. Vectr: Best Simple Web Design Tool for Vector Drawing
11. GIMP: Best Simple Web Design Tool for Photo Editing
12. Marvel: Best Simple Web Design Tool for User Testing
13. Wix: Best Simple Website Builder
14. Framer: Best Simple Design Tool for Web Apps and Products
Bootstrap: Best Prebuilt Web Design Framework
15. Sublime Text: Best Free Code Editor for Mac
16. Visual Studio Code: Best Free Code Editor for Windows
17. Mobirise: Offline Static drag & drop website builder
Driving tech strategy on the transformation journey
Tags: transformation, cloud, aws, serverless
Published: 2022-08-18 09:52:00

Dave joined the [AI Ireland](https://aiireland.ie/2021/09/28/e68-technologist-david-anderson/) podcast to talk about his experience of driving technical strategy. He has worked in organizations ranging from startups to global enterprises. He has a wealth of experience guiding technical and business teams through the digital transformation journey.

It hasn’t all been plain sailing. He has encountered cultural and leadership challenges along the way. And it is these challenges that can halt progress. He shares his thinking and tools that he has used to galvanise teams. To allow them to work together more effectively.

With the dynamic pace of change and ever evolving customer demand, Dave demonstrates how this process is continuous. It requires new ways of thinking and working to achieve the right change cadence.

## Tech Strategy Drivers
Dave talks about theses tech strategy drivers:

- How to [build AI in your business](https://medium.com/predict/moving-ai-from-poc-stage-to-production-fc4b0908d0c4)
- Developing a [data strategy](https://theserverlessedge.com/serverless-database-simplify-your-challenge-in-the-cloud/) using [Wardley Mapping](https://learnwardleymapping.com/)
- [Digital Transformation](https://sloanreview.mit.edu/article/the-new-elements-of-digital-transformation/) in the Fintech sector
- Using the [North Star Framework](https://amplitude.com/north-star)
- Advice for embarking on your AI journey
- His passion for [serverless architectures](https://aws.amazon.com/serverless/)
- Being involved with [Open source groups and research](https://www.youtube.com/watch?v=Z9IzNOzSuEc)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yvupgibjcrylkl5g4clb.png)

## AI Ireland
AI Ireland are a non-profit community devoted to promoting AI to increase public awareness of artificial intelligence (AI) and bring academia and industry together to showcase the excellent work done on the island of Ireland.

They want AI to benefit society and increase competitiveness for everyone living on the island of Ireland positioning the island as a hub for AI investment to embrace the third digital wave.
Wishful Programming
Tags: programming, beginners, design, productivity
Published: 2022-08-18 09:47:00

> I'm sure I could write that program if I knew how to do that one thing.
> And I could do that one thing if I knew how to do that other thing.
> Wish I knew how to do that stuff.

## Creating Programs With Wishes

There is a practical software development strategy which a Computer Science professor ( many years ago ) described to our class as "wishful programming" and over the years I've successfully applied it, **whatever the language.**

### It is very simple.

Here is the gist of the approach:

1. Stub out a function ( or method or module ) with just a name and no body content.
2. For the body, call functions ( or methods etc ) that you wish existed, then stub out those functions and methods too.
3. Keep doing this until you have a collection of stubs that together, if they did anything real, would complete your program.

The magic is that in the process of doing that you are breaking down the task into smaller pieces. And as you do it, you are shifting the heavy lifting into smaller functions ( or methods ) at the edges. 

## It really does work. 

More recently I've learned the above approach is an example of the "[backcasting](https://en.wikipedia.org/wiki/Backcasting)" technique.

The application of this idea also ties into becoming a more creative person, which I wrote something about [here](https://medium.com/predict/becoming-creative-8c2ead9c903a).

If you've worked this way before, let me know. Let's compare notes.
WhatsApp Chat for WooCommerce
Tags: woocommerce, whatsapp, chat, plugins
Published: 2022-08-18 09:46:33

[Whatsapp WooCommerce plugin](https://woocommerce.com/products/whatsapp-chat-for-woocommerce/) allows you to add WhatsApp messenger to the store that enables customers to engage in a friendly and informal conversation. You can set predefined messages and and introduce staff members.

Features of Whatsapp WooCommerce plugin:

1. Add WhatsApp messenger to chat with customers
2. Create a complete support team for WhatsApp chat
3. Define availability of support staff
4. Predefine messages for customers
5. Enable floating button for WhatsApp chat widget
6. Display floating button on multiple store pages
7. Online/offline messages about support staff
8. Choose a position for the WhatsApp Chat widget

For more details: https://woocommerce.com/products/whatsapp-chat-for-woocommerce/
How to run gitlab-ce (self-managed) on docker container [part 1]
Tags: gitlab, docker, container
Published: 2022-08-18 09:37:00

Here we'll see how to run the gitlab-ce (community edition) self-managed on docker container (linux based). We'll use docker-compose too.

First we'll create a new variable `GITLAB_HOME`, in my case I used this command:

```
export GITLAB_HOME=$HOME/gitlab
```

You can verify if the variable it's correctly run `echo $GITLAB_HOME` in your terminal.

After that, we'll create our files as `docker-compose.yml`. Choose one folder to it and let's start!

Now, create one file named `root_password.txt`, and put on it one string to use as the root password. In my case I fill with `RootP@ssord123!`. 

Then, we can create our `docker-compose.yml`, you can use my template bellow:

```
version: '3.6'
services:
  web:
    image: 'gitlab/gitlab-ce:latest'
    container_name: gitlab_ce
    restart: always
    hostname: 'gitlab.henriqueholtz.com'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://gitlab.henriqueholtz.com'
    ports:
      - '80:80'
      - '443:443'
      - '22:22'
    volumes:
      - '$GITLAB_HOME/config:/etc/gitlab'
      - '$GITLAB_HOME/logs:/var/log/gitlab'
      - '$GITLAB_HOME/data:/var/opt/gitlab'
    shm_size: '256m'
    secrets:
      - gitlab_root_password

  gitlab_docs:
    image: registry.gitlab.com/gitlab-org/gitlab-docs:latest
    container_name: gitlab_ce_docs
    hostname: 'https://docs.gitlab.henriqueholtz.com:4000'
    ports:
      - '4000:4000'

secrets:
  gitlab_root_password:
    file: ./root_password.txt
```

Then we are ready to run our container, then run `docker-compose up -d`.

Note: If you want use the hostname above (ex: `gitlab.henriqueholtz.com`), you need to add it on the hosts config. Or we can use the `localhost` or `127.0.0.1`.

Using `https://localhost` (default port, 443), we already can see the gitlab web interface, but with the 502 status code:

![gitlab-ce at localhost with status code 502](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6y510azsm35in7pmjy4m.png)
 
The container can spend some minutes to stand up (for me something around 10 minutes). Meanwhile we can see the logs of our container with the command bellow:

```
docker logs gitlab-ce -f
```

We can access our gitlab-docs at `localhost:4000`:

![gitlab-ce docs at localhost:4000](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pz395yb13jjf7iuc77l1.png)
 
Some minutes later, we can access our gitlab community edition self-managed, and see the login page: (ex: `http://localhost`)

![Gitlab-ce at localhost:80 to login](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45n1avxfyjsjtgm0ttjv.png)
 
Now, to access your own gitlab you can [reset the root password of gitlab-ce](https://dev.to/henriqueholtz/how-to-reset-root-password-on-gitlab-ce-self-managed-using-gitlab-rake-3go7)

The official documentation to install gitlab-ce self-managed of gitlab: https://docs.gitlab.com/ee/install/docker.html

Thanks for reading, I see you later, in the next part!
Product Gallery Slider for WooCommerce
Tags: woocommerce, gallery, slider, plugin
Published: 2022-08-18 09:34:00

Adds a slider of gallery images to product pages with help of [WooCommerce product gallery slider](https://woocommerce.com/products/product-gallery-slider-for-woocommerce/). It allows customize sliders to match each store and position sliders in various layouts with auto-play options.

Features of Product Gallery slider are

1. Add Gallery Slider to specific products or categories
2. Upload or embed videos to product gallery
3. Multiple Bullet, Arrow, & Lightbox Styles
4. Use a lightbox to exhibit images and videos
5. Autoplay Image Gallery in a Slider
6. Customers can zoom in product images
7. Set a layout for the gallery slider

**For More details** https://woocommerce.com/products/product-gallery-slider-for-woocommerce/
Product Per Page for WooCommerce
Tags: woocommerce, product, perpage, plugins
Published: 2022-08-18 09:29:20

[WooCommerce product per page plugin](https://woocommerce.com/products/product-per-page-for-woocommerce/) enables you to increase the on-page visibility of their products and/or show more details for each product. It gives full control shop page to owner.

Key features of Product per page plugins are

1. Options to enable product-per-page selectors on shop pages
2. Multiple placements for product-per-page selectors
3. Customize the number of columns on shop pages
4. Set the default number of products to display on shop pages
5. Enable cookies and set cookie-expiration time