Topic: Programming

VueJS Check duplicated value in array 0

VueJS Check duplicated value in array

Today, We want to share with you VueJS Check duplicated value in array.In this post we will show you vue duplicate keys detected, hear for Rendering array remove duplicate values in vuejs we will give you demo and example for implement.In this post, we will learn about avoid duplicate values in the output of v-for loop in vuejs with an example.

VueJS Check duplicated value in array

There are the Following The simple About VueJS Check duplicated value in array Full Information With Example and source code.

As I will cover this Post with live Working example to develop vue js find duplicate objects in array, so the vue check for duplicate entries for this example is following below.

Include Vuejs CDN

https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.min.js

HTML Part

<form id="chat">
	<ul id='message'>
		<li v-for="msg in messages">{{msg}}</li>
	</ul>

	<input v-model="message">
	<button v-on:click="add">add</button>
</form>

JavaScript Part

new Vue({
	el:"#chat",
	data:{
		messages:[],
		message:''
	},
	methods:{
		add:function(e){
			e.preventDefault();
			this.messages.push(this.message);
		}
	}
});

vuejs remove duplicates from array

v-for loop in vuejs

methods: {
        myFilter: function (val, idx, arr) {
          for(var i = 0; i < idx; i++) {
            if(arr[i].name === val.name) {
              return false;
            }
          }
          return true;
        } 
      }

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about VueJS Check duplicated value in array.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Vuejs autocomplete search with typeahead js 0

Vuejs autocomplete search with typeahead js

Today, We want to share with you Vuejs autocomplete search with typeahead.js.In this post we will show you Vue AutoComplete TextBox Component, hear for Popular Vue autocomplete Component we will give you demo and example for implement.In this post, we will learn about Building an Autocomplete Component with Vue.js with an example.

Vuejs autocomplete search with typeahead.js

There are the Following The simple About Vuejs autocomplete search with typeahead.js Full Information With Example and source code.

As I will cover this Post with live Working example to develop Autocomplete Field using Vue.js, so the bootstrap-vue autocomplete for this example is following below.

HTML Part

<div id="app">
  <h3>form auto complete</h3>
  <div class="d-flex">
    <div class="d-flex-lang">
      <h4>Single Select</h4>
      <form-autocomplete
        v-model="programmingLangA"
        :options="countries"
        placeholder="please select programmingLang"
      ></form-autocomplete>
      <p>
        Selected programmingLang : <br/>
        lid: {{programmingLangA.lid}}  <br/>
        title: {{programmingLangA.title}}
      </p>
    </div>
    <div class="d-flex-lang">
      <h4>Multi Select</h4>
      <form-autocomplete
        is-multiple
        v-model="multiLanguageA"
        :options="countries"
        placeholder="please select programmingLang"
      ></form-autocomplete>
      <div>
        Selected programmingLang : <br/>
        <p v-for="(v, k) in multiLanguageA" :key="k">
          lid: {{v.lid}} - title: {{v.title}}
        </p>
      </div>
    </div>
    <!-- With Scope Slot -->
    <div class="d-flex-lang">
      <h4>Single Select - with Scope Slot</h4>
      <form-autocomplete
        v-model="programmingLangB"
        :options="countries"
        placeholder="please select programmingLang"
      >
        <template slot-scope="row"><span :class="`flag-icon flag-icon-${toLowerCase(row.lang.lid)}`"></span> {{row.lang.title}}</template>
        <template slot="selected" slot-scope="row"><span :class="`flag-icon flag-icon-${toLowerCase(row.lang.lid)}`"></span> {{row.lang.title}}</template>
      </form-autocomplete>
      <p>
        Selected programmingLang : <br/>
        lid: {{programmingLangB.lid}}  <br/>
        title: {{programmingLangB.title}}
      </p>
    </div>
    <div class="d-flex-lang">
      <h4>Multi Select - with Scope Slot</h4>
      <form-autocomplete
        is-multiple
        v-model="multiLanguageB"
        :options="countries"
        placeholder="please select programmingLang"
      >
        <template slot-scope="row"><span :class="`flag-icon flag-icon-${toLowerCase(row.lang.lid)}`"></span> {{row.lang.title}}</template>
        <template slot="selected" slot-scope="row"><span :class="`flag-icon flag-icon-${toLowerCase(row.lang.lid)}`"></span> {{row.lang.title}}</template>
      </form-autocomplete>
      <div>
        Selected programmingLang : <br/>
        <p v-for="(v, k) in multiLanguageB" :key="k">
          lid: {{v.lid}} - title: {{v.title}}
        </p>
      </div>
    </div>
    <!-- Default value -->
    <div class="d-flex-lang">
      <h4>Single Select - Default value</h4>
      <form-autocomplete
        v-model="programmingLangC"
        :options="countries"
        placeholder="please select programmingLang"
      >
        <template slot-scope="row"><span :class="`flag-icon flag-icon-${toLowerCase(row.lang.lid)}`"></span> {{row.lang.title}}</template>
        <template slot="selected" slot-scope="row"><span :class="`flag-icon flag-icon-${toLowerCase(row.lang.lid)}`"></span> {{row.lang.title}}</template>
      </form-autocomplete>
      <p>
        Selected programmingLang : <br/>
        lid: {{programmingLangC.lid}}  <br/>
        title: {{programmingLangC.title}}
      </p>
    </div>
    <div class="d-flex-lang">
      <h4>Multi Select - Default Value</h4>
      <form-autocomplete
        is-multiple
        v-model="multiLanguageC"
        :options="countries"
        placeholder="please select programmingLang"
      >
        <template slot-scope="row"><span :class="`flag-icon flag-icon-${toLowerCase(row.lang.lid)}`"></span> {{row.lang.title}}</template>
        <template slot="selected" slot-scope="row"><span :class="`flag-icon flag-icon-${toLowerCase(row.lang.lid)}`"></span> {{row.lang.title}}</template>
      </form-autocomplete>
      <div>
        Selected programmingLang : <br/>
        <p v-for="(v, k) in multiLanguageC" :key="k">
          lid: {{v.lid}} - title: {{v.title}}
        </p>
      </div>
    </div>
  </div>
