Dribbble shot: http://dribbble.com/shots/1316513
A Pen by Katy DeCorah on CodePen.
function getIp() { | |
if (getenv ( "HTTP_CLIENT_IP" ) && strcasecmp ( getenv ( "HTTP_CLIENT_IP" ), "unknown" )) { | |
$ip = getenv ( "HTTP_CLIENT_IP" ); | |
} else if (getenv ( "HTTP_X_FORWARDED_FOR" ) && strcasecmp ( getenv ( "HTTP_X_FORWARDED_FOR" ), "unknown" )) { | |
$ip = getenv ( "HTTP_X_FORWARDED_FOR" ); | |
} else if (getenv ( "REMOTE_ADDR" ) && strcasecmp ( getenv ( "REMOTE_ADDR" ), "unknown" )) { | |
$ip = getenv ( "REMOTE_ADDR" ); | |
} else if (isset ( $_SERVER ['REMOTE_ADDR'] ) && $_SERVER ['REMOTE_ADDR'] && strcasecmp ( $_SERVER ['REMOTE_ADDR'], "unknown" )) { | |
$ip = $_SERVER ['REMOTE_ADDR']; | |
} else { |
NSDate *selected = [_datePicker date]; | |
NSTimeZone *zone = [NSTimeZone systemTimeZone]; | |
NSInteger interval = [zone secondsFromGMTForDate: selected]; | |
NSDate *localeDate = [selected dateByAddingTimeInterval: interval]; |
body { | |
background:#e2b29f; | |
font-size:120%; | |
} | |
.rabbit { | |
width:5em; | |
height:3em; | |
background:#ffffff; | |
border-radius:70% 90% 60% 50%; |
Dribbble shot: http://dribbble.com/shots/1316513
A Pen by Katy DeCorah on CodePen.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script type='text/javascript'> | |
var reg=/^[\w\_\-]{6,20}$/; | |
alert(reg.test("12345")); | |
alert(reg.test("12345+")); | |
alert(reg.test("12345a-_")); | |
</script> |
package net.jthoenes.blog.spike.lambda; | |
import java.util.Arrays; | |
import java.util.List; | |
public class LambdaIntro { | |
public static interface ItemWithIndexVisitor<E> { | |
public void visit(E item, int index); |
<style name="MyTheme" parent="@android:style/Theme.Light"> | |
<item name="android:windowNoTitle">true</item> | |
<item name="android:windowAnimationStyle">@style/MyAnimation.Window</item> | |
</style> | |
<!-- Animations --> | |
<style name="MyAnimation" /> | |
<!-- Animations for a non-full-screen window or activity. --> | |
<style name="MyAnimation.Window" parent="@android:style/Animation"> |
Intent intent; | |
if (android.os.Build.VERSION.SDK_INT >= 9) { | |
/* on 2.3 and newer, use APPLICATION_DETAILS_SETTINGS with proper URI */ | |
Uri packageURI = Uri.parse("package:" + pkgName); | |
intent = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS", packageURI); | |
ctx.startActivity(intent); | |
} else { | |
/* on older Androids, use trick to show app details */ | |
intent = new Intent(Intent.ACTION_VIEW); |