teleren/devto huggingface dataset:
What's left: Platform Development Update 15-November-2022
Tags: web3, opensource, blockchain, programming
Published: 2022-11-16 15:34:18

Good news everyone!
We're coming closer to a Platform release candidate. Few things left. 
Find out more in the video and presentation transcription below.
{% embed https://www.youtube.com/watch?v=Ptlos1Piqfw %}

## TenderDash
**Goals:** Same block execution

**Tasks:**

Integration of same-block execution with Drive **_in progress_**

- refactor(abci): Provided a current block commit with FinalizeBlock **_done_**
- feat(abci): Add round to Prepare/ProcessProposal, FinalizeBlock **_done_**
- feat: add core_chain_lock_update to RequestProcessProposal **_done_**
- Released v0.10.0-dev.3 and v0.10.0-dev.4 **_done_**
Better proof signatures for light clients **_done_**
feat!: include state id in block signature **_done_**
- Investigate deadlocks **_in progress_**
refactor(consensus): consensus state to fix deadlock

**What’s Left before Testing Phase**

- Stabilize same-block execution
- Update BLS library
- Adjust vote extensions for withdrawal transactions
- Drive integration

## GroveDB

**What’s Left before Testing Phase**

Major
- Sum Trees merge

Minor
- Average case processing costs
- Some code polishing
- Light proof feature

## SDK
**Goals:**
Rework chain synchronization process (SPV)

Reworking chain synchronization process
- Manual QA **_done_**
- Stabilizing Platform related workflows (Platform Test Suite) **_in progress_**

DashPay Web Extension
- Migrating extension from Manifest V2 to Manifest V3 in progress
- (needed for publishing to Chrome Store)

**What's next**
- Reorgs handling and consensus rules fine tuning
- Secure keychain storage


**Protocol**
**Goals:** Same block execution, fees and withdrawals

**Tasks:**
Fee finalization in JS Drive and DPP **_in progress_**

Withdrawals:
- Introduce withdrawals data contract **_in review _**
- Implement the pooling process (type 0 only) for withdrawals **_in review_**
- Update status of withdrawals after broadcasting **_in review_**
- Add revision logic to IdentityCreditsWithdrawal transition **_in review_**

Same Block Execution:
- Use multiple database transactions for block processing in progress
- Provide signature and block time in query handlers in review
- Identity v2 in progress
- Efficient Data Serialization in progress

**What's left:**

Major
- Fee Refunds
- Accomplish and test withdrawals

Minor
- Logging of same block execution
- Use block candidate context in State Repository
- Deal with situation where fees are higher than Balance
- Verify fee processing costs
- Asset Lock and Unlock transactions integration
- BLS library rust binding
- Masternode reward distribution

## Rust Port Update
**Tasks:**

- Integrate Rust DPP into SDK, Drive, DAPI and test suite **_in progress_**
- Initial glue figured out, DPP tests ported 68/1174 **_in progress_**
- Successfully run platform test suite and test for Drive and Dapi **_planned_**
- Working on compatibility issues with RE2 and BLS lib **_done_**
- Integrating working BLS scheme into Rust DPP **_in progress_**
How to Assign a role to the user based on the LDAP group - Laravel LDAP authentication
Tags: opensource, webdev, laravel, php
Published: 2022-12-24 04:24:45

---
title: How to Assign a role to the user based on the LDAP group - Laravel LDAP authentication
published: true
date: 2022-11-16 15:31:48 UTC
tags: opensource,webdevelopment,laravel,php
canonical_url: https://medium.com/geekculture/how-to-assign-a-role-to-the-user-based-on-the-ldap-group-laravel-ldap-authentication-548a061ddd6c
---

[![](https://cdn-images-1.medium.com/max/2600/0*XISDz2zl4ZbGn2vs)](https://medium.com/geekculture/how-to-assign-a-role-to-the-user-based-on-the-ldap-group-laravel-ldap-authentication-548a061ddd6c?source=rss-17217f29618a------2)

Laravel LDAP authentication with an example — part 3

[Continue reading on Geek Culture »](https://medium.com/geekculture/how-to-assign-a-role-to-the-user-based-on-the-ldap-group-laravel-ldap-authentication-548a061ddd6c?source=rss-17217f29618a------2)
Introducing Owen Sauce - a new way to collborate
Tags: atlashackathon22, opensource, webdev
Published: 2022-11-16 15:16:46

Hackathons are an amazing way to build and learn new things.

MongoDB in collaboration with DevTo has come up with a new Hackathon.
I have decided to participate in this hackathon and build something that was on my mind.
## What am I building?
Recently I participated in the Hacktoberfest. And well who doesn't know Hacktoberfest, right? ✅✅

Being a beginner, I have faced the issue of not being able to find beginner friendly repositories easily. Besides, I understand that maintainers also face the issue of having to guide a newbie in solving some complex issues and then not being able to get the result.

🙅‍♂️🙅‍♂️No more. I will be building an open source software that deals with this issue. 

Maintainers will specify the level of developers they are looking for along with some gist of their project.

And contributors will easily find the projects based on their preferences.😎😎

And once again, I here with an **AWKWARD** name - 

## Owen Sauce 🌭
Sounding familiar? Well, Open Source with a burger in your mouth, OWEN SAUCE 
<img width="100%" style="width:100%" src="https://media.giphy.com/media/Dg09uzJRK4awU/giphy.gif">

## Tech Stack
| Tech       |     Used for   |
|------------|----------------|
| NextJS     | Components     |
| MongoDB    | Database/Auth  |
| Tailwind   | Styling        |
| Javascript | Language       |

## A Glimpse


![Open Source Contributions for Beginners](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l36s7qlld600d18k5hvz.png)


You can checkout my [Github Owen Sauce](https://github.com/thevinitgupta/open-sauce) repository for code updates!!

Happy Hacking.
Proxy Design Pattern
Published: 2022-11-16 14:49:25

There are three types of design patterns
* Creational
* structural 
* Behavioral  

Proxy: is a one of the structural design patterns .....

### what is the structural design patterns? 
* it's the way how objects use each others in a proper way

> Next Example the client code use two ways to send request 

* first one by create new instance from the actual object we want to use [RealSubject Object]
* second one by create new instance from proxyObject 


----- What is the benefit from using this pattern ? 
* we can add logging and checking before sending the request


```
/**
 * The Subject interface declares common operations for both RealSubject and the
 * Proxy. As long as the client works with RealSubject using this interface,
 * you'll be able to pass it a proxy instead of a real subject.
 *
 * @format
 */

interface Subject {
	request(): void;
}

/**
 * The RealSubject contains some core business logic. Usually, RealSubjects are
 * capable of doing some useful work which may also be very slow or sensitive -
 * e.g. correcting input data. A Proxy can solve these issues without any
 * changes to the RealSubject's code.
 */
class RealSubject implements Subject {
	public request(): void {
		console.log("RealSubject: Handling request.");
	}
}

/**
 * The Proxy has an interface identical to the RealSubject.
 */
class ProxyTest implements Subject {
	private realSubject: RealSubject;

	/**
	 * The Proxy maintains a reference to an object of the RealSubject class. It
	 * can be either lazy-loaded or passed to the Proxy by the client.
	 */
	constructor(realSubject: RealSubject) {
		this.realSubject = realSubject;
	}

	/**
	 * The most common applications of the Proxy pattern are lazy loading,
	 * caching, controlling the access, logging, etc. A Proxy can perform one of
	 * these things and then, depending on the result, pass the execution to the
	 * same method in a linked RealSubject object.
	 */
	public request(): void {
		if (this.checkAccess()) {
			this.realSubject.request();
			this.logAccess();
		}
	}

	private checkAccess(): boolean {
		// Some real checks should go here.
		console.log("Proxy: Checking access prior to firing a real request.");

		return true;
	}

	private logAccess(): void {
		console.log("Proxy: Logging the time of request.");
	}
}

/**
 * The client code is supposed to work with all objects (both subjects and
 * proxies) via the Subject interface in order to support both real subjects and
 * proxies. In real life, however, clients mostly work with their real subjects
 * directly. In this case, to implement the pattern more easily, you can extend
 * your proxy from the real subject's class.
 */
function clientCode(subject: Subject) {
	// ...

	subject.request();

	// ...
}

console.log("Client: Executing the client code with a real subject:");
const realSubject = new RealSubject();
clientCode(realSubject);

console.log("");

console.log("Client: Executing the same client code with a proxy:");
const proxy = new ProxyTest(realSubject);
clientCode(proxy);



```
Laravel : How to Create a regular expression constraints on the parameters in the routes file
Tags: laravel
Published: 2022-11-16 14:53:06

```php

Route::get('test/{id}', function(){
    return 'test page ';
});

// id=xxxxxxxxxx

// http://127.0.0.1:8000/test/xxxxxxxxxx 
// output => test page 

```

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



## Add condition id => any number integer unsigned =  [0-9]+ 
```php
Route::get('test/{id}', function(){
    return 'test page ';
})->where(['id' => '[0-9]+']);

// id=xxxxxxxxxx

// http://127.0.0.1:8000/test/xxxxxxxxxx 
// output 404 NOT FOUND

// id=10 

// http://127.0.0.1:8000/test/10 
// output => test page 

```

## You can make the condition on the whole project
#### open app/Providers/RouteServiceProvider.php;

```php 
 public function boot()
 {
        Route::pattern('id', '[0-9]+');
        parent::boot();
 }
```

##Reference
https://laravel.com/docs/9.x/routing#parameters-regular-expression-constraints
Best Practice #1 : One Function can be accessed many times with Different Values
Tags: java, android, formatting, dateconvert
Published: 2022-11-16 14:52:31

## Disclaimer
Pada dasarnya fungsi pada suatu aplikasi itu dapat dijalankan pada proses tersebut, misal `onClick`, `onScroll` dan lain sebagainya, namun kita juga tidak mungkin ada fungsi yang sebenarnya hampir sama dan sering digunakan pada proses / flow yang ada di aplikasi kita, contohnya saja yang sederhana, misal popup `Toast` saat berhasil melakukan sesuatu, memunculkan pesan melalui popup Toast dengan message yang berbeda

## Actions
Dibawah ini merupkan fungsi yang dapat kita kustom namun fungsinya sama misal melakukan penjumlahan dengan variable yang berbeda, berikut

```shell
Hasil penjumlahan 10 + 5 adalah 15
```
bagaimana caranya agar kita mendapatkan nilai hasil jumlah, yap tentu kita sudah tahu fungsinya `nilai a` + `nilai b`, namun apakah tidak terlalu membosankan dan memakan banyak space misal fungsi tersebut sering digunakan, oleh karena itu kita perlu membuat functions

```java
public int fungsiPenjumlahan(int x, int y) {
    // Variable Tampung hasil Penjumlahan
    int result = 0;
    // Lakukan Proses Penjumlahan dan di Tampung ke Variable result diatas
    result = x + y;
    // Kita kembalikan nilai yang sudah kita proses tadi ke proses yang memanggil fungsi ini
    return result;
}
```
Berikut program yang berfungsi untuk memanggil fungsi diatas

```java
public void bestPractice() {
    // Bagian Nilai yang Dapat kita Kustom (dinamis)
    int nilai_a = 10;
    int nilai_b = 5;
    // Output proses
    System.out.println("Hasil penjumlahan 10 + 5 adalah " + fungsiPenjumlahan(nilai_a, nilai_b));
}
```
dengan begitu kita dapat mempercepat pekerjaan yang sering kita lakukan dengan membuat 1 fungsi namun dapat di custom nilai yang akan di proses tersebut.
### Code Result
https://github.com/mask-b/mask-b/blob/main/best-practice/best-practice-1.java
Best Features of Power Pages From Power Apps Portal UI/UX Pro
Tags: microsoft, dynamics365, powerd365net, powerapps
Published: 2022-11-16 14:50:38

Microsoft Has Made Drastic Changes To Its Power Apps, This Post Will Help You Learn The Best Features Of Power Pages Using Power Apps Portal UI/UX.

To read more: [Click Here](https://powerd365.net/best-features-of-power-pages-from-power-apps-portal-ui-ux-pro/)
CSS Positioning
Published: 2022-11-16 12:44:52

The CSS position property defines the position of an element in a document. This property works with the left, right, top, bottom and z-index properties to determine the final position of an element on a page
During the web designing mostly position property is set to five important values which are <u>Static</u>, <u>fixed</u>, <u>absolute</u>, <u>relative</u> and <u>sticky</u>. In this article we are going to look how you can use this property and their values to place an element to your preferred location in the web page.

                    **STATIC PROPERTY** 

Static is the default position value of each element. For this kind of position property the element is positioned according to the normal flow of the document. Here the right, left, top, bottom and z-index properties does not have any effect on the element. 

                       **FIXED PROPERTY**

The element is eliminated from the typical document flow, and no room is made in the page layout for it. Unless one of its ancestors has a transform, perspective, or filter property set to something other than none or the will-change property is set to transform, in which case that ancestor acts as the containing block, it is positioned relative to the initial containing block established by the viewport. The top, right, bottom, and left values define its final location.

                     **ABSOLUTE PROPERTY**

The element is eliminated from the typical document flow, and no room is made in the page layout for it. If there is one, it is placed in relation to that ancestor; if not, it is placed in relation to the first contained block. The top, right, bottom, and left values define its final location.

When the value of the z-index is not auto, this value establishes a new stacking context. Absolute positioning prevents the margins of boxes from collapsing with other margins.

                       **RELATIVE POSTION**

The element is placed in accordance with the document's natural flow, and its offset from itself is determined by the values of top, right, bottom, and left. The space provided for the element in the page layout is the same as it would be if position were static because the offset has no effect on the positions of any other elements.

When the value of the z-index is not auto, this value establishes a new stacking context. Uncertain is how it will affect the elements of table-*-group, row, column, cell, and table-caption.

                   **STICKY POSITION**

The element is positioned in accordance with the document's natural flow, and depending on the values of top, right, bottom, and left, it is then offset in relation to its nearest scrolling ancestor and contained block (nearest block-level ancestor), including table-related elements. Other elements' positions are unaffected by the offset.

A new stacking context is always created by this value. It should be noted that a sticky element "sticks" to the closest ancestor that has a "scrolling mechanism" (produced when overflow is hidden, scrolled, auto, or overlay), even if that ancestor isn't the closest one that is really scrolling.
Replaced element vs non-replaced element
Published: 2022-11-16 14:43:43

Replaced element is an element whose representation is outside the CSS scope. They are external object whose representation is independent of CSS formatting model
In simple words replaced element are element which are not effected by the stylesheet of the current document. The position of replaced element can be affected using CSS, but not the contents of replaced element itself. Some replaced elements, such as iframe elements, may have stylesheets of their own, but they don't inherit the styles of the parent document.

The only other impact CSS can have on a replaced element is that there are properties which support controlling the positioning of the element's content within its box.
Replaced elements
Typical replaced elements are:

<iframe>
<video>
<embed>
<img>
Some elements are treated as replaced elements only in specific cases:

<option>
<audio>
<canvas>
<object>
<applet>
HTML spec also says that an <input> element can be replaced, because <input> elements of the "image" type are replaced elements similar to <img>. However, other form controls, including other types of <input> elements, are explicitly listed as non-replaced elements (the spec describes their default platform-specific rendering with the term "Widgets").

Objects inserted using the CSS content property are anonymous replaced elements. They are "anonymous" because they don't exist in the HTML markup.

**Controlling object position within the content box**

Certain CSS properties can be used to specify how the object contained within the replaced element should be positioned within the element's box area. These are defined by the CSS Images specification:

`object-fit`
Specifies how the replaced element's content object should be fitted to the containing element's box.

`object-position`
Specifies the alignment of the replaced element's content object within the element's box.
Full-text filter and index are already available!
Published: 2022-11-16 14:37:06

Qdrant is designed as an efficient vector database, allowing for a quick search of the nearest neighbours. But, you may find yourself in need of applying some extra filtering on top of the semantic search. Up to version 0.10, Qdrant was offering support for keywords only. Since 0.10, there is a possibility to apply full-text constraints as well. There is a new type of filter that you can use to do that, also combined with every other filter type.

Using full-text filters without the payload index
Full-text filters without the index created on a field will return only those entries which contain all the terms included in the query. That is effectively a substring match on all the individual terms but not a substring on a whole query.


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

Read more by the **[link](https://blog.qdrant.tech/qdrant-introduces-full-text-filters-and-indexes-9a032fcb5fa)**
Grid In tailwindCSS
Published: 2022-11-16 14:26:05

When you have grid of many divisions(div) which are not equal, you first identify  the smallest div amongest all the divisions you have and the you count how many times that small div appeared on the row and on the column, then what you do is to take the number of rows and multiply with the columns. For example on the this Image below we have 8 columns and 7 seven rows, the you take 7 times 8 and you get 56 divs in total, then make 56 divs in your components.
This images contains 56 divisions considering the small div. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8s7kgpz059no4n7x39s.png)
 Set images height to full and width to full. then on the wrapper apply grid-col-8.
Notes: You do not need to set grid-row-7. 
Therefore, count how many small div is in the first grid and then do col-span depending on the number of divs you want to cover. 

For example: On the first div you will do col-span-2 and row-spa-2.

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

Then you eleminate unused rows and columns until you have the exact rows and column you want.

Below Is my Implementation of the above grid. 



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7ligc2iye7v36hi6hy1.png) 
This is the  easiest way of doing complicated Grid in TailwindCSS without spending much time.
Hi Dev's - Zigi is live on Product Hunt today - show us your support ️🤟
Tags: productivity, slack, bot, devlive
Published: 2022-11-16 14:24:56

**Zigi - Slack-based workflow assistant built for devs & their teams**

Zigi automates the mundane day-to-day parts of your job. It examines your Jira & GitHub activity, figures out what needs your attention and sends you actionable, real-time help from Slack. That way, you can focus on code, collaborate better and save time.

⏳ **Why did we build this?**
We’re developers and we’re used to managing big R&D teams. Dev is a creative process done by multiple personas and in the last few years it’s changed. There’s so much overhead on top of coding, more dependencies, multiple tools, that developers are overloaded. Now the world has changed, teams are remote and scattered in different time zones, which just makes everything more complex.

Zigi was built because we think it’s time to take a new approach to driving productivity, while keeping devs and their teams happy. Zigi’s mission is to provide hands-on help with personalized automation, so we can manage our day-to-day tasks with minimal distractions and maximum focus.

**We’re so excited to share that Zigi is officially [live on Product Hunt](https://www.producthunt.com/posts/zigi)**. 
Come check us out and spread the love ❤️ 
Our team will be around all day to answer your questions and comments. We really want to know what you think! 👉 🚀

**👉 🚀 Check it out here : https://www.producthunt.com/posts/zigi**
Naming conventions for React developers
Tags: javascript, react, programming
Published: 2022-11-16 14:16:46

Naming conventions are something that helps to keep a codebase readable. On the frontend side, we use standard JavaScript conventions. Camel case for common variable names, pascal case for classes and components, and upper case for constant values. But this only covers the basics of naming conventions.

If we go to the React world, there are some other stable naming conventions; some come from when the primary way of creating React components was by using classes, and some are new, from React hooks.

One that comes from the old React, and is still used, is the prefix handle for functions that handles some component behavior, like handleSubmit or handleClose. Another common prefix from that era is the on__, which is used to declare that something happens on a specific event, like an onClick or onOpen. React class components also use two naming conventions that come from Object Oriented Programming, the use of setters and getters.

The major one from the hooks era is the useSomething. An eslint plugin even enforces this one. This is used both on the React default hooks and is forced to be used on any custom hook.

At last, one source of confusion reported by the team I work with is the name given to variables inside array iteration methods. Because of the similarity between singular and plural versions of entity names, a fast reading can make someone think that the plural version is singular and vice-versa. One way to solve that is to use generic names for the internal variable, like “item” or “element”. However, it’s up to the dev to do that or use the singular version of the entity since that proposition can change its value based on how long or complicated is the interation.

Two other classic naming conventions that can help anyone that wants to go further on this are https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html and https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/general-naming-conventions.

This article was originally published on https://felipebosi.com/programming/naming-conventions/