</div>

CSS Part

.d-flex {
  display: flex;
  flex-wrap: wrap;
}
.d-flex-lang {
  width: 300px;
  padding: 10px;
  border: 1px solid #eaeaea;
  margin: 0 20px 20px 0;
}
.form-autocomplete {
  padding: 10px;
  background: #eaeaea;
}

ul {
  width: 200px;
  padding-left: 0;
}
ul > li {
  cursor: pointer;
  list-style: none;
  padding: 5px;
  margin-bottom: 5px;
  border: 1px solid white;
  background: #dedede;
}
ul > li:hover {
  background: #313131;
  color: white;
}
ul > li.disabled,
ul > li.disabled:hover {
  background: #eaeaea;
  color: #a7a7a7;
  cursor: inherit;
}
ul > li.disabled .flag-icon {
  opacity: 0.5;
}

.langs-selected {
  margin-top: 20px;
}
.lang-selected {
  border-radius: 5px;
  display: inline-block;
  padding: 5px;
  background: #7b8fdc;
  color: white;
  margin: 0 5px 10px 0;
}

Js Part

const countries = [
  { lid: 'AU', title: 'Laravel' },
  { lid: 'ID', title: 'Angularjs' },
  { lid: 'KR', title: 'PHP' },
  { lid: 'NZ', title: 'Magento' },
];

