Roslyn  Conn

Roslyn Conn

1596393660

Basic Linux Console Commands Every Data Scientist Should Know

Data scientists usually develop on Linux machines with a desktop environment, a graphical file manager and an IDE installed. However, in many situations the terminal commands are more efficient and effective or it could happen that the graphical interface is not available: for instance, when using SSH to connect to a remote machine or when using Colab GPU instance through SSH.

In this article, we are going to list the most useful Linux console commands for a data scientist. The list is far from complete, but it is a good starting point! We divided the list into three parts: file management, system monitoring and text file manipulation.

Before starting, some basics in Linux command line:

  • Almost every Linux command has the option –help which provides a quick overview of its functionality.
  • You can use CTRL+C and CTRL+Z to stop any command that is working.
  • With history command, you can get the list of past commands.
  • If you want to get a clean window, just use clear.
  • When typing a long file/folder name, you can press TAB to autocomplete!
  • You can run multiple commands by separating them with “;” or with “&&”. If “&&” is used, then commad on the right will be executed only if the command on the left is successful.

#command-line #linux #terminal

What is GEEK

Buddha Community

Basic Linux Console Commands Every Data Scientist Should Know
 iOS App Dev

iOS App Dev

1620466520

Your Data Architecture: Simple Best Practices for Your Data Strategy

If you accumulate data on which you base your decision-making as an organization, you should probably think about your data architecture and possible best practices.

If you accumulate data on which you base your decision-making as an organization, you most probably need to think about your data architecture and consider possible best practices. Gaining a competitive edge, remaining customer-centric to the greatest extent possible, and streamlining processes to get on-the-button outcomes can all be traced back to an organization’s capacity to build a future-ready data architecture.

In what follows, we offer a short overview of the overarching capabilities of data architecture. These include user-centricity, elasticity, robustness, and the capacity to ensure the seamless flow of data at all times. Added to these are automation enablement, plus security and data governance considerations. These points from our checklist for what we perceive to be an anticipatory analytics ecosystem.

#big data #data science #big data analytics #data analysis #data architecture #data transformation #data platform #data strategy #cloud data platform #data acquisition

使用 jQuery 创建分页

在本文中,我们将看到如何使用 jquery 创建分页。我们将使用多种方式创建 jquery 分页。您可以使用不同的方式创建分页,例如使用简单的 HTML 创建分页,您可以使用 paginate() 方法在 laravel 中创建分页。另外,创建分页 laravel livewire,使用 bootstrap 进行分页。

我们将创建简单的 jquery 分页。此外,使用不带插件的 jquery 创建分页,并使用下一个和上一个按钮创建 jquery 分页

那么,让我们看看jquery中的动态分页和jquery中的bootstrap分页

例子:

在这个例子中,我们将使用 jquery 创建分页而不使用插件。此外,您可以自定义分页。

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>How To Create Pagination Using jQuery - Websolutionstuff</title>
        <style>
            .current {
            color: green;
            }

            #pagin li {
            display: inline-block;
            font-weight: 500;
            }

            .prev {
            cursor: pointer;
            }

            .next {
            cursor: pointer;
            }

            .last {
            cursor:pointer;
            margin-left:10px;
            }

            .first {
            cursor:pointer;
            margin-right:10px;
            }

            .line-content, #pagin, h3 {
            text-align:center;
            }

            .line-content {
            margin-top:20px;
            }

            #pagin {
            margin-top:10px;
            padding-left:0;
            }

            h3 {
            margin:50px 0;  
            }
        </style>
    </head>
    <body>
        <h3>How To Create Pagination Using jQuery - Websolutionstuff</h3>
        <div class="line-content">This is Page 1 content example with next and prev.</div>
        <div class="line-content">This is Page 2 content example with next and prev.</div>
        <div class="line-content">This is Page 3 content example with next and prev.</div>
        <div class="line-content">This is Page 4 content example with next and prev.</div>
        <div class="line-content">This is Page 5 content example with next and prev.</div>
        <div class="line-content">This is Page 6 content example with next and prev.</div>
        <div class="line-content">This is Page 7 content example with next and prev.</div>
        <div class="line-content">This is Page 8 content example with next and prev.</div>
        <div class="line-content">This is Page 9 content example with next and prev.</div>
        <div class="line-content">This is Page 10 content example with next and prev.</div>
        <div class="line-content">This is Page 11 content example with next and prev.</div>
        <div class="line-content">This is Page 12 content example with next and prev.</div>
        <div class="line-content">This is Page 13 content example with next and prev.</div>
        <div class="line-content">This is Page 14 content example with next and prev.</div>
        <div class="line-content">This is Page 15 content example with next and prev.</div>
        <div class="line-content">This is Page 16 content example with next and prev.</div>
        <div class="line-content">This is Page 17 content example with next and prev.</div>
        <div class="line-content">This is Page 18 content example with next and prev.</div>
        <div class="line-content">This is Page 19 content example with next and prev.</div>
        <div class="line-content">This is Page 20 content example with next and prev.</div>
        <div class="line-content">This is Page 21 content example with next and prev.</div>
        <div class="line-content">This is Page 22 content example with next and prev.</div>
        <div class="line-content">This is Page 23 content example with next and prev.</div>
        <div class="line-content">This is Page 24 content example with next and prev.</div>
        <div class="line-content">This is Page 25 content example with next and prev.</div>
        <div class="line-content">This is Page 26 content example with next and prev.</div>
        <div class="line-content">This is Page 27 content example with next and prev.</div>
        <div class="line-content">This is Page 28 content example with next and prev.</div>
        <div class="line-content">This is Page 29 content example with next and prev.</div>
        <div class="line-content">This is Page 30 content example with next and prev.</div>
        <div class="line-content">This is Page 31 content example with next and prev.</div>
        <div class="line-content">This is Page 32 content example with next and prev.</div>
        <div class="line-content">This is Page 33 content example with next and prev.</div>
        <div class="line-content">This is Page 34 content example with next and prev.</div>
        <div class="line-content">This is Page 35 content example with next and prev.</div>
        <div class="line-content">This is Page 36 content example with next and prev.</div>
        <div class="line-content">This is Page 37 content example with next and prev.</div>
        <div class="line-content">This is Page 38 content example with next and prev.</div>
        <div class="line-content">This is Page 39 content example with next and prev.</div>
        <div class="line-content">This is Page 40 content example with next and prev.</div>
        <div class="line-content">This is Page 41 content example with next and prev.</div>
        <div class="line-content">This is Page 42 content example with next and prev.</div>
        <div class="line-content">This is Page 43 content example with next and prev.</div>
        <div class="line-content">This is Page 44 content example with next and prev.</div>
        <div class="line-content">This is Page 45 content example with next and prev.</div>
        <ul id="pagin"></ul>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<script>

