Ruby
arr1 = [1, 2, 3, 4, 5]
arr2 = [5, 6, 7, 8, 9]
arr3 = [10, 11, 12, 13, 14]
(arr1 & arr2).empty? # => false
(arr1 & arr3).empty? # => true
Ruby on Rails
PosgreSQL
$ psql -U postgres_user -d database_name -a -f data.sql
MeteorJS
- Cross Origin Cors, add this code in server directory
WebApp.connectHandlers.use(function(req, res, next) {
res.setHeader("Access-Control-Allow-Origin", "*");
return next();
});
GO
Atom.io
AngularJS
MySQL
# To export to file (data only)
mysqldump -u [user] -p[pass] --no-create-info mydb > mydb.sql
# To export to file (structure only)
mysqldump -u [user] -p[pass] --no-data mydb > mydb.sql
# To import to database
mysql -u [user] -p[pass] mydb < mydb.sql