Vue.component('form-autocomplete', {
  template: 
    `<div class="form-autocomplete">
      <div v-if="!isMultiple">
        <input v-if="!value.lid" v-model="textSearch" type="text" :placeholder="placeholder" @focus="showOptions"/>
        <div class="langs-selected">
          <div class="lang-selected" v-if="value.lid">
            <slot name="selected" :lang="value">{{value.lid}} - {{value.title}}</slot> <button @click="clearItem">remove</button>
          </div>
        </div>
        <ul class="options" v-show="isShow">
          <li v-for="lang in filteredOptions" @click="selectItem(lang)">
            <slot :lang="lang">{{lang.title}}</slot>
          </li>
          <li v-if="filteredOptions.length===0">Item not found</li>
        </ul>
      </div>
      <div v-if="isMultiple">
        <input v-model="textSearch" type="text" :placeholder="placeholder" @focus="showOptions"/>
        <div class="langs-selected">
          <div class="lang-selected" v-for="(v, k) in value">
            <slot name="selected" :lang="v">{{v.lid}} - {{v.title}}</slot> <button @click="removeItem(k)">remove</button>
          </div>
        </div>
        <ul class="options" v-show="isShow">
          <li v-for="lang in filteredOptions" :class="{'disabled': inSelectedItems(lang.lid)}" @click="addItem(lang)">
            <slot :lang="lang">{{lang.title}}</slot>
          </li>
          <li v-if="filteredOptions.length===0">Item not found</li>
        </ul>
      </div>
    </div>`
  ,
  props: {
    isMultiple: {
      type: Boolean,
      default: false,
    },
    placeholder: {
      type: String,
      default: '',
    },
    options: {
      type: Array,
      default() {
        return [];
      },
    },
    value: {
      type: [Object, Array],
      default() {
        return {
          lid: undefined,
          title: undefined,
        };
      },
    },
  },
  data() {
    return {
      textSearch: '',
      isShow: false,
    };
  },
  computed: {
    filteredOptions() {
      return this.options.filter(val => val.title.toLowerCase().includes(this.textSearch.toLowerCase()));
    },
    selectedItems() {
      if (this.isMultiple) {
        return this.value.map(v => v.lid);
      }
      return [];
    },
  },
  methods: {
    inSelectedItems(lid) {
      return this.selectedItems.includes(lid);
    },
    showOptions() {
      this.isShow = true;
    },
    selectItem(lang) {
      this.textSearch = '';
      this.isShow = false;
      // this.$emit('update:lang', lang);
      this.$emit('input', lang);
      this.$emit('onSelectItem', lang);
    },
    clearItem() {
      this.textSearch = '';
      // this.$emit('update:lang', {
      //   id: undefined,
      //   title: undefined,
      // });
      this.$emit('input', {
        id: undefined,
        title: undefined,
      });
      this.$emit('onClearItem');
    },
    addItem(lang) {
      if (!this.inSelectedItems(lang.lid)) {
        this.textSearch = '';
        this.isShow = false;
        const langs = JSON.parse(JSON.stringify(this.value));
        langs.push(lang);
        // this.$emit('update:lang', langs);
        this.$emit('input', langs);
        this.$emit('onAddItem', langs);
      }
    },
    removeItem(index) {
      this.textSearch = '';
      const langs = JSON.parse(JSON.stringify(this.value));
      langs.splice(index, 1);
      // this.$emit('update:lang', langs);
      this.$emit('input', langs);
      this.$emit('onRemoveItem', langs);
    },
  },
});
new Vue({
  el: '#app',
  data() {
    return {
      programmingLangA: {
        lid: undefined,
        title: undefined,
      },
      programmingLangB: {
        lid: undefined,
        title: undefined,
      },
      programmingLangC: {
        lid: 'ID',
        title: 'Angularjs',
      },
      multiLanguageA: [],
      multiLanguageB: [],
      multiLanguageC: [
        { lid: 'ID', title: 'Angularjs' },
        { lid: 'AU', title: 'Laravel' },
      ],
    };
  },
  methods: {
    toLowerCase(text) {
      return text.toLowerCase();
    },
  },
});

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Vuejs autocomplete search with typeahead.js.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Stripe Refund Api Tutorial Example From Scratch 0

Stripe Refund Api Tutorial Example

Today, We want to share with you Stripe Refund Api Tutorial Example.In this post we will show you stripe connect api, hear for stripe cancel subscription refund we will give you demo and example for implement.In this post, we will learn about stripe cancel subscription using curl in php with an example.

Stripe Refund Api Tutorial Example

There are the Following The simple About Stripe Refund Api Tutorial Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop stripe cancel subscription At Period End using curl php, so the Stripe Authentication with Connect using PHP for this example is following below.

$ch = Stripe_Charge::retrieve('ch_19DAkJDKgNbxQsQZsCDh98La');
$ch->refunds->create(array('amount' => 100));

