Saturday, February 27, 2021

Tooltip For Angular

1.  Installation

    npm i ng2-tooltip-directive

2. Import Ng2Module

import { TooltipModule } from 'ng2-tooltip-directive';

  @NgModule({

imports: [ TooltipModule ]

})

3. Usage

Options can be set in the directive tag, so they have the highest priority.

<span tooltip="Tooltip" placement="top" show-delay="500">Tooltip on top</span>

may pass as an object:

<span tooltip="Tooltip" [options]="myOptions">Tooltip on left</span>

myOptions = {

'placement': 'left',

'show-delay': 500

}

Pass HTML as content:

<span tooltip="<p>Hello i'm a <strong>bold</strong> text!</p>">

  Tooltip with HTML content

</span>

<ng-template #HtmlContent>

  <p>Hello i'm a <strong>bold</strong> text!</p>

</ng-template>

 <span [tooltip]="HtmlContent" content-type="template">

  Tooltip with template content

</span> 

Full Stack Developer

 1. Front End Developer

     a. HTML

     b. CSS

     c. JS

     d. Any one Library

          i. React JS

  ii. Angular

  iii. Vue.js

2. BackEnd Developer (Any One)

a. PHP

b. JAVA

c. Node JS

d. GO

e. C#

f. Phython

4.  Database Server (Any One)

a. Mysql

b. Oracle

c. Mongo DB

5.  DEVOPS ( Any One )

a. DOCKER

b. JENKINS

c. GITLAB CL

Saturday, January 30, 2021

Top 20 Algorithms Every Programmer Should Know

 Searching

1. Linear Search

2. Binary Search

3. Breadth First Search (BFS)

4. Depth First Search (DFS)

Sorting

5. Merge Sort

6. Quick Sort

7. Insertion Sort 

8. Selection Sort 

9. Counting Sort 

10. Heap Sort

11. Topological Sort

12. Kahn’s Topological Sort

Arrays

13. KMP

14. Kadane’s 

15. Quickselect

16. Floyd’s Cycle Detection

17. Boyer–Moore Majority Vote

Basic Algo

18. Euclid’s

19. Union Find

20. Huffman Coding Compression

Monday, January 25, 2021

How to build an Angular 8 app from scratch in 11 easy steps


Step 1 — Installing Angular CLI 8


Step 2 — Creating your Angular 8 Project


Step 3 — Adding Angular HttpClient


Step 4 — Creating Components


Step 5 — Adding Routing


Step 6 — Building the UI with Angular Material Components


Step 7 — Mocking a REST API


Step 8 — Consuming the REST API with Angular HttpClient


Step 9 — Handling HTTP Errors


Step 10 — Adding Pagination


Step 11 — Building and Deploying your Angular Application to Firebase



Reff : https://www.freecodecamp.org/news/angular-8-tutorial-in-easy-steps/

Thursday, January 9, 2020

Codeigniter URL Routing, Suffix & Enable Query String

Wildcards:

We can use two types of wildcards, namely:
  1. :num –  Segment containing only numbers will be matched.
  2. :any – Segment containing only characters will be matched.

$route['(blog/:num)'] = 'tutorial/java/$1';
$route['(blog/:any)'] = 'tutorial/java';

Regular Expression
$route['blog/([a-zA-Z0-9]+)'] = 'tutorial/java';

Saturday, October 12, 2019

JQuery count number of divs with a certain class?


var numItems = $('.item').length;

Get all text field value located in a specific class


$(".test .text-field").each(function() {
    alert($(this).val());
});

Note : test and text-field is class of text field

Friday, June 7, 2019

Remove Menu From Wordpress Admin

add_action('admin_init', 'remove_menu_from_admin');

function remove_menu_from_admin()

    // Remove unnecessary menus
    $menus_to_stay = array(
        // Job Listing
        'edit.php?post_type=job_listing',
    );
    foreach ($GLOBALS['menu'] as $key => $value) {         
        if (!in_array($value[2], $menus_to_stay)) remove_menu_page($value[2]);
    }
}

Thursday, April 18, 2019

PHP Code to Remove Everything Except Number


$mobileNumber = "(111) 2568-5698";

preg_replace('/\D/', '', $mobileNumber);

OR,

preg_replace('/[^0-9]/', '', $mobileNumber);