pageSize = 5;
incremSlide = 5;
startPage = 0;
numberPage = 0;

var pageCount =  $(".line-content").length / pageSize;
var totalSlidepPage = Math.floor(pageCount / incremSlide);
    
for(var i = 0 ; i<pageCount;i++){
    $("#pagin").append('<li><a href="#">'+(i+1)+'</a></li> ');
    if(i>pageSize){
       $("#pagin li").eq(i).hide();
    }
}

var prev = $("<li/>").addClass("prev").html("Prev").click(function(){
    startPage-=5;
    incremSlide-=5;
    numberPage--;
    slide();
});

prev.hide();

var next = $("<li/>").addClass("next").html("Next").click(function(){
    startPage+=5;
    incremSlide+=5;
    numberPage++;
    slide();
});

$("#pagin").prepend(prev).append(next);

$("#pagin li").first().find("a").addClass("current");

slide = function(sens){
    $("#pagin li").hide();
   
    for(t=startPage;t<incremSlide;t++){
        $("#pagin li").eq(t+1).show();
    }
    if(startPage == 0){
        next.show();
        prev.hide();
    }else if(numberPage == totalSlidepPage ){
        next.hide();
        prev.show();
    }else{
        next.show();
        prev.show();
    }    
}

showPage = function(page) {
    $(".line-content").hide();
    $(".line-content").each(function(n) {
        if (n >= pageSize * (page - 1) && n < pageSize * page){
            $(this).show();
        }
    });        
}
    
showPage(1);
$("#pagin li a").eq(0).addClass("current");

$("#pagin li a").click(function() {
    $("#pagin li a").removeClass("current");
    $(this).addClass("current");
    showPage(parseInt($(this).text()));
});
</script>

输出:

how_to_create_pagination_using_jquery_output

例子:

在这个例子中,我们将在 jquery 的帮助下创建引导分页。

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>How To Create Bootstrap Pagination Using jQuery - Websolutionstuff</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
        <style>
            #data tr {
                display: none;
            }

            .page {
                margin: 30px;
            }

            table, th, td {
                border: 1px solid black;
            }

            #data {
                font-family: Arial, Helvetica, sans-serif;
                border-collapse: collapse;
                width: 100%;
            }

            #data td, #data th {
                border: 1px solid #ddd;
                padding: 8px;
            }

            #data tr:nth-child(even) {
                background-color: #f2f2f2;
            }

            #data tr:hover {
                background-color: #ddd;
            }

            #data th {
                padding-top: 12px;
                padding-bottom: 12px;
                text-align: left;
                background-color: #03aa96;
                color: white;
            }

            #nav a {
                color: #03aa96;
                font-size: 20px;
                margin-top: 22px;
                font-weight: 600;
            }

            a:hover, a:visited, a:link, a:active {
                text-decoration: none;
            }

            #nav {
                margin-top: 20px;
            }
        </style>
    </head>
    <body>                  
        <h2 align="center" class="mt-4">How To Create Bootstrap Pagination Using jQuery - Websolutionstuff</h2>
        <div class="page" align="center">   
            <table id="data">  
                <tr>  
                    <th>Id</th>  
                    <th>Name</th>  
                    <th>Country</th>  
                </tr>  
                <tr>  
                    <td>1</td>  
                    <td>Maria</td>  
                    <td>Germany</td>  
                </tr>  
                <tr>  
                    <td>2</td>  
                    <td>Christina</td>  
                    <td>Sweden</td>  
                </tr>  
                <tr>  
                    <td>3</td>  
                    <td>Chang</td>  
                    <td>Mexico</td>  
                </tr>  
                <tr>  
                    <td>4</td>  
                    <td>Mendel</td>  
                    <td>Austria</td>  
                </tr>  
                <tr>  
                    <td>5</td>  
                    <td>Helen</td>  
                    <td>United Kingdom</td>  
                </tr>  
                <tr>  
                    <td>6</td>  
                    <td>Philip</td>  
                    <td>Germany</td>  
                </tr>  
                <tr>  
                    <td>7</td>  
                    <td>Tannamuri</td>  
                    <td>Canada</td>  
                </tr>  
                <tr>  
                    <td>8</td>  
                    <td>Rovelli</td>  
                    <td>Italy</td>  
                </tr>  
                <tr>  
                    <td>9</td>  
                    <td>Dell</td>
                    <td>United Kingdom</td>
                </tr>  
                <tr>  
                    <td>10</td>  
                    <td>Trump</td>  
                    <td>France</td>  
                </tr>  
            </table>  
        </div>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<script>
