plus

3

--- a/drivers/video/msm/mdss/mdss_mdp_pipe.c
+++ b/drivers/video/msm/mdss/mdss_mdp_pipe.c
@@ -46,7 +46,7 @@ static inline u32 mdss_mdp_pipe_read(struct mdss_mdp_pipe *pipe, u32 reg)
 }
 static void mdss_mdp_smp_mmb_free(unsigned long *smp, bool write);
 static u32 mdss_mdp_smp_mmb_reserve(struct mdss_mdp_pipe_smp_map *smp_map,
-	size_t n)
+	size_t n, bool force_alloc)
 {
 	u32 i, mmb;
 	u32 fixed_cnt = bitmap_weight(smp_map->fixed, SMP_MB_CNT);
@@ -64,7 +64,7 @@ static u32 mdss_mdp_smp_mmb_reserve(struct mdss_mdp_pipe_smp_map *smp_map,
 	 * that calls for change in smp configuration (addition/removal
 	 * of smp blocks), so that fallback solution happens.
 	 */
-	if (i != 0 && n != i) {
+	if (i != 0 && n != i && !force_alloc) {
 		pr_debug("Can't change mmb config, num_blks: %d alloc: %d\n",
 			n, i);
 		return 0;
@@ -182,6 +182,7 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe)
 	int i;
 	int rc = 0, rot_mode = 0;
 	u32 nlines;
+	bool force_alloc = 0;
 	u16 width;
 
 	width = pipe->src.w >> pipe->horz_deci;
@@ -221,6 +222,8 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe)
 
 	nlines = pipe->bwc_mode ? 1 : 2;
 
+	force_alloc = pipe->flags & MDP_SMP_FORCE_ALLOC;
+
 	mutex_lock(&mdss_mdp_smp_lock);
 	for (i = (MAX_PLANES - 1); i >= ps.num_planes; i--) {
 		if (bitmap_weight(pipe->smp_map[i].allocated, SMP_MB_CNT)) {
@@ -250,7 +253,7 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe)
 		pr_debug("reserving %d mmb for pnum=%d plane=%d\n",
 				num_blks, pipe->num, i);
 		reserved = mdss_mdp_smp_mmb_reserve(&pipe->smp_map[i],
-			num_blks);
+			num_blks, force_alloc);
 		if (reserved < num_blks)
 			break;
 	}
plus

132

--- a/src/main/java/com/jjoe64/graphview/series/LineGraphSeries.java
+++ b/src/main/java/com/jjoe64/graphview/series/LineGraphSeries.java
@@ -4,12 +4,10 @@
 import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Path;
-import android.util.Log;
 
 import com.jjoe64.graphview.GraphView;
 
 import java.util.Iterator;
-import java.util.List;
 
 /**
  * Created by jonas on 13.08.14.
@@ -26,7 +24,9 @@
     private Styles mStyles;
     private Paint mPaint;
     private Paint mPaintBackground;
+    private Path mPathBackground;
     private Path mPath;
+    private Paint mCustomPaint;
 
     public LineGraphSeries(E[] data) {
         super(data);
@@ -34,8 +34,10 @@ public LineGraphSeries(E[] data) {
         mStyles = new Styles();
         mPaint = new Paint();
         mPaint.setStrokeCap(Paint.Cap.ROUND);
+        mPaint.setStyle(Paint.Style.STROKE);
         mPaintBackground = new Paint();
 
+        mPathBackground = new Path();
         mPath = new Path();
     }
 
@@ -68,8 +70,15 @@ public void draw(GraphView graphView, Canvas canvas, boolean isSecondScale) {
         mPaint.setColor(getColor());
         mPaintBackground.setColor(mStyles.backgroundColor);
 
+        Paint paint;
+        if (mCustomPaint != null) {
+            paint = mCustomPaint;
+        } else {
+            paint = mPaint;
+        }
+
         if (mStyles.drawBackground) {
-            mPath.reset();
+            mPathBackground.reset();
         }
 
         double 
plus

5

--- a/lib/acts_as_sane_tree/singleton_methods.rb
+++ b/lib/acts_as_sane_tree/singleton_methods.rb
@@ -1,6 +1,6 @@
 module ActsAsSaneTree
   module SingletonMethods
-    
+
     # Check if we are in rails 3
     def rails_3?
       @is_3 ||= !defined?(Arel).nil?
@@ -26,8 +26,8 @@ def root
         configuration[:class].where("#{configuration[:foreign_key]} IS NULL").order(configuration[:order]).first
       else
         configuration[:class].find(
-          :first, 
-          :conditions => "#{configuration[:foreign_key]} IS NULL", 
+          :first,
+          :conditions => "#{configuration[:foreign_key]} IS NULL",
           :order => configuration[:order]
         )
       end
@@ -57,12 +57,12 @@ def nodes_within?(src, chk)
     # chk:: Array of nodes
     # Return all nodes that are within both chk and src
     def nodes_within(src, chk)
-      s = (src.is_a?(Array) ? src : [src]).map{|x|x.is_a?(ActiveRecord::Base) ? x.id : x.to_i}
-      c = (chk.is_a?(Array) ? chk : [chk]).map{|x|x.is_a?(ActiveRecord::Base) ? x.id : x.to_i}
+      s = (src.is_a?(Array) ? src : [src]).to_ary.map{|x|x.is_a?(ActiveRecord::Base) ? x.id : x.to_i}
+      c = (chk.is_a?(Array) ? chk : [chk]).to_ary.map{|x|x.is_a?(ActiveRecord::Base) ? x.id : x.to_i}
       if(s.empty? || c.empty?)
         nil
       else
-        query = 
+        query =
           "(WITH RECURSIVE crumbs AS (
             SELECT #{configuration[:class].table_name}.*, 0 AS depth FROM #{configuration[:class].table_name} WHERE id in (#{s.join(', ')})
             UNION ALL
@@ -76,7 +76,7 @@ def nodes_within(src, chk)
         end
       end
     end
-    
+
     # args:: ActiveRecord models or IDs - Symbols: :raw, :no_self - Hash: {:to_depth => n, :at_depth => n}
     # Returns provided nodes plus all descendants of provided nodes in nested Hash where keys are nodes and values are children
     # :raw:: return value will be flat array
@@ -104,7 +104,7 @@ def nodes_and_descendants(*args)
         depth_clause = "#{configuration[:class].table_name}.depth + 1 < #{depth.to_i + 2}"
       end
       base_ids = args.map{|x| x.is_a?(ActiveRecord::Base) ? x.id : x.to_i}
-      query = 
+      query =
         "(WITH RECURSIVE crumbs AS (
           SELECT #{configuration[:class].table_name}.*, #{no_self ? -1 : 0} AS depth FROM #{configuration[:class].table_name} WHERE #{base_ids.empty? ? 'parent_id IS NULL' : "id in (#{base_ids.join(', ')})"}
           UNION ALL
@@ -126,7 +126,7 @@ def nodes_and_descendants(*args)
         end
       else
         q = configuration[:class].scoped(
-          :from => query, 
+          :from => query,
           :conditions => "#{configuration[:class].table_name}.depth >= 0"
         )
         if(configuration[:order].present?)
plus

252

--- a/Symfony/CS/Tokenizer/Tokens.php
+++ b/Symfony/CS/Tokenizer/Tokens.php
@@ -797,29 +797,27 @@ public function isArrayMultiLine($index)
         // Skip only when its an array, for short arrays we need the brace for correct
         // level counting
         if ($this[$index]->isGivenKind(T_ARRAY)) {
-            ++$index;
+            $index = $this->getNextMeaningfulToken($index);
         }
 
-        for ($c = $this->count(); $index < $c; ++$index) {
-            $token = $this[$index];
+        $endIndex = $this[$index]->equals('(')
+            ? $this->findBlockEnd(self::BLOCK_TYPE_PARENTHESIS_BRACE, $index)
+            : $this->findBlockEnd(self::BLOCK_TYPE_SQUARE_BRACE, $index)
+        ;
 
-            if ($token->equalsAny(array('(', '['))) {
-                ++$bracesLevel;
+        for (++$index; $index < $endIndex; ++$index) {
+            $token      = $this[$index];
+            $blockType  = $this->detectBlockType($token);
+
+            if ($blockType && $blockType['isStart']) {
+                $index = $this->findBlockEnd($blockType['type'], $index);
                 continue;
             }
 
-            if (1 === $bracesLevel && $token->isGivenKind(T_WHITESPACE) && false !== strpos($token->getContent(), "\n")) {
+            if ($token->isGivenKind(T_WHITESPACE) && false !== strpos($token->getContent(), "\n")) {
                 $isMultiline = true;
                 break;
             }
-
-            if ($token->equalsAny(array(')', ']'))) {
-                --$bracesLevel;
-
-                if (0 === $bracesLevel) {
-                    break;
-                }
-            }
         }
 
         return $isMultiline;
plus

8

--- a/src/core/screens/Screen.cpp
+++ b/src/core/screens/Screen.cpp
@@ -134,6 +134,7 @@ namespace Screen {
     void screenEnd(const char * firstLine) {
         lcdSetCursor0_0();
         lcdPrint_P(firstLine);
+        lcdPrintTime(Monitor::getTimeSec());
         lcdSetCursor0_1();
         lcdPrint_P(Program::stopReason_);
         lcdPrintSpaces();
@@ -142,14 +143,12 @@ namespace Screen {
 
 void Screen::displayScreenProgramCompleted()
 {
-    screenEnd(PSTR("program complete"));
-    lcdSetCursor0_1();
-    lcdPrint_P(PSTR("Time: ")); lcdPrintTime(Monitor::getTimeSec());
+    screenEnd(PSTR("complete: "));
 }
 
 void Screen::displayMonitorError()
 {
-    screenEnd(PSTR("Error:"));
+    screenEnd(PSTR("error:    "));
 }
 
 
@@ -179,7 +178,6 @@ void Screen::displayAnimation()
         lcdPrintChar(255);
         Time::delayDoIdle(10);
     }
-    Time::delayDoIdle(10);
 }
 
 void Screen::displayCalibrationErrorScreen(uint8_t errNo)
@@ -216,7 +214,7 @@ void Screen::runResetEepromDone(uint8_t before, uint8_t after) {
 	} else {
 		//TODO
 		//if(before )
-	    displayStrings(PSTR("please cal."));
+	    displayStrings(PSTR("please calibrate"));
 	    waitButtonPressed();
 	}
 }
plus

16

--- a/geoserver/webapp/app/maps/detail/compose.js
+++ b/geoserver/webapp/app/maps/detail/compose.js
@@ -242,7 +242,7 @@ angular.module('gsApp.maps.compose', [
             $timeout(function() {
               $rootScope.$broadcast(AppEvent.ImportData, {
                 mapInfo: mapInfo,
-                workspace: workspace
+                workspace: $scope.workspace
               });
             }, 250);
             // go to this state to initiate listener for broadcast above!
plus

4870

--- a/src/ng/location.js
+++ b/src/ng/location.js
@@ -327,6 +327,13 @@ var locationPrototype = {
    * Return full url representation with all segments encoded according to rules specified in
    * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).
    *
+   *
+   * ```js
+   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
+   * var absUrl = $location.absUrl();
+   * // => "http://example.com/#/some/path?foo=bar&baz=xoxo"
+   * ```
+   *
    * @return {string} full url
    */
   absUrl: locationGetter('$$absUrl'),
@@ -342,6 +349,13 @@ var locationPrototype = {
    *
    * Change path, search and hash, when called with parameter and return `$location`.
    *
+   *
+   * ```js
+   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
+   * var url = $location.url();
+   * // => "/some/path?foo=bar&baz=xoxo"
+   * ```
+   *
    * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)
    * @return {string} url
    */
@@ -366,6 +380,13 @@ var locationPrototype = {
    *
    * Return protocol of current url.
    *
+   *
+   * ```js
+   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
+   * var protocol = $location.protocol();
+   * // => "http"
+   * ```
+   *
    * @return {string} protocol of current url
    */
   protocol: locationGetter('$$protocol'),
@@ -379,6 +400,13 @@ var locationPrototype = {
    *
    * Return host of current url.
    *
+   *
+   * ```js
+   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
+   * var host = $location.host();
+   * // => "example.com"
+   * ```
+   *
    * @return {string} host of current url.
    */
   host: locationGetter('$$host'),
@@ -392,6 +420,13 @@ var locationPrototype = {
    *
    * Return port of current url.
    *
+   *
+   * ```js
+   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
+   * var port = $location.port();
+   * // => 80
+   * ```
+   *
    * @return {Number} port
    */
   port: locationGetter('$$port'),
@@ -410,6 +445,13 @@ var locationPrototype = {
    * Note: Path should always begin with forward slash (/), this method will add the forward slash
    * if it is missing.
    *
+   *
+   * ```js
+   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
+   * var path = $location.path();
+   * // => "/some/path"
+   * ```
+   *
    * @param {(string|number)=} path New path
    * @return {string} path
    */
@@ -435,10 +477,9 @@ var locationPrototype = {
    * var searchObject = $location.search();
    * // => {foo: 'bar', baz: 'xoxo'}
    *
-   *
    * // set foo to 'yipee'
    * $location.search('foo', 'yipee');
-   * // => $location
+   * // $location.search() => {foo: 'yipee', baz: 'xoxo'}
    * ```
    *
    * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or
@@ -508,6 +549,13 @@ var locationPrototype = {
    *
    * Change hash fragment when called with parameter and return `$location`.
    *
+   *
+   * ```js
+   * // given url http://example.com/some/path?foo=bar&baz=xoxo#hashValue
+   * var hash = $location.hash();
+   * // => "hashValue"
+   * ```
+   *
    * @param {(string|number)=} hash New hash fragment
    * @return {string} hash
    */
plus

27

--- a/tests/test_run.py
+++ b/tests/test_run.py
@@ -22,14 +22,11 @@
 import pexpect
 import unittest
 import subprocess
+import tempfile
 import sys
+import os
 from . import PexpectTestCase
 
-# TODO Many of these test cases blindly assume that sequential
-# TODO listing of the /bin directory will yield the same results.
-# TODO This may not always be true, but seems adequate for testing for now.
-# TODO I should fix this at some point.
-
 unicode_type = str if pexpect.PY3 else unicode
 
 def timeout_callback (d):
@@ -44,14 +41,24 @@ class RunFuncTestCase(PexpectTestCase.PexpectTestCase):
     empty = b''
     prep_subprocess_out = staticmethod(lambda x: x)
 
+    def setUp(self):
+        fd, self.rcfile = tempfile.mkstemp()
+        os.write(fd, b'PS1=GO: \n')
+        os.close(fd)
+        super(RunFuncTestCase, self).setUp()
+
+    def tearDown(self):
+        os.unlink(self.rcfile)
+        super(RunFuncTestCase, self).tearDown()
+
     def test_run_exit (self):
         (data, exitstatus) = self.runfunc('python exit1.py', withexitstatus=1)
         assert exitstatus == 1, "Exit status of 'python exit1.py' should be 1."
 
     def test_run (self):
-        the_old_way = subprocess.Popen(args=['ls', '-l', '/bin'],
+        the_old_way = subprocess.Popen(args=['uname', '-m', '-n'],
                 stdout=subprocess.PIPE).communicate()[0].rstrip()
-        (the_new_way, exitstatus) = self.runfunc('ls -l /bin', withexitstatus=1)
+        (the_new_way, exitstatus) = self.runfunc('uname -m -n', withexitstatus=1)
         the_new_way = the_new_way.replace(self.cr, self.empty).rstrip()
         self.assertEqual(self.prep_subprocess_out(the_old_way), the_new_way)
         self.assertEqual(exitstatus, 0)
@@ -65,11 +72,20 @@ def test_run_bad_exitstatus (self):
         assert exitstatus != 0
 
     def test_run_tuple_list (self):
-        events = [('abc\r\n.*[$#]','echo "def"\n'),
-                  ('def\r\n.*[$#]','exit\n'),
-                  ('[$#] ','echo "abc"\n')]
-        (data, exitstatus) = pexpect.run('bash', withexitstatus=1,
-                                          events=events, timeout=10)
+        events = [
+            # second match on 'abc', echo 'def'
+            ('abc\r\n.*GO:', 'echo "def"\n'),
+            # final match on 'def': exit
+            ('def\r\n.*GO:', 'exit\n'),
+            # first match on 'GO:' prompt, echo 'abc'
+            ('GO:', 'echo "abc"\n')
+        ]
+
+        (data, exitstatus) = pexpect.run(
+            'bash --rcfile {0}'.format(self.rcfile),
+            withexitstatus=True,
+            events=events,
+            timeout=10)
         assert exitstatus == 0
 
 class RunUnicodeFuncTestCase(RunFuncTestCase):
plus

3

--- a/src/schemes/oaep.js
+++ b/src/schemes/oaep.js
@@ -38,18 +38,18 @@ module.exports.digestLength = {
  *		To add another algorythm the algorythem must be accepted by crypto.createHash, and then the length of the output of the hash function (the digest) must be added to the digestLength object below.
  *		Most RSA implementations will be expecting sha1
  */
-module.exports.eme_oaep_mgf1 = function(seed, maskLength, hashFunction){
+module.exports.eme_oaep_mgf1 = function (seed, maskLength, hashFunction) {
     hashFunction = hashFunction || "sha1";
     var hLen = module.exports.digestLength[hashFunction];
     var count = Math.ceil(maskLength / hLen);
     var T = new Buffer(hLen * count);
     var c = new Buffer(4);
-    for(var i = 0; i < count; ++i) {
+    for (var i = 0; i < count; ++i) {
         var hash = crypt.createHash(hashFunction);
         hash.write(seed);
         c.writeUInt32BE(i, 0);
         hash.end(c);
-        hash.read().copy(T, i*hLen);
+        hash.read().copy(T, i * hLen);
     }
     return T.slice(0, maskLength);
 };
plus

4869

--- a/src/auto/injector.js
+++ b/src/auto/injector.js
@@ -10,9 +10,10 @@
  * Creates an injector object that can be used for retrieving services as well as for
  * dependency injection (see {@link guide/di dependency injection}).
  *
-
  * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
- *        {@link angular.module}. The `ng` module must be explicitly added.
+ *     {@link angular.module}. The `ng` module must be explicitly added.
+ * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which
+ *     disallows argument name annotation inference.
  * @returns {injector} Injector object. See {@link auto.$injector $injector}.
  *
  * @example
@@ -158,8 +159,10 @@ function annotate(fn, strictDi, name) {
  * ## Inference
  *
  * In JavaScript calling `toString()` on a function returns the function definition. The definition
- * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with
- * minification, and obfuscation tools since these tools change the argument names.
+ * can then be parsed and the function arguments can be extracted. This method of discovering
+ * annotations is disallowed when the injector is in strict mode.
+ * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the
+ * argument names.
  *
  * ## `$inject` Annotation
  * By adding an `$inject` property onto a function the injection parameters can be specified.
@@ -244,6 +247,8 @@ function annotate(fn, strictDi, name) {
  *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
  * ```
  *
+ * You can disallow this method by using strict injection mode.
+ *
  * This method does not work with code minification / obfuscation. For this reason the following
  * annotation strategies are supported.
  *
@@ -296,6 +301,8 @@ function annotate(fn, strictDi, name) {
  * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to
  * be retrieved as described above.
  *
+ * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.
+ *
  * @returns {Array.<string>} The names of the services which the function requires.
  */
 
plus

11

--- a/lib/PicoFeed/Parser/XmlParser.php
+++ b/lib/PicoFeed/Parser/XmlParser.php
@@ -2,6 +2,7 @@
 
 namespace PicoFeed\Parser;
 
+use Closure;
 use DomDocument;
 use DOMXPath;
 use SimpleXmlElement;
@@ -45,14 +46,14 @@ public static function getSimpleXml($input)
     /**
      * Scan the input for XXE attacks
      *
-     * @param string   $input        Unsafe input
-     * @param string   $callback     Callback called to build the dom.
+     * @param string    $input       Unsafe input
+     * @param Closure   $callback    Callback called to build the dom.
      *                               Must be an instance of DomDocument and receives the input as argument
      *
      * @return bool|DomDocument      False if an XXE attack was discovered,
      *                               otherwise the return of the callback
      */
-    private static function scanInput($input, $callback)
+    private static function scanInput($input, Closure $callback)
     {
         if (substr(php_sapi_name(), 0, 3) === 'fpm') {
 
plus

30

--- a/lib/famous.js
+++ b/lib/famous.js
@@ -38,9 +38,12 @@ function autoHeight(callback) {
     if (callback)
       callback.call(fview, height);
   } else {
-    Engine.nextTick(function() {
+    // Ideally Engine.nextTick, but
+    // https://github.com/Famous/famous/issues/342
+    // e.g. /issue10
+    window.setTimeout(function() {
       fview.autoHeight();
-    });
+    }, 10);  // FYI: 16.67ms = 1x 60fps animation frame
   }
 }
 
plus

13

--- a/impl/src/main/java/uk/ac/manchester/cs/owl/owlapi/MapPointer.java
+++ b/impl/src/main/java/uk/ac/manchester/cs/owl/owlapi/MapPointer.java
@@ -17,6 +17,7 @@
 import gnu.trove.set.hash.THashSet;
 
 import java.lang.ref.SoftReference;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Map;
@@ -147,7 +148,7 @@ public synchronized boolean isInitialized() {
             return this;
         }
         if (visitor instanceof InitVisitor) {
-            for (V ax : (Set<V>) i.getAxiomsByType().getValues(type)) {
+            for (V ax : (Collection<V>) i.getAxiomsByType().getValues(type)) {
                 K key = ax.accept((InitVisitor<K>) visitor);
                 // this can only be null because the visitor return nulls in
                 // methods that do not declare it
@@ -156,7 +157,7 @@ public synchronized boolean isInitialized() {
                 }
             }
         } else {
-            for (V ax : (Set<V>) i.getAxiomsByType().getValues(type)) {
+            for (V ax : (Collection<V>) i.getAxiomsByType().getValues(type)) {
                 Collection<K> keys = ax
                         .accept((InitCollectionVisitor<K>) visitor);
                 for (K key : keys) {
@@ -364,12 +365,12 @@ private boolean removeInternal(K k, V v) {
     }
 
     @Nonnull
-    private Set<V> get(K k) {
+    private Iterable<V> get(K k) {
         Set<V> t = map.get(k);
         if (t == null) {
             return CollectionFactory.emptySet();
         }
-        return t;
+        return new ArrayList<>(t);
     }
 
     /**
plus

42

--- a/flexget/utils/tools.py
+++ b/flexget/utils/tools.py
@@ -404,22 +404,6 @@ def __repr__(self):
         return '%s(%r)' % (self.__class__.__name__, dict(zip(self._store, (v[1] for v in self._store.values()))))
 
 
-class Tee(object):
-    """Used so that output to sys.stdout can be grabbed and still displayed."""
-    def __init__(self, *files):
-        self.files = files
-
-    def __getattr__(self, meth):
-        def method_runner(*args, **kwargs):
-            for f in self.files:
-                try:
-                    getattr(f, meth)(*args, **kwargs)
-                except AttributeError:
-                    # We don't really care if all of our 'files' fully support the file api
-                    pass
-        return method_runner
-
-
 class BufferQueue(Queue.Queue):
     """Used in place of a file-like object to capture text and access it safely from another thread."""
     # Allow access to the Empty error from here
plus

52

--- a/lib/spotify_to_mp3/app.rb
+++ b/lib/spotify_to_mp3/app.rb
@@ -1,39 +1,39 @@
-require 'colorize'
 require 'fileutils'
 require 'spotify_to_mp3/app/stream_track_ids'
 
 module SpotifyToMp3
   class App
-    def initialize(track_id_resolver, grooveshark)
+    def initialize(track_id_resolver, grooveshark, logger)
       @track_id_resolver = track_id_resolver
       @grooveshark = grooveshark
+      @logger = logger
     end
 
     def run
       StreamTrackIds.new(ARGF).each do |track_id|
         begin
-          puts "Resolving \"#{track_id}\""
+          @logger.info "Resolving \"#{track_id}\""
           track = @track_id_resolver.resolve(track_id)
 
-          puts "Searching \"#{track}\" on Grooveshark"
+          @logger.info "Searching \"#{track}\" on Grooveshark"
           grooveshark_track = @grooveshark.get_track(track.grooveshark_query)
 
           if File.exists?(grooveshark_track.filename)
             # To know about songs no longer in download list
             FileUtils.touch grooveshark_track.filename
 
-            puts "Skipping \"#{grooveshark_track}\", it already exists"
+            @logger.info "Skipping \"#{grooveshark_track}\", it already exists"
           else
-            puts "Downloading \"#{grooveshark_track}\""
+            @logger.info "Downloading \"#{grooveshark_track}\""
             @grooveshark.download(grooveshark_track)
           end
         rescue Exception => exception # For some reason without the "Exception" it is ignored
-          puts exception.message.red
+          @logger.error exception.message
           # Continue with the next track
         end
       end
     rescue
-      puts "#{$!}".red
+      @logger.error "#{$!}"
     end
   end
 end
plus

3

--- a/src/MarkdownEdit/MarkdownConverters/IMarkdownConverter.cs
+++ b/src/MarkdownEdit/MarkdownConverters/IMarkdownConverter.cs
@@ -2,6 +2,6 @@
 {
     public interface IMarkdownConverter
     {
-        string ConvertToHtml(string markdown);
+        string ConvertToHtml(string markdown, bool resolveUrls = true);
     }
 }
\ No newline at end of file
plus

23

--- a/text_pastry.py
+++ b/text_pastry.py
@@ -675,7 +675,7 @@ def run(self, edit, start=0, stop=None, step=1, padding=1, fillchar='0', justify
         if global_settings('range_include_end_index', True):
             stop += step
         # if stop is negative, step needs to be negative aswell
-        if (start > stop):
+        if (start > stop and step > 0):
             step = step * -1
         items = [str(x) for x in range(start, stop, step)]
         if padding > 1:
plus

5

--- a/camera/CameraWrapper.cpp
+++ b/camera/CameraWrapper.cpp
@@ -34,6 +34,9 @@
 #include <camera/Camera.h>
 #include <camera/CameraParameters.h>
 
+static char KEY_SUPPORTED_ISO_MODES[] = "iso-values";
+static char KEY_ISO_MODE[] = "iso";
+
 // Sony parameter names
 static char KEY_SONY_IMAGE_STABILISER_VALUES[] = "sony-is-values";
 static char KEY_SONY_IMAGE_STABILISER[] = "sony-is";
@@ -153,7 +156,7 @@ static char *camera_fixup_getparams(int id, const char *settings)
             }
         }
         sprintf(buffer, "%s,auto", buffer);
-        params.set(android::CameraParameters::KEY_SUPPORTED_ISO_MODES, buffer);
+        params.set(KEY_SUPPORTED_ISO_MODES, buffer);
     }
 
     if (params.get(KEY_SONY_IMAGE_STABILISER)) {
@@ -173,16 +176,16 @@ static char *camera_fixup_getparams(int id, const char *settings)
         if (params.get(KEY_SONY_AE_MODE_VALUES)) {
             const char *aeMode = params.get(KEY_SONY_AE_MODE);
             if (strcmp(aeMode, "auto") == 0 ) {
-                params.set(android::CameraParameters::KEY_ISO_MODE, "auto");
+                params.set(KEY_ISO_MODE, "auto");
                 params.set("shutter-speed","auto");
             } else if (strcmp(aeMode, "iso-prio") == 0) {
                 char *isoVal = (char*)malloc(sizeof(char)*
                         (3 + strlen(params.get(KEY_SONY_ISO_MODE))));
                 sprintf(isoVal,"ISO%s",params.get(KEY_SONY_ISO_MODE));
-                params.set(android::CameraParameters::KEY_ISO_MODE,isoVal);
+                params.set(KEY_ISO_MODE,isoVal);
                 params.set("shutter-speed","auto");
             } else if (strcmp(aeMode, "shutter-prio") == 0) {
-                params.set(android::CameraParameters::KEY_ISO_MODE, "auto");
+                params.set(KEY_ISO_MODE, "auto");
                 const char *shutterSpeed = params.get("sony-shutter-speed");
                 if (shutterSpeed) {
                     params.set("shutter-speed",shutterSpeed);
@@ -195,9 +198,9 @@ static char *camera_fixup_getparams(int id, const char *settings)
                 char *isoVal = (char*)malloc(sizeof(char)*
                                         (3 + strlen(params.get(KEY_SONY_ISO_MODE))));
                 sprintf(isoVal,"ISO%s",params.get(KEY_SONY_ISO_MODE));
-                params.set(android::CameraParameters::KEY_ISO_MODE,isoVal);
+                params.set(KEY_ISO_MODE,isoVal);
             } else {
-                params.set(android::CameraParameters::KEY_ISO_MODE, "auto");
+                params.set(KEY_ISO_MODE, "auto");
                 params.set("shutter-speed","auto");
             }
         }
@@ -237,8 +240,8 @@ static char *camera_fixup_setparams(int id, const char *settings)
         }
     }
 
-    if (params.get(android::CameraParameters::KEY_ISO_MODE)) {
-        const char *isoMode = params.get(android::CameraParameters::KEY_ISO_MODE);
+    if (params.get(KEY_ISO_MODE)) {
+        const char *isoMode = params.get(KEY_ISO_MODE);
         if (strcmp(isoMode, "auto") != 0) {
             params.set(KEY_SONY_ISO_MODE, isoMode + 3);
         }
plus

3

--- a/include/utils/RefBase.h
+++ b/include/utils/RefBase.h
@@ -53,6 +53,15 @@ inline bool operator _op_ (const U* o) const {                  \
 
 // ---------------------------------------------------------------------------
 
+/* START JB MR1 COMPAT */
+class ReferenceConverterBase {
+public:
+    virtual size_t getReferenceTypeSize() const = 0;
+    virtual void* getReferenceBase(void const*) const = 0;
+    inline virtual ~ReferenceConverterBase() { }
+};
+/* END JB MR1 COMPAT */
+
 class ReferenceRenamer {
 protected:
     // destructor is purposedly not virtual so we avoid code overhead from
plus

3

--- a/lib/public/stylesheets/app.css
+++ b/lib/public/stylesheets/app.css
@@ -4,6 +4,12 @@
 
 body {
   font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
+  background-color: #BBC7C5;
+}
+
+.container {
+  background-color: #fff;
+  border-bottom: 5px solid #999;
 }
 
 .text-content {
@@ -30,6 +36,10 @@ a {
   text-decoration: none;
 }
 
+#key-keys a:hover {
+  text-decoration: underline;
+}
+
 #settings-button {
   float: left;
 }