View binary_to_decimal.py
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
""" | |
To run: | |
- Download this code as .py | |
- Install python3 on your machine | |
- Open your CMD(Windows) or Terminal in Linux/MacOS and use the following command | |
python3 /Path/to/binary_to_decimal.py [COMMAND] [DECIMAL_NUMBER] | |
- COMMANDS | |
* -b : To convert decimal to binary | |
* -d : To convert binary to decimal |
View RecursionReverseString.java
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 class RecursionReverseString { | |
public static void main(String[] args){ | |
String value = "abcdefghijk"; | |
System.out.println(reverse(value.length()-1, value, "")); | |
} | |
public static String reverse(int l, String value, String r){ | |
if(l <0 ){ | |
return r; |
View omni_state.dart
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 ApiState<T> { | |
String message; | |
T data; | |
ApiStates state; | |
ApiState(this.state, this.data, this.message); | |
static ApiState<T> loading<T>() { | |
return ApiState<T>(ApiStates.Loading, null, null); | |
} |
View TimeOutService.java
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 devmike.leviapps.co.tensorlitepose.device; | |
import android.app.IntentService; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.CountDownTimer; | |
import android.os.Handler; | |
import android.os.HandlerThread; | |
import android.os.Message; | |
import android.os.SystemClock; |
View PartClickTextView.java
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 class PartClickTextView extends TextView{ | |
public static final String TAG = PartClickTextView.class.getSimpleName(); | |
private OnPartTextClickListener mListener; | |
public interface OnPartTextClickListener{ | |
void onPartTextClick(View view); | |
} | |
public void setOnPartTextClickListener(OnPartTextClickListener mCallback){ |
View gist:5a4f80c09e13e9e782bec723740265cd
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
// ConsoleApplication1.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
int _tmain() |