$(document).ready (function () {  
    $('#data').after ('<div id="nav"></div>');  
    var rowsShown = 5;  
    var rowsTotal = $('#data tbody tr').length;  
    var numPages = rowsTotal/rowsShown;  
    for (i = 0;i < numPages;i++) {  
        var pageNum = i + 1;  
        $('#nav').append ('<a href="#" rel="'+i+'">'+pageNum+'</a> ');  
    }  
    $('#data tbody tr').hide();  
    $('#data tbody tr').slice (0, rowsShown).show();  
    $('#nav a:first').addClass('active');  
    $('#nav a').bind('click', function() {  
    $('#nav a').removeClass('active');  
    $(this).addClass('active');  
        var currPage = $(this).attr('rel');  
        var startItem = currPage * rowsShown;  
        var endItem = startItem + rowsShown;  
        $('#data tbody tr').css('opacity','0.0').hide().slice(startItem, endItem).  
        css('display','table-row').animate({opacity:1}, 300);  
    });  
});
</script>

输出:

how_to_create_pagination_using_jquery_and_bootstrap

例子:

在此示例中,我们将使用twbsPagination插件创建分页。这个 jQuery 插件简化了 Bootstrap 分页的使用。

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>jQuery Pagination Using Plugin - Websolutionstuff</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
        <style>
            .wrapper{
                margin: 60px auto;
                text-align: center;
            }
            h2{
                margin-bottom: 1.25em;
            }
            
            #pagination-demo{
                display: inline-block;
                margin-bottom: 1.75em;
            }

            #pagination-demo li{
                display: inline-block;
            }

            .page-content{
                background: #eee;
                display: inline-block;
                padding: 10px;
                width: 100%;
                max-width: 660px;
            }
        </style>
    </head>
    <body>                  
        <div class="wrapper">
            <div class="container">
              
              <div class="row">
                <div class="col-sm-12">
                  <h2>jQuery Pagination Using Plugin - Websolutionstuff</h2>
                  <p>Simple pagination using the TWBS pagination JS library.</p>
                  <ul id="pagination-demo" class="pagination-sm"></ul>
                </div>
              </div>
          
              <div id="page-content" class="page-content">Page 1</div>
            </div>
          </div>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twbs-pagination/1.4.1/jquery.twbsPagination.min.js"></script>
<script>
$(document).ready (function () {  
    $('#pagination-demo').twbsPagination({
        totalPages: 16,
        visiblePages: 6,
        next: 'Next',
        prev: 'Prev',
        onPageClick: function (event, page) {            
            $('#page-content').text('Page ' + page) + ' content here';
        }
    });
});
</script>

输出:

jquery_pagination_using_plugin

原文出处:https: //websolutionstuff.com/

#jquery #pagination 

Создание пагинации с помощью jQuery

В этой статье мы увидим, как создать пагинацию с помощью jquery. Мы создадим разбиение на страницы jquery, используя несколько способов. Вы можете создать разбиение на страницы, используя разные способы, такие как создание разбиения на страницы с помощью простого HTML, вы можете создать разбиение на страницы в laravel, используя метод paginate(). Кроме того, создайте разбиение на страницы laravel livewire, разбиение на страницы с помощью бутстрапа.

Мы создадим простую пагинацию jquery. Кроме того, создайте разбиение на страницы с помощью jquery без плагина и создайте разбивку на страницы jquery с помощью кнопок «Далее» и «Предыдущий».

Итак, давайте посмотрим динамическую нумерацию страниц в jquery и бутстраповскую нумерацию страниц в jquery.

Пример:

