code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/WaypointCreationRequest.java
Java
asf20
2,886
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/Track.java
Java
asf20
4,761
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksLocation.java
Java
asf20
1,550
package com.google.android.apps.mytracks.content; parcelable WaypointCreationRequest;
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/WaypointCreationRequest.aidl
AIDL
asf20
85
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/WaypointsColumns.java
Java
asf20
2,815
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/TrackPointsColumns.java
Java
asf20
1,754
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtilsImpl.java
Java
asf20
36,807
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/TracksColumns.java
Java
asf20
2,606
package com.google.android.apps.mytracks.content; parcelable Waypoint;
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/Waypoint.aidl
AIDL
asf20
70
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/MyTracksProviderUtils.java
Java
asf20
13,929
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/DescriptionGenerator.java
Java
asf20
1,233
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/content/Waypoint.java
Java
asf20
5,336
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/stats/ExtremityMonitor.java
Java
asf20
2,451
package com.google.android.apps.mytracks.stats; parcelable TripStatistics;
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/stats/TripStatistics.aidl
AIDL
asf20
74
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/stats/TripStatistics.java
Java
asf20
15,887
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
0000som143-mytracks
MyTracksLib/src/com/google/android/apps/mytracks/lib/MyTracksLibConstants.java
Java
asf20
925
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
0000som143-mytracks
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthListenerEclair.java
Java
asf20
5,243
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthConstants.java
Java
asf20
1,200
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
0000som143-mytracks
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthService.java
Java
asf20
7,870
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/RecordingStateReceiver.java
Java
asf20
2,316
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
0000som143-mytracks
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthListenerCupcake.java
Java
asf20
6,236
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthListenerFactory.java
Java
asf20
1,650
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthPreferences.java
Java
asf20
2,044
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
SignalStrengthSampler/src/com/google/android/apps/mytracks/signalstrength/SignalStrengthListener.java
Java
asf20
1,157
/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
0000som143-mytracks
MyTracksApiSample/src/com/google/android/apps/mytracks/samples/api/MyTracksReceiver.java
Java
asf20
1,220
/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
0000som143-mytracks
MyTracksApiSample/src/com/google/android/apps/mytracks/samples/api/MainActivity.java
Java
asf20
5,172
#ifndef DRIVE_H_ #define DRIVE_H_ #include "WPILib.h" #include "GlobalInclude.h" class Drive { public: Drive(); virtual ~Drive(); void printLeft(void); void jagDebug(int); void printRight(void); /* CANJaguar *leftJag;// CAN attached Jag for the Left1 motor **** 2 CANJaguar *rightJag;// CAN attache...
1138eagle-engineering2011
Drive.h
C++
gpl3
675
#ifndef ARM_H_ #define ARM_H_ #include "WPILib.h" #include "DoubleSolenoid.h" #include "GlobalInclude.h" #include "PIDCalculator.h" #include "OperatorInterface.h" class Arm { public: Arm(OperatorInterface *oiArmX); //void jagDebug(int); virtual ~Arm(); void liftInit(void); OperatorInterface *oiAr...
1138eagle-engineering2011
Arm.h
C++
gpl3
972
#ifndef PHOTOSWITCH_H_ #define PHOTOSWITCH_H_ #include "WPIlib.h" #include "GlobalInclude.h" #include "Sensor.h" class PhotoSwitch { public: PhotoSwitch(Drive *y); ~PhotoSwitch(void); int onLight(void); int onDark(void); int onDark1(void); int onDark3(void); int allLight(void); int all...
1138eagle-engineering2011
PhotoSwitch.h
C++
gpl3
870
#include "WPILib.h" #include "GlobalInclude.h" //#include "CANJaguar.h" #include "PhotoSwitch.h" #include "Drive.h" #include "OperatorInterface.h" #include "PIDCalculator.h" #include "Arm.h" #define waitTime 0.01//try 0.05 or 0.1 class CANRobotDemo : public IterativeRobot { Drive *dr; OperatorInterfac...
1138eagle-engineering2011
MyRobot.cpp
C++
gpl3
3,005
#ifndef GLOBALINCLUDE_H_ #define GLOBALINCLUDE_H_ //#define armExperimental 1 #define oiExperimental 1 #define armDebug 0 #define liftDebug 1 #define driveDebug 0 #endif /*GLOBALINCLUDE_H_*/
1138eagle-engineering2011
GlobalInclude.h
C
gpl3
208
#ifndef SENSOR_H_ #define SENSOR_H_ #include "WPILib.h" #include "GlobalInclude.h" #include "PIDCalculator.h" #include "Drive.h" class Sensor { public: Sensor(Drive *z); virtual ~Sensor(); Drive *sensorDrive; Gyro *gyro; PIDCalculator *calc; PIDController *pid; void gyroSubroutine(int); float ...
1138eagle-engineering2011
Sensor.h
C++
gpl3
380
#include "Sensor.h" Sensor::Sensor(Drive *z) { sensorDrive = z; gyro = new Gyro(1); calc = new PIDCalculator(); pid = new PIDController(0.0625,0.003,0,gyro,calc); pid->SetInputRange(-360,360);//-360 degrees to 360 degrees pid->SetTolerance(0.15);//tolerance is 0.15% of total range pid->SetOutputRan...
1138eagle-engineering2011
Sensor.cpp
C++
gpl3
1,555
#include "Arm.h" #define manual 1 #define armGain 0.4 #define liftGain 0.5 Arm::Arm(OperatorInterface *oiArmX) { oiArm = oiArmX; lift1 = new Jaguar(5); lift2 = new Jaguar(6); arm = new Jaguar(7); liftEnc = new Encoder(7,8); liftEnc->SetDistancePerPulse(1); liftEnc->Start(); //armEnc = new...
1138eagle-engineering2011
Arm.cpp
C++
gpl3
5,435
#include "OperatorInterface.h" OperatorInterface::OperatorInterface() { leftStick = new Joystick(1); rightStick = new Joystick(2); ds = DriverStation::GetInstance(); lcd = DriverStationLCD::GetInstance(); estop = new Joystick(3); } void OperatorInterface::updateButtons() { #if oiExperimental == 1 ...
1138eagle-engineering2011
OperatorInterface.cpp
C++
gpl3
1,219
#include "PIDCalculator.h" PIDCalculator::PIDCalculator() { printf("PIDCalculator Initialized"); pidOutput = 0; } PIDCalculator::~PIDCalculator() { printf("PIDCalculator Deconstructor Called"); //delete instance; //instance = NULL; } float PIDCalculator::getOutput() { return pidOutput; } void PI...
1138eagle-engineering2011
PIDCalculator.cpp
C++
gpl3
576
#include "WPILib.h" #include "Drive.h" Drive::Drive() { /* leftJag = new CANJaguar(5); // These must be initialized in the same order rightJag = new CANJaguar(3); // as they are declared above. leftJag2 = new CANJaguar(4); rightJag2 = new CANJaguar(2); */ leftJag = new Jaguar(4); // These must be ini...
1138eagle-engineering2011
Drive.cpp
C++
gpl3
1,199
#ifndef PIDCALCULATOR_H_ #define PIDCALCULATOR_H_ #include "WPILib.h" #include "GlobalInclude.h" class PIDCalculator : public PIDOutput { public: //static PIDCalculator* PIDCalculator::instance; PIDCalculator(); virtual ~PIDCalculator(); virtual void PIDWrite(float output); virtual float getOutput...
1138eagle-engineering2011
PIDCalculator.h
C++
gpl3
454
#ifndef OPERATORINTERFACE_H_ #define OPERATORINTERFACE_H_ #include "WPILib.h" #include "GlobalInclude.h" class OperatorInterface { public: OperatorInterface(); virtual ~OperatorInterface(); void updateButtons(void); Joystick *leftStick; // left joystick Joystick *rightStick; DriverStation *ds; D...
1138eagle-engineering2011
OperatorInterface.h
C++
gpl3
739
#include "PhotoSwitch.h" #define defaultSteeringGain 0.3 #define defaultLeftSpeed -0.5 #define defaultRightSpeed -0.5 #define lineStyle 0 //1 for Dark, 0 for Light PhotoSwitch::PhotoSwitch(Drive *y) { p1 = new DigitalInput(1);//dark 1 p2 = new DigitalInput(2);//dark 2 p3 = new DigitalInput(3);//dark 3...
1138eagle-engineering2011
PhotoSwitch.cpp
C++
gpl3
4,404
#!/bin/sh # Create a backup tar gzip file of the cwd with the date appended # located in the parent directory. FILENAME=../`pwd|xargs basename`-`date -j "+%Y-%m-%d"`.tgz echo Will create $FILENAME tar cfz $FILENAME . echo Done.
115371172-shuffle
createBackup.sh
Shell
asf20
232
package org.dodgybits.shuffle.android.core.activity.flurry; import com.google.inject.Inject; import roboguice.activity.RoboListActivity; public abstract class FlurryEnabledListActivity extends RoboListActivity { @Inject protected Analytics mAnalytics; @Override public void onStart() { sup...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/flurry/FlurryEnabledListActivity.java
Java
asf20
479
package org.dodgybits.shuffle.android.core.activity.flurry; import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryApiKey; import java.util.Map; import org.dodgybits.shuffle.android.preference.model.Preferences; import android.content.Context; import com.flurry.android.FlurryAgent; import com.googl...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/flurry/Analytics.java
Java
asf20
1,482
package org.dodgybits.shuffle.android.core.activity.flurry; import com.google.inject.Inject; import roboguice.activity.RoboExpandableListActivity; public abstract class FlurryEnabledExpandableListActivity extends RoboExpandableListActivity { @Inject protected Analytics mAnalytics; @Override public v...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/flurry/FlurryEnabledExpandableListActivity.java
Java
asf20
509
package org.dodgybits.shuffle.android.core.activity.flurry; import com.google.inject.Inject; import roboguice.activity.RoboPreferenceActivity; public abstract class FlurryEnabledPreferenceActivity extends RoboPreferenceActivity { @Inject protected Analytics mAnalytics; @Override public void onStart(...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/flurry/FlurryEnabledPreferenceActivity.java
Java
asf20
497
package org.dodgybits.shuffle.android.core.activity.flurry; import com.google.inject.Inject; import roboguice.activity.RoboActivity; public abstract class FlurryEnabledActivity extends RoboActivity { @Inject protected Analytics mAnalytics; @Override public void onStart() { super.onStart()...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/flurry/FlurryEnabledActivity.java
Java
asf20
472
package org.dodgybits.shuffle.android.core.activity.flurry; import android.content.Intent; import com.google.inject.Inject; import roboguice.service.RoboService; public abstract class FlurryEnabledService extends RoboService { @Inject protected Analytics mAnalytics; @Override public void onStart(In...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/flurry/FlurryEnabledService.java
Java
asf20
538
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/HelpActivity.java
Java
asf20
3,581
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/WelcomeActivity.java
Java
asf20
4,453
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/BootstrapActivity.java
Java
asf20
1,693
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/TopLevelActivity.java
Java
asf20
11,447
package org.dodgybits.shuffle.android.core.activity; import java.util.ArrayList; import java.util.List; import org.dodgybits.android.shuffle.R; import org.dodgybits.shuffle.android.core.activity.flurry.FlurryEnabledListActivity; import org.dodgybits.shuffle.android.core.view.IconArrayAdapter; import org.dodgybits.shu...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/activity/LauncherShortcutActivity.java
Java
asf20
3,847
package org.dodgybits.shuffle.android.core.configuration; import android.content.ContextWrapper; import com.google.inject.Provides; import org.dodgybits.android.shuffle.R; import org.dodgybits.shuffle.android.core.model.Context; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.an...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/configuration/ShuffleModule.java
Java
asf20
7,142
package org.dodgybits.shuffle.android.core; import com.google.inject.Module; import org.dodgybits.shuffle.android.core.configuration.ShuffleModule; import roboguice.application.RoboApplication; import java.util.List; public class ShuffleApplication extends RoboApplication { @Override protected void add...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/ShuffleApplication.java
Java
asf20
410
package org.dodgybits.shuffle.android.core.model; public final class Id { private final long mId; public static final Id NONE = new Id(0L); private Id(long id) { mId = id; } public long getId() { return mId; } public boolean isInitialised() { ret...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/Id.java
Java
asf20
907
package org.dodgybits.shuffle.android.core.model; public class Reminder { public Integer id; public final int minutes; public final Method method; public Reminder(Integer id, int minutes, Method method) { this.id = id; this.minutes = minutes; this.method = method; } public Reminder(int minutes, Method me...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/Reminder.java
Java
asf20
416
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/Project.java
Java
asf20
5,810
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/Task.java
Java
asf20
9,326
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/Context.java
Java
asf20
5,328
package org.dodgybits.shuffle.android.core.model.encoding; import static android.provider.BaseColumns._ID; import static org.dodgybits.shuffle.android.persistence.provider.ContextProvider.Contexts.COLOUR; import static org.dodgybits.shuffle.android.persistence.provider.ContextProvider.Contexts.ICON; import static org....
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/encoding/ContextEncoder.java
Java
asf20
1,843
package org.dodgybits.shuffle.android.core.model.encoding; import static android.provider.BaseColumns._ID; import static org.dodgybits.shuffle.android.persistence.provider.ProjectProvider.Projects.ARCHIVED; import static org.dodgybits.shuffle.android.persistence.provider.ProjectProvider.Projects.DEFAULT_CONTEXT_ID; im...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/encoding/ProjectEncoder.java
Java
asf20
2,124
package org.dodgybits.shuffle.android.core.model.encoding; import static android.provider.BaseColumns._ID; import static org.dodgybits.shuffle.android.persistence.provider.TaskProvider.Tasks.ALL_DAY; import static org.dodgybits.shuffle.android.persistence.provider.TaskProvider.Tasks.CAL_EVENT_ID; import static org.dod...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/encoding/TaskEncoder.java
Java
asf20
3,943
package org.dodgybits.shuffle.android.core.model.encoding; import android.os.Bundle; public interface EntityEncoder<Entity> { void save(Bundle icicle, Entity e); Entity restore(Bundle icicle); }
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/encoding/EntityEncoder.java
Java
asf20
211
package org.dodgybits.shuffle.android.core.model.encoding; import org.dodgybits.shuffle.android.core.model.Id; import android.os.Bundle; public abstract class AbstractEntityEncoder { protected static Id getId(Bundle icicle, String key) { Id result = Id.NONE; if (icicle.containsKey(key)) { ...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/encoding/AbstractEntityEncoder.java
Java
asf20
990
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.android.core.model.Context; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.dto.ShuffleProtos.Context.Builder; public class ContextProtocolTranslator implements EntityProtocolTranslator<Context , ...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/protocol/ContextProtocolTranslator.java
Java
asf20
2,145
package org.dodgybits.shuffle.android.core.model.protocol; import com.google.protobuf.MessageLite; public interface EntityProtocolTranslator<E,M extends MessageLite> { E fromMessage(M message); M toMessage(E entity); }
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/protocol/EntityProtocolTranslator.java
Java
asf20
240
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.android.core.model.Context; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.android.core.model.Project; import org.dodgybits.shuffle.dto.ShuffleProtos.Project.Builder; public class ProjectProtocolT...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/protocol/ProjectProtocolTranslator.java
Java
asf20
2,599
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.dto.ShuffleProtos.Date; public final class ProtocolUtil { private ProtocolUtil() { // deny } public static Date toDate(long millis) { return Date.newBuilder() .setMillis(millis) ...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/protocol/ProtocolUtil.java
Java
asf20
536
package org.dodgybits.shuffle.android.core.model.protocol; import java.util.HashMap; import java.util.Map; import org.dodgybits.shuffle.android.core.model.Id; public class HashEntityDirectory<Entity> implements EntityDirectory<Entity> { private Map<String,Entity> mItemsByName; private Map<Id, Entity> mItemsById; ...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/protocol/HashEntityDirectory.java
Java
asf20
736
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.android.core.model.Context; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.android.core.model.Project; import org.dodgybits.shuffle.android.core.model.Task; import org.dodgybits.shuffle.dto.Shuffle...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/protocol/TaskProtocolTranslator.java
Java
asf20
4,337
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.android.core.model.Id; /** * A lookup service for entities. Useful when matching up entities from different * sources that may have conflicting ids (e.g. backup or remote synching). */ public interface EntityDirectory<Entity> {...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/protocol/EntityDirectory.java
Java
asf20
398
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/InitialDataGenerator.java
Java
asf20
11,653
package org.dodgybits.shuffle.android.core.model.persistence; import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryCountParam; import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryCreateEntityEvent; import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryDeleteEntityE...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/AbstractEntityPersister.java
Java
asf20
7,181
package org.dodgybits.shuffle.android.core.model.persistence; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import com.google.inject.Inject; import org.dodgybits.shuffle.android.core.activity.flurry.Analytics; import org.dodgybits.shuffle.android.core.model.Project; impo...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/ProjectPersister.java
Java
asf20
3,104
package org.dodgybits.shuffle.android.core.model.persistence; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.provider.BaseColumns; import android.text.TextUtils; import android.text...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/TaskPersister.java
Java
asf20
12,683
package org.dodgybits.shuffle.android.core.model.persistence; import org.dodgybits.shuffle.android.core.model.Entity; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.android.core.util.ItemCache; import org.dodgybits.shuffle.android.core.util.ItemCache.ValueBuilder; import roboguice.in...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/DefaultEntityCache.java
Java
asf20
1,312
package org.dodgybits.shuffle.android.core.model.persistence; import java.util.Collection; import org.dodgybits.shuffle.android.core.model.Entity; import org.dodgybits.shuffle.android.core.model.Id; import android.database.Cursor; import android.net.Uri; public interface EntityPersister<E extends Entity> { Uri...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/EntityPersister.java
Java
asf20
1,525
package org.dodgybits.shuffle.android.core.model.persistence; import org.dodgybits.shuffle.android.core.model.Entity; import org.dodgybits.shuffle.android.core.model.Id; public interface EntityCache<E extends Entity> { E findById(Id localId); }
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/EntityCache.java
Java
asf20
249
package org.dodgybits.shuffle.android.core.model.persistence.selector; import static org.dodgybits.shuffle.android.core.model.persistence.selector.Flag.ignored; import static org.dodgybits.shuffle.android.core.model.persistence.selector.Flag.no; import static org.dodgybits.shuffle.android.core.model.persistence.select...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/selector/TaskSelector.java
Java
asf20
11,202
package org.dodgybits.shuffle.android.core.model.persistence.selector; import android.util.Log; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.android.core.util.StringUtils; import org.dodgybits.shuffle.android.preference.model.ListPreferenceSettings; import java.util.ArrayList; impo...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/selector/AbstractEntitySelector.java
Java
asf20
4,440
package org.dodgybits.shuffle.android.core.model.persistence.selector; import android.net.Uri; import org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider; import org.dodgybits.shuffle.android.persistence.provider.ContextProvider; import java.util.List; public class ContextSelector extends A...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/selector/ContextSelector.java
Java
asf20
1,861
package org.dodgybits.shuffle.android.core.model.persistence.selector; import android.net.Uri; import org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider; import org.dodgybits.shuffle.android.persistence.provider.ProjectProvider; import java.util.List; public class ProjectSelector extends A...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/selector/ProjectSelector.java
Java
asf20
1,860
package org.dodgybits.shuffle.android.core.model.persistence.selector; import android.content.Context; import android.net.Uri; import org.dodgybits.shuffle.android.preference.model.ListPreferenceSettings; public interface EntitySelector<E extends EntitySelector> { Uri getContentUri(); Flag getActive(); ...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/selector/EntitySelector.java
Java
asf20
960
package org.dodgybits.shuffle.android.core.model.persistence.selector; public enum Flag { yes, no, ignored }
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/selector/Flag.java
Java
asf20
114
package org.dodgybits.shuffle.android.core.model.persistence; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import com.google.inject.Inject; import org.dodgybits.shuffle.android.core.activity.flurry.Analytics; import org.dodgybits.shuffle.android.core.model.Context; impo...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/persistence/ContextPersister.java
Java
asf20
2,757
package org.dodgybits.shuffle.android.core.model; public interface Entity { /** * @return primary key for entity in local sqlite DB. 0L indicates an unsaved entity. */ Id getLocalId(); /** * @return ms since epoch entity was last modified. */ long getModifiedDate(); ...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/Entity.java
Java
asf20
433
package org.dodgybits.shuffle.android.core.model; public interface EntityBuilder<E> { EntityBuilder<E> mergeFrom(E e); EntityBuilder<E> setLocalId(Id id); EntityBuilder<E> setModifiedDate(long ms); EntityBuilder<E> setTracksId(Id id); EntityBuilder<E> setActive(boolean value); EntityBuilder<E>...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/model/EntityBuilder.java
Java
asf20
370
package org.dodgybits.shuffle.android.core.view; import android.content.res.Resources; import android.text.TextUtils; public class ContextIcon { private static final String cPackage = "org.dodgybits.android.shuffle"; private static final String cType = "drawable"; public static final ContextIcon NON...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/view/ContextIcon.java
Java
asf20
1,012
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/view/AlertUtils.java
Java
asf20
3,820
package org.dodgybits.shuffle.android.core.view; import org.dodgybits.android.shuffle.R; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; public class IconArrayAdapter extends ArrayAdapter<CharSequence> { pr...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/view/IconArrayAdapter.java
Java
asf20
1,214
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/view/DrawableUtils.java
Java
asf20
1,533
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/view/MenuUtils.java
Java
asf20
15,259
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/util/TextColours.java
Java
asf20
2,088
package org.dodgybits.shuffle.android.core.util; import java.util.List; public class StringUtils { public static String repeat(int count, String token) { return repeat(count, token, ""); } public static String repeat(int count, String token, String delim) { StringBuilder builder = new StringBuilder(); for...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/util/StringUtils.java
Java
asf20
839
package org.dodgybits.shuffle.android.core.util; import java.lang.ref.SoftReference; import java.util.HashMap; import android.util.Log; /** * Generic in-memory cache based on Romain Guy's suggestion. * See http://code.google.com/events/io/2009/sessions/TurboChargeUiAndroidFast.html */ public class ItemCache<K,V> ...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/util/ItemCache.java
Java
asf20
1,382
package org.dodgybits.shuffle.android.core.util; public final class Constants { private Constants() { //deny } public static final String cPackage = "org.dodgybits.android.shuffle"; public static final int cVersion = 29; public static final String cFlurryApiKey = "T7KF1PCGVU...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/util/Constants.java
Java
asf20
1,292
package org.dodgybits.shuffle.android.core.util; import java.lang.reflect.Field; import android.os.Build; public class OSUtils { public static boolean osAtLeastFroyo() { boolean isFroyoOrAbove = false; try { Field field = Build.VERSION.class.getDeclaredField("SDK_INT"); i...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/util/OSUtils.java
Java
asf20
565
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/util/DateUtils.java
Java
asf20
5,036
package org.dodgybits.shuffle.android.core.util; import android.net.Uri; public class CalendarUtils { // We can't use the constants from the provider since it's not a public portion of the SDK. private static final Uri CALENDAR_CONTENT_URI = Uri.parse("content://calendar/calendars"); // Calendars.C...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/core/util/CalendarUtils.java
Java
asf20
1,459
/* * Copyright (C) 2009 Android Shuffle Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
115371172-shuffle
client/src/org/dodgybits/shuffle/android/editor/activity/ColourPickerActivity.java
Java
asf20
2,863