teleren/devto huggingface dataset:
Fcal
Tags: codepen, javascript, typescript
Published: 2019-12-13 11:25:13

<p>Math expression evaluator 
<a href="https://github.com/5anthosh/fcal" target="_blank">https://github.com/5anthosh/fcal</a> </p>

{% codepen https://codepen.io/5anthosh/pen/XWWdyMg %}
Azure Virtual Network Service Endpoints explained in plain english 
Tags: azure, beginners, cloud
Published: 2019-12-13 11:20:11

---
title: Azure Virtual Network Service Endpoints explained in plain english 
published: true
description: This is the ridiculously simple animated explanation of Azure Virtual Network Service Endpoints and Service endpoint policies in plain english with a juicy story
cover_image: https://csapodcast.blob.core.windows.net/images/thumbnail.png
tags: #azure, #beginners ,#explainlikeimfive, #cloud
---



{% youtube gxsitRRgylI %}
Streaming large file downloads in Laravel.
Tags: laravel, php, file, download
Published: 2019-12-13 11:04:13

####Background

In my role as a developer at Reviews.io we often have customers who want to export large datasets from our Dashboard. Large dynamic file downloads can be problematic as they introduce the scope for memory exhaustion.

One way in which we tackle this issue is by streaming our file downloads using Laravel's Response Streaming.

####Streamed Downloads

>Sometimes you may wish to turn the string response of a given operation into a downloadable response without having to write the contents of the operation to disk. You may use the streamDownload method in this scenario. This method accepts a callback, file name, and an optional array of headers as its arguments

####The code

Let's start by declaring a route to get our download file from, I've opted to make the file retrievable by making a get request to `/download` with an optional number of rows we want the file to contain.

```
<?php

Route::get('download/{rows?}', ['uses' => 'StreamedDownloadController@download']);

```

Now we need to implement our Controller Method `download`

N.B. I'm using [Faker](https://github.com/fzaninotto/Faker) here to generate the data, in reality this would be fetched from a database but the idea is essentially the same.

First of we need to define the method on our controller.

```
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Faker;

class StreamedDownloadController extends Controller
{
    public function download($rows = 50000)
    {
```

We've specified a default value for the number of rows we want to write out to the file.

```php
        // callback function that writes to php://output
        $callback = function() use ($rows) {
    
        // Open output stream
        $handle = fopen('php://output', 'w');
    
        // Add CSV headers
        fputcsv($handle, [
            'Name',
            'Address', 
        ]);

        // Generate a faker instance
        $faker = Faker\Factory::create();

        // add the given number of rows to the file.
        for ($i=0; $i < $rows ; $i++) { 
            $row = [
                $faker->name,
                $faker->address,
            ];
            fputcsv($handle, $row);
        }
        
    
        // Close the output stream
        fclose($handle);
    };
```

This is the callback method that will process writing the file out to the `php:output` buffer.


Next up we specify the Content-Type so that the browser knows what format the file is supposed to be in.

```php
    // build response headers so file downloads.
    $headers = [
        'Content-Type' => 'text/csv',
    ];
```

And finally we return a `streamDownload()` response, that executes the callback, writing the generated file out.

```php
    // return the response as a streamed response.
    return response()->streamDownload($callback, 'download.csv', $headers);
    }
}
```
What is Continuous Integration? 
Tags: devops, azure
Published: 2019-12-13 10:23:29

Constant Integration (CI) is a development practice where the developer incorporates code into a common archive frequently, ideally a few times each day. Every integration would then be able to be checked by a robotized assemble and computerized tests. While robotized testing isn't carefully part of CI it is regularly suggested. 

One of the key advantages of incorporating normally is that you can recognize blunders rapidly and find them all the more effectively. As each change presented is commonly little, pinpointing the particular change that presented an imperfection should be possible rapidly. 

As of late CI has become a best practice for programming improvement and is guided by a lot of key standards. Among them are updated control, manufacture computerization and robotized testing. 




Moreover, Continuous Deployment and Continuous Delivery have created as best practices for keeping your application deployable anytime or in any event, pushing your principle codebase naturally into generation at whatever point new changes are brought into it. This enables your group to move quick while keeping excellent gauges that can be checked consequently.

Get the real-time application of Continuous Integration through <a href= " https://onlineitguru.com/devops-training.html">DevOps Online Training <a/> 

<b>Difference between Continuous Integration, Continuous Delivery and Continuous Deployment<b>:

Consistent Integration (CI) is an improvement practice where specialists join code into a typical chronicle once in a while, in a perfect world a couple of times every day. Each joining would then have the option to be checked by automated and modernized tests. While automated testing isn't cautiously part of CI it is normally proposed. 
One of the key focal points of fusing ordinarily is that you can perceive botches quickly and discover them even more adequately. As each change exhibited is ordinarily small, pinpointing the specific change that displayed a defect should be conceivable quickly. 
Starting late CI has become a best practice for programming development and is guided by a great deal of key principles. Among them is updated control, fabricate computerization and robotized testing. 

In addition, Continuous Deployment and Continuous Delivery have made as best practices for keeping your application deployable whenever or in any occasion, pushing your rule codebase normally into age at whatever point new changes are brought into it. This empowers your gathering to move snappy while keeping fantastic measures that can be checked thusly.
jQuery Form multi submit preventDefault() ajax formData
Tags: jquery, form, multiple, formdata
Published: 2019-12-13 09:59:50

<hr />

<center>Happy Coding</center>

<hr />

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

https://stackoverflow.com/questions/16638181/targeting-multiple-forms-to-send-via-ajax-jquery/59319231#59319231
https://stackoverflow.com/questions/19182199/to-submit-a-form-among-multiple-forms-using-jquery-ajax#autocomment104839387

<form id="form1" method="post" action="form1_process.php" >
    <input type="text" name="name" />
    <input type="submit" value="Submit Form 1">
</form>

<form id="form2" method="post" action="form2_process.php" >
    <input type="text" name="name" >
    <input type="submit" value="Submit Form 2">
</form>

<script>
  
    /* get all form and loop */
    $( "form" ).each( function () {

        /* addEventListener onsubmit each form */
        $( this ).bind( "submit", function (event) {

            /* return false */
            event.preventDefault();
          
            /* formHTML element (object) */
            var formHTML = event.target;

            /* display each props of forms */
            console.log( formHTML );
            console.log( "form id: " + formHTML.id );
            console.log( "form method: " + formHTML.method );
            console.log( "form action: " + formHTML.action );

            /* using formData */
            var formData = new FormData( formHTML );
            console.log( formData );
          
            /* ajax */
            $.ajax({

                method: formHTML.method,
                url: formHTML.action,

                // data: $( this ).serialize(), // serializes the form's elements.
                data: formData,

            	/*
            		result type data
            		JSON.parse(data)
            		http://api.jquery.com/jQuery.ajax/
            	*/
            	dataType: "HTML",

            	cache: false,

            	/* upload */
            	contentType: false, // formData with $_POST or $_FILES in server (PHP)
            	processData: false,

                success: function(result)
                {
                    alert(result);      
                    console.log(result);
                }

            });          

        } );

    });
  
</script>

Demo <a href="https://repl.it" >repl.it</a>

<ul>
  <li><a href="https://repl.it/@antelove19/jQuery-Form-multi-submit-preventDefault-ajax-fd" >Editor</a></li>
  <li><a href="https://jQuery-Form-multi-submit-preventDefault-ajax-fd.antelove19.repl.co" >Live</a></li>
</ol>

<hr/>

<center>Thank for reading :)</center>

