This file contains 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
#!/usr/bin/env python | |
""" | |
Check that a particular email address exists. | |
Adam Blinkinsop <[email protected]> | |
WARNING: | |
Checking email addresses in this way is not recommended, and will lead to | |
your site being listed in RBLs as a source of abusive traffic. Mail server | |
admins do like it when they get connections that don't result in email being | |
sent, because spammers often use this technique to verify email addresses. |
This file contains 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
public static final int FREQUENCY = 44100; | |
public static final int CHANNEL_CONFIGURATION = AudioFormat.CHANNEL_CONFIGURATION_MONO; | |
public static final int AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT; | |
private void recordSound(){ | |
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/"+RECORDED_FILENAME); | |
// Delete any previous recording. | |
if (file.exists()) |
This file contains 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
private void mixFiles(){ | |
try { | |
InputStream is1 = getResources().openRawResource(R.raw.test1); | |
List<Short> music1 = createMusicArray(is1); | |
InputStream is2 = getResources().openRawResource(R.raw.test2); | |
List<Short> music2 = createMusicArray(is2); | |
InputStream is3 = getResources().openRawResource(R.raw.test3); | |
List<Short> music3 = createMusicArray(is3); |
This file contains 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 some.awesome.package; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.view.animation.Animation; | |
import android.view.animation.Animation.AnimationListener; | |
import android.view.animation.Transformation; | |
import android.widget.RelativeLayout; |
This file contains 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
/** | |
* Copyright (c) 2013 Xcellent Creations, Inc. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
This file contains 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
private Point getScreenSize() { | |
Point size = new Point(); | |
WindowManager w = getWindowManager(); | |
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { | |
w.getDefaultDisplay().getSize(size); | |
}else{ | |
Display d = w.getDefaultDisplay(); | |
size.x = d.getWidth(); | |
size.y = d.getHeight(); | |
} |
This file contains 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
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Random; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import android.app.Activity; | |
import android.app.PendingIntent; |
This file contains 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
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.widget.SeekBar; | |
public class FloatSeekBar extends SeekBar { | |
private float max = 1.0f; | |
private float min = 0.0f; | |
public FloatSeekBar(Context context, AttributeSet attrs, int defStyle) { |
This file contains 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
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.ColorMatrix; | |
import android.graphics.ColorMatrixColorFilter; | |
import android.graphics.Matrix; |
This file contains 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 com.sjl.util; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.util.Log; | |
import java.util.List; |
OlderNewer