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
| #!/usr/bin/env ruby | |
| # Replace the following by the url given to you in your project's edit page | |
| POST_RECEIVE_URL = 'http://integrity.url.com/project_name/push' | |
| # Set user and password if Integrity is protected with basic auth | |
| USER = "***" | |
| PASSWORD = "***" | |
| ####################################################################### |
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
| // problem when closing the app, this one crashed without any reason | |
| bindService(new Intent(this, PlayerService.class), this.playerServiceConnection, Context.BIND_AUTO_CREATE); | |
| // solution | |
| bindService(new Intent(this, PlayerService.class), this.playerServiceConnection, Context.BIND_DEBUG_UNBIND); |
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 MyActivity extends Activity { | |
| // define the wakeLock as attribute | |
| PowerManager.WakeLock wakeLock ; | |
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.main); |
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
| CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:9803") ; | |
| CoordinateReferenceSystem targetCRS = DefaultGeographicCRS.WGS84; | |
| MathTransform tr = CRS.findMathTransform(sourceCRS, targetCRS); | |
| DirectPosition sourcePt = new GeneralDirectPosition(coordinates.getDouble(0), coordinates.getDouble(1), 0); | |
| DirectPosition targetPt = tr.transform(sourcePt, null); | |
| System.out.println("Source point: " + sourcePt); | |
| System.out.println("Target point: " + targetPt); |
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 Point lambert72toWGS84(double x, double y) { | |
| double newLongitude; | |
| double newLatitude; | |
| double n = 0.77164219; | |
| double F = 1.81329763; | |
| double thetaFudge = 0.00014204; | |
| double e = 0.08199189; | |
| double a = 6378388; |
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
| package be.agherschon.moveinbxl.maps; | |
| /** | |
| * Represents a geographical point. | |
| * As it is used with Google Maps, it has two more getters, which returns the values in x^E6. | |
| * @author Alexandre Gherschon | |
| */ | |
| public class Point { | |
| private double latitude ; | |
| private double longitude; |
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
| AlertDialog alertDialog = new AlertDialog.Builder(this).create(); | |
| alertDialog.setTitle(this.getResources().getString(R.string.no_internet_dialog_title)); | |
| alertDialog.setMessage(this.getResources().getString(R.string.no_internet_dialog_message)); | |
| alertDialog.setCancelable(false); | |
| alertDialog.setButton(this.getResources().getString(R.string.no_internet_dialog_button_text), new OnClickListener() { | |
| public void onClick(DialogInterface dialog, int which) { | |
| // I just close the app if there is no internet connection | |
| OxydroidActivity.this.finish(); |
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
| http://myapp.com/users.xml |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <classpath> | |
| <classpathentry kind="src" path="packages/apps/Bluetooth/src"/> | |
| <classpathentry kind="src" path="packages/apps/Browser/src"/> | |
| <classpathentry kind="src" path="packages/apps/Calendar/src"/> | |
| <classpathentry kind="src" path="packages/apps/Calculator/src"/> | |
| <classpathentry kind="src" path="packages/apps/Camera/src"/> | |
| <classpathentry kind="src" path="packages/apps/CertInstaller/src"/> | |
| <classpathentry kind="src" path="packages/apps/Contacts/src"/> | |
| <classpathentry kind="src" path="packages/apps/DeskClock/src"/> |
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
| class Android | |
| def self.verify(data , sig) | |
| official_key = "mykeygoeshere" | |
| key = OpenSSL::PKey::RSA.new(Base64.decode64(official_key)) | |
| verified = key.verify( OpenSSL::Digest::SHA1.new, Base64.decode64(sig), data ) | |
| end | |
| end | |
| end |
OlderNewer