One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| public final class StoreContract { | |
| public static abstract class HeadphoneEntry implements BaseColumns { | |
| public static final String TABLE_NAME = "headphones"; | |
| public static final String COLUMN_NAME = "name"; | |
| public static final String COLUMN_PRICE = "price"; | |
| public static final String COLUMN_STYLE = "style"; | |
| public static final String COLUMN_IN_STOCK = "in_stock"; | |
| public static final String COLUMN_DESCRIPTION = "description"; |
| /* | |
| * Copyright (C) 2014 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 applicable law or agreed to in writing, software |
| // ----------------------------------------------------------------------------- | |
| // SIMPLE REUSABLE AJAX GET JSON FUNCTION | |
| // A frequent thing I find myself writing in projects is a simple function to | |
| // get JSON via AJAX. This simple helper does that in a sensible way without | |
| // needing jQuery or a needlessly complex standalone Ajax library. Get data | |
| // so you can do stuff with it. That’s all it does. No POSTing, no crazy edge- | |
| // case error handling. | |
| function getJson(url, callback) { |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| #!/usr/bin/env python | |
| """ | |
| Use byzanz to create a GIF screencast of a specific window. | |
| Required tools: | |
| sudo apt-get install byzanz x11-utils xdotool | |
| A tip: use an extra-long duration (-d 100), record your shot, and use | |
| gimp to shorten the duration of the last frame. You need to rename the layer | |
| from "Frame 123 (100000 ms) (combine)" to "Frame 123 (1000 ms) (combine)". |
This should be one of the core features of Git, but for some reason it's impossible to figure out how to search for a string in your commit history and see the diffs that that string is in. Here's the best I've come up with:
To find which commits and which files a string was added or removed in:
git log -S'search string' --oneline --name-status
To see the diff of that
| /** | |
| * This class provides the URI and const values to work with Any.do's Content Provider. | |
| * | |
| * A guide is available on http://tech.any.do/content-provider-for-any-do/ | |
| */ | |
| public class TasksContract { | |
| public static final Uri TASKS_URI = Uri.parse("content://com.anydo.provider/tasks"); | |
| public static final Uri FOLDERS_URI = Uri.parse("content://com.anydo.provider/folders"); | |
| public static final String PERMISSION_READ = "com.anydo.provider.permission.READ_ANYDO_TASKS"; |