How to do refund in Stripe PHP?

You can also do refund as below

\Stripe\Stripe::setApiKey("sk_test_kfjdIFNOtvieiPAKAvc9qFwJ");

 $refund = \Stripe\Refund::create([
            'charge' => 'ch_19DAkJDKgNbxQsQZsCDh98La',
            'amount' => 1000,  // For 10 $
            'reason' => 'refund'
        ]);

$balanceLiveTransaction = \Stripe\BalanceTransaction::retrieve($refund->balance_transaction);

stripe cancel subscription using curl in php

stripe cancel subscriptionCanceling subscriptions Example

curl https://api.stripe.com/v1/subscriptions/sub_B49U3PAKAINFO8Onp \
   -u sk_test_kfjdIFNOtvieiPAKAvc9qFwJ: \
   -X DELETE

Source Code for stripe cancel subscription using curl in php
function delete_curl($path)
{
    // Add Stripe your key
    $headers = array('Authorization: Bearer sk_test_kfjdIFNOtvieiPAKAvc9qFwJ');
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $path);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $result = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);  
    curl_close($ch);
    return $result;
}
 //Stripe Refund Api Tutorial Example
// add your simple subscriptions id
$path = "https://api.stripe.com/v1/subscriptions/sub_B49U3PAKAINFO8Onp";
$delete_curl = delete_curl($path);
echo "<pre>";
print_r($delete_curl);
echo "</pre>";

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Stripe Refund Api Tutorial Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Laravel JSON Encode Decode Handling 0

Laravel JSON Encode Decode Handling

Today, We want to share with you Laravel JSON Encode Decode Handling.In this post we will show you Convert and Loop through JSON with Laravel, hear for get data from json array in Laravel 5.7 we will give you demo and example for implement.In this post, we will learn about get the data from an array of JSONarray from Laravel 5.7 with an example.

Laravel JSON Encode Decode Handling

There are the Following The simple About Laravel JSON Encode Decode Handling Full Information With Example and source code.

As I will cover this Post with live Working example to develop Handling JSON Data in Laravel 5.7, so the laravel 5.7 return view with json data for this example is following below.

JSON encoded database column

[{
    "title": "Vuejs",
    "points": 0,
    "tags": [{
        "type": "Core",
        "uid": 45
    }]
}, {
    "title": "Angularjs",
    "points": 2,
    "tags": [{
        "type": "MVC",
        "uid": 1
    }]
}]

Laravel 5.7 – Get specific array in JSON encoded database column

$postData = json_decode($post->data, true);
dd($postData);

json decode laravel controller

Laravel Decode JSON

foreach (json_decode($response) as $area)
{
	print_r($area);
}

Encoding JSON Data

<?php
// An associative array
$marks = array("Vuejs"=>65, "Laravel"=>80, "PHP"=>78, "Angularjs"=>90);
 
echo json_encode($marks);
?>

Decoding JSON Data

<?php
$json = '{"Vuejs":65,"Laravel":80,"PHP":78,"Angularjs":90}';
 
var_dump(json_decode($json));
?>

Laravel Controller and Route Setup

create a new controller in Laravel 5.7

php artisan make:controller HomeController

# app/Http/Controllers/HomeController.php
...
use App\Product;

class HomeController extends Controller
{
    public function getProducts() {
        $products = Product::all();
        return $products;
    }
}

Formatting JSON data in Laravel

json_encode() to simple way to encode arrays into JSON string format.

$array = array('JavaScript','Magento','Vuejs');
return json_encode($array);

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel JSON Encode Decode Handling.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

PHP Image Rotate Resize and Save Examples 0

PHP Image Rotate Resize and Save

Today, We want to share with you PHP Image Rotate Resize and Save.In this post we will show you php resizing image on upload rotates, hear for Manipulating Images in PHP Using GD we will give you demo and example for implement.In this post, we will learn about php rotate image without quality loss with an example.

PHP Image Rotate Resize and Save

There are the Following The simple About PHP Image Rotate Resize and Save Full Information With Example and source code.

As I will cover this Post with live Working example to develop Open Image, rotate, resize and save, so the Rotate and Save an image using PHP for this example is following below.

