/[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]/
Arabic (0600—06FF, 225 characters)
Arabic Supplement (0750—077F, 48 characters)
#!/usr/bin/env ruby | |
# Full Contol on Ethnet, IP & TCP headers. Play with it ;) | |
# to test it: nc -lvp 4444 | |
# as root: tcpdump -nvvvv 'tcp port 4444' -i wlan0 # change wlan0 to your interface | |
# or use packetfu to monitor as tcpdump | |
# on OSX exchange wlan0 to en0 | |
## cap = PacketFu::Capture.new(:iface => 'wlan0' , :promisc=> true) | |
## cap.show_live(:filter => 'tcp and port 4444') | |
# libpcap should be installed | |
# gem install pcaprub packetfu |
// Here we demonstrate working with Optionals in Swift | |
// in Swift, Optionals are basically the type which is allowed to hold (reference to be more accurate) a null (nil). | |
// We use "?" to declare an optional | |
var age: Int? | |
if age == nil { | |
// Since age is nil | |
// This will be executed | |
print("There is no age") |
// Here we demonstrate functions in swift | |
// Concentrating on three points: | |
// * Pass-by-Value | |
// * Pass-by-Reference | |
// * External Name / Internal Name | |
// | |
// Drop this in a playground to see instant results. | |
func combineStr(str1: String, str2: String) -> String { |
/* | |
To run this: | |
open command prompt execute 'swipl' | |
then run ['path/to/this/file.pl']. | |
then query away. | |
*/ | |
% FACTS | |
likes(jana, omar). | |
likes(omar, jana). |
# This URL was useful: https://gist.github.com/iangreenleaf/b206d09c587e8fc6399e | |
############################################################ | |
################### ROUTES #################### | |
############################################################ | |
get 'welcome/home', to: 'welcome#home' # HTTP GET /welcome/home to controller: welcome action(Method): home. | |
# Should have controller WelcomeController < ApplicationController | |
# controller should have action(Method) home | |
# should have a template (view) in app/views/welcome/home.html.erb |
<?php | |
### | |
# NOTE: This code won't work with PHP 7. | |
# MySQL is deprecated and will be removed in PHP 7 checkout MySQLi. | |
### | |
############## JUST FILL THESE VARIABLES ###### | |
$dbname = 'name'; # Name of the Database in the MySQL Server | |
$dbuser = 'user'; # User name of the database in MySQL | |
$dbpass = 'pass'; # Password for the user of in database in MySQL | |
$dbhost = 'host'; # url/link to database |
heroku pg:reset DATABASE --confirm db-name
heroku pg:push local-db-name heroku-db-name --app app-name
heroku run rake db:migrate