Posts
How to Implement Splash Screen in AndroidAndroid Development

How to Implement Splash Screen in AndroidAndroid Development
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/white" /> <item android:drawable="@drawable/ic_icon_vector" android:gravity="center" /> </layer-list>
<!-- Splash Screen theme. --> <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> <item name="android:windowBackground">@drawable/splash_background</item> </style>
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.exmple.splash"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme"> <activity android:name=".SplashActivity" android:theme="@style/SplashTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
public class SplashActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); startActivity(new Intent(SplashActivity.this, MainActivity.class)); finish(); } }
How to implement Mailchimp into Gatsby SiteGatsby

How to implement Mailchimp into Gatsby SiteGatsby
We are recently developed a site into the gatsby. basically contact us feature is common in all website. and we are implementing Mailchimp because it's a very popular platform in email market. So, I will show you how to setup a Mailchimp in the Gatsby site. ## Using gatsby-source-mailchimp Use your Mailchimp API key to download your campaigns into Gatsby’s GraphQL data layer! Install the package by running the following command: `npm i gatsby-source-mailchimp --save` ### How to configure Once the installation is complete, you can now add this plugin to your gatsby-config.js, like so: Configure mailchimp Key and add this {resolve: `gatsby-source-mailchimp`} into the plugins array. code looks like
``` module.exports = { // ... plugins: [ { resolve: 'gatsby-source-mailchimp', options: { // Avoid including your key directly in your file. // Instead, opt for adding them to .env files for extra // security ;) key: 'asd712jdas90122jdas90122jkadsd1-usXX', rootURL: 'https://usXX.api.mailchimp.com/3.0', }, }, ], // ... } ```
Above is the minimal configuration required to have it work. By default, This plugin was made out of a specific necessity, so it doesn't cover all of Mailchimp’s data sources, focusing only on campaigns. this plugin are provide few options. you can refer here. ## Using `.env` variables to hide your key If you don’t want to attach your API key to the repo, you can easily store it in .env files by doing the following:
``` // In your .env file MAILCHIMP_KEY = 'asd712jdas90122jdas90122jkadsd1-usXX'; ``` ``` // In your gatsby-config.js file require('dotenv').config({ path: `.env.${process.env.NODE_ENV}`, }); module.exports = { // ... plugins: [ { resolve: 'gatsby-source-mailchimp', options: { key: process.env.MAILCHIMP_KEY, rootURL: 'https://usXX.api.mailchimp.com/3.0', // ... }, }, ], // ... }; ```
Recruitment:The things HR need to keep in mindHuman Resource

Recruitment:The things HR need to keep in mindHuman Resource
6. Talent v/s Experience
How to Create Custom CardView in AndroidAndroid Development

How to Create Custom CardView in AndroidAndroid Development
dependencies { implementation ‘androidx.cardview:cardview:1.0.0’ }
res > drawable > New > Drawable Resource File.
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#FFAB00" android:endColor="#FFAB00"> </gradient> </shape>
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#0091EA" android:endColor="#00BFA5"> </gradient> </shape>
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#AEEA00" android:endColor="#FFD600"> </gradient> </shape>