В этом примере мы создадим пагинацию с помощью jquery без использования плагина. Кроме того, вы можете настроить пагинацию.

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>How To Create Pagination Using jQuery - Websolutionstuff</title>
        <style>
            .current {
            color: green;
            }

            #pagin li {
            display: inline-block;
            font-weight: 500;
            }

            .prev {
            cursor: pointer;
            }

            .next {
            cursor: pointer;
            }

            .last {
            cursor:pointer;
            margin-left:10px;
            }

            .first {
            cursor:pointer;
            margin-right:10px;
            }

            .line-content, #pagin, h3 {
            text-align:center;
            }

            .line-content {
            margin-top:20px;
            }

            #pagin {
            margin-top:10px;
            padding-left:0;
            }

            h3 {
            margin:50px 0;  
            }
        </style>
    </head>
    <body>
        <h3>How To Create Pagination Using jQuery - Websolutionstuff</h3>
        <div class="line-content">This is Page 1 content example with next and prev.</div>
        <div class="line-content">This is Page 2 content example with next and prev.</div>
        <div class="line-content">This is Page 3 content example with next and prev.</div>
        <div class="line-content">This is Page 4 content example with next and prev.</div>
        <div class="line-content">This is Page 5 content example with next and prev.</div>
        <div class="line-content">This is Page 6 content example with next and prev.</div>
        <div class="line-content">This is Page 7 content example with next and prev.</div>
        <div class="line-content">This is Page 8 content example with next and prev.</div>
        <div class="line-content">This is Page 9 content example with next and prev.</div>
        <div class="line-content">This is Page 10 content example with next and prev.</div>
        <div class="line-content">This is Page 11 content example with next and prev.</div>
        <div class="line-content">This is Page 12 content example with next and prev.</div>
        <div class="line-content">This is Page 13 content example with next and prev.</div>
        <div class="line-content">This is Page 14 content example with next and prev.</div>
        <div class="line-content">This is Page 15 content example with next and prev.</div>
        <div class="line-content">This is Page 16 content example with next and prev.</div>
        <div class="line-content">This is Page 17 content example with next and prev.</div>
        <div class="line-content">This is Page 18 content example with next and prev.</div>
        <div class="line-content">This is Page 19 content example with next and prev.</div>
        <div class="line-content">This is Page 20 content example with next and prev.</div>
        <div class="line-content">This is Page 21 content example with next and prev.</div>
        <div class="line-content">This is Page 22 content example with next and prev.</div>
        <div class="line-content">This is Page 23 content example with next and prev.</div>
        <div class="line-content">This is Page 24 content example with next and prev.</div>
        <div class="line-content">This is Page 25 content example with next and prev.</div>
        <div class="line-content">This is Page 26 content example with next and prev.</div>
        <div class="line-content">This is Page 27 content example with next and prev.</div>
        <div class="line-content">This is Page 28 content example with next and prev.</div>
        <div class="line-content">This is Page 29 content example with next and prev.</div>
        <div class="line-content">This is Page 30 content example with next and prev.</div>
        <div class="line-content">This is Page 31 content example with next and prev.</div>
        <div class="line-content">This is Page 32 content example with next and prev.</div>
        <div class="line-content">This is Page 33 content example with next and prev.</div>
        <div class="line-content">This is Page 34 content example with next and prev.</div>
        <div class="line-content">This is Page 35 content example with next and prev.</div>
        <div class="line-content">This is Page 36 content example with next and prev.</div>
        <div class="line-content">This is Page 37 content example with next and prev.</div>
        <div class="line-content">This is Page 38 content example with next and prev.</div>
        <div class="line-content">This is Page 39 content example with next and prev.</div>
        <div class="line-content">This is Page 40 content example with next and prev.</div>
        <div class="line-content">This is Page 41 content example with next and prev.</div>
        <div class="line-content">This is Page 42 content example with next and prev.</div>
        <div class="line-content">This is Page 43 content example with next and prev.</div>
        <div class="line-content">This is Page 44 content example with next and prev.</div>
        <div class="line-content">This is Page 45 content example with next and prev.</div>
        <ul id="pagin"></ul>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<script>

pageSize = 5;
incremSlide = 5;
startPage = 0;
numberPage = 0;

var pageCount =  $(".line-content").length / pageSize;
var totalSlidepPage = Math.floor(pageCount / incremSlide);
    
for(var i = 0 ; i<pageCount;i++){
    $("#pagin").append('<li><a href="#">'+(i+1)+'</a></li> ');
    if(i>pageSize){
       $("#pagin li").eq(i).hide();
    }
}

var prev = $("<li/>").addClass("prev").html("Prev").click(function(){
    startPage-=5;
    incremSlide-=5;
    numberPage--;
    slide();
});

prev.hide();

var next = $("<li/>").addClass("next").html("Next").click(function(){
    startPage+=5;
    incremSlide+=5;
    numberPage++;
    slide();
});

$("#pagin").prepend(prev).append(next);

$("#pagin li").first().find("a").addClass("current");

