plus

124

--- a/realm-annotations-processor/src/main/java/io/realm/processor/RealmVersionChecker.java
+++ b/realm-annotations-processor/src/main/java/io/realm/processor/RealmVersionChecker.java
@@ -27,7 +27,7 @@
 
     public static final String REALM_ANDROID_DOWNLOAD_URL = "http://static.realm.io/downloads/java/latest";
     private static final String VERSION_URL = "http://static.realm.io/update/java?";
-    private static final String REALM_VERSION = "0.75.0"; //TODO: The version value should be pulled from a build file
+    private static final String REALM_VERSION = "0.75.1"; //TODO: The version value should be pulled from a build file
     private static final int READ_TIMEOUT = 2000;
     private static final int CONNECT_TIMEOUT = 4000;
 
plus

6

--- a/db_update.php
+++ b/db_update.php
@@ -161,7 +161,7 @@ function stripslashes_array($array)
 }
 
 $default_style = $luna_config['o_default_style'];
-if (!file_exists(FORUM_ROOT.'style/'.$default_style.'.css'))
+if (!file_exists(FORUM_ROOT.'style/'.$default_style.'/style.css'))
 	$default_style = 'Random';
 
 // Empty all output buffers and stop buffering
plus

4

--- a/alert/scrapers/tasks.py
+++ b/alert/scrapers/tasks.py
@@ -36,7 +36,7 @@ def get_clean_body_content(content):
     """Parse out the body from an html string, clean it up, and send it along.
     """
     cleaner = Cleaner(style=True,
-                      remove_tags=['a', 'body', 'font', 'noscript'])
+                      remove_tags=['a', 'body', 'font', 'noscript', 'img'])
     try:
         return cleaner.clean_html(content)
     except XMLSyntaxError:
plus

6

--- a/src/parsers/sagan-strstr/sagan-strstr-hook.c
+++ b/src/parsers/sagan-strstr/sagan-strstr-hook.c
@@ -77,7 +77,7 @@ char *Sagan_strstr(const char *_x, const char *_y)
 #endif
 
 /* This works similar to "strcasestr".  The "needle" (_y) is assumed to
- * already be converted to lowercase
+ * already be converted to lowercase it "needle_lower" is FALSE. 
  *
  * 0/FALSE == Don't convert needle
  * 1/TRUE  == Convert needle
plus

671

--- a/tests/jenkins.py
+++ b/tests/jenkins.py
@@ -766,9 +766,8 @@ def run(opts):
             print(stderr)
         sys.stderr.flush()
 
-        # Download packages only if the script ran and was successful
-        if 'Build complete' in stdout:
-            download_packages(opts)
+        # Grab packages and log file (or just log file if build failed)
+        download_packages(opts)
 
     if opts.download_remote_reports:
         # Download unittest reports
plus

8

--- a/src/main/java/com/bluepowermod/part/wire/PartWireFace.java
+++ b/src/main/java/com/bluepowermod/part/wire/PartWireFace.java
@@ -131,6 +131,7 @@ public boolean renderStatic(Vec3i translation, RenderHelper renderer, RenderBloc
             renderer.renderBox(new Vec3dCube(8 / 16D - width, 0, 8 / 16D + width, 8 / 16D + width, height, s2 ? 1 : 12 / 16D), icons);
         }
 
+        renderer.setColor(0xFFFFFF);
         renderer.resetTransformations();
 
         return true;
plus

5

--- a/src/worker.js
+++ b/src/worker.js
@@ -6,20 +6,18 @@
 *
 *   { 
 *     text: "the text to encrypt",
-*     uploaderSourcePath: "/path/to/basic_s3_uploader.js"
+*     uploaderFilePath: "/path/to/basic_s3_uploader.js"
 *   }
 */
