The document describes how to use Sqoop to import and export data between SQL databases and Hadoop. Sqoop allows importing individual tables or entire databases from a SQL database into HDFS files. It can also generate Java classes to interact with imported data and import data directly into a Hive data warehouse. The document provides examples of using Sqoop to import a MySQL table into HDFS and Hive, and export an HDFS directory to a database table. It also describes additional Sqoop commands for listing databases, tables, and evaluating SQL statements.
From Java to Kotlin beyond alt+shift+cmd+k - Kotlin Community Conf MilanFabio Collini
Kotlin is a first-class language for Android development since Google I/O 2017. And it’s here to stay!
Thanks to Android Studio it’s really easy to introduce Kotlin in an existing project, the configuration is trivial and then we can convert Java classes to Kotlin using a Alt+Shift+Cmd+K. But the new syntax is the just beginning, using Kotlin we can improve our code making it more readable and simpler to write.
In this talk we’ll see how to use some Kotlin features (for example data classes, collections, coroutines and delegates) to simplify Android development comparing the code with the equivalent “modern” Java code. It’s not fair to compare Kotlin code with plain Java 6 code so the Java examples will use lambdas and some external libraries like RxJava and AutoValue.
From java to kotlin beyond alt+shift+cmd+k - Droidcon italyFabio Collini
Kotlin is a first-class language for Android development since Google I/O 2017. And it’s here to stay!
Thanks to Android Studio it’s really easy to introduce Kotlin in an existing project, the configuration is trivial and then we can convert Java classes to Kotlin using a Alt+Shift+Cmd+K. But the new syntax is the just beginning, using Kotlin we can improve our code making it more readable and simpler to write.
In this talk we’ll see how to use some Kotlin features (for example data classes, collections, coroutines and delegates) to simplify Android development comparing the code with the equivalent “modern” Java code. It’s not fair to compare Kotlin code with plain Java 6 code so the Java examples will use lambdas and some external libraries like RxJava and AutoValue.
Async code on kotlin: rx java or/and coroutines - Kotlin Night TurinFabio Collini
It’s never easy to write async code but luckily there are many libraries to manage asynchronicity without adding too much complexity. In the last years RxJava and the other ReactiveX libraries have been very popular but lately there is a new way to manage async code in Kotlin: the coroutines. In this talk we’ll pros and cons of there two approaches and how to leverage them to simplify asynchronous code on Android.
Do they solve the same problem? Can we use them together? Which one can be used to write functional code? How can we use them effectively in Android development?
Spoiler alert: They are both great!
In this talk we’ll see how to solve common problems using RxJava or Coroutines, starting from basic concepts (for example the Retrofit support and how to cancel a task) to some more advanced (like threading, error management and how to combine multiple tasks).
All example of the talk are available on this repository:
https://github.com/fabioCollini/RxJavaVsCoroutines
From Java to Kotlin beyond alt+shift+cmd+k - Kotlin Community Conf MilanFabio Collini
Kotlin is a first-class language for Android development since Google I/O 2017. And it’s here to stay!
Thanks to Android Studio it’s really easy to introduce Kotlin in an existing project, the configuration is trivial and then we can convert Java classes to Kotlin using a Alt+Shift+Cmd+K. But the new syntax is the just beginning, using Kotlin we can improve our code making it more readable and simpler to write.
In this talk we’ll see how to use some Kotlin features (for example data classes, collections, coroutines and delegates) to simplify Android development comparing the code with the equivalent “modern” Java code. It’s not fair to compare Kotlin code with plain Java 6 code so the Java examples will use lambdas and some external libraries like RxJava and AutoValue.
From java to kotlin beyond alt+shift+cmd+k - Droidcon italyFabio Collini
Kotlin is a first-class language for Android development since Google I/O 2017. And it’s here to stay!
Thanks to Android Studio it’s really easy to introduce Kotlin in an existing project, the configuration is trivial and then we can convert Java classes to Kotlin using a Alt+Shift+Cmd+K. But the new syntax is the just beginning, using Kotlin we can improve our code making it more readable and simpler to write.
In this talk we’ll see how to use some Kotlin features (for example data classes, collections, coroutines and delegates) to simplify Android development comparing the code with the equivalent “modern” Java code. It’s not fair to compare Kotlin code with plain Java 6 code so the Java examples will use lambdas and some external libraries like RxJava and AutoValue.
Async code on kotlin: rx java or/and coroutines - Kotlin Night TurinFabio Collini
It’s never easy to write async code but luckily there are many libraries to manage asynchronicity without adding too much complexity. In the last years RxJava and the other ReactiveX libraries have been very popular but lately there is a new way to manage async code in Kotlin: the coroutines. In this talk we’ll pros and cons of there two approaches and how to leverage them to simplify asynchronous code on Android.
Do they solve the same problem? Can we use them together? Which one can be used to write functional code? How can we use them effectively in Android development?
Spoiler alert: They are both great!
In this talk we’ll see how to solve common problems using RxJava or Coroutines, starting from basic concepts (for example the Retrofit support and how to cancel a task) to some more advanced (like threading, error management and how to combine multiple tasks).
All example of the talk are available on this repository:
https://github.com/fabioCollini/RxJavaVsCoroutines
Understanding the assembly generated by Go programs can help you better understand the language, it's runtime, and how things operate behind the scenes.
날이 갈수록 쏟아지는 모던 프로그래밍 언어들, 안드로이드 앱 개발자에겐 꿈과 같은 이야기였다고요? 이제는 더 이상 꿈이 아닙니다.
이 세션에서는 구글 I/O 2017에서 안드로이드의 공식 지원 언어로 발표된 코틀린에 대해 간략히 알아보고, 실제 애플리케이션에 적용한 사례를 함께 소개합니다.
Google I/O 2017 Extended Seoul
2017.07.02
안드로이드 앱 개발시 필요한 여러 기능, 여러분은 어떻게 구현하고 계신가요?
모든 기능을 이태리 장인처럼 한 땀 한 땀 구현할 생각에 고민하고 계시진 않나요?
이제 더 이상 혼자 고민하지 마세요.
전 세계의 개발자들이 모여 만들어가는 오픈소스 라이브러리와 함께라면, 더 이상 혼자가 아닙니다. 여러 사람들의 힘으로 만들어진 라이브러리를 사용하여 원하는 기능을 쉽게 구현하세요.
오픈소스 라이브러리에 필요한 기능이 없나요? 이제 당신이 주인공이 될 차례입니다.
필요한 기능을 추가하여 라이브러리를 향상시키세요!
이 세션에서는 앱 개발시 각 분야별로 유용하게 사용할 수 있는 오픈소스 라이브러리의 종류를 알아보고, 간단한 사용 방법을 알아봅니다.
더불어, 오픈소스 라이브러리에 기여하는 여러 방법에 대해서도 함께 알아봅니다.
GDG DevFest Seoul 2015
2016.11.5
Understanding the assembly generated by Go programs can help you better understand the language, it's runtime, and how things operate behind the scenes.
날이 갈수록 쏟아지는 모던 프로그래밍 언어들, 안드로이드 앱 개발자에겐 꿈과 같은 이야기였다고요? 이제는 더 이상 꿈이 아닙니다.
이 세션에서는 구글 I/O 2017에서 안드로이드의 공식 지원 언어로 발표된 코틀린에 대해 간략히 알아보고, 실제 애플리케이션에 적용한 사례를 함께 소개합니다.
Google I/O 2017 Extended Seoul
2017.07.02
안드로이드 앱 개발시 필요한 여러 기능, 여러분은 어떻게 구현하고 계신가요?
모든 기능을 이태리 장인처럼 한 땀 한 땀 구현할 생각에 고민하고 계시진 않나요?
이제 더 이상 혼자 고민하지 마세요.
전 세계의 개발자들이 모여 만들어가는 오픈소스 라이브러리와 함께라면, 더 이상 혼자가 아닙니다. 여러 사람들의 힘으로 만들어진 라이브러리를 사용하여 원하는 기능을 쉽게 구현하세요.
오픈소스 라이브러리에 필요한 기능이 없나요? 이제 당신이 주인공이 될 차례입니다.
필요한 기능을 추가하여 라이브러리를 향상시키세요!
이 세션에서는 앱 개발시 각 분야별로 유용하게 사용할 수 있는 오픈소스 라이브러리의 종류를 알아보고, 간단한 사용 방법을 알아봅니다.
더불어, 오픈소스 라이브러리에 기여하는 여러 방법에 대해서도 함께 알아봅니다.
GDG DevFest Seoul 2015
2016.11.5
Не так давно вышел C# 6, основанный на новом компиляторе Roslyn. Обновление языка содержит большое количество приятных синтаксических конструкций, которые упрощают написание кода и делают его более лаконичным. Но Microsoft на этом не успокоились: прямо сейчас ведётся работа над 7-ой версией языка, которую планируют сделать ещё удобнее, благодаря реализации современных тенденций написания кода. В этом докладе мы поговорим о том, что может войти в C# 7. В числе прочего будут обсуждаться Tuples, Pattern matching, Records / algebraic data types, Nullability tracking и многое другое.
Twitter Author Prediction from Tweets using Bayesian NetworkHendy Irawan
Can We Predict the Author from a Tweet?
Most authors have a distinct writing style
... And unique topics to talk about
... And signature distribution of words used to tweet
Can we train Bayesian Network so that occurrence of words in a tweet can be used to infer the author of that tweet?
In summary: YES!
Disclaimer: Accuracy varies
In a test suite with @dakwatuna vs @farhatabbaslaw (very different tweet topics) – 100% prediction accuracy is achieved
This is my attempt at a look at some of the features of C++11, and more importantly, describing some of the style changes in C++11 that will make programmers more productive and programs more efficient.
C++ BinaryTree Help Creating main function for Trees...Here are .pdfforecastfashions
C++ BinaryTree Help : Creating main function for Trees...
Here are the header files :
PrintExpressionTour.H:
#ifndef _PRINTEXPRESSIONTOUR_H_
#define _PRINTEXPRESSIONTOUR_H_
#include \"EulerTour.h\"
#include
template
class PrintExpressionTour : public EulerTour {
protected: // ...same type name shortcuts as in EvaluateExpressionTour
public:
inline void execute( const BinaryTree& T ) { // execute the tour
initialize( T );
std::cout << \"Expression: \"; eulerTour( T.root() ); std::cout << std::endl;
}
protected: // leaf: print value
virtual void visitExternal( const Position& p, Result& r ) const {
std::cout << *p;
}
// left: open new expression
virtual void visitLeft( const Position& p, Result& r ) const {
std::cout << \"(\";
}
// below: print operator
virtual void visitBelow( const Position& p, Result& r ) const {
std::cout << *p;
}
// right: close expression
virtual void visitRight( const BinaryTree::Position& p, Result& r ) const {
std::cout << \")\";
}
};
#endif // _PRINTEXPRESSIONTOUR_H_
BinaryTree.h:
#ifndef _BINARYTREE_H_
#define _BINARYTREE_H_
#include
#include
typedef std::string Elem; // base element type
class BinaryTree {
protected:
struct Node { // a node of the tree
Elem elt; // element value
Node* par; // parent
Node* left; // left child
Node* right; // right child
Node() : elt(), par( NULL ), left( NULL ), right( NULL ) {} // constructor
};
public:
class Position { // position in the tree
private:
Node* v; // pointer to the node
public:
Position( Node* _v = NULL ) : v( _v ) {} // constructor
Elem& operator*() const // get element
{
return v->elt;
}
Position left() const // get left child
{
return Position( v->left );
}
Position right() const // get right child
{
return Position( v->right );
}
Position parent() const // get parent
{
return Position( v->par );
}
bool isRoot() const // root of the tree?
{
return v->par == NULL;
}
bool isExternal() const // an external node?
{
return v->left == NULL && v->right == NULL;
}
friend class BinaryTree; // give tree access
};
typedef std::list PositionList; // list of positions
public:
BinaryTree(); // constructor
int size() const; // number of nodes
bool empty() const; // is tree empty?
Position root() const; // get the root
PositionList positions() const; // list of nodes
void addRoot(); // add root to empty tree
void expandExternal( const Position& p ); // expand external node
Position removeAboveExternal( const Position& p ); // remove p and parent
// housekeeping functions omitted...
protected: // local utilities
void preorder( Node* v, PositionList& pl ) const; // preorder utility
private:
Node* _root; // pointer to the root
int n; // number of nodes
};
#endif // _BINARYTREE_H_
EulerTour.h:
#ifndef _EULERTOUR_H_
#define _EULERTOUR_H_
#include \"BinaryTree.h\"
template // element and result types
class EulerTour { // a template for Euler tour
protected:
struct Result { // stores tour results
R leftResult; // result from left subtree
R rightResult; // result from right subtree
R finalR.
#LibreOffice is a #free and powerful #officesuite, and a successor to #OpenOffice.org (commonly known as #OpenOffice).
Its clean interface and feature-rich tools help you unleash your #creativity and enhance your #productivity. #LibreOffice includes several applications that make it the most versatile #Free and #OpenSource office suite on the market: #Writer (#wordprocessing), Calc (#spreadsheets), Impress (presentations), #Draw (vector graphics and #flowcharts), Base (#databases), and #Math (#formula editing).
#LibreOffice is #community-driven and #developed #software, and is a project of the #nonprofit #organization, The #Document #Foundation. #LibreOffice is free and #opensource software, originally based on #OpenOffice.org (commonly known as OpenOffice), and is the most actively developed OpenOffice.org successor project.
#LibreOffice is developed by users who, just like you, believe in the principles of #FreeSoftware and in sharing their work with the world in non-restrictive ways.
This office suite can easily replace costly paid option available. If you need a good office suite which is easily and freely available you can for sure give a try and.
It has following features/components for making your work easy and cost free and vendor independent:
Writer – word processor
Calc – spreadsheet
Impress – presentations
Draw – diagrams
Base – database
Math – formula editor
Charts
Better #collaboration
#Sharingdocuments and edits with other users have been enhanced and well tracked, to make modifications more clear.
Work faster in Calc
Working with #Spreadsheet has the new #Bash-like autocompletion feature helps you to input data in a snap.
#Barcodes and borders
We can now insert #barcodes into your #documents with just a few clicks
For Full information about the release you can visit if your are interested.
https://wiki.documentfoundation.org/ReleaseNotes/7.3
If you need any help you can reach out here
https://twitter.com/libreoffice
https://blog.documentfoundation.org/
https://www.facebook.com/libreoffice.org
https://twitter.com/AskLibreOffice
What Next :
#LibreOffice 7.4 – is next major release in August, you can try installing and test it and help the developers to find if any bug or issue or need any improvement.
Let's install and explore.
We will now install it in #Ubuntu and explore this a bit
#SystemArchitecture Series: #Kerberos Architecture Component and communication flow #architecture
#Kerberos is a ticketing-based #authentication #system, based on the use of #symmetric keys. #Kerberos uses tickets to provide #authentication to resources instead of #passwords. This eliminates the threat of #password stealing via #networksniffing. One of the biggest benefits of #Kerberos is its ability to provide single sign-on (#SSO). Once you log into your #Kerberos environment, you will be automatically logged into other applications in the environment.
To help provide a secure environment, #Kerberos makes use of Mutual #Authentication. In Mutual #Authentication, both the #server and the #client must be authenticated. The client knows that the server can be trusted, and the server knows that the client can be trusted. This #authentication helps prevent man-in-the-middle attacks and #spoofing. #Kerberos is also time sensitive. The tickets in a #Kerberosenvironment must be renewed periodically or they will expire.
1. i s
th
Writing Codes in in
a nd
d ,
in
m
to
es
m
co
n
a tio
lic
a pp
eb
w
i ze
-s
n et
la ing
p tt
i
rm s f
te t i
e i
Th se
ca
DWIVEDISHASHWAT@GMAIL.COM
13. System.out.println("===========get one record========");
HBaseTest.getOneRecord(tablename, "zkb");
System.out.println("===========show all record========");
HBaseTest.getAllRecord(tablename);
System.out.println("===========del one record========");
HBaseTest.delRecord(tablename, "baoniu");
HBaseTest.getAllRecord(tablename);
System.out.println("===========show all record========");
HBaseTest.getAllRecord(tablename);
} catch (Exception e) {
e.printStackTrace();
}
}}
14. Sqoop (“SQL-to-Hadoop”) is a straightforward command-
line tool with the following capabilities:
Imports individual tables or entire databases to files in
HDFS
Generates Java classes to allow you to interact with your
imported data
Provides the ability to import from SQL databases
straight into your Hive data warehouse
15. sqoop --connect jdbc:mysql://db.example.com/website --table USERS --local
--hive-import
This would connect to the MySQL database on this server and
import the USERS table into HDFS. The –-local option instructs
Sqoop to take advantage of a local MySQL connection which
performs very well. The –-hive-import option means that after
reading the data into HDFS, Sqoop will connect to the Hive
metastore, create a table named USERS with the same
columns and types (translated into their closest analogues in
Hive), and load the data into the Hive warehouse directory on
HDFS
16. Suppose you wanted to work with this data in MapReduce and
weren’t concerned with Hive. When storing this table in HDFS,
you might want to take advantage of compression, so you’d like
to be able to store the data in Sequence Files.
sqoop --connect jdbc:mysql://db.example.com/website --table
USERS --as-sequencefile
Sqoop includes some other commands which allow you to inspect
the database you are working with. For example, you can list
the available database schemas (with the sqoop-list-databases
tool) and tables within a schema (with the sqoop-list-tables
tool). Sqoop also includes a primitive SQL execution shell (the
sqoop-eval tool)
17. sqoop help
usage: sqoop COMMAND [ARGS]
Available commands:
codegen Generate code to interact with database records
create-hive-table Import a table definition into Hive
eval Evaluate a SQL statement and display the results
export Export an HDFS directory to a database table
help List available commands
import Import a table from a database to HDFS
import-all-tables Import tables from a database to HDFS
list-databases List available databases on a server
list-tables List available tables in a database
version Display version information
See 'sqoop help COMMAND' for information on a specific command.
18. sqoop help import
usage: sqoop import [GENERIC-ARGS] [TOOL-ARGS]
Common arguments:
--connect <jdbc-uri> Specify JDBC connect string
--connect-manager <jdbc-uri> Specify connection manager class to use
--driver <class-name> Manually specify JDBC driver class to use
--hadoop-home <dir> Override $HADOOP_HOME
--help Print usage instructions
-P Read password from console
--password <password> Set authentication password
--username <username> Set authentication username
--verbose Print more information while working