You can change it according to your needs.
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="173dp" android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:layout_marginEnd="20dp" app:cardCornerRadius="8dp"> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg1" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Assam" android:textColor="#000000" android:textSize="22sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Current Location" android:textColor="#000000" android:textSize="14sp" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="25" android:textColor="#000000" android:textSize="28sp" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" android:text="o" android:textColor="#000000" android:textSize="13sp" /> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="18 %" android:textColor="#000000" android:textSize="14sp" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_marginStart="6dp" android:text="11.25 AM" android:textColor="#000000" android:textSize="14sp" /> </RelativeLayout> </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="173dp" android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:layout_marginEnd="20dp" app:cardCornerRadius="8dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg2" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Delhi" android:textColor="@color/white" android:textSize="22sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2 days ago" android:textColor="@color/white" android:textSize="14sp" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="39" android:textColor="@color/white" android:textSize="28sp" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" android:text="o" android:textColor="@color/white" android:textSize="13sp" /> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="35 %" android:textColor="@color/white" android:textSize="14sp" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_marginStart="6dp" android:text="01.05 PM" android:textColor="#D6D6D6" android:textSize="14sp" /> </RelativeLayout> </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="173dp" android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:layout_marginEnd="20dp" app:cardCornerRadius="8dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bg3" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Darjeeling" android:textColor="#000000" android:textSize="22sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2 weeks ago" android:textColor="#000000" android:textSize="14sp" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="30dp" android:layout_marginTop="20dp" android:layout_marginEnd="30dp" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="12" android:textColor="#000000" android:textSize="28sp" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" android:text="o" android:textColor="#000000" android:textSize="13sp" /> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="9 %" android:textColor="#000000" android:textSize="14sp" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_marginStart="6dp" android:text="05.00 AM" android:textColor="#000000" android:textSize="14sp" /> </RelativeLayout> </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> </LinearLayout>
Make fully configurable livewire searching componentLaravel

Make fully configurable livewire searching componentLaravel
Recently we have developed the livewire common searchable component which makes your searching easier, as you can specify which fields you want to search by just giving the field name into the component.
What you have to do is just create SearchableComponent a class into your App\Http\Livewire directory. just copy the following class on the given namespace.
<?php namespace App\Http\Livewire; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Livewire\Component; use Livewire\WithPagination; use Str; abstract class SearchableComponent extends Component { use WithPagination; /** * @var string */ public $search = ''; /** * @var int */ protected $paginate = 12; /** @var Builder */ private $query; /** * SearchableComponent constructor. * * @param $id */ public function __construct($id) { parent::__construct($id); $this->prepareModelQuery(); } /** * Prepare query */ private function prepareModelQuery() { /** @var Model $model */ $model = app($this->model()); $this->query = $model->newQuery(); } /** * @return mixed */ abstract function model(); /** * Reset model query */ protected function resetQuery() { $this->prepareModelQuery(); } /** * @return Builder */ protected function getQuery() { return $this->query; } /** * @param Builder $query */ protected function setQuery(Builder $query) { $this->query = $query; } /** * @param bool $search * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator */ protected function paginate($search = true) { if ($search) { $this->filterResults(); } $all = $this->query->paginate($this->paginate); $currentPage = $all->currentPage(); $lastPage = $all->lastPage(); if ($currentPage > $lastPage) { $this->page = $lastPage; } return $this->query->paginate($this->paginate); } /** * @return Builder */ protected function filterResults() { $searchableFields = $this->searchableFields(); $search = $this->search; $this->query->when(! empty($search), function (Builder $q) use ($search, $searchableFields) { $searchString = '%'.$search.'%'; foreach ($searchableFields as $field) { if (Str::contains($field, '.')) { $field = explode('.', $field); $q->orWhereHas($field[0], function (Builder $query) use ($field, $searchString) { $query->whereRaw("lower($field[1]) like ?", $searchString); }); } else { $q->orWhereRaw("lower($field) like ?", $searchString); } } }); return $this->query; } /** * @return mixed */ abstract function searchableFields(); }
<?php namespace App\Http\Livewire; use App\Models\Tag; use Illuminate\Contracts\Pagination\LengthAwarePaginator; class Tags extends SearchableComponent { public function render() { $tags = $this->searchTags(); return view('livewire.tags', [ 'tags' => $tags, ])->with("search"); } /** * @return LengthAwarePaginator */ public function searchTags() { $this->setQuery($this->getQuery()); return $this->paginate(); } function model() { return Tag::class; } function searchableFields() { return [
'name',
];
}
}
In searchable fields you can specify the field name that you want to search. and replace the Model with your records Model.
That it. Now you don't need to write search queries again and again. just extend your livewire component by searchable component.
Here are some Interesting livewire tutorials that you need to check :
What are some important qualities of graphic designers?Design

What are some important qualities of graphic designers?Design
Our analysis helped us identify five important qualities employers are seeking in graphic design candidates. Here's what we found


How to explain the tricks to close your next dealSales

