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 View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); | |
config.useAccelerometer = false; | |
config.useCompass = false; | |
config.useWakelock = true; | |
config.numSamples = 1; | |
config.resolutionStrategy = new ResolutionStrategy() { | |
@Override | |
public MeasuredDimension calcMeasures(int widthMeasureSpec, int heightMeasureSpec) { | |
int width = widthMeasureSpec; |
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
@Provider | |
public class BusinessExceptionMapper implements ExceptionMapper<BusinessException> { | |
private static final Logger log = Logger.getLogger(TestEndpoint.class.getName()); | |
private static final ResourceBundle resource = | |
ResourceBundle.getBundle("com.blogspot.avianey"); | |
@Override | |
public Response toResponse(BusinessException e) { |
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
openssl genrsa -out ca.key 2048 | |
openssl req -new -key ./ca.key -out ./ca.csr | |
openssl x509 -req -days 365 -in ./ca.csr -out ./ca.crt -signkey ./ca.key | |
openssl x509 -in ca.crt -text | |
openssl rsa -in ca.key -passin pass:XXXX -pubout -out ca.public.key |
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 math | |
class Planet(object): | |
def __init__(self, name, a, e, i, l, lp, ln, | |
ac, ec, ic, lc, lpc, lnc): | |
self.name = name | |
self.a = a | |
self.ac = ac | |
self.e = e |
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 com.badlogic.gdx.ApplicationListener; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.assets.AssetManager; | |
import com.badlogic.gdx.graphics.GL20; | |
import com.badlogic.gdx.graphics.g2d.TextureAtlas; | |
import com.badlogic.gdx.scenes.scene2d.Stage; | |
import com.badlogic.gdx.scenes.scene2d.ui.Image; | |
import com.badlogic.gdx.scenes.scene2d.ui.Label; | |
import com.badlogic.gdx.scenes.scene2d.ui.Skin; | |
import com.badlogic.gdx.scenes.scene2d.ui.Table; |
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 fr.pixelprose.count.generator; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Set; | |
import static com.google.common.base.Preconditions.checkArgument; | |
import static java.lang.Math.min; |
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
Make your Code Cleaner with Decorators | |
* https://medium.com/@NetanelBasal/javascript-make-your-code-cleaner-with-decorators-d34fc72af947#.9gq7z3rk4 | |
Making Magic with WebSockets and CSS3 | |
* https://medium.com/outsystems-engineering/making-magic-with-websockets-and-css3-ec22c1dcc8a8#.h52dbfbrq |
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
java -jar apktool.jar d 321.apk | |
java -jar apktool.jar b 321 -o 323.apk | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./your.keystore 323.apk alias | |
[android-sdk]/build-tools/27.0.2/zipalign -v 4 323.apk 323-aligned.apk |
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
class SampleCode { | |
public static void main(String[] args) { | |
// TODO | |
} | |
} |
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
TabLayout tabLayout = findViewById(R.id.tabs); | |
if (tabLayout != null) { | |
tabLayout.setupWithViewPager( | |
pager, | |
false // avoid listen for change of items in the adapter | |
); | |
try { | |
// Add custom tabs with managed click handler | |
Method m = tabLayout.getClass().getDeclaredMethod("createTabView", TabLayout.Tab.class); | |
m.setAccessible(true); |
OlderNewer