slide = function(sens){
    $("#pagin li").hide();
   
    for(t=startPage;t<incremSlide;t++){
        $("#pagin li").eq(t+1).show();
    }
    if(startPage == 0){
        next.show();
        prev.hide();
    }else if(numberPage == totalSlidepPage ){
        next.hide();
        prev.show();
    }else{
        next.show();
        prev.show();
    }    
}

showPage = function(page) {
    $(".line-content").hide();
    $(".line-content").each(function(n) {
        if (n >= pageSize * (page - 1) && n < pageSize * page){
            $(this).show();
        }
    });        
}
    
showPage(1);
$("#pagin li a").eq(0).addClass("current");

$("#pagin li a").click(function() {
    $("#pagin li a").removeClass("current");
    $(this).addClass("current");
    showPage(parseInt($(this).text()));
});
</script>

Выход:

как_to_create_pagination_using_jquery_output

Пример:

В этом примере мы создадим загрузочную пагинацию с помощью jquery.

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>How To Create Bootstrap Pagination Using jQuery - Websolutionstuff</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
        <style>
            #data tr {
                display: none;
            }

            .page {
                margin: 30px;
            }

            table, th, td {
                border: 1px solid black;
            }

            #data {
                font-family: Arial, Helvetica, sans-serif;
                border-collapse: collapse;
                width: 100%;
            }

            #data td, #data th {
                border: 1px solid #ddd;
                padding: 8px;
            }

            #data tr:nth-child(even) {
                background-color: #f2f2f2;
            }

            #data tr:hover {
                background-color: #ddd;
            }

            #data th {
                padding-top: 12px;
                padding-bottom: 12px;
                text-align: left;
                background-color: #03aa96;
                color: white;
            }

            #nav a {
                color: #03aa96;
                font-size: 20px;
                margin-top: 22px;
                font-weight: 600;
            }

            a:hover, a:visited, a:link, a:active {
                text-decoration: none;
            }

            #nav {
                margin-top: 20px;
            }
        </style>
    </head>
    <body>                  
        <h2 align="center" class="mt-4">How To Create Bootstrap Pagination Using jQuery - Websolutionstuff</h2>
        <div class="page" align="center">   
            <table id="data">  
                <tr>  
                    <th>Id</th>  
                    <th>Name</th>  
                    <th>Country</th>  
                </tr>  
                <tr>  
                    <td>1</td>  
                    <td>Maria</td>  
                    <td>Germany</td>  
                </tr>  
                <tr>  
                    <td>2</td>  
                    <td>Christina</td>  
                    <td>Sweden</td>  
                </tr>  
                <tr>  
                    <td>3</td>  
                    <td>Chang</td>  
                    <td>Mexico</td>  
                </tr>  
                <tr>  
                    <td>4</td>  
                    <td>Mendel</td>  
                    <td>Austria</td>  
                </tr>  
                <tr>  
                    <td>5</td>  
                    <td>Helen</td>  
                    <td>United Kingdom</td>  
                </tr>  
                <tr>  
                    <td>6</td>  
                    <td>Philip</td>  
                    <td>Germany</td>  
                </tr>  
                <tr>  
                    <td>7</td>  
                    <td>Tannamuri</td>  
                    <td>Canada</td>  
                </tr>  
                <tr>  
                    <td>8</td>  
                    <td>Rovelli</td>  
                    <td>Italy</td>  
                </tr>  
                <tr>  
                    <td>9</td>  
                    <td>Dell</td>
                    <td>United Kingdom</td>
                </tr>  
                <tr>  
                    <td>10</td>  
                    <td>Trump</td>  
                    <td>France</td>  
                </tr>  
            </table>  
        </div>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<script>
$(document).ready (function () {  
    $('#data').after ('<div id="nav"></div>');  
    var rowsShown = 5;  
    var rowsTotal = $('#data tbody tr').length;  
    var numPages = rowsTotal/rowsShown;  
    for (i = 0;i < numPages;i++) {  
        var pageNum = i + 1;  
        $('#nav').append ('<a href="#" rel="'+i+'">'+pageNum+'</a> ');  
    }  
    $('#data tbody tr').hide();  
    $('#data tbody tr').slice (0, rowsShown).show();  
    $('#nav a:first').addClass('active');  
    $('#nav a').bind('click', function() {  
    $('#nav a').removeClass('active');  
    $(this).addClass('active');  
        var currPage = $(this).attr('rel');  
        var startItem = currPage * rowsShown;  
        var endItem = startItem + rowsShown;  
        $('#data tbody tr').css('opacity','0.0').hide().slice(startItem, endItem).  
        css('display','table-row').animate({opacity:1}, 300);  
    });  
});
</script>

Выход:

как_to_create_pagination_using_jquery_and_bootstrap

Пример:

