teleren/devto huggingface dataset:
Google launches Bard, a new experimental artificial intelligence platform powered by LaMDA
Tags: seo, googlebard, ia, marketing
Published: 2023-04-23 04:38:00

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/048fh8pz6l0nho36ekth.jpg)

In response to ChatGPT's recent AI innovation, Google has announced its own experimental artificial intelligence platform called Bard. This platform uses the language model for dialogue application, LaMDA, which will allow users to interact with the platform in a conversational environment. Google CEO Sundar Pichai revealed the launch of Bard to a select group of "trusted testers," providing examples of what this early versión can offer.

## **[What is Bard?](https://bard.google.com/)**
Bard is an experimental conversational AI platform, separate from Google Search, that seeks to combine the breadth of world knowledge with the power, intelligence, and creativity of Google's large language models. It was introduced two years ago at the Google I/O 2021 conference and is currently in testing phase to help Google learn and improve the quality and speed of its service.

## **LaMDA and Bard**
The Bard platform uses the language model for dialogue application, LaMDA, to allow for more natural and effective communication between the user and the platform. LaMDA is capable of understanding the semantics and context of questions and answers, allowing the platform to provide more precise and relevant responses.

## **Attribution and Citations**
Although Google has not provided comments on how it plans to provide attribution and/or citations for its responses, whether from Bard or in search results, it is important to note that this could be a significant factor to consider in search engine optimization (SEO) in the near future.

## **What are the benefits?**