Example for PNG File:

<?php
    $uploadFilenm = "pakainfo25041992.png";
    $degrees = 90;
    $orignal_file = imagecreatefrompng($uploadFilenm);
    $rotate = imagerotate($orignal_file, $degrees, 0);
    imagepng($rotate, "changeUpdatFile.png");
    print_r('Your Live Image/Files saved successfully.');
?>

Example for JPEG File:

<?php
    
    $uploadFilenm = "pakainfo25041992.jpeg";
    $degrees = 90;
    $orignal_file = imagecreatefromjpeg($uploadFilenm);
    $rotate = imagerotate($orignal_file, $degrees, 0);
    imagejpeg($rotate, "changeUpdatFile.jpeg");
    print_r('Your Live Image/Files saved successfully.');
   
?>

Open Image, rotate, resize and save

<?php
   if(isset($_FILES['image'])){
      $dynamicErr= array();
      $orignal_file = $_FILES['image']['name'];
      $file_size =$_FILES['image']['size'];
      $file_tmp =$_FILES['image']['tmp_name'];
      $file_type=$_FILES['image']['type'];
      $file_ext=strtolower(end(explode('.',$_FILES['image']['name'])));
 
      $expensions= array("jpeg","jpg","png");
      
      if(in_array($file_ext,$expensions)=== false){
         $dynamicErr[]="extension not Any allowed, please select a JPEG or PNG file.";
      }
      
      if($file_size > 2097152){
         $dynamicErr[]='File size must be excately 2 MB';
      }
      
      if(empty($dynamicErr)==true){
         move_uploaded_file($file_tmp, $orignal_file);
         echo "Success";
      }else{
         print_r($dynamicErr);
      }

      $uploadFilenm = $orignal_file;
      $exif = exif_read_data($uploadFilenm);
      if(!empty($exif['Orientation'])) {
         switch($exif['Orientation']) {
                    case 8:
                        $degree = 90;
                        break;
                    case 3:
                        $degree = 180;
                        break;
                    case 6:
                        $degree = -90;
                        break;
                }
      $source = imagecreatefromjpeg($uploadFilenm) or notfound();
      $rotate = imagerotate($source,$degree,0);

      imagejpeg($rotate,$uploadFilenm);

      imagedestroy($source);
      imagedestroy($rotate);
      }

      echo '<img src="'.$orignal_file.'">';
   }
?>
<html>
   <body>
      
      <form action="" method="POST" enctype="multipart/form-data">
         <input type="file" name="image" />
         <input type="submit"/>
      </form>
      
   </body>
</html>

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about PHP Image Rotate Resize and Save.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Fixed Position Elements in CSS Examples 0

Fixed Position Elements in CSS Examples

Today, We want to share with you Fixed Position Elements in CSS Examples.In this post we will show you position fixed relative to parent, hear for position fixed inside position absolute we will give you demo and example for implement.In this post, we will learn about an element with position: fixed; is positioned relative with an example.

Fixed Position Elements in CSS Examples

There are the Following The simple About Fixed Position Elements in CSS Examples Full Information With Example and source code.

As I will cover this Post with live Working example to develop css position relative to parent, so the image position html for this example is following below.

Example 1: Pure CSS FIXED POSITION ELEMENTS

.center_verticaly{
   position:fixed;
   top:50%;
   -webkit-transform:translate(-50%);
   -moz-transform:translate(-50%);
   -o-transform:translate(-50%);
   -ms-transform:translate(-50%);
   transform: translate(-50%);
}
 
.center_vertically_and_horizontaly{
   position:fixed;
   top:50%;
   left:50%
   -webkit-transform:translate(-50%,-50%);
   -moz-transform:translate(-50%,-50%);
   -o-transform:translate(-50%,-50%);
   -ms-transform:translate(-50%,-50%);
   transform: translate(-50%,-50%);
}

Example 2: Fixed position but relative to container

HTML Part

<div id="fixedContainer">
</div>
<div style="height:1000px;background-color:#bbb;"></div>

CSS Part

