More snow in Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^ #start of the line | |
[_A-Za-z0-9-\\+]+ # must start with string in the bracket [ ], must contains one or more (+) | |
( # start of group #1 | |
\\.[_A-Za-z0-9-]+ # follow by a dot "." and string in the bracket [ ], must contains one or more (+) | |
)* # end of group #1, this group is optional (*) | |
@ # must contains a "@" symbol | |
[A-Za-z0-9-]+ # follow by string in the bracket [ ], must contains one or more (+) | |
( # start of group #2 - first level TLD checking | |
\\.[A-Za-z0-9]+ # follow by a dot "." and string in the bracket [ ], must contains one or more (+) | |
)* # end of group #2, this group is optional (*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WindowManager.LayoutParams params = new WindowManager.LayoutParams( | |
WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY, | |
WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, PixelFormat.TRANSLUCENT); | |
params.gravity = Gravity.CENTER; | |
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); | |
wm.addView(view, params); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Dribbble shot: http://dribbble.com/shots/1316513
A Pen by Katy DeCorah on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background:#e2b29f; | |
font-size:120%; | |
} | |
.rabbit { | |
width:5em; | |
height:3em; | |
background:#ffffff; | |
border-radius:70% 90% 60% 50%; |