code stringlengths 3 1.18M | language stringclasses 1
value |
|---|---|
package org.dodgybits.shuffle.android.synchronisation.tracks;
import java.io.IOException;
import java.io.StringWriter;
import java.util.Map;
import org.dodgybits.android.shuffle.R;
import org.dodgybits.shuffle.android.core.activity.flurry.Analytics;
import org.dodgybits.shuffle.android.core.model.Context;
import org.... | Java |
package org.dodgybits.shuffle.android.synchronisation.tracks;
import java.io.IOException;
import java.io.StringWriter;
import java.util.Map;
import org.dodgybits.android.shuffle.R;
import org.dodgybits.shuffle.android.core.activity.flurry.Analytics;
import org.dodgybits.shuffle.android.core.model.EntityBuilder;
impor... | Java |
package org.dodgybits.shuffle.android.synchronisation.tracks;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryTracksSyncCompletedEvent;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryTracksSyncError;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryT... | Java |
package org.dodgybits.shuffle.android.synchronisation.tracks;
import org.apache.http.StatusLine;
public class WebResult {
private String mContent;
private StatusLine mStatus;
public WebResult(StatusLine status, String content) {
mStatus = status;
mContent = content;
}
public String getCo... | Java |
package org.dodgybits.shuffle.android.synchronisation.tracks;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.apache.http.HttpStatus;
import org.apache.http.StatusLine;
import org.dodgybits.shuffle.android.core.model.EntityBuilder;
import org.dodgybits.shuffle.android.core.mode... | Java |
package org.dodgybits.shuffle.android.synchronisation.tracks;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHos... | Java |
package org.dodgybits.shuffle.android.synchronisation.tracks;
import org.dodgybits.shuffle.android.preference.view.Progress;
/**
* Items that can receive updates about synchronization progress
*
* @author Morten Nielsen
*/
public interface SyncProgressListener {
void progressUpdate(Progress progress);
}
| Java |
package org.dodgybits.shuffle.android.synchronisation.tracks;
import java.util.Map;
import org.dodgybits.shuffle.android.core.model.Id;
import org.dodgybits.shuffle.android.synchronisation.tracks.model.TracksEntity;
public class TracksEntities<E extends TracksEntity> {
private Map<Id, E> mEntities;
... | Java |
package org.dodgybits.shuffle.android.synchronisation.tracks;
@SuppressWarnings("serial")
public class ApiException extends Exception {
public ApiException(String reason) {
super(reason);
}
public ApiException(String reason, Exception e) {
super(reason, e);
}
}
| Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
package org.dodgybits.shuffle.android.preference.activity;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.dodgybits.android.shuffle.R;
import org.dodgybits.shuffle.android.core.activity... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
package org.dodgybits.shuffle.android.preference.activity;
import org.dodgybits.shuffle.android.core.activity.flurry.FlurryEnabledActivity;
import org.dodgybits.shuffle.android.synchronisation.gae.AccountsActivity;
import android.content.Intent;
import android.os.Bundle;
public class PreferencesAppEngineSynchronizat... | Java |
/*
* 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... | Java |
package org.dodgybits.shuffle.android.preference.activity;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
... | Java |
package org.dodgybits.shuffle.android.preference.activity;
import static org.dodgybits.shuffle.android.preference.model.Preferences.TRACKS_INTERVAL;
import static org.dodgybits.shuffle.android.preference.model.Preferences.TRACKS_PASSWORD;
import static org.dodgybits.shuffle.android.preference.model.Preferences.TRACKS_... | Java |
/*
* 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... | Java |
package org.dodgybits.shuffle.android.preference.model;
import org.dodgybits.shuffle.android.core.model.persistence.selector.Flag;
import roboguice.util.Ln;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Pref... | Java |
package org.dodgybits.shuffle.android.preference.view;
public class Progress {
private int mProgressPercent;
private String mDetails;
private boolean mIsError;
private Runnable mErrorUIAction;
public static Progress createProgress(int progressPercent, String details) {
return new Progress(progressPercent, det... | Java |
/*
* 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... | Java |
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... | Java |
/*
* 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... | Java |
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()... | Java |
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... | Java |
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... | Java |
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... | Java |
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(... | Java |
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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
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... | Java |
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... | Java |
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<E>> {
Uri getContentUri();
Flag getActive();
... | Java |
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... | Java |
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... | Java |
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... | Java |
package org.dodgybits.shuffle.android.core.model.persistence.selector;
public enum Flag {
yes, no, ignored
}
| Java |
package org.dodgybits.shuffle.android.core.model.persistence;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryCompleteTaskEvent;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryCountParam;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryDeleteEntityE... | Java |
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);
} | Java |
/*
* 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... | Java |
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... | Java |
package org.dodgybits.shuffle.android.core.model.persistence;
import static org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider.ShuffleTable.ACTIVE;
import static org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider.ShuffleTable.DELETED;
import static org.dodgybits.sh... | Java |
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... | Java |
package org.dodgybits.shuffle.android.core.model.persistence;
import static org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider.ShuffleTable.ACTIVE;
import static org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider.ShuffleTable.DELETED;
import static org.dodgybits.sh... | Java |
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... | Java |
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... | Java |
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)
... | Java |
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... | Java |
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;
... | Java |
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 , ... | Java |
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> {... | Java |
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);
}
| Java |
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>... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
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... | Java |
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... | Java |
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);
}
| Java |
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)) {
... | Java |
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.... | Java |
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();
... | Java |
/*
* 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... | Java |
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... | Java |
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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
/*
* 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... | Java |
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... | Java |
package org.dodgybits.shuffle.android.core.configuration;
import org.dodgybits.android.shuffle.R;
import org.dodgybits.shuffle.android.core.model.Context;
import org.dodgybits.shuffle.android.core.model.Project;
import org.dodgybits.shuffle.android.core.model.Task;
import org.dodgybits.shuffle.android.core.model... | Java |
/*
* 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... | Java |
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... | Java |
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> ... | Java |
/*
* 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... | Java |
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... | Java |
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 = 40;
public static final String cFlurryApiKey = "T7KF1PCGVU... | Java |
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... | Java |
/*
* Copyright (C) 2008 The Android 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 app... | Java |
package org.dodgybits.shuffle.android.widget;
import static org.dodgybits.shuffle.android.core.util.Constants.cIdType;
import static org.dodgybits.shuffle.android.core.util.Constants.cPackage;
import static org.dodgybits.shuffle.android.core.util.Constants.cStringType;
import java.util.Arrays;
import java.util.HashMa... | Java |
/*
* Copyright (C) 2008 The Android 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 app... | Java |
package org.dodgybits.shuffle.android.widget;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
public class RoboAppWidgetProvider extends RoboBroadcastReceiver {
@Override
protected void handleReceive(Context context, Intent i... | Java |
package org.dodgybits.shuffle.android.widget;
import roboguice.RoboGuice;
import roboguice.inject.RoboInjector;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
* To ensure proper ContextScope usage, override the handleReceive method
*
* Replace with rob... | Java |
package org.dodgybits.shuffle.android.widget;
import java.util.ArrayList;
import java.util.List;
import org.dodgybits.android.shuffle.R;
import org.dodgybits.shuffle.android.core.view.IconArrayAdapter;
import org.dodgybits.shuffle.android.list.config.StandardTaskQueries;
import org.dodgybits.shuffle.android.preferenc... | Java |
package dhtpdud;
public class Java_4_7 {
public static void main ( String[] args ) {
int i,j;
System.out.println("***** result *****");
for(i=1; i<10; i++) {
for (j=1; j<10; j++) {
System.out.print(i+"*"+j+"="+(i*j)+" ");
if ( j == 9 )
System.out.print("\n");
}
}
}
... | Java |
package dhtpdud;
class Data{
int x;
int y;
public static void sw2 ( Data data ) {
int temp;
temp = data.x;
data.x = data.y;
data.y = temp;
System.out.println("sw2 x = " + data.x + ", sw2 y = " + data.y);
}
}
public class Java_5_4 {
public static void sw1 ( int x, int y ) {
int temp;
temp = x;... | Java |
package dhtpdud;
public class Java_3_3 {
public static void main (String[] args) {
int x = 50, y = 30;
System.out.println("**** result ****\n");
System.out.println("x < y -> "+(x<y));
System.out.println("x <=y -> "+(x<=y));
System.out.println("x > y -> "+(x>y));
System.out.println("x >=y... | Java |
package dhtpdud;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Java_4_4 {
public static void main ( String[] args )
throws java.io.IOException {
int jumsu;
char hakjum;
String iput;
System.out.println("***** result *****");
System.out.print("Inp... | Java |
package dhtpdud;
public class Java_homework_3_5 {
public static void main ( String[] args ) {
int i, j;
int result;
for(i=1; i<=10; i++) {
result = 1;
for (j=i; j>=1; j--) {
result *= j;
}
System.out.println(i+"! = "+result);
}
}
}
| Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.