<hr/>
jQuery Form multi submit preventDefault() ajax
Tags: jquery, form, multiple, ajax
Published: 2019-12-13 09:56:22

<hr />

<center>Happy Coding</center>

<hr />

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

https://stackoverflow.com/questions/16638181/targeting-multiple-forms-to-send-via-ajax-jquery/59319231#59319231
https://stackoverflow.com/questions/19182199/to-submit-a-form-among-multiple-forms-using-jquery-ajax#autocomment104839387

<form id="form1" method="post" action="form1_process.php" >
    <input type="text" name="name" />
    <input type="submit" value="Submit Form 1">
</form>

<form id="form2" method="post" action="form2_process.php" >
    <input type="text" name="name" >
    <input type="submit" value="Submit Form 2">
</form>

<script>
  
    /* get all form and loop */
    $( "form" ).each( function () {

        /* addEventListener onsubmit each form */
        $( this ).bind( "submit", function (event) {

            /* return false */
            event.preventDefault();
          
            /* formHTML element (object) */
            var formHTML = event.target;

            /* display each props of forms */
            console.log( formHTML );
            console.log( "form id: " + formHTML.id );
            console.log( "form method: " + formHTML.method );
            console.log( "form action: " + formHTML.action );
          
            /* ajax */
            $.ajax({

                method: formHTML.method,
                url: formHTML.action,

                data: $( this ).serialize(), // serializes the form's elements.

                success: function(result)
                {
                    alert(result);
                    console.log(result);
                }

            });          

        } );

    });
  