В этом примере мы создадим пагинацию с помощью плагина twbsPagination . Этот плагин jQuery упрощает использование разбиения на страницы Bootstrap.

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>jQuery Pagination Using Plugin - Websolutionstuff</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
        <style>
            .wrapper{
                margin: 60px auto;
                text-align: center;
            }
            h2{
                margin-bottom: 1.25em;
            }
            
            #pagination-demo{
                display: inline-block;
                margin-bottom: 1.75em;
            }

            #pagination-demo li{
                display: inline-block;
            }

            .page-content{
                background: #eee;
                display: inline-block;
                padding: 10px;
                width: 100%;
                max-width: 660px;
            }
        </style>
    </head>
    <body>                  
        <div class="wrapper">
            <div class="container">
              
              <div class="row">
                <div class="col-sm-12">
                  <h2>jQuery Pagination Using Plugin - Websolutionstuff</h2>
                  <p>Simple pagination using the TWBS pagination JS library.</p>
                  <ul id="pagination-demo" class="pagination-sm"></ul>
                </div>
              </div>
          
              <div id="page-content" class="page-content">Page 1</div>
            </div>
          </div>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twbs-pagination/1.4.1/jquery.twbsPagination.min.js"></script>
<script>
$(document).ready (function () {  
    $('#pagination-demo').twbsPagination({
        totalPages: 16,
        visiblePages: 6,
        next: 'Next',
        prev: 'Prev',
        onPageClick: function (event, page) {            
            $('#page-content').text('Page ' + page) + ' content here';
        }
    });
});
</script>

Выход:

jquery_pagination_using_plugin

Оригинальный источник статьи: https://websolutionstuff.com/

#jquery #pagination 

Create Pagination Using jQuery

In this article, we will see how to create pagination using jquery. We will create jquery pagination using multiple ways. You can create pagination using different ways like creating pagination using simple HTML, you can create pagination in laravel using paginate() method. Also, create pagination laravel livewire, pagination using bootstrap.

We will create simple jquery pagination. Also, create pagination using jquery without a plugin and create jquery pagination with next and previous buttons

So, let's see dynamic pagination in jquery and bootstrap pagination in jquery

Example:

In this example, we will create pagination using jquery without using a plugin. Also, you can customize the pagination.

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>How To Create Pagination Using jQuery - Websolutionstuff</title>
        <style>
            .current {
            color: green;
            }

            #pagin li {
            display: inline-block;
            font-weight: 500;
            }

            .prev {
            cursor: pointer;
            }

            .next {
            cursor: pointer;
            }

            .last {
            cursor:pointer;
            margin-left:10px;
            }

            .first {
            cursor:pointer;
            margin-right:10px;
            }

            .line-content, #pagin, h3 {
            text-align:center;
            }

            .line-content {
            margin-top:20px;
            }

            #pagin {
            margin-top:10px;
            padding-left:0;
            }

            h3 {
            margin:50px 0;  
            }
        </style>
    </head>
    <body>
        <h3>How To Create Pagination Using jQuery - Websolutionstuff</h3>
        <div class="line-content">This is Page 1 content example with next and prev.</div>
        <div class="line-content">This is Page 2 content example with next and prev.</div>
        <div class="line-content">This is Page 3 content example with next and prev.</div>
        <div class="line-content">This is Page 4 content example with next and prev.</div>
        <div class="line-content">This is Page 5 content example with next and prev.</div>
        <div class="line-content">This is Page 6 content example with next and prev.</div>
        <div class="line-content">This is Page 7 content example with next and prev.</div>
        <div class="line-content">This is Page 8 content example with next and prev.</div>
        <div class="line-content">This is Page 9 content example with next and prev.</div>
        <div class="line-content">This is Page 10 content example with next and prev.</div>
        <div class="line-content">This is Page 11 content example with next and prev.</div>
        <div class="line-content">This is Page 12 content example with next and prev.</div>
        <div class="line-content">This is Page 13 content example with next and prev.</div>
        <div class="line-content">This is Page 14 content example with next and prev.</div>
        <div class="line-content">This is Page 15 content example with next and prev.</div>
        <div class="line-content">This is Page 16 content example with next and prev.</div>
        <div class="line-content">This is Page 17 content example with next and prev.</div>
        <div class="line-content">This is Page 18 content example with next and prev.</div>
        <div class="line-content">This is Page 19 content example with next and prev.</div>
        <div class="line-content">This is Page 20 content example with next and prev.</div>
        <div class="line-content">This is Page 21 content example with next and prev.</div>
        <div class="line-content">This is Page 22 content example with next and prev.</div>
        <div class="line-content">This is Page 23 content example with next and prev.</div>
        <div class="line-content">This is Page 24 content example with next and prev.</div>
        <div class="line-content">This is Page 25 content example with next and prev.</div>
        <div class="line-content">This is Page 26 content example with next and prev.</div>
        <div class="line-content">This is Page 27 content example with next and prev.</div>
        <div class="line-content">This is Page 28 content example with next and prev.</div>
        <div class="line-content">This is Page 29 content example with next and prev.</div>
        <div class="line-content">This is Page 30 content example with next and prev.</div>
        <div class="line-content">This is Page 31 content example with next and prev.</div>
        <div class="line-content">This is Page 32 content example with next and prev.</div>
        <div class="line-content">This is Page 33 content example with next and prev.</div>
        <div class="line-content">This is Page 34 content example with next and prev.</div>
        <div class="line-content">This is Page 35 content example with next and prev.</div>
        <div class="line-content">This is Page 36 content example with next and prev.</div>
        <div class="line-content">This is Page 37 content example with next and prev.</div>
        <div class="line-content">This is Page 38 content example with next and prev.</div>
        <div class="line-content">This is Page 39 content example with next and prev.</div>
        <div class="line-content">This is Page 40 content example with next and prev.</div>
        <div class="line-content">This is Page 41 content example with next and prev.</div>
        <div class="line-content">This is Page 42 content example with next and prev.</div>
        <div class="line-content">This is Page 43 content example with next and prev.</div>
        <div class="line-content">This is Page 44 content example with next and prev.</div>
        <div class="line-content">This is Page 45 content example with next and prev.</div>
        <ul id="pagin"></ul>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<script>