-addEventListener('message', function(e) {
+self.addEventListener('message', function(e) {
   // Import the uploader, which contains the 
   // asmCrypto library.
-  importScripts(e.data.uploaderSourcePath);
+  self.importScripts(e.data.uploaderFilePath);
 
   // Encrypt the value
   var encrypted = asmCrypto.SHA256.hex(e.data.text);
 
   // Send the encrypted data back
-  postMessage(encrypted);
-  // Terminate the worker
-  terminate();
+  self.postMessage(encrypted);
 
 }, false);
plus

4

--- a/main.cpp
+++ b/main.cpp
@@ -60,10 +60,10 @@ int main() {
     cout<<"danke";
     
     
-    boost::depth_first_search(g.mGraph, boost::visitor(mVisitor));
+    //boost::depth_first_search(g.mGraph, boost::visitor(mVisitor));
     
     cout<<"deupa";
-    
+    g.getStatistics().calculateDegree();
     
     //ofstream myfile;
     //myfile.open ("/Users/O10/Documents/myfile.dot");
plus

3

index 0000000..9c642ae
--- /dev/null
+++ b/src/main.java
@@ -0,0 +1,13 @@
+/**
+ * Created by Sbastien on 03/12/14.
+ */
+
+import javafx.application.Application;
+
+public class main  {
+
+    public static void main(String[] args) {
+
+    }
+
+}
plus

39

--- a/tests/unit/test_control_connection.py
+++ b/tests/unit/test_control_connection.py
@@ -59,7 +59,7 @@ def rebuild_token_map(self, partitioner, token_map):
 
 class MockCluster(object):
 
-    max_schema_agreement_wait = Cluster.max_schema_agreement_wait
+    max_schema_agreement_wait = 5
     load_balancing_policy = RoundRobinPolicy()
     reconnection_policy = ConstantReconnectionPolicy(2)
     down_host = None
@@ -131,7 +131,7 @@ def setUp(self):
         self.connection = MockConnection()
         self.time = FakeTime()
 
-        self.control_connection = ControlConnection(self.cluster, timeout=0.01)
+        self.control_connection = ControlConnection(self.cluster, timeout=1)
         self.control_connection._connection = self.connection
         self.control_connection._time = self.time
 
@@ -206,7 +206,7 @@ def test_wait_for_schema_agreement_fails(self):
         self.connection.peer_results[1][1][2] = 'b'
         self.assertFalse(self.control_connection.wait_for_schema_agreement())
         # the control connection should have slept until it hit the limit
-        self.assertGreaterEqual(self.time.clock, Cluster.max_schema_agreement_wait)
+        self.assertGreaterEqual(self.time.clock, self.cluster.max_schema_agreement_wait)
 
     def test_wait_for_schema_agreement_skipping(self):
         """
@@ -247,7 +247,7 @@ def test_wait_for_schema_agreement_rpc_lookup(self):
         # but once we mark it up, the control connection will care
         host.is_up = True
         self.assertFalse(self.control_connection.wait_for_schema_agreement())
-        self.assertGreaterEqual(self.time.clock, Cluster.max_schema_agreement_wait)
+        self.assertGreaterEqual(self.time.clock, self.cluster.max_schema_agreement_wait)
 
     def test_refresh_nodes_and_tokens(self):
         self.control_connection.refresh_node_list_and_token_map()
@@ -332,12 +332,13 @@ def bad_wait_for_responses(*args, **kwargs):
     def test_refresh_schema_timeout(self):
 
         def bad_wait_for_responses(*args, **kwargs):
-            self.assertEqual(kwargs['timeout'], self.control_connection._timeout)
+            self.time.sleep(kwargs['timeout'])
             raise OperationTimedOut()
 
-        self.connection.wait_for_responses = bad_wait_for_responses
+        self.connection.wait_for_responses = Mock(side_effect=bad_wait_for_responses)
         self.control_connection.refresh_schema()
-        self.cluster.executor.submit.assert_called_with(self.control_connection._reconnect)
+        self.assertEqual(self.connection.wait_for_responses.call_count, self.cluster.max_schema_agreement_wait/self.control_connection._timeout)
+        self.assertEqual(self.connection.wait_for_responses.call_args[1]['timeout'], self.control_connection._timeout)
 
     def test_handle_topology_change(self):
         event = {
plus

3

--- a/client/client.js
+++ b/client/client.js
@@ -590,20 +590,17 @@
         // fullscreen event
         droppy.prefixes.fullscreenchange.forEach(function (eventName) {
             $(document).register(eventName, function () {
-                var fse  = fullScreenElement(),
-                    view = $(fse).parents(".view");
-
-                // unfocus the fullscreen button so the space key won't un-toggle fullscreen
-                document.activeElement.blur();
-
+                var view, fse = fullScreenElement();
+                document.activeElement.blur(); // unfocus the fullscreen button so the space key won't un-toggle fullscreen
                 if (fse) {
+                    view = $(fse).parents(".view");
                     addKey(32, function (e) { swapMedia(view, e.shiftKey ? "left" : "right") });
                     addKey([37, 38], function () { swapMedia(view, "left");  });
                     addKey([39, 40], function () { swapMedia(view, "right"); });
                     view.find(".fs").html(droppy.svg.unfullscreen);
                 } else {
                     removeKey([32, 37, 38, 39, 40]);
-                    view.find(".fs").html(droppy.svg.fullscreen);
+                    $(".fs").html(droppy.svg.fullscreen);
                 }
             });
         });
plus

219

--- a/robolectric-shadows/shadows-core/src/main/java/org/robolectric/shadows/ShadowResourceCursorAdapter.java
+++ b/robolectric-shadows/shadows-core/src/main/java/org/robolectric/shadows/ShadowResourceCursorAdapter.java
@@ -1,19 +1,3 @@
-/*
- * Copyright (C) 2007 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
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 package org.robolectric.shadows;
 
 import android.content.Context;
@@ -32,46 +16,27 @@
 @Implements(ResourceCursorAdapter.class)
 public class ShadowResourceCursorAdapter extends ShadowCursorAdapter {
   private int mLayout;
-
   private int mDropDownLayout;
-
   private LayoutInflater mInflater;
 
-  /**
-   * Constructor.
-   *
-   * @param context The context where the ListView associated with this
-   *            SimpleListItemFactory is running
-   * @param layout resource identifier of a layout file that defines the views
-   *            for this list item.  Unless you override them later, this will
-   *            define both the item views and the drop down views.
-   * @param c The cursor from which to get the data.
-   */
   public void __constructor__(Context context, int layout, Cursor c) {
     super.__constructor__(context, c);
     mLayout = mDropDownLayout = layout;
     mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
   }
 
-  /**
-   * Constructor.
-   *
-   * @param context The context where the ListView associated with this
-   *            SimpleListItemFactory is running
-   * @param layout resource identifier of a layout file that defines the views
-   *            for this list item.  Unless you override them later, this will
-   *            define both the item views and the drop down views.
-   * @param c The cursor from which to get the data.
-   * @param autoRequery If true the adapter will call requery() on the
-   *                    cursor whenever it changes so the most recent
-   *                    data is always displayed.
-   */
   public void __constructor__(Context context, int layout, Cursor c, boolean autoRequery) {
     super.__constructor__(context, c, autoRequery);
     mLayout = mDropDownLayout = layout;
     mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
   }
 
+  public void __constructor__(Context context, int layout, Cursor c, int flags) {
+    super.__constructor__(context, c, flags);
+    mLayout = mDropDownLayout = layout;
+    mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+  }
+
   @Implementation
   public View newView(Context context, Cursor cursor, ViewGroup parent) {
     return mInflater.inflate(mLayout, parent, false);
plus

10

--- a/src/clientiface.cpp
+++ b/src/clientiface.cpp
@@ -386,7 +386,7 @@ int RemoteClient::GetNextBlocks(
 				auto lock = m_blocks_sent.lock_shared_rec();
 				block_sent = m_blocks_sent.find(p) != m_blocks_sent.end() ? m_blocks_sent.get(p) : 0;
 			}
-			if(block_sent > 0 && ((block_overflow && d>1) || block_sent + (d <= 2 ? 1 : d*d) > m_uptime)) {
+			if(block_sent > 0 && ((block_overflow && d>1) || block_sent + (d <= 2 ? 1 : d*d*d) > m_uptime)) {
 				continue;
 			}
 
@@ -399,9 +399,11 @@ int RemoteClient::GetNextBlocks(
 			bool block_is_invalid = false;
 			if(block != NULL)
 			{
-				if (block_sent > 0 && block_sent >= block->m_changed_timestamp) {
-					continue;
-				}
+
+				// todo: remake:
+				//if (block_sent > 0 && block_sent >= block->m_changed_timestamp) {
+				//	continue;
+				//}
 
 /*
 		{
plus

68

--- a/Clockwork/Storage/Storage.php
+++ b/Clockwork/Storage/Storage.php
@@ -15,12 +15,6 @@
 	public $filter = array();
 
 	/**
-	 * Retrieve request specified by id argument, if second argument is specified, array of requests from id to last
-	 * will be returned
-	 */
-	abstract public function retrieve($id = null, $last = null);
-
-	/**
 	 * Same as retrieve, but json representations of requests are returned
 	 */
 	public function retrieveAsJson($id = null, $last = null)
@@ -40,11 +34,6 @@ public function retrieveAsJson($id = null, $last = null)
 	}
 
 	/**
-	 * Store request
-	 */
-	abstract public function store(Request $request);
-
-	/**
 	 * Return array of data with applied filter
 	 */
 	protected function applyFilter(array $data)
plus

7

--- a/src/rpmostree-db-builtin-list.c
+++ b/src/rpmostree-db-builtin-list.c
@@ -93,7 +93,6 @@ rpmostree_db_builtin_list (int argc, char **argv, GCancellable *cancellable, GEr
   gboolean rpmdbdir_is_tmp = FALSE;
   gs_unref_ptrarray GPtrArray *patterns = NULL;
   gs_unref_ptrarray GPtrArray *revs = NULL;
-  GQueue queue = G_QUEUE_INIT;
   gboolean success = FALSE;
   int ii;
 
@@ -103,41 +102,34 @@ rpmostree_db_builtin_list (int argc, char **argv, GCancellable *cancellable, GEr
                                           &rpmdbdir, &rpmdbdir_is_tmp, cancellable, error))
     goto out;
 
-  /* Put all the arguments in a GPtrArray (because it's easier to deal with
-   * than a string vector), and then split the trailing arguments which are
-   * valid commit checksums into a separate GPtrArray. */
-
-  patterns = g_ptr_array_new ();
+  /* Iterate over all arguments. When we see the first argument which
+   * appears to be an OSTree commit, take all other arguments to be
+   * patterns.
+   */
   revs = g_ptr_array_new ();
 
   for (ii = 1; ii < argc; ii++)
-    g_ptr_array_add (patterns, argv[ii]);
-
-    while (patterns->len > 0)
-      {
-        gs_free char *commit = NULL;
-        guint index = patterns->len - 1;
-        char *arg = patterns->pdata[index];
-
-        ostree_repo_resolve_rev (repo, arg, TRUE, &commit, NULL);
-
-        /* Stop when we find a non-commit argument. */
-        if (commit == NULL)
-          break;
+    {
+      if (patterns != NULL)
+        g_ptr_array_add (patterns, argv[ii]);
+      else
+        {
+          gs_free char *commit = NULL;
 
-        /* XXX Need to PREPEND to the 'revs' array to preserve order, but
-         *     in GLib versions prior to 2.40 you can only (easily) APPEND
-         *     to a GPtrArray.  g_ptr_array_insert() is not available to us
-         *     at this time, so use a GQueue to swap the order. */
-        g_queue_push_head (&queue, arg);
-        g_ptr_array_remove_index (patterns, index);
-      }
+          ostree_repo_resolve_rev (repo, argv[ii], TRUE, &commit, NULL);
 
-    while (!g_queue_is_empty (&queue))
-      g_ptr_array_add (revs, g_queue_pop_head (&queue));
+          if (!commit)
+            {
+              patterns = g_ptr_array_new ();
+              g_ptr_array_add (patterns, argv[ii]);
+            }
+          else
+            g_ptr_array_add (revs, argv[ii]);
+        }
+    }
 
-    if (!_builtin_db_list (repo, rpmdbdir, revs, patterns, cancellable, error))
-      goto out;
+  if (!_builtin_db_list (repo, rpmdbdir, revs, patterns, cancellable, error))
+    goto out;
 
   success = TRUE;
 
plus

58

--- a/include/localization.js
+++ b/include/localization.js
@@ -142,21 +142,45 @@ Localization.best = function(request){
 Localization.init = function() {
 	var supportedLocales = [];
 	Localization.storage = {};
-	for (var i = 0; i < pb.config.locales.supported.length; i++) {
-
-		var obj              = {generic: {}};
-		var localeDescriptor = pb.config.locales.supported[i];
-		try {
-			obj = require(localeDescriptor.file);
+    
+    //create path to localization directory
+    var localizationDir = path.join(DOCUMENT_ROOT, 'public', 'localization');
+    var files = fs.readdirSync(localizationDir);
+    files.forEach(function(file) {
+        if (file === '.' || file === '..') {
+            return;   
+        }
+        
+        //check extension
+        var ext   = '';
+        var index = file.lastIndexOf('.');
+        if (index >= 0) {
+            ext = file.substring(index);
+        }
+        if (ext != '.js') {
+            return;
+        }
+        
+        //parse the file
+        var obj          = {generic: {}};
+        var absolutePath = path.join(localizationDir, file);
+        try {
+			obj = require(absolutePath);
 		}
 		catch(e) {
-			pb.log.warn('Localization: Failed to load core localization file [%s]. Localization may be provided by a plugin', localeDescriptor.file);
+			pb.log.warn('Localization: Failed to load core localization file [%s]. %s', absolutePath, e.stack);
 		}
-		Localization.storage[localeDescriptor.locale.toLowerCase()] = obj;
-		supportedLocales.push(localeDescriptor.locale);
-	}
-
-	pb.log.debug("Localization: Supporting - " + JSON.stringify(supportedLocales));
+        
+        //convert file name to locale
+        var locale = file.toLowerCase().substring(0, file.indexOf('.')).replace(/-/g, '_');
+        
+        //Register as a supported language
+        Localization.storage[locale] = obj;
+		supportedLocales.push(locale);
+    });
+    
+    //set the supported locales
+    pb.log.debug("Localization: Supporting - " + JSON.stringify(supportedLocales));
 	Localization.supported = new locale.Locales(supportedLocales);
 };
 
plus

3

--- a/pg7_source_files/Player.h
+++ b/pg7_source_files/Player.h
@@ -3,7 +3,7 @@
  inheritted from Player class
  */
 
-#include "Player.h"
+#include "Hand.h"
 #include <string>
 #include <vector>
 
@@ -57,9 +57,11 @@ class Player {
     bool isValidHand() { if (this->myHand.size <= 7) return true; else return false; };
     
     // Validates sellOne(int handInd)
-    bool isValidSaleOfOne()
+    bool isValidSaleOfOne();
     
     // Validates sellMult()
+    
+    friend class Hand;
 };
 
 #endif
plus

179

--- a/src/Codeception/Lib/InnerBrowser.php
+++ b/src/Codeception/Lib/InnerBrowser.php
@@ -378,25 +378,26 @@ protected function getFormUrl($form)
         }
         
         $build = parse_url($currentUrl);
-        $uriparts = parse_url($action);
-        
         if ($build === false) {
-            throw new \Codeception\Exception\TestRuntime("URL '{$currentUrl}' is malformed");
-        } elseif ($uriparts === false) {
-            throw new \Codeception\Exception\TestRuntime("URI '{$action}' is malformed");
+            throw new TestRuntime("URL '$currentUrl' is malformed");
+        }
+
+        $uriParts = parse_url($action);
+        if ($uriParts === false) {
+            throw new TestRuntime("URI '$action' is malformed");
         }
         
-        foreach ($uriparts as $part => $value) {
+        foreach ($uriParts as $part => $value) {
             if ($part === 'path' && strpos($value, '/') !== 0 && !empty($build[$part])) {
                 // if it ends with a slash, relative paths are below it
                 if (preg_match('~/$~', $build[$part])) {
                     $build[$part] = $build[$part] . $value;
-                } else {
-                    $build[$part] = dirname($build[$part]) . '/' . $value;
+                    continue;
                 }
-            } else {
-                $build[$part] = $value;
+                $build[$part] = dirname($build[$part]) . '/' . $value;
+                continue;
             }
+            $build[$part] = $value;
         }
         return \GuzzleHttp\Url::buildUrl($build);
     }
plus

18

--- a/updates.sh
+++ b/updates.sh
@@ -16,6 +16,9 @@ fi
 # build: Add option to disable block-based ota
 cherries+=(78849)
 
+# recovery: Always include ext4 stuff
+cherries+=(79803)
+
 # Android: driver_nl80211: implement NoA/p2p_ps/set_wps_ie stubs
 cherries+=(78120)
 
@@ -26,6 +29,6 @@ cherries+=(78853)
 cherries+=(79136)
 
 # libutils: refbase: jellybean mr1 compat
-cherries2+=(79142)
+cherries+=(79142)
 
 ${android}/build/tools/repopick.py -b ${cherries[@]}
plus

24

--- a/src/BattleServer/battlerby.cpp
+++ b/src/BattleServer/battlerby.cpp
@@ -707,21 +707,32 @@ int BattleRBY::calculateDamage(int p, int t)
         def = crit ? this->poke(t).normalStat(SpAttack) : getStat(t, SpAttack);
     }
 
+    //burn
+    if (!crit) {
+        //Burn does not halve the attack stat during damage calculation of Critical hits in RBY
+        attack = attack / ((poke.status() == Pokemon::Burnt && cat == Move::Physical) ? 2 : 1);
+        //Minimum attack is set to 1
+        if (attack == 0) {
+            attack = 1;
+        }
+    }
     /* Light screen / Reflect */
+    //In RBY, Reflect / Light Screen boost doesn't cap the stat at 999 or 1023
     if ( !crit && pokeMemory(t).value("Barrier" + QString::number(cat) + "Count").toInt() > 0) {
-        def = std::min(1024, def*2);
+        def*=2;
     }
-    
+
     // In RBY, if either stat is higher than 255, both are quartered during damage calculation
     if (def > 255 || attack > 255) {
-    	def = (def/4) % 256;
-	if (def == 0)
-	    def = 1;
-	attack = (attack/4) % 256;
-	if (attack == 0)
-	    attack = 1;
-    }		
-	
+        def = (def/4) % 256;
+        if (def == 0)
+            def = 1;
+
+        attack = (attack/4) % 256;
+        if (attack == 0)
+            attack = 1;
+    }
+
     attack = std::min(attack, 65535);
 
     if ( (attackused == Move::Explosion || attackused == Move::Selfdestruct)) {
@@ -740,12 +751,6 @@ int BattleRBY::calculateDamage(int p, int t)
     power = std::min(power, 65535);
     int damage = ((std::min(((level * ch * 2 / 5) + 2) * power, 65535) * attack / def) / 50) + 2;
 
-    //Guts, burn
-    if (!crit){
-        //Burn does not halve the damage of Critical hits in RBY
-        damage = damage / ((poke.status() == Pokemon::Burnt && cat == Move::Physical) ? 2 : 1);
-    }
-
     damage = (damage * stab/2) ;
     while (typemod > 0) {
         damage *= 2;
@@ -755,7 +760,12 @@ int BattleRBY::calculateDamage(int p, int t)
         damage /= 2;
         typemod++;
     }
-    damage = (damage * randnum) / 255;
+
+    // In RBY, minimum damage after randnum is applied is 1,
+    // unless it became 0 during typemod calculations.
+    if (damage != 1) {
+        damage = (damage * randnum) / 255;
+    }
 
     return damage;
 }