teleren/devto huggingface dataset:
How to create JS Functions
Published: 2017-11-23 17:10:08

javascript ,Reactjs, nodejs,vuejs

How to create JS Functions 
- something about function



Function means "Building Blocks" of the program . It can allow to reuse the code without repetition. For Example , we need to create shopping cart . To get AddItemCart , total-amount . It is used for the program .

Let's talk about function . How to create Functions.

#Function Declaration:

function Createfunction(){
  alert("Hello world!");
}
Createfunction();


Let's explain the code . "function" is keyword which have to write first  then I create function Name which can be wrote any-letter and The parameters will be the brackets(empty in the example above) . Finally, Function body code where you have to write your all codes .

Createfunction() is called for function output . If you write two times, the output will show two times . it executes the code of the functions. 

#Local variable:

Local variable declared inside the function body is only visible that function . Make sure that when You will write the title of function name , You can write the first letter of word can be capital letter because it will help you to see look nice .. Example:CreateMyName. In addition, I will write later how to write properly the name of  function.

Example:1

function CreateMyName(){
  var name = "poran";
  alert(name);
}

CreateMyName(); // output :  poran 
alert(name); // Error output because Variables is called as a local .


#outer Variable:

outer variable declared outside of the function . 
Example:2
 
var name = "poran";
function ShowName(){
  var nickName = "Shaha" + name;
  alert(nickName);
}

ShowName(); // output : Shahaporan

Outer variable is worked as global variables.It has full accessed and modify in the code .

Example:3
 
var name3 = "poran"; // outerVariable
function ShowName(){
   name3 =  "Sujon"; // Outer variable is changed .
  var nickName = "My Name is" + name3;
  alert(nickName);
}
alert(name3); // Show outer value
ShowName(); // output : My Name is Shahaporan
alert(name3) // Show changed value


Here is missing something about outer variables that I will write next articles .

"Happy coding"
PHP GraphQL пакеты и интеграции с Symfony
Tags: php, package, graphql
Published: 2018-02-01 11:02:22

---
title: PHP GraphQL пакеты и интеграции с Symfony
published: true
tags: php, package, GraphQL
canonical_url: http://phpprofi.ru/blogs/post/78
---

GraphQL продолжает набирать обороты. Хотя он и не является заменой для REST, он обеспечивает поользователей контентных API и т.п. лучшей эргономикой, чем RESTful-интерфейсы общего назначения. Для PHP существуют две популярные библиотеки, и обе имеют бандлы для интеграции с Symfony.