> The launch of Google Bard has multiple potential benefits to improve user experience, search engine optimization, and content marketing. As an [expert SEO and digital marketing agency](https://www.clientesya.cl/), we recommend that you follow and visit our website for more information on SEO, SEM, and digital marketing. Do not hesitate to contact us for more tailored and personalized assistance.
Android Transparent Status Bar
Tags: android, kotlin, beginners, java
Published: 2023-04-23 04:37:20

Need to set parent theme as NoActionBar

Step 1: In App theme add 
`<item name="android:windowTranslucentStatus">false</item>`

and change status bar colour to `@android:color/transparent`
so `<item name="android:statusBarColor">@android:color/transparent</item`


![Till Status Bar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oj77w1arfjwvhm4oh3jx.png)

and in our activity (view fit to full window size)
`WindowCompat.setDecorFitsSystemWindows(window,
            false)`


![Full Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1j7ibmib6ushrmvy8nyo.png)
UseEffect in Brief !
Tags: precise, use, of, useeffect
Published: 2023-04-23 04:08:51

There are several hidden features of the useEffect hook that can be useful for posting in a blog. Here are a few:

_Conditional rendering:_ You can use useEffect to conditionally render components based on certain conditions. For example, if 
you only want to show a component if the user is logged in, you can use useEffect to check the user's authentication status and then conditionally render the component.

_Fetching data_: You can use useEffect to fetch data from an API or database and then update your component's state with that data. This can be useful for displaying dynamic content in your blog.

_Updating the document title_: You can use useEffect to update the document title based on the content of your blog post. This can help with search engine optimization and make it easier for users to find your post.

Overall, useEffect is a powerful tool for managing state and side effects in your React components, and can be especially useful when creating blog posts with dynamic content.
openGauss dolphin-bit-string-types
Tags: opengauss
Published: 2023-04-23 02:38:36

Compared with the original openGauss, Dolphin modifies the bit string types as follows:

The data of the bit type is of variable length up to the maximum length n. Longer strings will be rejected. The data of the bit varying type is of variable length up to the maximum length n. Longer strings will be rejected.
If one explicitly casts a bit-string value to bit(n), it will be truncated or zero-padded on the left to be exactly n bits, without raising an error.
""
--Create a table.
openGauss=# CREATE TABLE bit_type_t1 
(
    BT_COL1 INTEGER,
    BT_COL2 BIT(3),
    BT_COL3 BIT VARYING(5)
) ;

--Data is converted if it exceeds the length of this data type.
openGauss=# INSERT INTO bit_type_t1 VALUES(2, B'1000'::bit(3), B'101');

--View data.
openGauss=# SELECT * FROM bit_type_t1;
 bt_col1 | bt_col2 | bt_col3 
---------+---------+---------
       2 | 100     | 101
(2 rows)

--If the length of a character string is insufficient, the character string is converted to bit(n) and zeros are padded on the left.
openGauss=# SELECT B'10'::bit(4);
  bit   
--------
 000010
(1 row)

--Delete a table.
openGauss=# DROP TABLE bit_type_t1;
openGauss dolphin-character-types
Tags: opengauss
Published: 2023-04-23 02:36:51

Compared with the original openGauss, Dolphin modifies the character types as follows:

The meaning of n of the CHARACTER/NCHAR type is modified. n indicates the character length instead of the byte length.
During comparison of all character data types, spaces at the end are ignored, for example, in the WHERE and JOIN scenarios. For example, 'a'::text = 'a'::text is true. For the VARCHAR, VARCHAR2, NVARCHAR2, NVARCHAR, TEXT, and CLOB types, HASH JOIN and HASH AGG ignore spaces at the end only when string_hash_compatible is set to on.
The optional modifier (n) is added for TEXT. That is, the usage of TEXT(n) is supported. n is meaningless and does not affect any performance.
The TINYTEXT(n)/MEDIUMTEXT(n)/LONGTEXT(n) data type is added, which is the alias of TEXT. n is meaningless and does not affect any performance.
Table 1 Character types


Name

Description

Storage Space

CHAR(n)

CHARACTER(n)

NCHAR(n)

Character string with fixed length. Empty characters are filled in with blank spaces. **n** indicates the string length. If it is not specified, the default precision **1** is used.

The maximum size is 10 MB.

TEXT(n),

TINYTEXT(n),

MEDIUMTEXT(n),

LONGTEXT(n)

Character string with variable length. **n** has no actual meaning and does not affect any performance.

The maximum size is 1 GB - 1 byte. However, the size of the column description header and the size of the tuple (less than 1 GB - 1 byte) where the column is located must also be considered. Therefore, the maximum size of the TEXT type may be less than 1 GB - 1 byte.

Example:

""
--Create a table.
openGauss=# CREATE TABLE char_type_t1 
(
    CT_COL1 CHARACTER(4),
    CT_COL2 TEXT(10),
    CT_COL3 TINYTEXT(11),
    CT_COL4 MEDIUMTEXT(12),
    CT_COL5 LONGTEXT(13)
);

--View a table structure.
openGauss=# \d char_type_t1 
    Table "public.char_type_t1"
 Column  |     Type     | Modifiers
---------+--------------+-----------
 ct_col1 | character(4) |
 ct_col2 | text         |
 ct_col3 | text         |
 ct_col4 | text         |
 ct_col5 | text         |

--Insert data.
openGauss=# INSERT INTO char_type_t1 VALUES ('Four characters');
openGauss=# INSERT INTO char_type_t1 VALUES('e   ');

--View data.
openGauss=# SELECT CT_COL1,length(CT_COL1) FROM char_type_t1;
 ct_col1  | length
----------+--------
 Four characters | 4
 e        |      1
(2 rows)

--Filter data.
openGauss=# SELECT CT_COL1 FROM char_type_t1 WHERE CT_COL1 = 'e';
 ct_col1
---------
 e
(1 row)

openGauss=# SELECT CT_COL1 FROM char_type_t1 WHERE CT_COL1 = 'e ';
 ct_col1
---------
 e
(1 row)

--Delete the table.
openGauss=# DROP TABLE char_type_t1;
openGauss Dolphin Restrictions
Tags: opengauss
Published: 2023-04-23 02:32:53

The lite edition is not supported.
The Dolphin plug-in cannot be deleted.
The Dolphin plug-in can be created only in the B-compatible database.
The Dolphin plug-in needs to create data types and functions in schemas such as pg_catalog. Therefore, loading the Dolphin plug-in requires initial user permissions. openGauss automatically loads the Dolphin plug-in when the initial user or a user with the initial user permissions connects to B-compatible database for the first time. If a B-compatible database has never been connected by an initial user or a user with initial user permissions, it will not load the Dolphin plug-in.
All added or modified syntaxes in Dolphin cannot be viewed by running \h on the gsql client, and cannot be automatically supplemented on the gsql client.
The creation of the Dolphin plug-in deletes the functions and types with the same name required by the plug-in that exists in the database and the objects that previously depend on the plug-in.
openGauss Dolphin Installation
Tags: opengauss
Published: 2023-04-23 02:31:14

The plug-in is automatically installed and loaded. You do not need to manually install and load the plug-in. To manually compile and load the plug-in, perform the following steps:

Compilation and Installation
Compile and install openGauss.

Copy the Dolphin source code to the contrib directory of the openGauss source code.

Go to the Dolphin directory and run make install.

Create a B-compatible database and connect to B-compatible database as the initial user.

OM Installation
Install openGauss on the OM.

Copy the files required by the plug-in.
Path of dolphin.so: app/lib/postgresql/
Path of dolphin.control and dolphin–1.0.sql: app/share/postgresql/extension

Create a B-compatible database and connect to B-compatible database as the initial user.
openGauss Dolphin Overview
Tags: opengauss
Published: 2023-04-23 02:30:30

openGauss provides Dolphin extensions (version: Dolphin-1.0.0). Dolphin extensions of openGauss are compatible with MySQL databases (dbcompatibility='B') in terms of keywords, data types, constants and macros, functions and operators, expressions, type conversion, DDL/DML/DCL syntax, stored procedures/user-defined functions, and system views.
Endpoint architecture
Tags: webdev, beginners, programming, django
Published: 2023-04-22 20:41:19

Endpoint architecture plays a critical role in the design and security of modern systems. As organizations continue to embrace digital transformation and adopt cloud-based solutions, endpoint architecture has become more important than ever before. In this post, we will explore the key aspects of endpoint architecture and why it is important for organizations to pay attention to it.

First, let's define what we mean by "endpoint". An endpoint can be any device or software that interacts with a network, such as a desktop computer, a mobile phone, a server, or a virtual instance of software. Endpoints serve as both the entry and exit points for data and communication within a network or application.

Endpoint architecture, then, refers to the design and structure of a system's endpoints. It determines how information is transmitted, received, and processed, and it plays a crucial role in ensuring that a system is secure and efficient. A well-designed endpoint architecture should provide robust security and protect against unauthorized access, while also ensuring efficient communication and data transfer between endpoints.

There are several key aspects to consider when designing endpoint architecture. One important consideration is the types of endpoints that will be used in the system. Different types of endpoints may require different communication protocols or security mechanisms. For example, mobile devices may require more stringent security measures than desktop computers, as they are more prone to theft or loss.

Another important consideration is the communication channels and protocols used to transmit data between endpoints. Different protocols may be better suited for certain types of data or endpoints, and it is important to choose the right protocol for the job. For example, a real-time communication application may require a low-latency protocol to ensure smooth communication between endpoints.

Security is also a key consideration in endpoint architecture. Endpoints are often the weakest link in a system's security, as they are more vulnerable to attacks or breaches. It is important to implement strong security measures, such as encryption, authentication, and access control, to protect endpoints and prevent unauthorized access.

Finally, endpoint architecture must be scalable and flexible enough to accommodate changing needs and requirements. As organizations grow and evolve, their endpoint architecture must be able to adapt to new technologies and use cases. This requires a forward-thinking approach to design and a willingness to make changes as needed.

In conclusion, endpoint architecture is a critical aspect of modern systems design. By paying attention to the types of endpoints used, the communication channels and protocols employed, the security mechanisms in place, and the scalability and flexibility of the system, organizations can ensure that their systems are secure, efficient, and able to adapt to changing needs.
You can’t sort Immutable Java Lists?
Tags: programming, beginners, java, tutorial
Published: 2023-04-23 02:06:58

> Follow me on YouTube for more content https://www.youtube.com/@therealdumbprogrammer/playlists

I was working on a sorting demo using Comparable and Comparator when I first noticed this.

So, if you create a new List by calling List.of(…) which returns an immutable list then you can’t sort this list in a straightforward manner.

Suppose, we have a list of integers.

    List<Integer> nums = List.of(1, 4, 2, 3);

And, if we try sorting this list via Collections.sort(..) or List.sort(..) then it throws an UnsupportedOperationExcecption.

    nums.sort(null);
    //OR
    Collections.sort(nums);
    
    ----------------------------------
    Exception in thread "main" java.lang.UnsupportedOperationException
     at java.base/java.util.ImmutableCollections.uoe(ImmutableCollections.java:142)
     at java.base/java.util.ImmutableCollections$AbstractImmutableList.sort(ImmutableCollections.java:261)
     at java.base/java.util.Collections.sort(Collections.java:145)
     at SortingDemo.main(SortingDemo.java:13)

So, how can we sort such list. Well, streams can do that.

    List<Integer> sortedNums = nums.stream()
                                    .sorted()
                                    .collect(Collectors.toList());
👨🏾‍💻Portfolio Update
Tags: nextjs, frontend, webdev, typescript
Published: 2023-04-23 01:02:53

## Here is a Update! 

### Thoughts
![Ideas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1134naajad5awvvdti98.png)



This has been the most mentally straining process. As a developer who just began his journey. Trying to figure out thinks I haven’t learned has been a great and painful lesson. Learning to use Axios for APIs . Along side soon Integrating  


###What’s happening 
![whats happening](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o28w4y0k2fuyissu0292.png)

My attempt was I wanted my to have my portfolio update my Blog post and be able to render it dynamically. 

![Blog Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n9c5w2fgkqrin7m02aii.jpeg)



**currently working on that** 

![sorry](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhgrp67bxucq1cz5c7sd.png)


While also showing a updated list of my hub up repositories and updates stars forks. Eventually will expand to my open source contributions as well. Even sorted by stars ⭐️ 
![repo page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a87b7rl1uao3i2bcrl1q.jpeg)

###Overall


![conclusion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3fggj0n0387rosp43a5w.png)
Though I’ve done a lot still so much more to go before it’s ready for production and me being so particular on the small details isn’t helping either but I’m learning !


![page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/td7lmgr4mb50f7q3cgf8.jpeg)


![page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xquptg96ms3n63fxhzn.jpeg)

****

![page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yponn87gbbl3tzu8nfhu.jpeg)

####This is the best experience I feel. Shout out to  @m_ahmad for **TemplateKart . Recommend y’all to truly check him out and follow his blog! 


##Catch ya on the next update!

Hopefully I’ll be done by than hehe 😜
Working on Matching and User Interface Improvements for the project
Tags: webdev, javascript, programming, node
Published: 2023-04-23 00:48:17

Day 82 of #100DaysOfCode and today I made some great progress on the project. I wrote the code for the other side of users to capture the user ID of liked users and send them along with the signed-in user's ID to the backend and to the database.

As I was working on the project, I realized that I enjoy working on the server-side more than the frontend. Although frontend development can be fun, I find the logic of server-side programming more engaging. It's exciting to struggle with a problem and finally figure it out.

Although I didn't work as much on my project as other days, I also spent time learning from a Udemy course by Angela Yu (she is awesome!). I'm on the last module, where we're learning Motoko for IC and web3. But, my main focus is still my project.

Tomorrow, I plan to start working on filtering and retrieving users based on the fact that they have liked each other. This feature is crucial for the matching algorithm, which will suggest potential matches to users based on their preferences and previous swipes.

Additionally, I'm considering changing the component structure and pages of the frontend a bit, and adding transitions to the routing between pages when users press buttons. These changes will make the user experience more seamless and intuitive.

Overall, I'm happy with my progress and excited to continue working on the project. I'll keep you updated on my journey and progress as I continue on this exciting path of learning and growth.
Improve Your Coding with ChatGPT
Published: 2023-04-22 23:26:09

As a coder, it’s important to have access to tools that can help you improve your productivity and efficiency. One such tool is ChatGPT, a large language model trained by OpenAI. With its natural language processing capabilities, ChatGPT can be used as a coding assistant to help with a wide range of tasks. In this blog post, we’ll dive into some specific examples of how coders can use ChatGPT to streamline their workflow and become more effective at their jobs.

Generating code snippets
ChatGPT can generate code snippets for a wide range of programming languages. This is particularly useful when you’re working on a project in a language you’re not familiar with, or when you need to implement a feature that you haven’t worked with before. For example, if you’re working on a web application and you need to add a carousel to the homepage, you can ask ChatGPT for a code snippet for a carousel in JavaScript.

Finding solutions to coding problems
Coders often run into issues that they’re not sure how to solve. When this happens, ChatGPT can be a useful resource for finding solutions. For example, if you’re trying to integrate a third-party API into your application and you’re getting an error message that you don’t understand, you can ask ChatGPT for help. ChatGPT can provide you with information on what the error message means, and suggest potential solutions to the problem.

Learning new programming concepts
ChatGPT can also be used to learn new programming concepts. This is particularly useful when you’re just starting out with a new language or framework. For example, if you’re new to React and you’re not sure how to create a component, you can ask ChatGPT for an explanation. ChatGPT can provide you with a clear and concise explanation of how React components work, and provide you with code examples to help you get started.

Collaborating with other coders
ChatGPT can be a useful tool for collaborating with other coders. For example, if you’re working on a project with a remote team and you need to share code snippets, you can use ChatGPT to do so. ChatGPT can also be used to facilitate communication between team members, allowing everyone to stay on the same page and work more effectively together.

Writing better code
Finally, ChatGPT can be used to help you write better code. For example, if you’re writing a function and you’re not sure if it’s efficient, you can ask ChatGPT for advice. ChatGPT can provide you with information on best practices for writing efficient code, and suggest ways to optimize your function.

In conclusion, ChatGPT can be a valuable tool for coders. It can help with everything from generating code snippets to finding solutions to coding problems, learning new programming concepts, collaborating with other coders, and writing better code. By incorporating ChatGPT into your workflow, you can become a more efficient and effective coder.
Note: Show longer history on macOS terminal
Tags: macos, tutorial, terminal, shell
Published: 2023-04-22 22:20:00

## Solution

- Change the default behaviour of `history` command.
- Change the value `-50` if that is too much.

```
~/.zshrc
======
alias history='history -50'
```

```
# Apply above change
exec zsh
```

## Reference

- [zsh history is too short [closed]](https://stackoverflow.com/questions/26846738/zsh-history-is-too-short)
Prompt Engineering
Tags: ai, machinelearning, gpt3
Published: 2023-04-22 21:42:16

I want to start off this series, with some general theory and then we'll go into building an actual application!

By now you've probably already tried some form of zero shot or few shot prompting. If you haven't here's quick explanation: 

Both are ways of getting a large language model (LLM) to perform a task that it wasn't specifically trained for without finetuning. Some usecases could be: 
- Sentiment analysis on text the model's never seen before
- Writing in your, or your company's style or tone of voice
- Creating product names
The list goes on, but I think you get it. 
 
**Zero Shot:**

The simplest one is to just tell or ask the model to do what you want, with no examples whatsoever. This can work quite well, given the vast training data most of the really popular LLMs are trained on.

**Few Shot:**

This one just means giving the model a few examples of the task or final output you want. It's a way of guiding the model to your final outcome. 


Both of these are a great ways of getting simple, shorter tasks done. But once you have anything more complex, you need more of a "human" brain. And human brains allow us to think and reason. That's where chain of thought comes into the picture. 

**Chain of Thought**

[The full paper is here](https://arxiv.org/abs/2201.11903) 

The TLDR; chain of thought is a way to prompt the LLM to reason its way through a problem by chaining rationales, one step at a time, until it reaches a solution. Again, there are two types:

**Zero shot:** 

This involves getting the model to work through a problem using natural language, like "show your rationale, step by step" or ""Let's break this down into smaller steps and consider each one in turn. What is the first step we need to take, and what information do we need to gather in order to take that step? Once we have that information, what is the next logical step to take? Let's continue this process until we have a clear understanding of the issue at hand and a plan for how to proceed."

**Few shot:**

With shot you give some examples of rationale chains, so it knows how to work through a problem. For example, by providing a few examples on how to do BODMAS, before asking it to solve a maths problem.


So, there you have it, a very quick theory session on prompt engineering. In the next post, we'll start putting this (in particular chain of thought) into action by building a content engine. All powered by AI.