pageSize = 5;
incremSlide = 5;
startPage = 0;
numberPage = 0;

var pageCount =  $(".line-content").length / pageSize;
var totalSlidepPage = Math.floor(pageCount / incremSlide);
    
for(var i = 0 ; i<pageCount;i++){
    $("#pagin").append('<li><a href="#">'+(i+1)+'</a></li> ');
    if(i>pageSize){
       $("#pagin li").eq(i).hide();
    }
}

var prev = $("<li/>").addClass("prev").html("Prev").click(function(){
    startPage-=5;
    incremSlide-=5;
    numberPage--;
    slide();
});

prev.hide();

var next = $("<li/>").addClass("next").html("Next").click(function(){
    startPage+=5;
    incremSlide+=5;
    numberPage++;
    slide();
});

$("#pagin").prepend(prev).append(next);

$("#pagin li").first().find("a").addClass("current");

slide = function(sens){
    $("#pagin li").hide();
   
    for(t=startPage;t<incremSlide;t++){
        $("#pagin li").eq(t+1).show();
    }
    if(startPage == 0){
        next.show();
        prev.hide();
    }else if(numberPage == totalSlidepPage ){
        next.hide();
        prev.show();
    }else{
        next.show();
        prev.show();
    }    
}

showPage = function(page) {
    $(".line-content").hide();
    $(".line-content").each(function(n) {
        if (n >= pageSize * (page - 1) && n < pageSize * page){
            $(this).show();
        }
    });        
}
    
showPage(1);
$("#pagin li a").eq(0).addClass("current");

$("#pagin li a").click(function() {
    $("#pagin li a").removeClass("current");
    $(this).addClass("current");
    showPage(parseInt($(this).text()));
});
</script>

Output:

how_to_create_pagination_using_jquery_output

Example:

In this example, we will create bootstrap pagination with help of jquery.

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>How To Create Bootstrap Pagination Using jQuery - Websolutionstuff</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
        <style>
            #data tr {
                display: none;
            }

            .page {
                margin: 30px;
            }

            table, th, td {
                border: 1px solid black;
            }

            #data {
                font-family: Arial, Helvetica, sans-serif;
                border-collapse: collapse;
                width: 100%;
            }

            #data td, #data th {
                border: 1px solid #ddd;
                padding: 8px;
            }

            #data tr:nth-child(even) {
                background-color: #f2f2f2;
            }

            #data tr:hover {
                background-color: #ddd;
            }

            #data th {
                padding-top: 12px;
                padding-bottom: 12px;
                text-align: left;
                background-color: #03aa96;
                color: white;
            }

            #nav a {
                color: #03aa96;
                font-size: 20px;
                margin-top: 22px;
                font-weight: 600;
            }

            a:hover, a:visited, a:link, a:active {
                text-decoration: none;
            }

            #nav {
                margin-top: 20px;
            }
        </style>
    </head>
    <body>                  
        <h2 align="center" class="mt-4">How To Create Bootstrap Pagination Using jQuery - Websolutionstuff</h2>
        <div class="page" align="center">   
            <table id="data">  
                <tr>  
                    <th>Id</th>  
                    <th>Name</th>  
                    <th>Country</th>  
                </tr>  
                <tr>  
                    <td>1</td>  
                    <td>Maria</td>  
                    <td>Germany</td>  
                </tr>  
                <tr>  
                    <td>2</td>  
                    <td>Christina</td>  
                    <td>Sweden</td>  
                </tr>  
                <tr>  
                    <td>3</td>  
                    <td>Chang</td>  
                    <td>Mexico</td>  
                </tr>  
                <tr>  
                    <td>4</td>  
                    <td>Mendel</td>  
                    <td>Austria</td>  
                </tr>  
                <tr>  
                    <td>5</td>  
                    <td>Helen</td>  
                    <td>United Kingdom</td>  
                </tr>  
                <tr>  
                    <td>6</td>  
                    <td>Philip</td>  
                    <td>Germany</td>  
                </tr>  
                <tr>  
                    <td>7</td>  
                    <td>Tannamuri</td>  
                    <td>Canada</td>  
                </tr>  
                <tr>  
                    <td>8</td>  
                    <td>Rovelli</td>  
                    <td>Italy</td>  
                </tr>  
                <tr>  
                    <td>9</td>  
                    <td>Dell</td>
                    <td>United Kingdom</td>
                </tr>  
                <tr>  
                    <td>10</td>  
                    <td>Trump</td>  
                    <td>France</td>  
                </tr>  
            </table>  
        </div>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<script>
