Skip to content

Instantly share code, notes, and snippets.

View calindotgabriel's full-sized avatar
🦁
typing...

Calin Gabriel calindotgabriel

🦁
typing...
  • Endava
  • Cluj-Napoca
View GitHub Profile
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder(this)
.name(Realm.DEFAULT_REALM_NAME)
.schemaVersion(0)
.deleteRealmIfMigrationNeeded()
public class EventAdapter extends RecyclerView.Adapter<EventAdapter.ViewHolder> {
private List<Event> events;
public EventAdapter(List<Event> events) {
this.events = events;
}
@Override
public EventAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
CREATE
/*[ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
[DEFINER = { user | CURRENT_USER }]
[SQL SECURITY { DEFINER | INVOKER }]*/
VIEW `SalesViewStage`.`followup_notes_seen_ex`
AS
(SELECT
ID,
ALERT_ID,
DELIMITER $$
DROP PROCEDURE IF EXISTS WEB_SPS_PROJECTS_FOR_CALENDAR_EX $$
CREATE
/*[DEFINER = { user | CURRENT_USER }]*/
PROCEDURE `SalesViewStage`.`WEB_SPS_PROJECTS_FOR_CALENDAR_EX`(IN_USER_ID BIGINT, IN_CONTACT_ID BIGINT,
IN_STATUS BIGINT, IN_MONTH INT, IN_YEAR INT, IN_TYPE SMALLINT, IN_DATE VARCHAR(50))
/*LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
public class NetworkService {
@IntDef({OK, SV_DOWN, SV_INVALID, UNKNOWN})
@Retention(RetentionPolicy.SOURCE)
public @interface Response{}
public static final int OK = 0;
public static final int SV_DOWN = 1;
public static final int SV_INVALID = 2;
public static final int UNKNOWN = 3;
class Response {
public static final int OK = 0;
public static final int SV_DOWN = 1;
public static final int SV_INVALID = 2;
public static final int UNKNOWN = 3;
}
public final class Response extends java.lang.Enum<Response> {
public static final Response OK;
public static final Response SV_DOWN;
public static final Response SV_INVALID;
public static final Response UNKNOWN;
public static Response[] values();
public static Response valueOf(java.lang.String);
static{};
}
public enum Response {
OK, SV_DOWN, SV_INVALID, UNKNOWN;
}
String myMapID = "yourMapID";
String accesToken = "yourAccesToken";
MapBoxOnlineTileProvider provider = new MapBoxOnlineTileProvider(myMapID, accesToken);
mMap.addTileOverlay(new TileOverlayOptions()
.tileProvider(provider));
package com.tapptitude.mapgpx.gpx.mapbox;
import android.util.Log;
import java.net.MalformedURLException;
import java.net.URL;
import com.google.android.gms.maps.model.UrlTileProvider;
public class MapBoxOnlineTileProvider extends UrlTileProvider {