#fixedContainer
{
  background-color:#3d3d3d;
  position: fixed;
  width: 200px;
  height: 100px;
  left: 50%;
  top: 0%;
  margin-left: -100px; /*half the width*/
}

Example 3: Create Fixed Elements with CSS

Step #1. The HTML

<div class="block">
    Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.
</div>

Step #2. The CSS

.block {
    position: fixed;
    background: #2184cd;
    color: #fff;
    padding: 20px;
    width: 400px;
}

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Fixed Position Elements in CSS Examples & position fixed inside position absolute.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

CSS Sticky Footer Tutorial Example From Scratch 0

CSS Sticky Footer Tutorial Example From Scratch

Today, We want to share with you CSS Sticky Footer Tutorial Example From Scratch.In this post we will show you fixed footer overlaps content, hear for make div stick to bottom of parent we will give you demo and example for implement.In this post, we will learn about keep footer at bottom of page when scrolling with an example.

CSS Sticky Footer Tutorial Example From Scratch

There are the Following The simple About CSS Sticky Footer Tutorial Example From Scratch Full Information With Example and source code.

As I will cover this Post with live Working example to develop responsive sticky footer, so the css tricks sticky for this example is following below.

Creating a Sticky Footer

Step 1: HTML Part

<body>
  <main><main>
  <footer></footer>
</body>

Step 1: Pure CSS Part

main {
  min-height: calc(100vh - 50px);
}
footer {
  height: 50px;
}

Step 3: JavaScript Part

function set_main_height(){
   var footerHeight = $('footer').innerHeight();
   $('main').css('min-height','100vh -'+footerHeight);
}
 
$(function() { 
  set_main_height();
  window.resize(function(){
    set_main_height();
  });
});

Simple Sticky Footer Examples

Example 1: Sticky Footer with Negative Margin

HTML Part

<div class="content">
  <h1>Sticky Footer with Negative Margin 1</h1>
  <p><button id="add">Include Data</button></p>
  <div class="push"></div>
</div>

<footer class="footer">
  Footer 
</footer>

CSS Part
html, body {
  height: 100%;
  margin: 0;
}
.content {
  padding: 20px;
  min-height: 100%;
  margin: 0 auto -50px;
}
.footer,
.push {
  height: 50px;
}


js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").insertBefore(".push");
});

Example 2: Sticky Footer Navbar Template for Bootstrap

HTML Part

<div class="content">
  <div class="content-inside">
    <h1>Sticky Footer Navbar Template for Bootstrap</h1>
    <p><button id="add">Include Data</button></p>
  </div>
</div>

<footer class="footer">
  Footer 
</footer>

CSS Part
html, body {
  height: 100%;
  margin: 0;
}
.content {
  min-height: 100%;
}
.content-inside {
  padding: 20px;
  padding-bottom: 50px;
}
.footer {
  height: 50px;
  margin-top: -50px;
}

js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").appendTo(".content-inside");
});

Example 3: Sticky Footer Template for Bootstrap

HTML Part

<div class="content">
  <h1>Sticky Footer with calc()</h1>
  <p><button id="add">Include Data</button></p>
</div>

<footer class="footer">
  Footer 
</footer>

CSS Part
.content {
  min-height: calc(100vh - 70px);
  padding: 40px 40px 0 40px;
}
.footer {
  height: 50px;
}

js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").appendTo(".content");
});

Example 4: Adding a Sticky Footer Using CSS

HTML Part

<div class="content">
  <h1>Adding a Sticky Footer Using CSS</h1>
  <p><button id="add">Include Data</button></p>
</div>

<footer class="footer">
  Footer 
</footer>

CSS Part
html {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.content {
  flex: 1 0 auto;
  padding: 20px;
}
.footer {
  flex-shrink: 0;
  padding: 20px;
}


js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").appendTo(".content");
});

Example 5: Pure CSS3 Sticky Footer

HTML Part

<div class="content">
  <h1>Pure CSS3 Sticky Footer with Grid</h1>
  <p><button id="add">Include Data</button></p>
</div>

<footer class="footer">
  Footer
</footer>

CSS Part
html {
  height: 100%;
}
body {
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
}
.content {
  padding: 20px;
}
.footer {
  grid-row-start: 2;
  grid-row-end: 3;
}


* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 16px Sans-Serif;
}
h1 {
  margin: 0 0 20px 0;
}
p {
  margin: 0 0 20px 0;
}
.footer {
  background: #42A5F5;
  color: white;
  padding: 20px;
}

js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").appendTo(".content");
});

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about CSS Sticky Footer Tutorial Example From Scratch.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Installing APC for php Accelerator xampp/WAMP 0

Installing APC for php Accelerator xampp/WAMP

Today, We want to share with you Installing APC for php Accelerator xampp/WAMP.
In this post we will show you How To install APC Cache on WAMP/XAMPP, hear for how to install PHP Accelerator in Xampp we will give you demo and example for implement.
In this post, we will learn about Installing APC for PHP 7 Accelerator xampp/WAMP with an example.

How to install PHP Accelerator in Xampp ?

The PHP first of all php accelerator download and It’s should Internationalization extension is used to php accelerator wamp/xampp, amongst more, by PHP based Symfony (for some more validators) for install and/or enable a php accelerator (highly recommended).

This php accelerator xampp extension allows you to write source codes like this one Example:

$php_accelerator_xampp_format = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
echo $php_accelerator_xampp_format->format(1234567.89); // 1,234,567.89

$php_accelerator_xampp_format = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
echo $php_accelerator_xampp_format->format(1234567.89); // 1 234 567,89

$php_accelerator_xampp_format = new NumberFormatter('en_US', NumberFormatter::CURRENCY);
echo $php_accelerator_xampp_format->getTextAttribute(NumberFormatter::CURRENCY_CODE); // USD

$php_accelerator_xampp_format = new NumberFormatter('pt_BR', NumberFormatter::CURRENCY);
echo $php_accelerator_xampp_format->getTextAttribute(NumberFormatter::CURRENCY_CODE); // BRL

After that Therefor much more, including install and/or enable a php accelerator (highly recommended). prestashop formatting of currency, install and/or enable a php accelerator, number and date/time, php accelerator ampps as well as UCA-conformant collations php accelerator cpanel (customizable all the method to compare two php_apc.dll php 7 strings).

install php accelerator To activate this PHP simple install apc on xampp extension in Xampp, just simple edit your file Like as a php.ini (Example in C:\xampp\php folder) and remove the semicolon to uncomment this line :

;extension=php_intl.dll

Note : : Lastly You don’t forget to Your PHP restart Apache !

We hope you get an idea about How to install Alternative PHP Cache(APC) in Xampp
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.

VueJS Bar and Star Rating Component and demo 0

VueJS Bar and Star Rating Component and demo

VueJS Bar and Star Rating Component and demo

In this Post We Will Explain About is VueJS Bar and Star Rating Component and demo With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Vuejs rating component Example

In this post we will show you Best way to implement VueJS Bar Rating Component and demo, hear for star rating Vuejs examples free download with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Include External Libs

index.html

<!-- Devloped by Pakainfo.com free download examples -->
<div id="liveApp">
    <h1>Example of the Star rating in vue.js demo</h1>
    <ul>
        <li>
            <p>{{product.name}}: {{product.level}}</p>
            
        </li>
    </ul>
    <pre>{{webdev | json}}</pre>
</div>

index.js

// Devloped by Pakainfo.com free download examples -->
Vue.component('live-star-rating', {
  props: {
    'name': String, //Datatype string
    'value': null,
    'real_val': null,
    'id': String,  //Datatype string
    'disabled': Boolean,//true or false
    'required': Boolean  //true or false
  },
  template: '<div class="live-star-rating">\
        <label class="live-star-rating__star">= rating) && value != null), \'is-hover\': ((real_val >= rating) && real_val != null), \'is-disabled\': disabled}" \
        v-on:click="set(rating)" v-on:mouseover="star_over(rating)" v-on:mouseout="star_out">\
        ★</label></div>',

  data: function() {
    return {
      temp_value: null,
      liveAllRates: [1, 2, 3, 4, 5]
    };
  },
  methods: {
    star_over: function(index) {
      var self = this;

      if (!this.disabled) {
        this.temp_value = this.real_val;
        return this.real_val = index;
      }

    },

    star_out: function() {
      var self = this;

      if (!this.disabled) {
        return this.real_val = this.temp_value;
      }
    },
	//set value
    set: function(value) {
      var self = this;
	//check value
      if (!this.disabled) {        
        this.temp_value = value;
        return this.value = value;
      }
    }
  }

});