How to explain the tricks to close your next dealSales
Introduction
Let's review the persuasion strategy you can implement today to close your next deal.
1. Personalize your message
This doesn't mean you need to fully wing your sales calls, it does mean you need to be prepared to adjust your message based on what interests you in the potential.
2. Focus on problem-solving
3. Give social proof
While buyers may take your point as a sales representative with a grain of salt because they know you want to sell, they are more likely to trust a testimonial or story from a previous customer who was looking for a similar solution.
4. Assume goals
Then during a call, potentially throws out several turns, asking you questions and mentioning objections that you weren’t prepared to account for - the dream of every sales rip. But don't go too far. This is a valuable learning experience.
5. Empower empowerment decision making
6. Make personal connections
7. Don’t rush into the process

As I mentioned earlier, there is a contradiction in the usage of Bug and Defect. People widely say the bug is an informal name for the defect.
Defect : The variation between the actual results and expected results is known as defect.
If a developer finds an issue and corrects it by himself in the development phase then it’s called a defect.
Failure : Once the product is deployed and customers find any issues then they call the product as a failure product. After release, if an end user finds an issue then that particular issue is called as failure
Error : We can’t compile or run a program due to coding mistake in a program. If a developer unable to successfully compile or run a program then they call it as an error.
Severity
Critical: This defect indicates complete shut-down of the process, nothing can proceed further
Major: It is a highly severe defect and collapses the system. However, certain parts of the system remain functional
Medium: It causes some undesirable behavior, but the system is still functional
Low: It won't cause any major break-down of the system
Low: The Defect is an irritant but repair can be done once the more serious Defect has been fixed
Medium: During the normal course of the development activities defect should be resolved. It can wait until a new version is created
High: The defect must be resolved as soon as possible as it affects the system severely and cannot be used until it is fixed
New: When a new defect is logged and posted for the first time. It is assigned a status as NEW.
Assigned: Once the bug is posted by the tester, the lead of the tester approves the bug and assigns the bug to the developer team
Open: The developer starts analyzing and works on the defect fix
Fixed: When a developer makes a necessary code change and verifies the change, he or she can make bug status as "Fixed."
Pending retest: Once the defect is fixed the developer gives a particular code for retesting the code to the tester. Since the software testing remains pending from the testers end, the status assigned is "pending retest."
Retest: Tester does the retesting of the code at this stage to check whether the defect is fixed by the developer or not and changes the status to "Re-test."
Verified: The tester re-tests the bug after it got fixed by the developer. If there is no bug detected in the software, then the bug is fixed and the status assigned is "verified."
Reopen: If the bug persists even after the developer has fixed the bug, the tester changes the status to "reopened". Once again the bug goes through the life cycle.
Closed: If the bug is no longer exists then tester assigns the status "Closed."
Duplicate: If the defect is repeated twice or the defect corresponds to the same concept of the bug, the status is changed to "duplicate."
Rejected: If the developer feels the defect is not a genuine defect then it changes the defect to "rejected."
Deferred: If the present bug is not of a prime priority and if it is expected to get fixed in the next release, then status "Deferred" is assigned to such bugs
Not a bug:If it does not affect the functionality of the application then the status assigned to a bug is "Not a bug".
2. A defect is forwarded to the project manager for analysis.
3. The project manager decides whether a defect is valid.
4. Here the defect is invalid. The status is "Rejected".
5. The project manager assigns a rejected status.
6. If the bug is not resolved, the next step is to check that it is in scope.
7. Next, the manager checks to see if a similar error has occurred earlier. If so, a duplicate status is assigned to the error.
8. If not, the bug is assigned to the developer, who starts correcting the code.
9. During this phase, the defect is assigned a status in process,
10. Once the code is fixed. A defect is assigned a status fixed.
11. Next, the tester tests the code again, If the test case is passed, the defect is closed. If the test cases fail again, the bug is reopened and assigned to the developer.
12. Consider a situation where, during the first release of the flight reservation, an error was detected in the fax order, which has been fixed and a status of closed has been assigned. The same error occurred again during the second upgrade version.
In such cases, a closed defect is opened again.