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
/* | |
-How to use Custom CSS for the Gamepad Viewer- | |
http://mrmcpowned.com/gamepad | |
Enabling a custom CSS is as easy as adding &css=[url to css file] | |
to the end of the url like so: | |
http://mrmcpowned.com/gamepad?p=1&css=https://gist.github.com/anonymous/526491dc02014099cd14/raw/d7bb0477ba984f794497f3f0f82cb33484dc7889/ps3.css | |
If you're going to be using custom CSS for the gamepad viewer | |
to design your own skin, we're assuming you have some sort of |
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 final class MyPlaylistEventListener implements PlaylistEventListener { | |
@Override | |
public void onNext() { | |
log("NEXT VIDEO"); | |
} | |
@Override | |
public void onPrevious() { | |
log("PREVIOUS VIDEO"); | |
} |
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
@Action(GimbalKeys.ROTATE) | |
public void rotate(InnerCallback callback, final Rotation rotation) { | |
if (rotation == null) { | |
CallbackUtils.onFailure(callback, DJIGimbalError.COMMON_PARAM_ILLEGAL); | |
return; | |
} | |
if (rotation.getMode() == null) { | |
callback.onFails(DJIError.COMMON_PARAM_ILLEGAL); |
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 edu.southern.cs.circ.devoted; | |
import android.app.Activity; | |
import android.app.FragmentManager; | |
import android.content.SharedPreferences; | |
import android.os.Bundle; | |
import android.preference.PreferenceManager; | |
import android.view.Menu; | |
import android.view.MenuInflater; |
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
Android: | |
Edittext Autocapitalize, add this to properties of Edittext: | |
android:inputType="textCapSentences" | |
ListView context Menu: | |
//********************************* | |
//Inside onCreate | |
//Get a hold of the list | |
ListView list = (ListView) findViewById(R.id.list); | |
//Register and handle longclick |
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 HelloWorld{ | |
public static void main(String []args){ | |
//test 2^2 | |
System.out.println("Test power(2,2)"); | |
System.out.println(power(2,2)); | |
//test 5^3 | |
System.out.println("Test power(5,3)"); | |
System.out.println(power(5,3)); | |
} |
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 HelloWorld{ | |
public static void main(String []args){ | |
//test with 5 | |
System.out.println("Test print(5)"); | |
print(5); | |
//test with 10 | |
System.out.println("Test print(10)"); | |
print(10); |
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
//first problem | |
int min (array a){ | |
if (a.size() == 1 ) | |
return a[0] | |
else | |
{ | |
if (a[0] < a[a.size()-1] ) | |
{ | |
//copy everything but the last element to new array b | |
create a new array b with size = a.size()-1; |
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
#include <iostream> | |
using namespace std; | |
//this method complexity is O(n) time and O(1) space | |
void reverse(char *str) { | |
cout<<str<<endl; | |
char *end=str; | |
while(*end) | |
end++; | |
end--; |
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
#include <iostream> | |
using namespace std; | |
//this method complexity is O(n) time and O(1) space | |
bool check_unique_string(string to_be_checked){ | |
bool check_array[256]={}; | |
for(int i=0;i<to_be_checked.length();i++){ | |
if (check_array[to_be_checked[i]]) | |
return false; | |
else check_array[to_be_checked[i]] = true; |
NewerOlder