</script>

<hr />

Demo <a href="https://repl.it" >repl.it</a>

<ul>
  <li><a href="https://repl.it/@antelove19/jQuery-Form-multi-submit-preventDefault-ajax" >Editor</a></li>
  <li><a href="https://jquery-form-multi-submit-preventdefault-ajax--antelove19.repl.co" >Live</a></li>
</ol>

<hr/>

<center>Thank for reading :)</center>

<hr/>
Friday Blast #82
Tags: fridayblast, links, post
Published: 2019-12-27 22:33:22

---
title: Friday Blast #82
published: true
date: 2019-12-13 07:00:00 UTC
tags: friday_blast,links,post
canonical_url: https://horia141.com/friday-blast-82.html
series: "Friday Blast"
---

[What sticks in your head (2019)](https://www.johndcook.com/blog/2019/02/26/what-sticks-in-your-head/) - musings on why it is easier to remember some stuff rather than other. John, who’s been linked on this blog many times, has a knack for remembering math, but doesn’t really remember programming topics that well. I’m opposite that. The “picking your memory battles” section was quite good from this point - if you know you don’t have a knack for something, don’t weight yourself with too many topics in that area - try to focus on the most important bits.

[Amazon personalize (2019)](https://aws.amazon.com/personalize/) - AWS has a personalisation service in their data toolbox, and it’s apparently the same one they use for Amazon.com. Hard to believe, but still, it’s a very high level system that is being offered and I’m curious how it’ll work in practice.

[Practical polytheism (2019)](https://acoup.blog/category/collections/practical-polytheism/) - again, the topic of popular culture representations of history and culture. This time focusing on ancient polytheistic religions. My big takeaways from here were just how transactional this was, how many gods there were (thousands and millions even), and still how much of that is present in modern-day montheistic religions in tne end - suggesting something more fundamental is at play.

[DNS crash course for developers (2019)](https://twitter.com/chrisachard/status/1188870256971915265) - DNS is a globally distributed and federated key-value store used to map hierardical domains to “arbitrary information”, but usually IP addresses. The data is organised as records, which can be of several types, and this is a short overview of these.
jQuery Form multi submit preventDefault()
Tags: jquery, form, multiple
Published: 2019-12-13 09:51:29

<hr />

<center>Happy Coding</center>

<hr />

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

https://stackoverflow.com/questions/11609295/jquery-submit-multiple-forms-in-a-page/59317426#59317426

<form id="myForm1" method="post" action="comment1.php" >
    <input type="submit" value="Submit Form1" />
</form>

<form id="myForm2" method="post" action="comment2.php" >
    <input type="submit" value="Submit Form2" />
</form>

<form id="myForm3" method="post" action="comment3.php" >
    <input type="submit" value="Submit Form3" />  
</form>

<form id="myForm4" method="post" action="comment4.php" >
    <input type="submit" value="Submit Form4" />  
</form>

<script>
  
    /* get all form and loop */
    $( "form" ).each( function () {

        /* addEventListener onsubmit each form */
        $( this ).bind( "submit", function (event) {

            /* return false */
            event.preventDefault();

            var form = event.target;

            /* display each props of forms */
            console.log( form ); // object formHTML
            console.log( "form id: " + form.id );
            console.log( "form action: " + form.action );
            console.log( "form method: " + form.method );

        } );

    });
  
</script>

<hr />

Demo <a href="https://repl.it/" >repl.it</a>

<ul>
  <li><a href="https://repl.it/@antelove19/jQuery-Form-multi-submit-preventDefault" >Editor</a></li>
  <li><a href="https://jQuery-Form-multi-submit-preventDefault.antelove19.repl.co" >Live</a></li>
</ol>

<hr/>

<center>Thank for reading :)</center>

<hr/>
How to use pbcopy on Ubuntu
Tags: pbcopy, linux, programming, commandline
Published: 2020-03-31 03:36:17

---
title: How to use pbcopy on Ubuntu
published: true
date: 2019-12-13 09:51:04 UTC
tags: pbcopy,linux,programming,command-line
canonical_url: https://medium.com/tech-epic/how-to-use-pbcopy-on-ubuntu-f12940e5e18c
---

#### this command line enables you to copy the standard input from terminal window to your clipboard enabling you to paste it to other applications.

![](https://cdn-images-1.medium.com/max/610/1*8lbbN0PQtlWJFVHbBdnqww.png)

pbcopy on a mac enables you to copy the standard input from terminal window to your clipboard enabling you to paste it to other applications.

You can replicate pbcopy on ubuntu by utilising a similar tool called xclip which does exactly the same. However its syntax is a little too verbose and I prefer to use OS X pbcopy command.

### how to configure pbcopy on ubuntu

If you haven’t previously installed xclip simply run the following command in your terminal window:

> sudo apt-get install xclip -y

Edit your BASH settings file using your favorite text editor.

> nano ~/.bashrc

Then create an alias for _pbcopy and pbpaste_:

> alias pbcopy=’xclip -selection clipboard’  
> alias pbpaste=’xclip -selection clipboard -o’

Close and save the file then just refresh your bash to import your new settings

> source ~/.bashrc

#### Usage

> pbcopy < /etc/resolv.conf

* * *
Conferences CFP tag in DEV.TO ?
Tags: discuss, conferences, cfp
Published: 2019-12-13 09:28:15

## Hello everyone,
I love DEV.TO and I would ask you what do you think about having a tag for conferences CFP or conferences in general ? @ben any comments  ? 

##I am organizer
together with 5 other Java developers to a Java conference in my country Bulgaria called jPrime - http://jprime.io and since Lanyrd is dead now our cfp is announced only on twitter but maybe here is also the right place? What do you think ?


## About jPrime

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/sy3ubd0ok8num6xn9mqi.jpg)

In our case the conference is not free, but it is organized by the Bulgarian Java User Group and the income is 100% reinvested in next year and other events of the Bulgarian Java User Group in the country. 
We do not cover the plain tickets but we do cover all the diners, the transportation from and to the airport, the hotel and well basically the whole stay here, we even do an networking event after the conference with some sightseeing in our country.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/q7688ofud738puq1k614.jpg)



__So yes I also announce the cfp https://jprime.io/cfp here and now__ and adding #cfp and #conferences as tags.

Lastly we always HAVE streaming, completely FREE and we always have all the recordings available some time after the conference at our youtube channel

https://www.youtube.com/user/BulgarianJUG

And you can check some conference photos in flickr:  https://www.flickr.com/photos/132936671@N08/albums/with/72157669160528575
Why Choose SEORAISERS 
Tags: seoservices, seocompany
Published: 2019-12-13 08:50:40

Avail the right outcome, from our seo service, along with current online activities. We will help you to improve the digital marketing stories, and rank your company at the top of different search engines. We will use only the best white hat seo strategies, technique and technology, as used by other top SEO Companies on a global platform. Our seo services are at par with the international standards and search engine guidelines, and with permanent positive reply.
Better Services, Better Revenue – SEORAISERS is a quality and result oriented SEO company helping our clients to properly project their brand and generate targeted traffic and revenue. Are you on the lookout for the best search engine Optimization Company or do you want to change your existing SEO Company, then, look no further? You have just clicked the right destination. Be it an e-commerce website or a blog, we help to add value to your websites and maximize your profit.
Reading Snippets [9]
Tags: javascript, beginners, webdev
Published: 2019-12-13 08:46:56

A reference error is a result of attempting to access a function's local variable using a global scope.

It is not possible for a global scope to access variable definitions in a lower level scope. 

Attempts to access variables in a function from a global scope will result in the error message, "RefferenceError: variable is not defined"
Emojicode FizzBuzz
Tags: emoji, emojicode, fizzbuzz
Published: 2019-12-13 08:27:40

---
title: Emojicode FizzBuzz
published: true
tags: emoji, Emojicode, FizzBuzz
---

この記事は、雑談Slack Advent Calendar 2019 の13日目の記事です。 :calendar:

https://adventar.org/calendars/4684

Emojicodeというプログラミング言語(?)を用いてFizzBuzzを書いたので、かんたんに読み解いていきます。 :computer:

https://www.emojicode.org/

{% github YutaGoto/emoji-fizzbuzz %}

{% twitter 1205375165057527809 %}

```emoji
🏁 🍇
  1 ➡️ 🖍🆕 i

  🔁 i ◀️🙌 15 🍇
    ↪️ i 🚮 15 🙌 0 🍇
      😀 🔤FizzBuzz🔤❗️
    🍉
    🙅↪️ i 🚮 5 🙌 0 🍇
      😀 🔤Buzz🔤❗️
    🍉
    🙅↪️ i 🚮 3 🙌 0 🍇
      😀 🔤Fizz🔤❗️
    🍉
    🙅 🍇
      😀 🔡 i 10❗️❗️
    🍉
    i ➕ 1 ➡️🖍 i
  🍉
🍉
```

- :checkered_flag:でメイン関数
- :grapes: :watermelon:でブロックの始めとおわり
- :arrow_right: :lower_left_crayon::new: 変数代入
- :repeat: Whileループ
- :arrow_backward::raised_hands: 小なりイコール ≦
- :arrow_right_hook: if
- :put_litter_in_its_place: 剰余算
- :raised_hands: イコール
- :smiley: 文字列標準出力
- :abc: 文字列を囲むダブルクォーテーションのような働きをするやつ
- :exclamation: 閉じカッコのようなもの。Booleanの頭の方にあったら否定する働きももつ。
- :no_good::arrow_right_hook: elseif
- :no_good: else
- :abcd: 整数値を文字列に変換する
- :heavy_plus_sign: +


なのでよくみる言語で書き直すと、

```ruby
# ruby
def main
  i = 1

  while i <= 15
    if i % 15 == 0
      puts "FizzBuzz"
    elsif i % 5 == 0
      puts "Buzz"
    elsif i % 3 == 0
      puts "Fizz"
    else
      puts i.to_s
    end
    i = i + 1
  end
end
```


```python
# python3
def main():
  i = 1

  while i <= 15:
    if i % 15 == 0:
      print("FizzBuzz")
    elif i % 5 == 0:
      print("Buzz")
    elif i % 3 == 0:
      print("Fizz")
    else:
      print(str(i))

    i = i + 1
```

とかなります。

入力はかなり大変ですが、見た目に慣れてしまえばかなり楽しいです。
Annihilation - Underrated Movie
Tags: annihilation, movie
Published: 2019-12-13 08:24:11

 The science fictional scary tale offers one excellent strategy-hiring an all feminine celebrities since the scientific army squad delivered into The Shimmer, a evolving, exciting swatch of land developed by something through outer space. Like a storyline gadget, up to now so great. However the stars which includes are virtually squandered and end up being stereotypes which serve exactly the same objective a great men cast acts in some other films such as "Predator" or "Alien"-fodder for the causes within the Shimmer. The most obvious issue is why these types of several also it appears that the only solution is they may expendable and it also appears to be comprehended they will not be coming back .

Which makes it no feeling considering that their assignment would be to figure out what is happening in The Shimmer. Portman attempts to infuse spectacular power in to her part as this wounderful woman has voluntarily joined up with the team after her spouse formerly vanished about the same project. She presumes a command part even though her cause for signing up for stays hidden from the various other members. 


Leigh, as being the psychologist, provides every collection in a insipide just as if bored stiff by every thing she runs into which includes this part. Rodriguez really does sparkle in her part as being the paramedic of the group however isn't very provided sufficient to accomplish. They experience variations both in plant and animal living which goes toward detailing what The Shimmer is, however actually that description simply leaves the audience still baffled. There's sufficient graphic violence to make this film its R rating, however, not sufficient of a engaging story to create this trip advantageous. As being a horror film it does not have uncertainty and as a science fiction film, it does not have accordance. Overall, a annoying waste of resources.


In case you are anticipating a film with non-stop action or a horror movie, this is simply not that film. At it's central, this particular a science fiction secret movie. It is a lot more like Arrival (2016; however this film has a much better closing, IMO) having a little of the very first Alien (1979) spread in. At the end of the movie you may be provided sufficient solutions to comprehend what occurred (you will understand just as much as the figures) however you will see a few left over queries which will perhaps you have taking into consideration the film after it ends. Which includes films unclear endings feel as if a opt out or such as the writers select it simply because they didn't understand how to wrap up the tale, nevertheless, which is not the case with this film. It experienced such as the correct method to end the film.



<a href="https://www.1moviesearch.com/">film france </a>