new Vue({
  el: '#liveApp',
  data: {
  	webdev: [
    	{name: "Live24u", level: 4},
			{name: "Vuejs", level: 3}
    ]
  }
});

style.css

.live-star-rating__star.is-selected,
.live-star-rating__star.is-hover {
  color: #FFD700;
}
.live-star-rating__star.is-disabled:hover {
  cursor: default;
}
pre{
  background: #1d1d1d;
  border: 2px solid #3d3d3d;
  padding: 18px;
  border-radius: 3px;
}
.live-star-rating__star {
  display: inline-block;
  line-height: 1;
  font-size: 1.5em;
  color: #ABABAB;
  padding: 3px;
  vertical-align: middle;
  transition: color .2s ease-out;
}
.live-star-rating__checkbox {
  position: absolute;
  height: 2px;
  width: 2px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  margin: -2px;
  padding: 0;
  border: 0;
}
.live-star-rating__star:hover {
  cursor: pointer;
}

Example

You are Most welcome in my youtube Channel Please subscribe my channel. and give me Feed Back.
More Details……
Angularjs Example

Example

I hope you have Got What is Vuejs rating component And how it works.I would Like to have Feed Back From My Blog(Pakainfo.com) readers.Your Valuable Feed Back,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

PHP Array Length Size Count Tutorial With Example 0

PHP Array Length Size Count Tutorial With Example

Today, We want to share with you PHP Array Length Size Count Tutorial With Example.In this post we will show you php count array elements with specific value, hear for we will give you demo and example for implement.In this post, we will learn about PHP Count total items in a multidimensional array/ associative array with an example.

PHP Array Length Size Count Tutorial With Example

There are the Following The simple About PHP Array Length Size Count Tutorial With Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop php array count values multidimensional array, so the Counts all elements in an array, or something in an object for this example is following below.

How to Count Array Elements in PHP

$num = array(1, 2, 3, array(4, 5, 6));
echo count($num)."\n";
echo count($num, 1);
//4 7

sizeof()

Array length Using PHP sizeof()

<?php

$mydata = array(5, 6, 7, array(8, 9, 10));
echo sizeof($mydata)."\n";
echo sizeof($mydata, 1);
//4 7
?>

PHP Indexed Arrays using Count

<?php
$product = array("Mobile", "Bike", "Computer");
$length = count($product);

for($x = 0; $x < $length; $x++) {
    echo $product[$x];
    echo "<br>";
}

How To Get Arrays Length

<?php
   $product = array("Mobile", "Bike", "Apple");
   $length = count($product);
   echo $length;
?>

Loop Through an Indexed Array

<?php
$product = array("Mobile", "Bike", "Computer");
$length = count($product);

for($x = 0; $x < $length; $x++) {
    echo $product[$x];
    echo "<br>";
}

PHP Loop Through an Associative Array

 $product = array("Mobile"=>"12566", "Bike"=>"98989", "Apple"=>"21");
 foreach($product as $x => $x_value) { 
 echo "Key=" . $x . ", Value=" . $x_value;
 echo "<br>";
}

Counting multidimensional arrays

php array count values multidimensional array

$devloperInfo = array( "devloper" => array( "Alfred shah", "Stanley sojitra", "Martin kumar", "deepak Lang" ),"languages" => array( "PHP", "Laravel", "Magento", "vuejs" ) );

// Displays "2"
echo count( $devloperInfo );

$devloperInfo = array( "devloper" => array( "mayur Hitchcock", "hitesh Kubrick", "Ravi Scorsese", "ketan Lang" ),"languages" => array( "PHP", "Laravel", "Angularjs", "Vuejs" ) );

// Displays "10"
echo count( $devloperInfo, COUNT_RECURSIVE );

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about PHP Array Length Size Count Tutorial With Example.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.