teleren/devto huggingface dataset:
Liman Çekirdek 1.8 Duyuruldu
Tags: liman, laravel, php, server
Published: 2021-08-30 06:30:45

# Liman Çekirdek 1.8
Liman Çekirdek 1.8 sürümü 30 Ağustos 2021 tarihinde HAVELSAN Açıklab Ekibi tarafından duyuruldu.

Daha fazla bilgi için Liman [web sayfası](https://liman.dev)na ulaşabilirsiniz.

<img src="https://gblobscdn.gitbook.com/assets%2F-Mfw1hjdpJczPvgNBOdm%2F-Mg5hNL4VRIM_Y4rrVDx%2F-Mg5hOdfAJUoygxQMZX7%2Fl1man.png?alt=media&token=4fb12c2b-bcca-49b5-8a46-ab1a02bbb993" width="600">

# Kurulum
Uygun işletim sistemlerine göre kurulum yapabilirsiniz: 
https://docs.liman.dev/baslangic/kurulum

# Büyük yenilikler
- İlk kurulum sihirbazı sisteme eklendi.
- Sistemin %99'una İngilizce desteği eklendi.
- Tüm sistemin dizaynı güncellendi.
- Genel kullanıcı deneyimi geliştirildi.
- Sistemdeki dil seçeneği oturum yerine veritabanına ve ortam değişkenleri dosyasına taşındı.
- YENİ! Eklenti mağazamız sisteme eklendi. Liman bünyesinde geliştirdiğimiz açık kaynaklı ve ücretli tüm eklentilere bir tık kadar yakın olacaksınız.
- Nesne yönelimli eklenti geliştirme eğitimi için yeni eklenti şablonu eklendi.
- Arama özelliği eklendi.
- Yeni ana sayfa düzeni geliştirildi. Sunucu durumları, genel eklentilerden özetler ve Liman sunucusunun durumunun izlenmesi sağlandı.

# Hata düzeltmeleri
- Fontlar klasörü düzeltildi, sistem arayüzünün yeni fontu Inter olarak değiştirildi ve FontAwesome güncellendi.
- Componentler klasörünün ismi kullanıcı dostu olan "components/" olarak değiştirildi.
- Tüm modallar y ekseninde ortalandı.
- Yeni arayüz sistemi için sunucuların tıklandıkça üste çıkması sağlandı.
- Ana sayfadaki grafiklerin çalışmama problemi giderildi.
- Tüm breadcrumb menüleri düzenlendi.
- Tablo componenti düzenlendi, kullanıcı dostu olması için sağ klik menüsü bulunan tablolarda o satıra dair işlem yapılması için üç nokta simgesi eklendi.
- Sistemdeki modalların çalışma biçimi değiştirildi. Bootstrap'ta olmayan üst üste modal desteği geliştirilerek deneyim düzenlendi.
- Üst üste açılan modallarda kapatma tuşuna basınca tüm modalların kapanması çözüldü.
- Üst üste açılan modallarda arkadaki siyah gölgenin çalışma biçimi düzenlendi.
- Karanlık mod düzenlendi.
- Ubuntu 20.04 desteği eklendi.
- Sistem geneli İngilizce çeviri yapıldı. 
- Bildirimler sistemi düzenlendi. İngilizce mesaj desteği eklendi.
- Componentlerdeki bazı buglar çözüldü.
- Sol menünün aktif olan linkleri düzgün göstermeme problemi çözüldü.
- Sistem geneli tüm geçerli olmayan HTML kodları düzenlendi. Geçerli bir düzen getirildi.
- Sunucular için şehir tanımlama zorunluluğu kaldırıldı.
- WinRM uptime problemi çözüldü.
- Eklenti güncelleme, eklenti indirme sistemleri düzenlendi.
- Tüm sistem dokümantasyonları https://docs.liman.dev aktarıldı.
- lsb_release ve lsof paketi bağımlılığı olan sayfalar düzenlendi. lsb_release bağımlılığı kaldırıldı.
- Sol menü eklenti sayısı özelliği kaldırıldı.
- Sol menü sunucu sayısı özelliği ince ayarlar sekmesine eklendi.
JavaScript basics error handling
Tags: javascript, beginners
Published: 2021-08-30 06:14:51

When it comes to writing code that is not breaking, we have to address error handling.

In JavaScript, this is managed through exceptions. But before we dive into those, let's look and see what happens when we introduce some faulty code.

```js
iDontExist();

console.log('log me');
```

This will result in an error stating:

```text
Uncaught ReferenceError: iDontExist is not defined
```

And stop our code completely.

Which is not ideal, because we don't want our code to crash right away.

## Catching error in JavaScript

The way to catch errors in JavaScript is to wrap them in a `try...catch` statement.

Let's do just that for the code we have above and see what happens.

```js
try {
  iDontExist();
} catch (error) {
  console.error(error);
}

console.log('log me');
```

Now this will result in our error being logged, as well as our custom console.log being called.

## JavaScript finally statement

To create a complete `try...catch` statement, we can introduce the `finally` block.

This block will be called once the whole code block is evaluated, and it doesn't care if it was an error or not.

```js
try {
  iDontExist();
} catch (error) {
  console.error(error);
} finally {
  console.log('fully done');
}
```

## Throwing new exceptions in JavaScript

By now, we have seen how to catch errors, and often these are just the errors JavaScript throws for us.

But we can also introduce our own errors, because there might be some user error.

We can invoke these by using the `throw` method. This can then use an `Error` or a custom message.

```js
try {
  throw new Error('my error');
} catch (error) {
  console.error(error);
} finally {
  console.log('fully done');
}
```

Which will result in a custom error message saying `my error`.

## Nesting `try...catch` blocks

Another cool thing to note is that we can even nest `try...catch` blocks.
The main thing to note when doing this is that the outer catch block will catch the exceptions.

```js
try {
  try {
    throw new Error('my error');
  } finally {
    console.log('inner done');
  }
} catch (error) {
  console.error(error);
} finally {
  console.log('fully done');
}

console.log('log me');
```

Resulting in the following flow:

```js
// inner done
// Error: my error
// fully done
// log me
```

I hope you got a good understanding of error handling in JavaScript. If you have any question, don't hesitate to contact me.

You can also have a play with this on the following CodePen demo.

{% codepen https://codepen.io/rebelchris/pen/rNwBpzR %}

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Path alias in Node.js
Tags: node, javascript, typescript, programming
Published: 2021-08-30 06:12:39

While doing import in node.js application, we see a lot of `'../'`
path. As the project grows vertically deep this path gets much duskier. This really looks awful especially when we are building a production-grade big application.


```
import { AuthControlller } from '../../../user/userControlller'
import { your_module } from '../../../main/your_module'
``` 

You can observe the path combination made of dots and backslashes (`'../../../'`). Obviously, this is not looking good in a project. As well in big projects, understanding the perfect location also gets duskier when we are assigning this to a new member of our team.

## The Solution

We can use **path alias** to solve this problem and our code beautified. 

### What is a path alias?


> 
It is a way to map paths into certain absolute paths which can be used in every corner of our application

### Setup

Step 1.  Install module-alias package

```
npm install --save module-alias
```

Step 2. Update package.json

here we have to add our custom configuration into the `package.json` file so that this effect can be traced all around the project and with that, we can directly call this configuration just by importing it into the project files. 

```
"_moduleAliases": {
    "@auth": "src/api/components/user/auth",
    "@your_module": "abc/cde/efg/hij/your_module"
}
```

This `abc/cde/efg/` is the path of your module main folder and `@your_module` is the name that you will use to import the module. Basically, it means that we are assigning the path to this `@your_module`

**Note** this ***@ *** must be included before a module name. 

Step 3. Update your files

Just use regular import statement with assigning to this path aliases

```
const your_module_name = require('@your_module')

ES6
import your_module from '@your_module'

modules with different files
import { authController } from '@auth/controllers'
```

Additional steps for TypeScript

Step 4. Update tsconfig.json

```
"baseUrl": "./src"   // if your directory starts from src folder
"path": {
    "@your_module": ["src/api/components"]  // your module path
}
```

Step 5. update index.ts or your main server file

Add this line on top of your main server file

```
// it imports the file all around the project 
import "module_alias/register"
```

It's all done. Now let's go and execute our path alias and make our project beautified. 

If you like this article then try it in your project. Also try to share this project to others.
Trying to integrate FCM using Next.js 
Tags: firebase, nextjs, reactnative, pwa
Published: 2021-08-30 06:06:28

Hello I am trying to integrate FCM using Next.js... I am getting the following error...

> Build error occurred
ReferenceError: navigator is not defined
    at Component.WindowMessagingFactory [as instanceFactory] (D:\development\noustek\we-pwa\node_modules\@firebase\messaging\dist\index.cjs.js:1280:5)
    at Provider.getOrInitializeService (D:\development\noustek\we-pwa\node_modules\@firebase\component\dist\index.cjs.js:342:39)
    at Provider.getImmediate (D:\development\noustek\we-pwa\node_modules\@firebase\component\dist\index.cjs.js:134:29)      
    at getMessagingInWindow (D:\development\noustek\we-pwa\node_modules\@firebase\messaging\dist\index.cjs.js:1444:74)      
    at Object.1514 (D:\development\noustek\we-pwa\.next\server\pages\_app.js:53:61)
    at __webpack_require__ (D:\development\noustek\we-pwa\.next\server\webpack-runtime.js:25:42)
    at __webpack_exec__ (D:\development\noustek\we-pwa\.next\server\pages\_app.js:204:39)
    at D:\development\noustek\we-pwa\.next\server\pages\_app.js:205:66
    at Function.__webpack_require__.X (D:\development\noustek\we-pwa\.next\server\webpack-runtime.js:108:21)
    at D:\development\noustek\we-pwa\.next\server\pages\_app.js:205:47 {
  type: 'ReferenceError'
}
   
Any help?
How to add the Whatsapp share button in Web Apps?
Published: 2021-08-30 05:28:17

We see many web applications having this WhatsApp share button to share the content. Have you wondered how we can have it in our next web app? You know, it's very easy, as easy as using an Html element. 

The only thing you need is the below universal links.

```
Example: https://wa.me/<number> 
Example: https://wa.me/<number>?text=<urlencodedtext>
```

### Breakdown of above links:


* The ```<number>``` is a full phone number in international format. Omit any brackets, dashes, plus signs, and leading zeros when adding the phone number in international format.

```
Examples:

Use: https://wa.me/919999999999

Don't use: https://wa.me/+91-9999999999
```

* The ```<urlencodedtext>``` is a URL-encoded pre-filled message, that will automatically appear in the text field of a chat. **URL encoding?** converts characters into a format that can be transmitted over the Internet. [HTML URL Encoding Reference](https://www.w3schools.com/tags/ref_urlencode.ASP)

```
Example: 

https://wa.me/919999999999?text=I'm%20interested%20in%20your%20car%20for%20sale
```

### How many ways we can use the above links:

* We can create a link with just a pre-filled message, use ```https://wa.me/?text=urlencodedtext```
* We can create a link with no pre-filled message, use ```https://wa.me/<number>```


### Finally, how to use the link?

```   
Example: 
 
<a href="https://wa.me/919999999999text=I'm%20interested%20in%20your%20car%20for%20sale">Share</a>
```

When a user clicks on the above link it opens the WhatsApp application installed on users device either it be a phone or desktop.

*To learn more please visit:* [*How to link to WhatsApp from a different app*](https://faq.whatsapp.com/iphone/how-to-link-to-whatsapp-from-a-different-app/?lang=en)
Two ways to solve Fibonacci
Published: 2021-08-30 03:43:09

A very common question that you may come across during a coding interview is to find the Fibonacci sequence with a given number. The Fibonacci sequence is a set of numbers that starts with a one or a zero, followed by a one, and proceeds based on the rule that each number (called a Fibonacci number) is equal to the sum of the preceding two numbers. If the Fibonacci sequence is denoted F (n), where n is the first term in the sequence, the following equation obtains for n = 0, where the first two terms are defined as 0 and 1 by convention:

F (0) = 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 …

So during the interview, you will be asked:

Given a number N return the index value of the Fibonacci sequence, where the sequence is:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …

After a quick look, you can easily notice that the pattern of the sequence is that each value is the sum of the 2 previous values, which means that for N=5 → 2+3 or in maths:
F(n) = F(n-1) + F(n-2)

The easiest way to accomplish this is with a simple loop:

```
let fibonacci = (num) => {
    let a = 1;
    let b = 0;
    let temp;

    while ( num >= 0) {
        temp = a;
        a = a + b;
        b = temp;
        num--
    }
    return b;
}
```

With this solution, we calculate the next number by adding the current number to the old number. And this gives you an O(n) time complexity. But there is a faster approach to the problem. And that approach is called recursion.

```
let fibonacci = (num) => {
  if (num <= 1) return 1;
  return fibonacci(num - 1) + fibonacci(num - 2);
}
```

With the recursive function, we go to an O(2^n) time complexity. So we have increased the complexity exponentially. But we are able to solve the question in only 3 lines code.
Login Page (HTML And CSS)
Tags: codepen, loginpage, webdev, css
Published: 2021-08-30 05:21:19

<p>Login form design using html and css </p>

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uw1rss1k9gqyh1d8f9ql.png)

COdePen Link:
https://codepen.io/sanketbodke/pen/ZEKqoZd

Github:
https://github.com/sanketbodke
Vocabulary Building Day 2
Tags: day2
Published: 2021-08-30 03:16:20

Hello, Daily I will come up with a post consisting of new 5 words that I have learned and which are frequently asked in GREs with Pictorial representation.
1. **harangue**(noun) :  A long pompous speech; a tirade
![alt text](https://i.ytimg.com/vi/oRTfvD4uNa4/hqdefault.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=harangue&oq=harangue&aqs=chrome.0.69i59j0i433i512j0i512l8.10127j0j9&sourceid=chrome&ie=UTF-8)

2. **ambivalent**(adjective) : having mixed feelings or contradictory ideas about something or someone.
![alt text](https://www.vocationvillage.com/wp-content/uploads/2016/02/what-to-do-about-ambivalence.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=ambivalent&oq=ambivalent&aqs=chrome..69i57j0i433i512j0i512l2j0i433i512j0i512l5.7747j1j9&sourceid=chrome&ie=UTF-8)

3. **prevaricate**(verb) : to speak in an evasive way
![alt text](http://static1.squarespace.com/static/54ad91eae4b04d2abc8d6247/t/55bc52a3e4b055590b32d8aa/1438405283815/?format=1500w)
[Checkout Pronunciation](https://www.google.com/search?q=prevaricate&oq=prev&aqs=chrome.0.69i59j69i57j0i433i512j69i65l2j69i61j69i60l2.6100j0j9&sourceid=chrome&ie=UTF-8)

4. **aberration**(noun) : a deviation from what is normal or expected
![alt text](https://webstockreview.net/images/mirror-clipart-person-12.gif)
[Checkout Pronunciation](https://www.google.com/search?q=aberration&oq=aberra&aqs=chrome.0.69i59j69i57j0i20i131i263i433i512j0i433i512j0i512l6.3793j0j9&sourceid=chrome&ie=UTF-8)
5. **censure**(verb) : to express strong disapproval
![alt text](https://i.ytimg.com/vi/O9USRUCzytU/maxresdefault.jpg)
[Checkout Pronunciation](https://www.google.com/search?q=censure&oq=censure&aqs=chrome.0.69i59j0i20i263i433i512j0i512j0i433i512j0i512l2j0i131i433i512j0i512l3.7661j0j9&sourceid=chrome&ie=UTF-8)
I hope this helps to you if you are preparing for GRE exams..
perform Linear and Binary Search in one line !
Tags: algorithms, javascript, 100daysofcode, beginners
Published: 2021-08-30 05:01:58

alright is you want to perform search algorithm in one line well my friend you will need [search-ray npm library](https://www.npmjs.com/package/search-ray)

Steps :  You will need NodeJS installed on your pc if you have then skip this step

Now install library using npm

```
npm install search-ray
```

create on simple folder and file named anything you like, copy below code init and run that JS files to get Output!


1] for linear search  

```

const search = require('search-ray');
console.log(search.linearSearch([1,2,3,5],5))   // [3]

```

2] for Binary search

```

const search = require('search-ray');
console.log(search.binarySearch([1,2,3,5],5))   // 3

```

and thats it my friend thanks.. 
follow me for such tutorials! 
https://twitter.com/pawandeore7
CSS Overlay Effects
Tags: codepen, overlay, css, csseffect
Published: 2021-08-30 04:58:45

<p>CSS Overlay effects using html and css</p>

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ix6pvkeq48sh136hbstv.png)

CodePen Link:
https://codepen.io/sanketbodke/pen/zYzvmeQ

Github:
https://github.com/sanketbodke
Create a Netflix clone from Scratch: JavaScript PHP + MySQL Day 35
Tags: php, javascript, webdev, tutorial
Published: 2021-08-30 04:33:50

Netflix provides streaming movies and TV shows to over 75 million subscribers across
the globe. Customers can watch as many shows/ movies as they want as long as they are
connected to the internet for a monthly subscription fee of about ten dollars. Netflix produces
original content and also pays for the rights to stream feature films and shows.

In this video,we will be creating category delete functionalities

{% youtube lCxlU676duM %}


If you like my work, please consider
[![Buy me a coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jm11knj7d8zwcvo150q2.png)](https://www.buymeacoffee.com/cglikpo)
so that I can bring more projects, more articles for you

If you want to learn more about Web Development, feel free to [follow me on Youtube!](https://www.youtube.com/c/ChristopherGlikpo)
Use Emotion with React Typescript ^4.1
Tags: react, typescript, emotion
Published: 2021-08-30 04:29:10

### Problem
Hello friends. I just spend over 20mins searching for the right way to configure react-typescript to get the [emotion](https://emotion.sh/docs/introduction) library working. And I couldn't find **the single place** where the answer lies.
So now that I gathered enough, you don't need to spend that time over such a simple issue.
### Solution
1 - After you install the proper package "@emotion/react". You need to head over your *tsconfig.json* file and make sure you have the following lines under *"compilerOptions"*:
```
    "jsx": "react-jsx",
    "jsxImportSource": "@emotion/react"
```
2 - Then as a requirement you must have *these* "comments" at the top of every .tsx file you want to use the css functionality.
```
/** @jsxRuntime classic */
/** @jsx jsx */
```
3 - Don't forget to always **import { jsx } from '@emotion/react'**
#### A complete usage example would be:
```
/** @jsxRuntime classic */
/** @jsx jsx */
import { jsx, css } from "@emotion/react";

const App = () => {
  return (
    <div
      css={css`
        padding: 32px;
        background-color: hotpink;
        font-size: 24px;
        border-radius: 4px;
        &:hover {
          color: ${color};
        }
      `}
    >Hover to change color.</div>
  );
};

export default App;
```

There you go! If it was useful for you consider to smash that heart, that way I'll keep posting stuff.
Introduction #2 
Published: 2021-08-30 02:27:28

Hi everyone my name is Francesca and I am a student at penn state. This year I will be graduating with a major in Human Centered Design and Development with a minor in Health Policy Administration. Between both the classroom and an internship at Merck I have gained experience in Front End Development, User Experience, User Interface Design, and Project Management. This summer in my role at Merck I learned to communicate effectivity between IT and the Business. I used my problem-solving skills to organize information, streamline workflows and increased productivity. My greatest goal is to make an impact on the healthcare system by applying an exceptional user experience to consumer engagement. I have experience in front end development from multiple classes, but still have lots to learn. 

I want to get involved in front end development because I enjoy problem solving and creating highly versatile and enjoyable interfaces. Web development is necessary in every industry which gives me a multitude of future career paths. Web development makes me excited and ignites a passion in me that networking and hardware does not. I specifically enjoy languages like HTML, CSS, and javascript. Front end development allows me to use my design and user experience skills along with my coding skills. From this class I want to strengthen my javascript skills and be able to truly unpack concepts that I only understand on the surface level. I decided to take IST 402 again after really enjoying the last 3 weeks of last semesters IST 402 class.
Better Linear Search
Tags: python, programming, algorithms
Published: 2021-08-30 04:21:09

```python
# better_linear_search.py
#   This program uses a linear search of an array of size n for
#   value x but unlike its predecessor linear_search.py it does
#   not traverse the entire array regardless of value x being
#   discovered.  It simply returns the value immediately once
#   the value of x in found in the array.  If not found then it 
#   will just return text saying it wasnt found.
# by: Scott Gordon

things = ["bike", "house", "cat", "computer", "hammer"]

def linear_search(array, n, x):
    for i in range(1, n):
        if array[i] == x:
            return i
    return "Not found!" 

print(linear_search(things, 5, "cat")) # prints the index of "cat" which is 2
print(linear_search(things, 5, "hammer")) # prints the index of "hammer" which is 4
print(linear_search(things, 5, "pasta")) # prints Not found!
```
Linear Search
Tags: python, algorithms, programming
Published: 2021-08-30 04:10:09

```python
# linear_search.py
#   This program uses a linear search of an array of size n for
#   value x 
# by: Scott Gordon

things = ["bike", "house", "cat", "computer", "hammer"]

def linear_search(array, n, x):
    answer = "Not found!"
    for i in range(1, n):
        if array[i] == x:
            answer = i
    return answer

print(linear_search(things, 5, "cat")) # prints the index of "cat" which is 2
print(linear_search(things, 5, "hammer")) # prints the index of "hammer" which is 4
print(linear_search(things, 5, "pasta")) # prints Not found!
```