plus

3

--- a/Port.java
+++ b/Port.java
@@ -5,7 +5,7 @@
 public class Port {
 	private int portNumber;
     public Port(int portNumberParam){
-    	portNumber = portNumberParam % (NUMBER_OF_PORTS + 1)
+    	portNumber = portNumberParam % (NUMBER_OF_PORTS + 1);
     }
 
     public port(byte higherByte, byte lowerByte){
plus

3

--- a/apps/fssrecon/fssrecon.cc
+++ b/apps/fssrecon/fssrecon.cc
@@ -160,6 +160,19 @@ main (int argc, char** argv)
         return 1;
     }
 
+    /* Surfaces between voxels with zero confidence are ghosts. */
+    std::cout << "Deleting zero confidence vertices..." << std::flush;
+    {
+        timer.reset();
+        std::size_t num_vertices = mesh->get_vertices().size();
+        mve::TriangleMesh::DeleteList delete_verts(num_vertices, false);
+        for (std::size_t i = 0; i < num_vertices; ++i)
+        if (mesh->get_vertex_confidences()[i] == 0.0f)
+            delete_verts[i] = true;
+        mesh->delete_vertices_fix_faces(delete_verts);
+    }
+    std::cout << " took " << timer.get_elapsed() << "ms." << std::endl;
+
     /* Check for color and delete if not existing. */
     mve::TriangleMesh::ColorList& colors = mesh->get_vertex_colors();
     if (!colors.empty() && colors[0].minimum() < 0.0f)
plus

6

--- a/src/toxprpl.c
+++ b/src/toxprpl.c
@@ -1320,7 +1320,7 @@ static int toxprpl_send_im(PurpleConnection *gc, const char *who,
     if (purple_message_meify(no_html, -1))
     {
         if (tox_send_action(plugin->tox, buddy_data->tox_friendlist_number,
-                                    (uint8_t *)no_html, strlen(message)+1) != 0)
+                                    (uint8_t *)no_html, strlen(message)) != 0)
         {
             message_sent = 1;
         }
@@ -1328,7 +1328,7 @@ static int toxprpl_send_im(PurpleConnection *gc, const char *who,
     else
     {
         if (tox_send_message(plugin->tox, buddy_data->tox_friendlist_number,
-                                   (uint8_t *)no_html, strlen(message)+1) != 0)
+                                   (uint8_t *)no_html, strlen(message)) != 0)
         {
             message_sent = 1;
         }
plus

586

--- a/src/node/hooks/express/socketio.js
+++ b/src/node/hooks/express/socketio.js
@@ -1,24 +1,22 @@
 var log4js = require('log4js');
 var settings = require('../../utils/Settings');
+var socketio = require('socket.io');
 var socketIORouter = require("../../handler/SocketIORouter");
 var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
 var webaccess = require("ep_etherpad-lite/node/hooks/express/webaccess");
 
-// there shouldn't be a browser that isn't compatible to all 
-// transports in this list at once
-// e.g. XHR is disabled in IE by default, so in IE it should use jsonp-polling
-
-var socketio = require('socket.io')({
-  transports: settings.socketTransportProtocols
-});
-
 var padMessageHandler = require("../../handler/PadMessageHandler");
 
 var connect = require('connect');
  
 exports.expressCreateServer = function (hook_name, args, cb) {
   //init socket.io and redirect all requests to the MessageHandler
-  var io = socketio.listen(args.server);
+  // there shouldn't be a browser that isn't compatible to all
+  // transports in this list at once
+  // e.g. XHR is disabled in IE by default, so in IE it should use jsonp-polling
+  var io = socketio({
+    transports: settings.socketTransportProtocols
+  }).listen(args.server);
 
   /* Require an express session cookie to be present, and load the
    * session. See http://www.danielbaulig.de/socket-ioexpress for more
plus

114

--- a/libr/util/p_format.c
+++ b/libr/util/p_format.c
@@ -480,8 +480,12 @@ int r_print_format_struct_size(const char *f, RPrint *p) {
 	int size = 0, tabsize=0, i, idx=0;
 	if (!end && !(end = strchr (o, '\0')))
 		return -1;
-	*end = 0;
-	args = strdup (end+1);
+	if (*end) {
+		*end = 0;
+		args = strdup (end+1);
+	} else {
+		args = strdup ("");
+	}
 	r_str_word_set0 (args);
 	for (i=0; i<strlen (fmt); i++) {
 		if (fmt[i] == '[') {
@@ -1080,18 +1084,18 @@ R_API int r_print_format(RPrint *p, ut64 seek, const ut8* b, const int len,
 				slide += (isptr) ? STRUCTPTR : NESTEDSTRUCT;
 				if (size == -1) {
 					s = r_print_format_struct (p, seeki,
-						buf+i, len, structname, slide, json);
+						buf+i, len-i, structname, slide, json);
 					i+= (isptr) ? 4 : s;
 				} else {
 					p->printf ("[\n");
 					s = r_print_format_struct (p, seeki,
-						buf+i, len, structname, slide, json);
+						buf+i, len-i, structname, slide, json);
 					i+= (isptr) ? 4 : s;
 					size--;
 					while (size--) {
 						p->printf (",\n");
 						s = r_print_format_struct (p, seeki,
-							buf+i, len, structname, slide, json);
+							buf+i, len-i, structname, slide, json);
 						i+= (isptr) ? 4 : s;
 					}
 					if (json) p->printf ("]]}");
plus

34

--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -127,6 +127,18 @@ class SK_API SkPixelRef : public SkRefCnt {
     */
     uint32_t getGenerationID() const;
 
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+    /** Returns a non-zero, unique value corresponding to this SkPixelRef.
+        Unlike the generation ID, this ID remains the same even when the pixels
+        are changed. IDs are not reused (until uint32_t wraps), so it is safe
+        to consider this ID unique even after this SkPixelRef is deleted.
+
+        Can be used as a key which uniquely identifies this SkPixelRef
+        regardless of changes to its pixels or deletion of this object.
+     */
+    uint32_t getStableID() const { return fStableID; }
+#endif
+
     /**
      *  Call this if you have changed the contents of the pixels. This will in-
      *  turn cause a 
plus

73

--- a/system/src/Grav/Common/Page/Page.php
+++ b/system/src/Grav/Common/Page/Page.php
@@ -258,9 +258,15 @@ public function header($var = null)
      */
     public function summary($size = null)
     {
-
         $content = $this->content();
 
+        // Handle summary divider
+        $divider_pos = strpos($content, '<p>'.SUMMARY_DELIMITER.'</p>');
+        if ($divider_pos !== false) {
+            $this->summary_size = $divider_pos;
+            $content = str_replace('<p>'.SUMMARY_DELIMITER.'</p>', '', $content);
+        }
+
         // Return calculated summary based on summary divider's position
         if (!$size && isset($this->summary_size)) {
             return substr($content, 0, $this->summary_size);
@@ -349,13 +355,6 @@ public function content($var = null)
                 $cache->save($cache_id, $this->content);
             }
 
-            // Handle summary divider
-            $divider_pos = strpos($this->content, '<p>'.SUMMARY_DELIMITER.'</p>');
-            if ($divider_pos !== false) {
-                $this->summary_size = $divider_pos;
-                $this->content = str_replace('<p>'.SUMMARY_DELIMITER.'</p>', '', $this->content);
-            }
-
             // Process any post-processing but pre-caching functionality
             self::$grav->fireEvent('onPageContentProcessed', new Event(['page' => $this]));
 
plus

3

--- a/lib/rest-core/promise.rb
+++ b/lib/rest-core/promise.rb
@@ -162,7 +162,11 @@ def protected_yield
       # so we just log the error
       # TODO: add error_log_method
       warn "RestCore: ERROR: #{e}\n  from #{e.backtrace.inspect}"
-      rejecting(e) unless done?  # not done: i/o error; done: callback error
+      begin
+        rejecting(e)
+      rescue Exception => e
+        warn "RestCore: ERROR: #{e}\n  from #{e.backtrace.inspect}"
+      end unless done? # not done: i/o error; done: callback error
     end
   end
 
plus

26

--- a/aura-components/src/main/components/aura/placeholder/placeholderRenderer.js
+++ b/aura-components/src/main/components/aura/placeholder/placeholderRenderer.js
@@ -33,11 +33,14 @@
         var atts = {};
         for(var x in attributes){
             var value=attributes[x];
-            if(value["descriptor"]){
-                value=value["value"];
-            }
-            if($A.util.isExpression(value)){
-                value=value.evaluate();
+            // Attribute values can be falsey values, which will not be a descriptor or an expression
+            if(value) {
+	            if(value["descriptor"]){
+	                value=value["value"];
+	            }
+	            if($A.util.isExpression(value)){
+	                value=value.evaluate();
+	            }
             }
             atts[x]=value;
         }
plus

5

--- a/lib/taste_tester/host.rb
+++ b/lib/taste_tester/host.rb
@@ -179,7 +179,8 @@ def config
       if TasteTester::Config.use_ssh_tunnels
         url = "http://localhost:#{@tunnel.port}"
       else
-        url = "http://#{@server.host}:#{TasteTester::State.port}"
+        scheme = TasteTester::Config.use_ssl ? 'http' : 'https'
+        url = "#{scheme}://#{@server.host}:#{TasteTester::State.port}"
       end
       ttconfig = <<-eos
 # TasteTester by #{@user}
@@ -189,12 +190,13 @@ def config
   Process.exit!
 end
 
-log_level                :info
-log_location             STDOUT
-chef_server_url          '#{url}'
+log_level :info
+log_location STDOUT
+chef_server_url '#{url}'
+ssl_verify_mode :verify_none
 Ohai::Config[:plugin_path] << '/etc/chef/ohai_plugins'
 
-      eos
+eos
 
       extra = TasteTester::Hooks.test_remote_client_rb_extra_code(@name)
       if extra
plus

3

--- a/src/Vision.cpp
+++ b/src/Vision.cpp
@@ -2164,7 +2164,7 @@ bool Vision::Results::isBallInGoal(Object* ball, Object* blueGoal, Object* yello
 	return false;
 }
 
-Vision::BallInWayMetric Vision::Results::getBallInWayMetric(ObjectList balls, int goalY) {
+Vision::BallInWayMetric Vision::Results::getBallInWayMetric(ObjectList balls, int goalY, Object* ignoreBall) {
 	Object* blueGoal = getLargestGoal(Side::BLUE);
 	Object* yellowGoal = getLargestGoal(Side::YELLOW);
 
@@ -2182,6 +2182,12 @@ Vision::BallInWayMetric Vision::Results::getBallInWayMetric(ObjectList balls, in
 
 	for (ObjectListItc it = balls.begin(); it != balls.end(); it++) {
 		ball = *it;
+
+		if (ignoreBall != NULL && ball == ignoreBall) {
+			std::cout << "@ IGNORING OWN BALL" << std::endl;
+
+			continue;
+		}
 		
 		if (isBallInGoal(ball, blueGoal, yellowGoal) || ball->getDribblerDistance() < 0.02f) {
 			continue;
plus

172

--- a/be/src/exprs/aggregate-functions.cc
+++ b/be/src/exprs/aggregate-functions.cc
@@ -1026,7 +1026,7 @@ void AggregateFunctions::HllMerge(FunctionContext* ctx, const StringVal& src,
   }
 }
 
-inline uint64_t AggregateFunctions::HllFinalEstimate(const uint8_t* buckets,
+uint64_t AggregateFunctions::HllFinalEstimate(const uint8_t* buckets,
     int32_t num_buckets) {
   DCHECK_NOTNULL(buckets);
   DCHECK_EQ(num_buckets, HLL_LEN);
plus

172

--- a/be/src/exprs/aggregate-functions.cc
+++ b/be/src/exprs/aggregate-functions.cc
@@ -1026,7 +1026,7 @@ void AggregateFunctions::HllMerge(FunctionContext* ctx, const StringVal& src,
   }
 }
 
-inline uint64_t AggregateFunctions::HllFinalEstimate(const uint8_t* buckets,
+uint64_t AggregateFunctions::HllFinalEstimate(const uint8_t* buckets,
     int32_t num_buckets) {
   DCHECK_NOTNULL(buckets);
   DCHECK_EQ(num_buckets, HLL_LEN);
plus

21

--- a/src/mame/drivers/supduck.c
+++ b/src/mame/drivers/supduck.c
@@ -365,15 +365,15 @@ static INPUT_PORTS_START( supduck )
 	PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 )
 
 	PORT_START("DSW")
-	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
-	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
-	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
-	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
-	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
-	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
-	PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
-	PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
-	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
+	PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) )
+	PORT_DIPSETTING(      0x0000, DEF_STR( 5C_1C ) )
+	PORT_DIPSETTING(      0x0001, DEF_STR( 4C_1C ) )
+	PORT_DIPSETTING(      0x0002, DEF_STR( 3C_1C ) )
+	PORT_DIPSETTING(      0x0003, DEF_STR( 2C_1C ) )
+	PORT_DIPSETTING(      0x0007, DEF_STR( 1C_1C ) )
+	PORT_DIPSETTING(      0x0006, DEF_STR( 1C_2C ) )
+	PORT_DIPSETTING(      0x0005, DEF_STR( 1C_3C ) )
+	PORT_DIPSETTING(      0x0004, DEF_STR( 1C_4C ) )
 	PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
 	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
@@ -407,12 +407,10 @@ static INPUT_PORTS_START( supduck )
 	PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
 	PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
-	PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
+	PORT_DIPNAME( 0x4000, 0x4000, "Character Test" )
 	PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
-	PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
-	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
-	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
+	PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
 INPUT_PORTS_END
 
 
@@ -581,4 +579,4 @@ ROM_START( supduck )
 	ROM_LOAD( "1.su13",   0x00000, 0x80000, CRC(7fb1ed42) SHA1(77ec86a6454398e329066aa060e9b6a39085ce71) ) // banked sample data
 ROM_END
 
-GAME( 1992, supduck, 0, supduck, supduck, driver_device, 0, ROT0, "Comad", "Super Duck", GAME_NOT_WORKING )
+GAME( 1992, supduck, 0, supduck, supduck, driver_device, 0, ROT0, "Comad", "Super Duck", GAME_IMPERFECT_COLORS )
plus

5

--- a/src/main/java/org/jboss/ejb/client/Affinity.java
+++ b/src/main/java/org/jboss/ejb/client/Affinity.java
@@ -80,5 +80,9 @@ public boolean equals(final Affinity obj) {
         protected Object readResolve() {
             return NONE;
         }
+
+        public String toString() {
+            return "None";
+        }
     }
 }
plus

3

index 0000000..2374bb8
--- /dev/null
+++ b/src/tetris/Player.java
@@ -0,0 +1,47 @@
+package tetris;
+
+public abstract class Player {
+	
+	protected String username;
+
+	public Player() {
+		username = "Anonymous";
+	}
+	
+	public Player(String newName)
+	{
+		newName = username;
+	}
+
+	public String getName()
+	{
+		return username;
+	}
+	
+	public void setName(String newName)
+	{
+		newName = username;
+	}
+	
+	public abstract boolean equals(Object o);
+	
+	public int compareTo(Object o)
+	{
+		if(this.getName().compareToIgnoreCase(username) < 0)
+			return -1;
+		else if (this.getName().compareToIgnoreCase(username) > 0)	
+			return 1;
+		else return 0;
+	}
+	
+	
+	//public int calcScore()
+	
+		
+	
+	
+	public String toString()
+	{
+		return "Player username is: " + username;
+	}
+}
plus

68

--- a/lib/plugin/load_plugins.php
+++ b/lib/plugin/load_plugins.php
@@ -48,7 +48,11 @@ public static function load() {
 
             // but before we load the libraries required by this lib
             foreach ($pluginClass->getRequiredLibraries() as $lib) {
-                require_once ROOT_PATH . 'plugins/' . $plugin->getName() . '/' . $lib;
+                require_once $plugin_path . '/' . $lib;
+            }
+            // if this plugin uses composer, require the autoload
+            if (file_exists($plugin_path . '/vendor/autoload.php')) {
+                require_once $plugin_path . '/vendor/autoload.php';
             }
             $init_queue[] = $pluginClass;
             return $pluginClass;
plus

416

--- a/apps/files/appinfo/remote.php
+++ b/apps/files/appinfo/remote.php
@@ -38,7 +38,7 @@
 $defaults = new OC_Defaults();
 $server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend, $defaults->getName()));
 $server->addPlugin(new \Sabre\DAV\Locks\Plugin($lockBackend));
-$server->addPlugin(new \Sabre\DAV\Browser\Plugin(false)); // Show something in the Browser, but no upload
+$server->addPlugin(new \Sabre\DAV\Browser\Plugin(false, false)); // Show something in the Browser, but no upload
 $server->addPlugin(new OC_Connector_Sabre_FilesPlugin());
 $server->addPlugin(new OC_Connector_Sabre_MaintenancePlugin());
 $server->addPlugin(new OC_Connector_Sabre_ExceptionLoggerPlugin('webdav'));
plus

9

--- a/src/core/com/frostwire/android/util/ImageLoader.java
+++ b/src/core/com/frostwire/android/util/ImageLoader.java
@@ -29,6 +29,7 @@
 import android.provider.MediaStore;
 import android.widget.ImageView;
 import com.frostwire.android.gui.services.Engine;
+import com.frostwire.logging.Logger;
 import com.squareup.picasso.Picasso;
 import com.squareup.picasso.Picasso.Builder;
 import com.squareup.picasso.Request;
@@ -43,6 +44,8 @@
  */
 public final class ImageLoader {
 
+    private static final Logger LOG = Logger.getLogger(ImageLoader.class);
+
     private static final int MIN_DISK_CACHE_SIZE = 5 * 1024 * 1024; // 5MB
     private static final int MAX_DISK_CACHE_SIZE = 50 * 1024 * 1024; // 50MB
 
@@ -86,15 +89,22 @@ public final static ImageLoader getInstance(Context context) {
      */
     public static Bitmap getAlbumArt(Context context, String albumId) {
         Bitmap bitmap = null;
-        Cursor cursor = context.getContentResolver().query(Uri.withAppendedPath(MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI, albumId), new String[]{MediaStore.Audio.AlbumColumns.ALBUM_ART}, null, null, null);
 
         try {
-            if (cursor.moveToFirst()) {
-                String albumArt = cursor.getString(0);
-                bitmap = BitmapFactory.decodeFile(albumArt);
+
+            Cursor cursor = context.getContentResolver().query(Uri.withAppendedPath(MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI, albumId), new String[]{MediaStore.Audio.AlbumColumns.ALBUM_ART}, null, null, null);
+
+            try {
+                if (cursor.moveToFirst()) {
+                    String albumArt = cursor.getString(0);
+                    bitmap = BitmapFactory.decodeFile(albumArt);
+                }
+            } finally {
+                cursor.close();
             }
-        } finally {
-            cursor.close();
+
+        } catch (Throwable e) {
+            LOG.error("Error getting album art", e);
         }
 
         return bitmap;
plus

3

--- a/config/unicorn.rb
+++ b/config/unicorn.rb
@@ -11,47 +11,18 @@
 GC.copy_on_write_friendly = true if GC.respond_to?(:copy_on_write_friendly=)
 
 before_fork do |server, worker|
-  ##
-  # When sent a USR2, Unicorn will suffix its pidfile with .oldbin and
-  # immediately start loading up a new version of itself (loaded with a new
-  # version of our app). When this new Unicorn is completely loaded
-  # it will begin spawning workers. The first worker spawned will check to
-  # see if an .oldbin pidfile exists. If so, this means we've just booted up
-  # a new Unicorn and need to tell the old one that it can now die. To do so
-  # we send it a QUIT.
-  #
-  # Using this method we get 0 downtime deploys.
-
-  old_pid = "#{root}/tmp/pids/unicorn.pid.oldbin"
-
-  if File.exists?(old_pid) && server.pid != old_pid
-    begin
-      Process.kill('QUIT', File.read(old_pid).to_i)
-    rescue Errno::ENOENT, Errno::ESRCH
-      # Someone else did our job for us
-    end
+  Signal.trap 'TERM' do
+    puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
+    Process.kill 'QUIT', Process.pid
   end
+
+  defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
 end
 
 after_fork do |server, worker|
-  ActiveRecord::Base.establish_connection
-
-  ##
-  # Unicorn master is started as root, which is fine, but let's
-  # drop the workers to git:git
-  begin
-    uid, gid = Process.euid, Process.egid
-    user, group = 'deploy', 'deploy'
-    target_uid = Etc.getpwnam(user).uid
-    target_gid = Etc.getgrnam(group).gid
-    worker.tmp.chown(target_uid, target_gid)
-
-    if uid != target_uid || gid != target_gid
-      Process.initgroups(user, target_gid)
-      Process::GID.change_privilege(target_gid)
-      Process::UID.change_privilege(target_uid)
-    end
-  rescue => e
-    raise e
+  Signal.trap 'TERM' do
+    puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
   end
+
+  defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection
 end