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
local tx = actor.x + actor.vx | |
local ty = actor.y + actor.vy | |
-- check for collision | |
while is_solid_a(actor, tx, ty) do | |
if actor.x < tx then | |
tx -= 1 | |
elseif actor.x > tx then | |
tx += 1 |
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
public class Matchers { | |
private static final String TAG = Matchers.class.getSimpleName(); | |
public static Matcher<View> withTitle(final String expectedTitle) { | |
return new TypeSafeMatcher<View>() { | |
@Override | |
public void describeTo(Description description) { | |
} |
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
# ..... | |
# BEFORE | |
# ..... | |
android.applicationVariants.all { variant -> | |
variant.mergeResources.dependsOn { | |
if (project.hasProperty('jBuildNumber')) { | |
replaceHockeyAppBuildNumber(jBuildNumber) | |
} | |
} |
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
/*....*/ | |
@Override | |
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, | |
final Bundle savedInstanceState) { | |
return inflater.inflate(R.layout.fragment_server_console, null, false); | |
} | |
/*....*/ |
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
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 | |
#libz.so.1: cannot open shared object file: No such file or directory | |
sudo apt-get install lib32z1 | |
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
@RequestMapping(method=RequestMethod.POST, value="/emp") | |
public @ResponseBody Employee addEmp(@RequestBody Employee e) { | |
employeeDS.add(e); | |
return e; | |
} | |
@RequestMapping(method=RequestMethod.PUT, value="/emp/{id}") | |
public @ResponseBody Employee updateEmp( | |
@RequestBody Employee e, @PathVariable String id) { | |
employeeDS.update(e); |
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
android:fontFamily="sans-serif" // roboto regular | |
android:fontFamily="sans-serif-light" // roboto light | |
android:fontFamily="sans-serif-condensed" // roboto condensed | |
android:fontFamily="sans-serif-thin" // roboto thin (android 4.2) |
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
public static Bitmap getCroppedBitmap(Bitmap bitmap) { | |
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), | |
bitmap.getHeight(), Bitmap.Config.ARGB_8888); | |
Canvas canvas = new Canvas(output); | |
final int color = 0xff424242; | |
final Paint paint = new Paint(); | |
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); | |
paint.setAntiAlias(true); |