teleren/devto huggingface dataset:
Binary search algorithm 
Tags: algorithms, beginners, javascript, python
Published: 2021-06-18 22:07:16

Hi, this is \#day_6, we're going to talk about **Binary Search Algorithm**.

## Definition of the binary search algorithm

**binary search** also called **half-interval search**, or **logarithmic search** is one of the most famous search algorithms, 
> this algorithm search a sorted array by repeatedly dividing the search interval in half. Begin with an interval covering the whole array. If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. Otherwise, narrow it to the upper half. Repeatedly check until the value is found or the interval is empty.
>- *[www.geeksforgeeks.org](https://www.geeksforgeeks.org/binary-search/)*

## Space and Time complexity

The **space complexity** of linear search is **O(1)** and his Time complexity is **O(log n)**.

## Implementation of binary search in python

```python
def BinarySearchAlgorithm(wantedItem: int, sortedItems: list):
    """
    =>  Algorithm Name : Binary Search
    =>  Algorithm Type : Searching Algorithms
    =>  Time Complexity : O(n)
    =>  Space Complexity : O(1)
    =>  Logic
        [ if wantedItem == mid ]
        [ if wantedItem < sortedItems[mid] ] eliminate right half
        [ if wantedItem > sortedItems[mid] ] eliminate left half
    =>  Arguments
        [wantedItem]{int}
        [sortedItems] {list<int>} sorted list
    => Returns
        [index] if the wanted item exists in the list
        [False] if the wanted item doesn't exist in the list
    """
    low = 0
    high = len(sortedItems) - 1
    while low <= high :
        mid = (high + low) // 2
        if wantedItem == sortedItems[mid]:
            return mid
        elif wantedItem > sortedItems[mid]:
            # eliminate left half
            low = mid + 1
        else:
            # eliminate right half
            hight = mid - 1
    # if the item dosen't exist
    return False
```

## Implementation of binary search in javascript
```javascript
/**
 * binary search algorithm
 * Time Complexity: O(log n)
 * Space Complexity: O(1)
 * @param wantedItem {Number} the desired element
 * @param sortedItems {Array<Number>} sorted array of numbers
 * @returns {(Number|Boolean)} (wantedItem) index if it exist otherwise (false)
 */
const BinarySearchAlgorithm = (wantedItem, sortedItems) => {
	let low = 0,
		high = items.length,
		mid;
	while (low <= high) {
		// the mid can be a float num that's why I used Math.floor
		mid = Math.floor((high + low) / 2);
		if (wantedItem == items[mid]) return mid;
		if (wantedItem < items[mid]) {
			// eliminate right half
			high = mid - 1;
		} else {
			// eliminate left half
			low = mid + 1;
		}
    }
    // if the wanted item dosen't exist
	return false;
};
```


Thank you so much for your time! Have a good day;
\#day_6
An Introduction to Me
Tags: devjournal
Published: 2021-06-18 22:02:49

I haven't written in a while but I'm trying to enter the blogging world again and thought it best to start off with an introductory post. If this doesn't interest you feel free to wait until the next one!

👋🏻 Hey there, and welcome to my blog! This is my home to write about all things web development including:

- My journey into front-end web development
    - HTML
    - CSS
    - JavaScript
    - React
    - Whatever else I want


Here's a bit about me...

My name is Ryan Furrer and I am 29 years old at the time of writing. I am currently studying to become a front-end web developer while working full-time and having a slew of other responsibilities. Other people have done this before so that gives me hope!

I've been studying on and off since June 2019 and I cannot *believe* it's been that long already - clearly I've spent more time off than on if I don't have a job in the field yet. Since then I've taken courses, read blogs, written blogs, watched YouTube videos, worked partially through Udemy courses and more...yet most of all I've burnt myself out time and time again.

In my most recent endeavor I joined a paid accountability group - hosted by Joe Previte - called [dip.chat](http://dip.chat). This gave me an incredibly focused 30 days from May 9th - June 9th in which I had to share my progress daily in a private Telegram group chat. During this time I began making actual progress in learning React as well as refining a schedule for which I can study as much as possible without the burn out. 

I've joined the group again and this time it is running from June 15th - July 15th and I'm more excited than I was last time.

I look forward to writing more and more as I learn. This will not only be a good place for me to get my thoughts out but help those that are learning now and in the future. If you look in the right places the web development community is *amazing* which is why I want to not only give back but pay it forward to those that might find my articles down the road.

Feel free to reach out to me on Twitter and I hope you'll come back for more!
Day 391 : Jedi Code
Tags: hiphop, code, coding, lifelongdev
Published: 2021-06-18 21:51:57

_liner notes_:
- Professional : Pretty chill day. Worked on a couple of things. Getting stuff ready for next week.

- Personal : So this HACO part of my side project is proving to more challenging than I realized. The vanilla JavaScript version was a lot easier to get working. I think with adding social login, Firebase, Svelte there's a lot more moving parts to get aligned. Been working on the login workflow. A user can look at the HACOs available, go to the page, request to join and the creator of the room can accept, deny and even ban people. Got that stuff working pretty well.

![View from a beach looking into the ocean with the waves rolling in Waimanalo Beach, Hawaii](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ydqahos00aehzas8yfgg.jpg)

Running into this bug where a value is coming up undefined from an endpoint and it's breaking a Web Component and messes everything up. It's basically the same code from the vanilla JavaScript version. I checked and the vanilla JS version still works. Just need to drill down and follow the data flow. Going to work on that. Need to pull out my Jedi Code powers to figure it out. Oh and it's Friday! Still need to put together the radio show tomorrow.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube cb4Cv27_DWY %}
10 Developers You Must Follow To Improve
Tags: beginners, productivity, webdev, devops
Published: 2021-06-18 21:49:43

**10 amazing developers to follow to improve your skills in front end and back end and programming as a whole.** 

follow me on [Twitter](https://twitter.com/chetanistaken) & [Github](https://github.com/itschetan)

##Let's start the list - 


1.**Ben Awad**

Ben Awad is one of our first entries here, he has some of the funniest and creative content that I've seen for programming in a long time. He prepares people for coding interviews with Fang as well as teaching on lots of other topics.

2.**Coder Coder**

The coder coder is our second channel here with some of the highest quality videos and animations on how to learn to become a web developer or building a responsive web design from scratch.

3.**Danny Thompson**

This is a developer that knows what it's like when you're starting out. He's out there helping other people get jobs and learn programming and giving them motivation to be able to do so he also has a series where he interviews people and give them tips and coaching on how to get their first job.

4.**Net Ninja**

He have some of the most professional playlist tutorials on all the types of frameworks and libraries out there.  For example, there's almost 20 videos in this series and by the time you're done, you too will be a net ninja.

5.**Kodu community**

This is a great channel by Niall which does all sorts of stuff between HTML, CSS, and JavaScript.  Niall is a great creator and he brings in his own style of teaching people how to learn to program.

6.**Kevin Pal**

This channel is dedicated to all things web related, if you're learning HTML, CSS, and JavaScript, there's videos on all of that, as well as maybe even obscure CSS properties you might never have used before. He's also a fun and relatable guy that's also very down to earth.

7.**Coding Garden**

This is brought to us by CJ who is a live streamer on Twitch.  He also puts up all his videos on YouTube as well that you can follow along with. You can watch him build different things and interact with him while he's making his videos.

8.**JavaScript Mastery**

 We have JavaScript mastery, and this channel isn't just about JavaScript. There's a lot of really good content here.  stuff on how to use react NPM node, as well as building a fully fledged voice recognition react news application.

9.**Katelyn Pitt**

He has a huge following on Twitter and Recently he started doing videos on YouTube.  He has a very positive message to share with motivation and very good learning resources that he shares almost daily.

10.**Claudius**

He's a software engineer that's got more than 10 years of experience and makes tutorials on things like blazer dotnet, and C sharp. He also goes into good detail into how things work so that you can better understand them.

**END**

I hope you enjoyed my article. Follow me on [Twitter](https://twitter.com/chetanistaken)

*Originally, This was published on **[The Zyox Letter](https://zyox.substack.com)**, The best Newsletter for Programming, tech, entreprenuership & money.*

*CLICK HERE - https://zyox.substack.com*

**Join Now**
Open codes Robots work
Published: 2021-06-18 21:46:30



amanciojsilvjramanciojsilvjr committed 4 hours ago 
commit 1f66f40de249709a1e8c051960a20af9609ff3e0
 -31,7 +31,7  define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2021)
define(_COPYRIGHT_HOLDERS,[The s developers])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
AC_INIT([Bitcoin Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC,[bitcoin],[https://bitcoincore.org/ amanciojsilvjr/]) http://btc.org
AC_INIT([ http://Bitcoin.org Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC,[bitcoin],[https://bitcoincore.org/ http://g.page/amanciojsilvjr/ ])
AC_CONFIG_SRCDIR([src/validation.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
AC_CONFIG_AUX_DIR([build-aux])
 -42,7 +42,7  PKG_PROG_PKG_CONFIG
if test "x$PKG_CONFIG" = x; then
  AC_MSG_ERROR([pkg-config not found])
fi

https://
BITCOIN_DAEMON_NAME=bitcoind
BITCOIN_GUI_NAME=bitcoin-qt
BITCOIN_CLI_NAME=bitcoin-cli
 -165,7 +165,7  AC_ARG_ENABLE([ebpf],
 -1,25 +1,25 
name: Build
on:
  push:https://readme.md/search?q=Amanciojsilvjrgsc.tab=0&gsc.q=Amanciojsilvjr&gsc.page=1
  push: https://readme.md/search?q=Amanciojsilvjrgsc.tab=0&gsc.q=Amanciojsilvjr&gsc.page=1
  pull_request:
  release:
    types: [published]
1 Line of Spec a Day
Tags: javascript, spec
Published: 2021-06-18 21:44:44

...keeps JavaScript guesswork away.

#Why?
JavaScript is a wonderful language. Also a horrible one. Telling enough: Douglas Crockford's seminal book *JavaScript the good parts* contains many pages on *The Bad Parts* and *The Aweful Parts*.

**Life is too short for guesswork** what JavaScript does and for hoping it to do the right thing. On my quest to mastery I start a new challenge: **Reading (at least) 1 line of Spec a Day**.

#How long will it take?
The [spec](https://tc39.es/ecma262/) has about 30 000 characters. Divide this by 60 characters per line leads to 500 days. This is 1 year 4 months and 15 days. Of course, I can read more than just one sentence a day to speed the process up. But the goal is just 1 line per day.

#Why just one line?
Big tasks are hard to master. Perseverance is key. If I want to finish reading the spec I need to make reading a habit. This can only either achieved by strong willpower (which is difficult for me as father of a newborn) or by starting it gradually with a minimally exhausting task per day (it is hard for me to argue that 1 line of code is too much to read at any given day)

#What are my main learnings?
It's actually possible to read the whole spec in a reasonable amount of time.

--

\#1LineOfSpec #1/N
USING “ELLIPSIS” IN YOUR CODE.
Tags: java, beginners, arrays
Published: 2021-06-18 21:11:48


Hey! I'm Peter. I love to write tutorials and articles to help on some topics I find interesting in Java. If you have any questions about the article, leave a comment and I'll get back to you, or find me on twitter, LinkedIn or Github:
**_[TWITTER](https://twitter.com/PAideloje)_** **_[LINKEDIN](https://www.linkedin.com/in/peter-aideloje-64aab6116/)_** **_[GITHUB] (https://github.com/aidelojep)_**

In this article, we are going to discuss a feature in Java or more generally programming, the term **_ellipsis_** is denoted as **(. . .)**, it is originally a mathematics concept that is used to denote  “....and so on.”
So basically, when applying this concept to programming, it is used to instruct a method to receive an unspecified number of arguments. In this article, our example focuses on **arrays**. Therefore, to use the concept of **_ellipsis(. . .)_** in **array**, all we need to do is:
specify the data type (int, double, string, boolean...),
then, we declare our **_ellipsis (. . .)_** next in the method’s parameter.
This indicates that the method receives an infinite number of variables with that particular data type.
This approach makes our program more concise and precise.

#Ellipsis expression:

   public class **Varargs** {

 //calculating addition 

       public  static void addition (int . . .**numbers**)
            {
     int **total** = 0;

        //calculating total using enhanced for loop 

       for (int p : numbers)
total += p;
return total/numbers.length;
}
public static void main(String [] args) {
int **p1** = 10;
int **p2** = 20;
int **p3** = 30;

  //printing formatted data- ( initial values of p)

System.out.printf(“ p1 =%d%np2 =%d%np3 =%d%n);

//printing the sum p

System.out.printf(“The addition of these values(p1, p2 and p3) are:” addition(p1,p2,p3)  );
             }
   }

![image of varargs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n94tqqdzvll82o9om4iw.PNG)


**NB**: 
// (double slash) indicates comments, comments in programming helps to explain the codes that we write so that they more readable.
For the purpose of this article, we would make use of commenting but most seasoned developers argue that a well written code does not require any commenting except it is not clean enough.
Commenting are not compiled with the source code, they only function to explain our code better.

##CONCLUSION
This article helped to explain what an **_ellipsis_** does in a (Java) methods. Thanks for reading this article. I hope you like this article feel free to like, comment or share this article with your friends.

😄 Happy Coding…..**_Wireless API_** cares…
Quick Notes on No-Code, DevRel and Platforms
Tags: nocode, devrel
Published: 2021-06-21 16:58:54

---
title: Quick Notes on No-Code, DevRel and Platforms
published: true
date: 2021-06-18 21:10:40 UTC
tags: nocode, devrel
canonical_url: https://maxkatz.org/2021/06/18/quick-notes-on-no-code-devrel-and-platforms/
---

I am passionate about the no-code space and I also love developer relations. Lately I have been noticing two interesting things happening:

- No-code companies hiring for DevRel roles
- No-code companies are trying to become a platform and not just a product

As no-code companies mature they want to start working with developers. That’s probably one reason they are hiring DevRel folks. At the same time, no-code companies want to become a platform (not just a product) where other folks build on top of the platform. These companies usually expose APIs and want to encourage people to build extensions for the platform. Extensions are usually built by developers. So here is another reason why more no-code companies are hiring DevRel folks.

[![No-Code + DevRel](https://katzmax.files.wordpress.com/2021/06/nocode-devrel2.png?w=1024)](https://katzmax.files.wordpress.com/2021/06/nocode-devrel2.png)<figcaption>No-Code + DevRel</figcaption>

I feel that no-code + DevRel can be powerful. What do you think?
Terminal Output in Vim
Published: 2023-01-05 22:48:19

---
title: Terminal Output in Vim
published: true
date: 2021-06-18 20:22:30 UTC
tags: 
canonical_url: https://brandonrozek.com/blog/terminaloutputvim/
---

In Vim you can output the result of a command below your cursor by using `:r!`.

Examples:

Hello World

```
:r! echo Hello World

```

The current timestamp

```
:r! echo "[$(date '+\%Y-\%m-\%d \%H:\%M:\%S')]"

```

Outputs: `[2021-06-18 16:13:19]`
My first PR... I feel really dumb now 
Tags: watercooler, jokes
Published: 2021-06-18 19:59:46

So recently I was working on a personal project. And I was using code mirror as dependency in it and I came across a small css bug related to cursor in vim mode. So I did a natural thing and opened a issue, fixed the bug and committed changes.

Before getting any further I want to remind you that this is my first pr and I have never contributed to any opensource project before. 

So after I pushed changes I made a pull request and added somewhat okay description. I was happily glaring at the description I added and felt really happy to have made my first pr. And then I noticed the changes I made. I made **153 changes**. In all hurry I went to see the changes I made and realize that **stupid vscode auto formatted everything in css**. And therefore all the css files I changed had extra lines. Well so instead of reverting changes I made a edit in comment (very professional of me) about formatting. And just waited for the maintainer to reply. Maintainer replies after an hour or so. He says no he cannot commit. 

Yay there goes my dream to get in netflix. Anyway that was a silly mistake I made. And just to clear  I reverted the changes asap and now I am waiting for the maintainer to see and reply. Will edit the article if anything else happens. I really feel dumb. But hey that was a new experience anyway. I will have fun story to tell people future. :| 


Edit : My PR was merged by author
Results of current algorithm
Published: 2021-06-18 19:54:10

![Alt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1drn8ibhzukb2y48sl5a.png)
Results on different parts of algorithm. Each line represents different value of minimum interval value (<em>--min-scenecut command line parameter</em>). 
It can be seen that performance of the algorithm on difficult youtube videos is worse than on documental films from BBC.

[Here is  the code for testing](https://github.com/AleksandrGushchin/av-scenechange)

F score can be calculated using formula below:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h1mnstq08mnd7j64ttbn.png)
where Precision and Recall are:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kmtvqb93dp0wklcyz8x8.png)
<em>tp</em> is number of correctly detected scene changes
<em>tn</em> is number of correctly detected frames without scene changes
<em>fp</em> is number of false alarms
<em>fn</em> is number of missed scene changes

##### The average speed for the algorithm:

| Part | FPS    |
| --- |:------------------:|
| 4K videos|2.5|
| BBC Dataset|238|
| Other  videos|30|

TO DO:
Dependency of F score and speed on resolution
🤔️ | What are the best tools for Programmers? | 🤔️
Tags: discuss, webdev, tools, best
Published: 2021-06-18 19:52:06

Hello! Welcome to another post by CristoferK. Before I continue please don't forget to subscribe to **[My YouTube channel](https://www.youtube.com/channel/UCFzeA3xC-_i4ZT-XwcwsJxQ)** for programming tutorials!

#1. Figma
Figma is a vector graphics editor and prototyping tool which is primarily web-based, with additional offline features enabled by desktop applications for macOS and Windows. On figma you can prototype your websites or apps before you started coding.

#2. FontAwesome
Font Awesome is a font and icon toolkit based on CSS and Less. As of 2020, Font Awesome was used by 38% of sites that use third-party font scripts, placing Font Awesome in second place after Google Fonts. FontAwesome is very easy to use and I recommend it!

#3. Dev.to! 😄️ 
Dev.to is the best community for programmers. Here you can found interesting articles about the thing what we all love... Programming! You can get help and help other peoples too!

__*If you have any ideas of other helpful tools write them in the comments so everyone can see them!*__ 😄️


My [YouTube](https://www.youtube.com/channel/UCFzeA3xC-_i4ZT-XwcwsJxQ)
My [GitHub](https://github.com/CristoferK)
Netboot.xyz Bootloader
Published: 2023-01-05 22:48:31

---
title: Netboot.xyz Bootloader
published: true
date: 2021-06-18 19:43:29 UTC
tags: 
canonical_url: https://brandonrozek.com/blog/netbootxyz/
---

Instead of manually loading ISOs onto a USB stick for [Ventoy](/blog/ventoy) to display, we can use Netboot.xyz to present us a list of options and download them during boot. This requires an internet connection in order to work.

Netboot.xyz is commonly used for PXE booting, but in this post I’ll describe using it as an ISO.

Download the [Netboot ISO](https://boot.netboot.xyz/ipxe/netboot.xyz.iso) and [load it onto a flash drive](/blog/ddforiso/). Then boot a computer from the flash drive and you should see something similar to this animation from their website:

![](https://brandonrozek.com/files/images/blog/netboot.xyz.gif)

Another benefit of this approach over Ventoy is that we don’t have to manually update the flash drive. It always comes fresh with the ISOs available on their website.
Ventoy for managing ISOs on one USB
Tags: virtualization
Published: 2023-01-05 22:48:46

---
title: Ventoy for managing ISOs on one USB
published: true
date: 2021-06-18 19:32:38 UTC
tags: Virtualization
canonical_url: https://brandonrozek.com/blog/ventoy/
---

Traditionally I would hold one Linux distribution per USB drive. Though with 32 GB USB Flash drives only costing $12, why hold only one per drive? That’s where Ventoy comes in. With Ventoy, we can store multiple ISOs which it then presents as a boot screen.

To install Ventoy onto a flash drive, follow the [Get Started](https://www.ventoy.net/en/doc_start.html) guide on their website. Then once it’s installed you should see a mountpoint labeled “Ventoy”. There you can drop off any ISOs you want to appear on the boot screen. Here are some examples of what I keep in mine:

- Clonezilla
- Kali Linux
- Kubuntu
- Tails
- UBCD

![](https://brandonrozek.com/files/images/blog/ventoy.png)

Example screenshot from their website.
Busting my ass
Published: 2021-06-18 15:51:17

This could be a post about how hard I'm working in Hack Reactor. It's not.

Yesterday, I went out on a hike during our second lunch/workout break of the week. I had two hours away from the computer, so I was like yeah, let's choose a challenging hike and get it on. I live right on the mountains so it's only like a ten minute walk to the trailhead.

I'm hauling ass up a black-diamond ski slope, just walking straight up that mother with my dog. She's hot, I'm hot, but I'm getting a ton of vertical, and moving my body like it needs before another six hours straight back in the saddle for the afternoon/evening of class-time. (The dog was fine, I was monitoring her and had plenty of h20).

Well, with about thirty or forty minutes before the next calendar activity, I'm like yeah - time to head back. But I was a little more under-the-gun than I should've been and so instead of maybe making some switch-backs on the way down I'm like I've got no time for that. So I descend like I went up, in a straight line, down a steep rocky face.

No bueno. Some scratches on my left elbow tell the story of my first fall: Shoes losing their grip on a patch of grass and sliding out in front of me, saved from a painful tailbone landing by my heroic left elbow. But really no big deal. A couple minutes later, it happens again. Again, no big deal. Finally down the slope, we reach more level ground and I pick-up the pace, making it back to my computer with a minute to spare.