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
| # custom Authorization | |
| from tastypie.authorization import Authorization | |
| class SimpleReaderAuthorization(Authorization): | |
| def read_list(self, object_list, bundle): | |
| return object_list.filter(email=bundle.request.user.email) | |
| # resource |
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 com.jumy.twitterclient.adapters; | |
| import android.content.Context; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.ArrayAdapter; | |
| import android.widget.ImageView; | |
| import android.widget.TextView; |
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
| ->./hist log_history_parser dney4mhqe2oy 2013-09-15 2013-09-20 | |
| Process Process-2: | |
| Process Process-1: | |
| Traceback (most recent call last): | |
| File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/process.py", line 232, in _bootstrap | |
| Traceback (most recent call last): | |
| File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/process.py", line 232, in _bootstrap | |
| self.run() | |
| File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/process.py", line 88, in run | |
| self._target(*self._args, **self._kwargs) |
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
| ->brew doctor | |
| Error: no such file to load -- requirements/minimum_macos_requirement | |
| Please report this bug: | |
| https://github.com/mxcl/homebrew/wiki/troubleshooting | |
| /usr/local/Library/Homebrew/requirements.rb:4:in `require' | |
| /usr/local/Library/Homebrew/requirements.rb:4 | |
| /usr/local/Library/Homebrew/dependency_collector.rb:4:in `require' | |
| /usr/local/Library/Homebrew/dependency_collector.rb:4 | |
| /usr/local/Library/Homebrew/formula.rb:1:in `require' |
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
| <component name="libraryTable"> | |
| <library name="support-v4-18.0.0"> | |
| <CLASSES> | |
| <root url="jar://$PROJECT_DIR$/../../../Android/android-sdk-mac_x86/extras/android/m2repository/com/android/support/support-v4/18.0.0/support-v4-18.0.0.jar!/" /> | |
| </CLASSES> | |
| <JAVADOC /> | |
| <SOURCES /> | |
| </library> | |
| </component |
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
| import System.Environment (getArgs) | |
| stringToArray :: String -> [String] | |
| stringToArray s = words s | |
| findLongestWord :: String -> [String] -> String | |
| findLongestWord x [] = x | |
| findLongestWord l (w1:s1) | |
| | length w1 > length l = findLongestWord w1 s1 | |
| | otherwise = findLongestWord l s1 |
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
| import System.Environment (getArgs) | |
| stringToArray :: String -> [String] | |
| stringToArray s = words s | |
| findLongestWord :: [String] -> String -> String | |
| findLongestWord [] x = x | |
| findLongestWord (w1:s1) l | |
| | length w1 > length l = findLongestWord s1 w1 | |
| | otherwise = findLongestWord s1 l |
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
| from tastypie.resources import ModelResource | |
| from simplereader_client.models import ReaderUser, Feed | |
| from django.contrib.auth.models import User | |
| from tastypie.authentication import ( | |
| Authentication, ApiKeyAuthentication, BasicAuthentication, | |
| MultiAuthentication) | |
| from tastypie.authorization import Authorization | |
| from tastypie import fields | |
| from tastypie.constants import ALL |
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 ReaderUserResource(ModelResource): | |
| class Meta: | |
| queryset = ReaderUser.objects.all() | |
| resource_name = 'user' | |
| filtering = { | |
| 'email': ['exact'], | |
| 'password': ['exact'], | |
| } |
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
| url called http://localhost:8000/api/user/?password__exact=103a8ab6cc265e99a4ce8cea60e63d1f8fc0004f&email__exact=jeremy.dagorn@gmail.com | |
| class ReaderUserResource(ModelResource): | |
| class Meta: | |
| queryset = ReaderUser.objects.all() | |
| resource_name = 'user' | |
| filtering = { | |
| 'email': ['exact'], | |
| 'password': ['exact'], | |
| 'query': ['exact',], |