![](http://phpprofi.ru//resources/img/blogs/57ded605-9034-4b9b-9bea-9a290af51351.jpeg)

Реализация **`GraphQL`**-совместимого сервера - не тривиальная задача, да и создавать с нуля свой собственный не рекомендуется (на любом языке). Для PHP на данный момент есть две библиотеки, которые предлагают прочную основу для построения реализаций GraphQL:

----
Читать далее: http://phpprofi.ru/blogs/post/78

----
En: https://symfony.fi/entry/state-of-graphql-php-libraries-and-symfony-integrations-in-2017
Twitterのような画像をフリックすると画面を閉じれるライブラリを作った - FlingLayout
Tags: twitter, android, androidlibrary, kotlin
Published: 2017-11-23 15:11:36

---
title: Twitterのような画像をフリックすると画面を閉じれるライブラリを作った - FlingLayout
published: true
description: This library provide fling dismiss effect like Twitter ImageView.
tags: #twitter #Android #Android-Library #kotlin
---

## 今回の成果物
### FlingLayout
https://github.com/chuross/flinglayout

![31901843-b1bdb554-b85d-11e7-9ae4-cc49b3a161b2.gif](https://qiita-image-store.s3.amazonaws.com/0/20629/0e7cdaa6-6f9e-2bf6-bfb2-24a906c29bbb.gif)

## 特徴
Twitterの画像とこで使われてるように、上下にフリック操作すると画面を閉じれる挙動をレイアウトに内包するだけで実現できる。

## 導入
1. jitpackをrepositoryに追加する

```
repositories {
    maven { url "https://jitpack.io" }
}
```

2. dependenciesにライブラリを追加する [![](https://jitpack.io/v/chuross/flinglayout.svg)](https://jitpack.io/#chuross/flinglayout)

```
dependencies {
    compile 'com.github.chuross:flinglayout:x.x.x'
}
```

## 使い方
サンプルプロジェクトでは[PhotoView](https://github.com/chrisbanes/PhotoView)を使って実現している。

具体的にどう使えばTwitterみたいにできるんじゃみたいなの知りたい場合はここ見てね

https://github.com/chuross/flinglayout/tree/master/app

### XMLにレイアウトを記述する
これだけで挙動自体は完成
内包できるViewは1つだけなので注意

```
<com.github.chuross.flinglayout.FlingLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <!-- something view parent -->

</com.github.chuross.flinglayout.FlingLayout>
```

### ドラッグ操作を制御する
FlingLatoutにドラッグを無効にするフラグを用意しているので適宜セットする

```
val flingLayout = findViewById<FlingLayout>(R.id.flinglayout)
flingLayout.isDragEnabled = false
```

サンプルプロジェクトではPhotoViewのスケールを見てフラグを必要に応じてセットしている。(拡大時はFlingLayoutはドラッグ操作を受け付けないようにしている)

### Dismissのリスナーを拾って画面を閉じる
いつものDismiss用のリスナーセットできるようにしてあるので、それを使えばおｋ

```
val flingLayout = findViewById<FlingLayout>(R.id.flinglayout)
flingLayout.dismissListener = { /** something your code **/ }
```

## XML属性一覧
| key | type | description | etc |
| --- | --- | --- | --- |
| fl_isDragEnabled | boolean | ドラッグの有効 / 無効 |  |
| fl_isDismissEnabled | boolean | Dismissの有効 / 無効 | 無効にした場合はスワイプしても元の位置に戻る |

## ライセンス
```
Copyright 2017 chuross

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

## あとがき
内部的にはViewDragHelperを使用しているので、実装はいたってシンプルに作れた。

需要はありそうな気がしてたけど、ざっと検索した感じ引っかからなかったり、メンテされてなくてビルドできなかったりしてたので自分で作った。
Just Enough Documentation
Tags: softwaredevelopment, documentation, architecture
Published: 2017-11-23 14:42:16

---
title: Just Enough Documentation
published: true
description: The lie of self-documenting code and the need for Just Enough Documentation
tags: software development, documentation, architecture
---

Code hardly every adequately documents itself.  Nobody in their right mind wants to learn a complex new system architecture by being presented with an IDE and a link to github.  Good documentation is an essential part of any maintainable system.  

Good documentation often starts as scribblings on a whiteboard, but if an artefact is useful, it is worth being captured more permanently (even if that's just a photo on a wiki).

Speaking of wikis... just because it's easy to create a page, doesn't mean you should!

Good documentation helps to communicate important ideas.

Good documentation remembers what we tend to forget, particularly reasons for decisions.

Good documentation aims to be just in time and just enough.  

Good documentation is useful, which means it has to be accurate and relevant.

Good documentation is owned and looked after. If you remember nothing else of this rant, remember this.

Good documentation is not redundant.

Good documentation knows when it is none of these, and should be archived for the historians.
A mystique guide on boarding CouchDB 
Tags: couchdb, opinion, database
Published: 2017-11-23 14:35:50

---
title: A mystique guide on boarding CouchDB 
published: true
description: A mindful list of how couchDB is the database of choice for a transcendent data architecture
tags: couchdb, opinion, databases
---

Our stack includes CouchDB consumed in Rails applications. Every time a new developer starts working in it, the first complain is how human thought is designed to create associations everywhere, and how the patterns the mind build are better represented by RDBS.

To them, I just ask them, to let go. Let go all your attachments, let the attachments go into stand alone documents. Stop expecting relationships to be for ever, but embrace them in a nested structure with relevant data. Stop expecting that the world won't change, and drop any idea of implementing schemas in a non RDBS.

Document Based data bases are not best or worst than RDBS, they are a different paradigm, and approach the world in a different way. Somethings are hard, others easier. But it will be impossible if you keep thinking relational while doing non RDBS.
Zeroqode.com is nominated to AWWWARDs
Tags: design, webapp, templates, webdev
Published: 2017-11-23 14:16:24

---
layout: post
title: "Zeroqode.com is nominated to AWWWARDs"
published: true
description: "Zeroqode AWWWARDs nominee"
tags: "design, webapp, templates, webdevelopment"
---

#[Zeroqode](https://zeroqode.com/) - the #1 platform for all things no-code (templates, [courses] (https://zeroqode.com/courses), backends, wev2native etc) has been nominated to [AWWWARDs](https://www.awwwards.com/sites/zeroqode-no-code-platform#_=_) - the most prestigious contest for web-design. We invite you to take a look and vote in case you like what we have created :)
Help wanted! Translate dev.to welcome message continuously
Tags: meta
Published: 2017-11-23 13:37:18

---
title: Help wanted! Translate dev.to welcome message continuously
published: true
description: How to keep translated ones of dev.to welcome message updated as well 
tags: meta
---

I need your help refine [dev.to](https://dev.to/) welcome message.When I enrolled [dev.to](https://dev.to/), I received a welcome message in Japanese. I was very impressed. Unfortunately, it seems to be a little off. @yohhoy also thought and He/She have written an article, "[Refinement proposal: Welcome mail text in Japanese ](https://dev.to/yohhoy/refinement-proposal-welcome-mail-text-in-japanese-e1k)" and it is great action but it has some challenges on translating it continuously.

Translation is very hard because we need to keep translated ones updated as well so I have configured the way to do it well with [GitLocalize](https://gitlocalize.com/). It may be experiment!!

Please follow the steps to get started with your contribution:

1. Go to [GitLocalize's sotayamashita/dev.to-welcome repository](https://gitlocalize.com/repo/548/).
1. Sign up using your GitHub account.
1. Find the document you are going to translate.
1. Happy translating
1. When you are done, send the translation for reviews.
1. Reviewed translation will be sent as a Pull Request to GitHub by language admin in the community.

To learn more about how GitLocalize works, visit their [help page](https://docs.gitlocalize.com/). If you find any issues or feature requests, please file them in [GitLocalize's issue tracker](https://github.com/gitlocalize/feedback/).

forward to hear your thought. :)
Hidden Boards - "copy/paste via http" for non-sensitive text
Tags: showdev
Published: 2017-11-23 11:31:20

---
title: Hidden Boards - "copy/paste via http" for non-sensitive text
published: true
description: 
tags: showdev
---

Hi everyone, I just build http://hiddenboards.com It's intent is to enable transferring private (but not too sensitive) text from one pc to another, without installing anything or going through lengthy registration processes. (ie copy/paste a serial number to a new machine)

You can create a board and the contents of the board are only available to those who have the (random) board ID (and me as the administrator). 

I will add a layer of (simple) encryption before posting the data to the firebase.

I would appreciate any comments.

The stack is firebase, vue.js & bulma.io (currently runs on the free tier so it should have a limit on about 100 simultaneous connections)
The Absence Of Internet Points
Tags: meta, discuss
Published: 2017-11-23 10:55:42

---
title: The Absence Of Internet Points
published: true
description: 
tags: #meta #discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ebbkeqapmh3yyz78jnvy.jpg
---

I was showing Dev.to to a bunch of my team members yesterday, and I noticed something. Maybe I'm just a little slow, but I can't seem to see who is following me, how many people are following me or how many cumulative "likes" I've accrued.

*EDIT: I just realised I missed the most important point: I also can't see how many followers and "likes" __other__ folks on the site have accumulated. This is in comparison to something like Twitter, where this information is front and centre.*

I 👏 Love 👏 That 👏

At first I thought to myself, "the site's kind of new, I guess those features will come some day". But then I thought a bit more and now I'm not really sure that I'd even want those features at all. Then I thought "maybe the absence of those features **is** a feature?"

Mind. Blown. 

Something great about this community is that it feels like everyone's on the same playing field. Whether you're brand new to writing software, or if you've been doing it for 30 years, Dev.to presents and treats everyone equally.

I think a huge part of what makes that possible is the absence of a public "points" system for users.

**For the Dev.to team:** Is this intentional? And if so, what's the motivation?

**For the general community:** How do y'all feel about this?
GitHub Search Text a Chrome Extension
Tags: tools, github, chrome
Published: 2017-11-23 08:45:39

---
published: true
title: "GitHub Search Text a Chrome Extension"
description: GitHub Search Text a Chrome Extension
tags: tools, github, chrome
---


<p style="text-align:justify">GitHub Text Search is a Chrome extension born by the needs to search code inside a repository directly from the web. Sometimes happens that while I'm reading the code from GitHub web pages I have the necessity to search different occurrences of something (usually code) but without clone the repository in my machine and then do my research. The extension add a search bar on the repository main page and allows the user to do the search, the file with matches are listed on the same page and opening them the matches are highlighted, it is possible to move around the matches using shortcut.
Due the use of GitHub's API there are some limitations, the search can be done:</p>

   * only in master branch
   * not in private repository

The extension is available on the chrome [market](https://chrome.google.com/webstore/detail/github-text-search/pligfddkdofoidbejpmjimcjfdkjlcem).
You can find the source code on [GitHub](https://github.com/Cereal84/github_text_search_chrome_ext).
You use ReactNative ?
Tags: showdev
Published: 2017-11-23 08:38:37

---
title: You use ReactNative ?
published: true
tags: showdev
---

Yes, i think ReactNative it's awesome fraemwork for building mobile app.
I tried build small app with nodeJS, RN, PostgreSQL and i like it!

Because i can write all parts of my project in JavaScript.

It's awesome! Yeah i like StarWars too.

Github server: https://github.com/Gaserd/PrincessLeiaServer
Github app: https://github.com/Gaserd/PrincessLeiaApp
Video: https://www.youtube.com/watch?v=E35XBu7A0bE
Can Dysfunctions Be Bright 
Tags: management, team, leadership, discuss
Published: 2017-11-23 07:48:06

---
title: Can Dysfunctions Be Bright 
published: true
description: So your leader comes up with an idea, which you don’t quite agree with -do you speak up or remain silent? 
tags: management, team, leadership, discuss 
---


So your leader comes up with an idea, which you don’t quite agree with -do you speak up or remain silent? Maybe you’re a leader and wonder whether the silence of your team mates is golden.

Sometimes debates are raised and last long after the meetings end. It happens that discussions involve at least half of the team and result in many solutions to the problem.

I smile to myself as I recall a brilliant book by Patrick Lencioni “The Five Dysfunctions of a Team”. Lencioni claims that a “Fear of Conflict” is the second dysfunction which prevents teams from delivering desired results. It makes people focus on the fear which consumes the whole energy and kills the productivity. Silence driven by fear brings lack of commitment and thus makes the company’s success almost impossible.

“All great relationships, the ones that last over time, require productive conflict in order to grow. This is true in marriage, parenthood, friendship, and certainly business” (Patrick Lencioni).

Conflict is generally good for the team, but often feels uncomfortable and especially difficult for a leader who should generally promote and reward it. Team members should be protected from harm and feel secure to share their thoughts and opinions. Debate are often messy and it may look like a leader is failing by losing the control over a team. A fearless debate is however a precondition to a true commitment. When team including the leader overcome the uncomfortable conflict bias, the organisation reaches the next level. According to Lencioni this is just a half way to the company’s success. This step however is a difficult one.

So is silence golden? Not necessarily, but I will be happy if you disagree.


Originally published at [brightinventions.pl](https://brightinventions.pl/blog/) on October 10, 2017.

By Monika Niegrzybowska, Software developer @ Bright Inventions
[Email](monika.niegrzybowska@brightinventions.pl)
Facts to Consider While Applying DevOps in Mobile App Development
Tags: mobileappdevelopment, appdevelopment, devops
Published: 2017-11-23 07:34:11

---
title: Facts to Consider While Applying DevOps in Mobile App Development
published: true
description: This blog throws light upon the facts you need to consider while applying DevOps in mobile app development process effectively.
tags: Mobile App Development, App Development, DevOps
---

## What is DevOps?

It is a strategy which boosts the software development by concentrating on cooperation between developers, workforce and product managers. The collaboration is needed while lining up projects with a company’s business motives which can bring in profits. So….Have you already implemented DevOps in mobile app development? OR Are you planning to implement it? Then you need to know certain facts.

## Here are they:

1. Whenever you consider DevOps for mobile app development it is recommended to focus on accessibility through several devices as the app will operate on different devices and networks. Besides that, the emphasis is also to be laid on the number of innovative features and coding lines are to be set up during app building process.

2. You must be knowing there is a difference between mobile development and traditional development. But...do you know the actual difference between them? Mobile development needs to put into consideration varied devices which come with diverse features like resolutions, screen sizes, etc.

3. A mobile testing automation suite is required to be used as it is able to detect the bugs every time. An app needs to be examined on the basis of the framework in which it is to be used.

4. The utilization of DevOps in mobile app development invariably helps to gauge the performance of the entire set consisting of the app inside it. The estimation always helps to take the right steps which always ensure to offer a high-class interface and experience to the users.

5. The frequent update of an app is a must and the coding meant for mobile app development also demands to be refined unless it is made available to the end users. Thus it is a prerequisite to carry out a proper examination to discover each of every error and correct it then and there to make the app splendid from every aspect.

So boost the mobile app development process by implementing DevOps to gift an impeccable app to your potential users.

To know more, visit: [Mobileapprental](https://mobileapprental.com)
Constants in Go.
Tags: go, programming
Published: 2017-11-23 07:29:44

---
title: Constants in Go.
published: true
description: In this part, we look at constants in Go, and how to use them.
tags: go,golang,programming
---

In this part, we're going to look at Constants in Go, and how they play a role in a program.

- Constants are declared like variables, but with the `const` keyword.

- Constants can be character, string, boolean, or numeric values. 

- Constants cannot be declared using the := syntax. 

Consider the following code:
```go
...

const MAX_WT = 200

func main() {

  fmt.Println("Max wait time: ", MAX_WT)
}

```

In the above, a constant `MAX_WT` is defined with a value of 200, and is available throughout the script.

The value of a constant should be known at compile time. Hence it cannot be assigned to a value returned by a function call since the function call takes place at run time.


## String Constant
Any value enclosed between double quotes (eg "John Doe"), is a string constant in Go. 

String constants by default are untyped:

```go

const name = "James Bond"

```

Since Go is strongly typed, and all variable requires an explicit type, but the above code works, why? 

> Constants have a default type associated with them and they supply it if and only if a line of code demands it.

#### Typed String Constants
Its possible to create typed constant? Yes here's an example:

```go
const name string = "James Bond"
```

## Boolean Constant
Boolean constants are two untyped constants true and false. The same rules for string constants apply to booleans. Here's an example of defining boolean constants:

```go
const published = true
```

## Numeric Constants
Numeric constants include integers, floats and complex constants. There are some subtleties in numeric constants.

```go
package main

import "fmt"

func main() {  
    const a = 5
    var intVar int = a
    var int32Var int32 = a
    var float64Var float64 = a
    var complex64Var complex64 = a
    fmt.Println("intVar",intVar, "\nint32Var", int32Var, "\nfloat64Var", float64Var, "\ncomplex64Var",complex64Var)
}

```

Running the above you should see the following output:

```bash
$ go run main.go

intVar 5 
int32Var 5 
float64Var 5 
complex64Var (5+0i)

```

That's it for constants. Here are some points you'd need to keep in mind:

- Constants can only be defined once
- Constants can be defined without a type
- Constants can be used withing the scope its being defined in

In the next part, we'd look at Functions in Go.

Have any feedback? let me know in the comments.

Cheers!