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
try { | |
File appDbFile = getActivity().getApplicationContext().getDatabasePath("myDatabase"); | |
File sourceDbFile = new File("/sdcard/downloads/myDatabase.db"); | |
//Make sure the directory and file exist | |
File dir = new File("/data/data/" +getActivity().getPackageName() + "/databases/"); | |
if (!dir.exists()) { | |
boolean result = dir.mkdir(); |
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
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
View decorView = getWindow().getDecorView(); | |
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN; | |
decorView.setSystemUiVisibility(uiOptions); | |
} |
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 SampleIssueListener extends AbstractIssueEventListener { | |
@Override | |
void workflowEvent(IssueEvent event) { | |
//Prepare and Validate update/transition | |
//Create a worker thread that waits for 2 seconds before performing the transition. | |
ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor(); | |
Runnable runnableUpdate = new Runnable() { | |
@Override | |
public void run() { |
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
try { | |
File configFile = new File(Environment.getExternalStorageDirectory().getPath() + "/Android/data/" + getPackageName() + "/config.xml"); | |
InputStream in = new FileInputStream(configFile); | |
String ns = null; | |
SharedPreferences.Editor editor = appPreferences.edit(); | |
//editor.clear(); | |
boolean prefsEmpty = false; | |
if (!appPreferences.contains("pref_key_optionx")) { | |
prefsEmpty = true; |
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
/** | |
* Created by Jon-Luke.West on 4/6/2015. | |
*/ | |
public class FullscreenWebChromeClient extends WebChromeClient { | |
private View mVideoProgressView; | |
private View mCustomView; | |
private WebView webView; | |
private FrameLayout customViewContainer; | |
private WebChromeClient.CustomViewCallback customViewCallback; |
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
var canvas = new Canvas(); | |
canvas.SetViewport(256, 256); | |
var bitMatrix = new bool[256][]; //bool[256][256] | |
//Generate the bitMatrix | |
//... | |
var blackPaint = new Paint {Color = Color.Black}; | |
var whitePaint = new Paint {Color = Color.White}; | |
for (var x = 0; x < 256; x++) { | |
for (var y = 0; y < 256; y++) { | |
canvas.DrawPoint(x,y, bitMatrix[x][y] ? blackPaint : whitePaint); |
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
## Macro title: Question | |
## Macro has a body: Y | |
## Body processing: rendered | |
## Output: block | |
## | |
## Developed by: Jon-Luke West | |
## Date created: 01/12/2021 | |
## Installed by: Jon-Luke West | |
## Highlights content as a question with a purple background |