teleren/devto huggingface dataset:
Flutter: Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized
Published: 2021-01-06 16:29:53

Hello Guys. from the last many time I have faced Flutter: Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized this error in a flutter.

so finally I have decided to make a solution to this error. so without wasting your time let’s start this article.

What is Issue:
I am Facing This issue at my Stacktrace.
```
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
#0      defaultBinaryMessenger.<anonymous closure> (package:flutter/src/services/binary_messenger.dart:73:7)
#1      defaultBinaryMessenger (package:flutter/src/services/binary_messenger.dart:86:4)
#2      MethodChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:140:62)
#3      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:35)
<asynchronous suspension>
#4      MethodChannel.invokeMapMethod (package:f<…>
```
What is Solution
Solution 1 :

Here is All Possible solution Added Please check out at here <a href="https://fluttercorner.com/flutter-unhandled-exception-servicesbinding-defaultbinarymessenger-was-accesse/">Flutter: Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized</a>
📊CPRA Passed. What’s Changing in “CCPA 2.0”
Tags: compliance, ccpa, cpra
Published: 2021-01-06 16:21:01

🇺🇸 The new California law goes much further than its predecessor.
[Read more...](https://auth0.com/blog/cpra-passed-what-s-changing-in-ccpa-2-0/?utm_source=content_synd&utm_medium=sc&utm_campaign=ccpa_20)
Day 6 Challenge
Tags: challenge, javascript, webdev, 365daysofcoding
Published: 2021-01-06 16:14:36

Happy Day 6! Today we are going back to basics. This challenge can easily be applied to front end as well as backend.

## The Problem
Create a function that accepts a string and a number. The function must return the given string truncated to the maximum length (number that was passed in) followed by "...".  if the string is shorter than the passed maximum length return the passed string.
```javascript
Examples:

        truncate('It works on my machine', 8) // 'It works...'
        truncate('It’s not a bug – it’s an undocumented feature', 14) // 'It’s not a bug...'
        truncate('In order to understand recursion, one must first understand recursion', 'In order to understand recursion, one must first understand recursion'.length)           // 'In order to understand recursion, one must first understand recursion'
        truncate('The cheapest, fastest, and most reliable components are those that aren’t there', 82) //'The cheapest, fastest, and most reliable components are those that aren’t there'
```
JS Clean Code tip: Don't use tuples for returned objects
Tags: javascript, cleancode
Published: 2021-01-06 16:14:31

I am _not_ going to talk about the [Record & Tuple Proposal](https://2ality.com/2020/05/records-tuples-first-look.html), but about this bad habit:

```javascript
function createSomething() {
  const thing1 = { 
    aProperty: 'indeed'
  };

  function thing2() { /* ... */ }

  return [thing1, thing2];
}
```

There is absolutely everything wrong with this example. Honestly I was kinda surprised to see it in actual production code.

## The problem is losing naming
So let's see some examples of using the thing above:

```javascript
// Having a typo won't cause any errors
// but you won't find the usages.
const [thang, thing2] = createSomething();

// This is not just valid, but super misleading!
// You accidentally changed the order and you had no errors!
const [thing2, thing1] = createSomething();
```

We are losing the meaningful names still intact inside `createSomething` with _nothing_ in return. (`React` team uses this actually to name your hooks in any way you want - but they also try to enforce naming through `linter` rules).

## How to fix it
Simply return an object:

```javascript
return { thing1, thing2 };
```

And this is how you use it:
```javascript
// will cause error
const { thang, thing2 } = createSomething();

// order does not matter, no penalty 
// if you misremember the order
const { thing2, thing1 } = createSomething();
```

💪 🦾 💪 🦾 💪 🦾 💪 🦾
Converting a sorted array into a binary search tree in C++
Published: 2021-01-06 16:08:28

Let us see how to convert a sorted array into a  binary search tree. Before that let us see what is a binary search tree.

What is a binary search tree?

A binary search tree is a node based data structure which has the following properties:
1. The left sub-tree of a node contains elements lesser than that of the node
2. The right sub-tree of a node contains elements greater than that of the node
3. There are no duplicated values in the binary search tree.
4. Each of the left sub-tree and right sub-tree follow the rules 1 and 2.

To create a binary search tree from a sorted array we first find the middle element and create the root. Then we use a recursive function to form the left and right sub-trees.

**Code**
The code snippet for creating a node:

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


The function for converting array to binary search tree:

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


The function for preorder traversal and printing of the binary search tree:

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


Hope this helps you!
Street tree app for DO hackathon
Tags: dohackathon
Published: 2021-01-06 16:04:20

## What I built
An R Shiny app exploring the benefits of street trees.

### Category Submission:
Programme for the people

### App Link
app-dan-carpenter.co.uk/street_trees/

### Screenshots


### Description
An app exploring the benefits of planting trees in my street, including carbon sequestration and pollution removal
 

### Link to Source Code
github.com/drdcarpenter/street_trees

### Permissive License
MIT License

## Background
My street only has two trees, but I think it should have more. Trees are great at storing and sequestering carbon as well as removing pollution from the air. More trees would make the street environment much better. The app explores how many trees could be planted and their benefits.

### How I built it 
I used Shiny in R to create the app and deployed to the app platform with a Dockerfile. I learned a lot about Dockerfiles in deploying this app.

## Additional Resources/Info
See dan-carpenter.co.uk/2020/12/31/street_trees/ for more details on how I built this app.
5 CSS Tips and Tricks to Master | Coder Champ
Tags: css, html, webdev, design
Published: 2021-01-06 16:04:06

CSS Tips and Tricks to Master
{% youtube oCS03fbrji4 %}

This guide will share **my years of experience**, which you can not find on google easily for now, until this article is ranked. 

I've put a lot of effort and commitment to make this guide for you. So, everyone can understand and take advantage of it in their CSS knowledge.

By the way, **if you're new to our Web Developer's list**. 
You will start loving our weekly newsletter. **[Subscribe Now](https://www.coderchamp.com/newsletter/)**

### 5 CSS Tips and Tricks to Master Properties:

**Below are some of the great tips which can help you to master CSS.**
1. **Learn from the experience** of others. You can explore Codepen, and there are tons of pure CSS stuff there. How animations work, icons, transformation is doing well in their pen? See, if you can pick something, maybe it could be a new property or a new approach?  


2. **Read books & blogs.** This approach will help you out to learn more advanced stuff. Here, you will read the theory and the purpose of using the specific property or method.


3. Same, like point #1. Do **inspect elements** on any of your desire websites and see what approach/properties they are using to create specific components. It could be a button/link design or a cool shadow effect, etc.


4. **Explore different CSS frameworks** code base. This approach will help you to architect CSS projects for big companies.


5. Keep up the momentum to learn and **practice stuff** in CSS. This approach is most important. It will help you to keep moving also build your confidence to write CSS.

I love writing CSS and always share my tips, tricks, approaches, experience in Web Development.

You can subscribe to our community weekly newsletter to keep yourself up to date with Web Development.

Subscribe  **[Coder Champ](https://www.coderchamp.com/)**

**If you like these tips, share them with others and give your feedback in the comments.** 

Thanks
FreeRADIUS with the rlm_sql_oracle module
Tags: linux, beginners, systems, devops
Published: 2021-01-06 15:43:24

We are going to build FreeRADIUS version ***3.0.21*** with ORACLE Module ***rlm_sql_oracle***.

### Download ORACLE Instant Client

Visit ORACLE official site and download oracle instant client. For that, you may need to log in. I'm downloading ***v12.2***   
Here is the link for oracle instant client. [https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html]( https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html )

```yml
mkdir /opt/oracle
cp instantclient-* /opt/oracle/
unzip instantclient-basic-linux.x64-12.2.0.4.0.zip
unzip instantclient-sdk-linux.x64-12.2.0.4.0.zip
```

Add below lines to file **.bash_profile**
`vim ~/.bash_profile`
```yaml
export ORACLE_HOME=/usr/lib/oracle/12.2/client64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/oracle/instantclient_12_2
```
```yaml
source ~/.bash_profile
```
Now verify the environment.
```yaml
env | grep -i oracle
 
LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:/usr/local/lib:/usr/local/lib64
ORACLE_HOME=/usr/lib/oracle/12.2/client64
```

Create a symlink for client shared library **libclntsh.so**. As, while compiling FreeRADIUS look for that oracle library.

```yaml
cd /opt/oracl/instantclient_12_2
 
ln -s libclntsh.so.12.1 libclntsh.so
```

### Download FreeRADIUS

Install dependency first.
```yaml
yum install libtalloc-devel
```
```yaml
wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-3.0.21.tar.gz
 
tar xvf freeradius-server-3.0.21.tar.gz
cd freeradius-server-3.0.21
```

Compile FreeRADIUS with the below parameters.
```yaml
./configure --with-oracle-home-dir=/opt/oracle/instantclient_12_2 --with-oracle-lib-dir=/opt/oracle/instantclient_12_2 --with-oracle-include-dir=/opt/oracle/instantclient_12_2/sdk/include
```

```yaml
make
make install
```
Now configure Radius with oracle module. 
```yaml
vim /usr/local/etc/raddb/mods-available/sql
```

```yaml
dialect = "oracle"
driver = "rlm_sql_oracle"

## your db credential here.
login = "wifiradius_admin"      
password = "xxxxxxxx"
 
 
radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXX.XXX.XXX.XXX)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dbname)))"
```
```yaml
cd /usr/local/etc/raddb/mods-enabled
ln -s ../mods-available/sql sql
```
Launch FreeRADIUS in debug mode and if everything looks ok then start the service.
```yaml
radiusd X
```
Here, you can see radius module being loaded.  
`rlm_sql (sql): Driver rlm_sql_oracle (module rlm_sql_oracle) loaded and linked.`

```yaml
systemctl start radiusd
```

Now your FreeRADIUS service should be running with ORACLE module.
Wednesday Links - Edition 2021-01-06
Tags: java, gradle, spring, microservices
Published: 2021-01-06 15:43:11

Mockito and JDK 16 (45 sec read) 🍹
https://twitter.com/MockitoJava/status/1345281603174543361

HexFormat in JDK 16 (3 min read) 🔣
https://download.java.net/java/early_access/jdk17/docs/api/java.base/java/util/HexFormat.html

Don't use Protobuf for Telemetry (10 min read) 📞
https://richardstartin.github.io/posts/dont-use-protobuf-for-telemetry

Spring Boot Best Practices for Microservices (10 min read) 🦭
https://piotrminkowski.com/2019/12/06/spring-boot-best-practices-for-microservices

Investigating MD5 overheads (12 min read) #️⃣
https://cl4es.github.io/2021/01/04/Investigating-MD5-Overheads.html

The Problem with Gradle (13 min read) 💭
https://www.bruceeckel.com/2021/01/02/the-problem-with-gradle

Do Loom’s Claims Stack Up? Part 1: Millions of Threads? (8 min read) ↗️
https://webtide.com/do-looms-claims-stack-up-part-1

IntelliJ IDEA 2020.3.1 Is Out With Apple Silicon Support (1 min read) 🍏
https://blog.jetbrains.com/idea/2020/12/intellij-idea-2020-3-1/
What a Front end Developer Exactly need to know in 2021
Tags: startup, devops, webdev, design
Published: 2021-01-06 15:40:28

When we look at our favorite website with the fantastic features made with front end development, the front end developers are behind it who implements web design through coding languages such as HTML, Javascript, and CSS. If we analyze last year's data and the current situation, the front-end developers are the most demanded nowadays. 

Let's have a look at the [Google Trend's](https://trends.google.com/trends/explore?q=front%20end%20developer) data,

![front end developer](https://cdn-images-1.medium.com/max/800/0*nVt2YVikaHC00KYj)

#What are the skills use by front end developer?

There are three leading front end coding languages that front end developers used to build the website and web app.
HTML
javaScript
CSS

Other technical and soft skills make front end developer more demanded in the market,

###Technical Skills

CSS and javaScript framework knowledge
Javascript/jQuery
CSS preprocessors
Responsive design
Version control and other developer tools
Web performance/ building and automation tools
Testing

###Soft skills 

Creativity
Communication
Teamwork

Let me give you the short information about the **front end developer role**, such as

Front end developer
Front end engineer
Junior front end developer
Front end software engineer


#Front end developer skills- Conclusion

The unique and creative website attracts more users. So you may clear about the front-end developer skills to make a more effective front-end website. You can [hire front end developer](https://www.bacancytechnology.com/hire-front-end-developer) from the most reputed front-end development company [Bacancy technology](https://www.bacancytechnology.com/).
Scriba's Weekly Web Dev Challenge
Tags: javascript, css, html, scrimba
Published: 2021-01-06 15:06:37

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/aqkcpa4krd16pmnzf6e0.jpg)


Like solving challenges? Love working with HTML, CSS and JavaScript? Scriba has got you covered:

Get a coding challenge in your inbox every Wednesday. Free of charge.

###[Sign up here.](https://weeklychallenge.scrimba.com/)

Don't forget to share your solution on Twitter with the hashtag **[#WeeklyWebDevChallenge](https://twitter.com/search?q=%23WeeklyWebDevChallenge&src=typeahead_click&f=live)**


#My Solutions to the Weekly Web Dev Challenges:

* [Short Changed](https://scrimba.com/scrim/co3864da3872e71686699c3d7)
* [Magic Squares](https://scrimba.com/scrim/co3864da3872e71686699c3d7)
* [Emoji Rating](https://scrimba.com/scrim/coba54e97a7c633f554fbe8e1)
* [Broken Clock](https://scrimba.com/scrim/co86d4820953a7c8ec2192508)
* [Currency Converter App](https://scrimba.com/scrim/co8fb4970a912cba1ff49c2e4)
* [Film Database](https://scrimba.com/scrim/coe164d66a4c756829a5ca5f9)
















<span>Photo by <a href="https://unsplash.com/@tateisimikito?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jukan Tateisi</a> on <a href="https://unsplash.com/s/photos/challenges?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
HOW TO MAKE A RPM PACKAGE
Tags: linux, redhat, rpm, packagemanagement
Published: 2021-01-06 15:00:13

## How to make a RPM package

RPM is a versatile Linux packaging originally meant for Red Hat Linux (now RHEL) but now ported to Fedora Linux, Clear linux, and many more distro's. In my opinion, it is more cleaner and refined than the .deb format, DPKG, and APT, (used by Debian Linux and it's derivatives.) 

**NOTE: The package was made on a CentOS 7 Virtual machine and was tested on a Fedora Linux 33 virtual machine.**

Step one, dependencies:

```
yum install rpm-build rpm-devel rpmlint make diffutils patch rpmdevtools
```

Step two, setup build directory

```
mkdir $HOME/rpmmaker
```

Step three, create a specifications file:

```
Name:       test
Version:    1
Release:    1
Summary:    a test RPM package
License:    None

%description
This is my first RPM package, which does nothing.

%prep
# We have nothing to prepare.

%build
cat > hello-world <<EOF
#!/bin/sh
echo Hello world
EOF

%install
mkdir -p %{buildroot}/usr/bin/
install -m 755 hello-world %{buildroot}/usr/bin/hello-world

%files
/usr/bin/hello-world

%changelog
#This is version 1.0!
```

Save it as helloworld.spec in the rpmmaker directory

Step four, make the rpm:

```
cd $HOME/rpmmaker
rpmdev-setuptree
rpmbuild -ba helloworld.spec
```

The directory `/home/YourName/rpmbuild/RPMS/x86_64/` should hold your RPM file.

Step 5, testing the file:

cd into the directory where the rpm is

```
sudo rpm -i filename.rpm
hello-world
```

If it says "Hello World!" then the file works.

The RPM is now ready to be shared.
From GUI to VUI: Voice-Enabling a Cross-Platform .NET Desktop Application
Tags: dotnet, csharp, programming, ai
Published: 2021-01-06 14:57:41

{% youtube AU87_4GpIzo %}
{% medium https://medium.com/picovoice/from-gui-to-vui-voice-enabling-a-cross-platform-net-desktop-application-aac44e470790 %}
Use Find & Replace Tool to Replace Text in Excel Office 365!!
Tags: excelpreface, replacetextusingfind, excelbasics, exceltutorials
Published: 2021-01-18 03:53:42

---
title: Use Find & Replace Tool to Replace Text in Excel Office 365!!
published: true
date: 2021-01-06 14:47:44 UTC
tags: ExcelPreface,ReplacetextusingFind,ExcelBasics,ExcelTutorials
canonical_url: https://geekexcel.com/use-find-replace-tool-to-replace-text-in-excel-office-365/
---

If you want to replace a text in the Excel worksheet, what will you do? So here we come up with a simple solution for this task. You can use the **Find and Replace tool to replace text** or characters in **Excel Office 365.** Let’s get into this article!!

## Replace Text Using Find & Replace Tool:

Let’s consider an example text **“Sample”** and we are going to change it to **“Excel”** in the whole worksheet. To do this, follow the below instructions.

- [Open the Workbook](https://geekexcel.com/open-a-workbook-using-shortcut-in-excel-365/) where you want to replace text.
- For instance, you can see the example text **“sample”.**

![Example](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/5.png)<figcaption id="caption-attachment-20710">Example</figcaption>

- You need to **click** on the **Find**  **& Select** option under the **Home Tab.**
- Then **select** the **Replace** option from the drop-down menu.

![Select Replace option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/dWGe7fmxYg.png)<figcaption id="caption-attachment-20711">Select Replace option</figcaption>

- It will display the **Find and Replace Dialog box.**
- **Find what –** You need to enter the text **“Sample”**.
- **Replace with –** Here, you need to enter the text **“Excel”**.
- You can also **click** the **Format** button to format the content that you are replacing.
- Then **click** the **Replace**   **All** button.

![Find and Replace Dialog box](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_KpgxZ8ywyI.png)<figcaption id="caption-attachment-20712">Find and Replace Dialog box</figcaption>

- Now, all the text that is searched will be replaced.

![Output](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_8wy7yukMVq.png)<figcaption id="caption-attachment-20714">Output</figcaption>

- At last, it will tell you how many replacements were made as shown in the below image.

![Click Ok button](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/01/EXCEL_k5n05lZad5.png)<figcaption id="caption-attachment-20713">Click Ok button</figcaption>

## Closure:

In the above article, we have clearly shown how to use the **Find and Replace tool to replace text** or characters in **Excel Office 365**. Share your **feedback** in the below comment section. Thanks for visiting **[Geek Excel!!](https://geekexcel.com/)** Keep Learning!!
Day 13 of 100DaysOfCode: Regular Expressions
Tags: 100daysofcode, beginners, codenewbie, python
Published: 2021-01-06 14:46:04

This is my 13 day of #100daysofcode. Today I learned more about CSS properties like create a gradual CSS linear gradient, use a linear gradient to create a striped element, create texture by adding a subtle pattern as a background image, use the CSS transform scale property to change the size of an image, use the CSS transform scale property to scale an element on hover etc from [freecodecamp.](https://www.freecodecamp.org/learn/responsive-web-design/applied-accessibility/)
 Also I learned something about web access to python from [Coursera.](https://www.coursera.org/learn/python-network-data/exam/BENWm/regular-expressions?redirectToCover=true)

Below is my code of this day
# Spam Confidence
Regular expression referred to as "regex" or "regexp", provides a concise and flexible means for matching strips of text. My code is start with importing regular expression as re as given below.
```python
import re
```
After that we open the file as hand and I build the list to put the number. I started the loop after that I strip line. We going to look findall . Look for the line start with X quit it will be stop in the blank. Then it will start extracting 0 through 9 for floating number bracket one or more time and the we end extracting. There is exactly one extraction. If there is no extraction then this code run empty extraction. This stuff is the list of the matches. If there will be more than one that type of floating number go through below and choose the maximum one.
```python
hand = open("mbox-short.txt")
numlist = list()
for line in hand:
    line = line.rstrip()
    stuff = re.findall('^X-DSPAM-Confidence: ([0-9.]+)',line)
    if len(stuff) != 1 : continue
    num = float(stuff[0])
    numlist.append(num)
print('Maximum:',max(numlist))

```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 13 of <a href="https://twitter.com/hashtag/100dysofcode?src=hash&amp;ref_src=twsrc%5Etfw">#100dysofcode</a> and <a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <br>* More about CSS properties including create a gradual css linear gradient , use a css linear gradient to create a striped element, create texture by adding a subtle pattern as a background image..<br>* More about python to access web data <a href="https://t.co/Mg2vXHWnoa">pic.twitter.com/Mg2vXHWnoa</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1346825510488166401?ref_src=twsrc%5Etfw">January 6, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>