WebGL experiment using ThreeJS. Move the fan and press to make wind, the lion will surely appreciate.
A Pen by Karim Maaloul on CodePen.
ListView lv = (ListView)findViewById(R.id.myListView); // your listview inside scrollview | |
lv.setOnTouchListener(new ListView.OnTouchListener() { | |
@Override | |
public boolean onTouch(View v, MotionEvent event) { | |
int action = event.getAction(); | |
switch (action) { | |
case MotionEvent.ACTION_DOWN: | |
// Disallow ScrollView to intercept touch events. | |
v.getParent().requestDisallowInterceptTouchEvent(true); | |
break; |
WebGL experiment using ThreeJS. Move the fan and press to make wind, the lion will surely appreciate.
A Pen by Karim Maaloul on CodePen.
<html> | |
<head> | |
<title>Clock :)</title> | |
</head> | |
<body> | |
<div id='clock_1'></div> | |
<div id='clock_2'></div> | |
</body> | |
</html> |
#threads | |
import thread | |
import threading | |
import time | |
class ThreadTask(threading.Thread): | |
def __init__(self,name,delay,callback): | |
threading.Thread.__init__(self) | |
upstream app_domain{ | |
server 127.0.0.1:4000; | |
} | |
server{ | |
listen 0.0.0.0:80; | |
server_name heracle.service.dev; | |
access_log /var/log/nginx/app_domain_access; |
function mcd() | |
{ | |
var mcd = 1; | |
var tmpMcd = 1; | |
var values = [].slice.call(arguments); | |
values = values.sort(function(a,b){ return a - b; }); | |
var minVal = values[0]; | |
for(i=0;i<=minVal;i++) | |
{ |
#! python | |
import zmq | |
context = zmq.Context() | |
socket = context.socket(zmq.REQ) | |
socket.connect('tcp://127.0.0.1:6000') |
server{ | |
listen 80; | |
root /var/www/path/public; | |
index index.php index.html index.htm; | |
server_name server_name.dev; | |
location / { | |
try_files $uri $uri/ /index.php; |
server { | |
listen 80; | |
server_name example.org; | |
access_log /var/log/nginx/example.log; | |
location / { | |
proxy_pass http://127.0.0.1:8000; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
chkconfig --levels 235 mysqld on | |
mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak | |
sysv-rc-conf apache2 on ( for new versions of ubuntu ) |