$(document).ready (function () {  
    $('#data').after ('<div id="nav"></div>');  
    var rowsShown = 5;  
    var rowsTotal = $('#data tbody tr').length;  
    var numPages = rowsTotal/rowsShown;  
    for (i = 0;i < numPages;i++) {  
        var pageNum = i + 1;  
        $('#nav').append ('<a href="#" rel="'+i+'">'+pageNum+'</a> ');  
    }  
    $('#data tbody tr').hide();  
    $('#data tbody tr').slice (0, rowsShown).show();  
    $('#nav a:first').addClass('active');  
    $('#nav a').bind('click', function() {  
    $('#nav a').removeClass('active');  
    $(this).addClass('active');  
        var currPage = $(this).attr('rel');  
        var startItem = currPage * rowsShown;  
        var endItem = startItem + rowsShown;  
        $('#data tbody tr').css('opacity','0.0').hide().slice(startItem, endItem).  
        css('display','table-row').animate({opacity:1}, 300);  
    });  
});
</script>

Output:

how_to_create_pagination_using_jquery_and_bootstrap

Example:

In this example, we will create pagination using the twbsPagination plugin. This jQuery plugin simplifies the usage of Bootstrap Pagination.

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>jQuery Pagination Using Plugin - Websolutionstuff</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
        <style>
            .wrapper{
                margin: 60px auto;
                text-align: center;
            }
            h2{
                margin-bottom: 1.25em;
            }
            
            #pagination-demo{
                display: inline-block;
                margin-bottom: 1.75em;
            }

            #pagination-demo li{
                display: inline-block;
            }

            .page-content{
                background: #eee;
                display: inline-block;
                padding: 10px;
                width: 100%;
                max-width: 660px;
            }
        </style>
    </head>
    <body>                  
        <div class="wrapper">
            <div class="container">
              
              <div class="row">
                <div class="col-sm-12">
                  <h2>jQuery Pagination Using Plugin - Websolutionstuff</h2>
                  <p>Simple pagination using the TWBS pagination JS library.</p>
                  <ul id="pagination-demo" class="pagination-sm"></ul>
                </div>
              </div>
          
              <div id="page-content" class="page-content">Page 1</div>
            </div>
          </div>
    </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twbs-pagination/1.4.1/jquery.twbsPagination.min.js"></script>
<script>
$(document).ready (function () {  
    $('#pagination-demo').twbsPagination({
        totalPages: 16,
        visiblePages: 6,
        next: 'Next',
        prev: 'Prev',
        onPageClick: function (event, page) {            
            $('#page-content').text('Page ' + page) + ' content here';
        }
    });
});
</script>

Output:

jquery_pagination_using_plugin

Original article source at: https://websolutionstuff.com/

#jquery #pagination 

Java Questions

Java Questions

1599137520

50 Data Science Jobs That Opened Just Last Week

Our latest survey report suggests that as the overall Data Science and Analytics market evolves to adapt to the constantly changing economic and business environments, data scientists and AI practitioners should be aware of the skills and tools that the broader community is working on. A good grip in these skills will further help data science enthusiasts to get the best jobs that various industries in their data science functions are offering.

In this article, we list down 50 latest job openings in data science that opened just last week.

(The jobs are sorted according to the years of experience r

1| Data Scientist at IBM

**Location: **Bangalore

Skills Required: Real-time anomaly detection solutions, NLP, text analytics, log analysis, cloud migration, AI planning, etc.

Apply here.

2| Associate Data Scientist at PayPal

**Location: **Chennai

Skills Required: Data mining experience in Python, R, H2O and/or SAS, cross-functional, highly complex data science projects, SQL or SQL-like tools, among others.

Apply here.

3| Data Scientist at Citrix

Location: Bangalore

Skills Required: Data modelling, database architecture, database design, database programming such as SQL, Python, etc., forecasting algorithms, cloud platforms, designing and developing ETL and ELT processes, etc.

Apply here.

4| Data Scientist at PayPal

**Location: **Bangalore

Skills Required: SQL and querying relational databases, statistical programming language (SAS, R, Python), data visualisation tool (Tableau, Qlikview), project management, etc.

Apply here.

5| Data Science at Accenture

**Location: **Bibinagar, Telangana

Skills Required: Data science frameworks Jupyter notebook, AWS Sagemaker, querying databases and using statistical computer languages: R, Python, SLQ, statistical and data mining techniques, distributed data/computing tools such as Map/Reduce, Flume, Drill, Hadoop, Hive, Spark, Gurobi, MySQL, among others.


#careers #data science #data science career #data science jobs #data science news #data scientist #data scientists #data scientists india