plus

7

--- a/week5/01_p5_examples/05_external_API_weather0/sketch.js
+++ b/week5/01_p5_examples/05_external_API_weather0/sketch.js
@@ -1,8 +1,6 @@
-var bubbles = [];
-
 function setup() {
 
-	loadJSON('http://api.openweathermap.org/data/2.5/weather?q=NewYork,USA', drawWeather); 
+  loadJSON('http://api.openweathermap.org/data/2.5/weather?q=NewYork,USA', drawWeather); 
 
   createCanvas(600, 400);
   noLoop();
@@ -10,10 +8,6 @@ function setup() {
 
 }
 
-function draw() {
-
-}
-
 function drawWeather(weather) {
 
   // Get the loaded JSON data
@@ -26,4 +20,4 @@ function drawWeather(weather) {
   for (var i = 0; i < 50; i++) {
     ellipse(random(width), random(height), 30, 30);
   }
-}
\ No newline at end of file
+}
plus

20

--- a/src/comm/LinkManager.cc
+++ b/src/comm/LinkManager.cc
@@ -673,9 +673,6 @@ UASInterface* LinkManager::createUAS(MAVLinkProtocol* mavlink, LinkInterface* li
     case MAV_AUTOPILOT_ARDUPILOTMEGA:
     {
         ArduPilotMegaMAV* mav = new ArduPilotMegaMAV(0, sysid);
-        UASObject *obj = new UASObject();
-        connect(mavlink,SIGNAL(messageReceived(LinkInterface*,mavlink_message_t)),obj,SLOT(messageReceived(LinkInterface*,mavlink_message_t)));
-        m_uasObjectMap[sysid] = obj;
 
         // Set the system type
         mav->setSystemType((int)heartbeat->type);
@@ -711,6 +708,10 @@ UASInterface* LinkManager::createUAS(MAVLinkProtocol* mavlink, LinkInterface* li
     break;
     }
 
+    UASObject *obj = new UASObject();
+    connect(mavlink,SIGNAL(messageReceived(LinkInterface*,mavlink_message_t)),obj,SLOT(messageReceived(LinkInterface*,mavlink_message_t)));
+    m_uasObjectMap[sysid] = obj;
+
     m_uasMap.insert(sysid,uas);
 
     // Set the autopilot type
plus

45

--- a/scripts/crontab/gen-crons.py
+++ b/scripts/crontab/gen-crons.py
@@ -15,7 +15,7 @@ def main():
     parser.add_option("-u", "--user",
                       help=("Prefix cron with this user. "
                            "Only define for cron.d style crontabs"))
-    parser.add_option("-p", "--python", default="python",
+    parser.add_option("-p", "--python", default="python2.7",
                       help="Python interpreter to use")
 
     (opts, args) = parser.parse_args()
@@ -23,9 +23,6 @@ def main():
     if not opts.kitsune:
         parser.error("-k must be defined")
 
-    # To pick up the right PyOpenSSL:
-    python_path = 'PYTHONPATH+=:/usr/local/lib64/python2.6/site-packages'
-
     ctx = {
         'django': 'cd %s; source virtualenv/bin/activate; %s %s -W ignore::DeprecationWarning manage.py' % (
             opts.kitsune, python_path, opts.python),
plus

7

--- a/content/js/application.js
+++ b/content/js/application.js
@@ -166,8 +166,9 @@ RESTEasy.ApplicationController = Ember.Controller.extend({
                         raw: request.response
                     };
 
-                // TODO: this is broken for binary filetypes - raw should be a
-                // hex dump and (for images) a preview should be displayed
+                // TODO: this is not implemented correctly for binary filetypes
+                // - raw should be a hex dump and (for images) a preview should
+                //   be displayed
 
                 // If the MIME type is text/*, then display a preview of the document
                 if(contentType.substring(0, 5) == 'text/')
plus

3291

--- a/Library/Formula/osquery.rb
+++ b/Library/Formula/osquery.rb
@@ -6,8 +6,9 @@ class Osquery < Formula
   url "https://github.com/facebook/osquery.git", :tag => "1.2.2"
 
   bottle do
-    sha1 "b65784d812adc0b95fded3c3901225541b8a2c40" => :yosemite
-    sha1 "51597010429a9f75196c09baa345a146468184f3" => :mavericks
+    revision 1
+    sha1 "a8142c2f22c3547d343a9eb86e3329ed1e4d464c" => :yosemite
+    sha1 "a45c7c5b005bb11e8ac414eca0af4dcce77cbe53" => :mavericks
   end
 
   # Build currently fails on Mountain Lion:
@@ -35,6 +36,12 @@ class Osquery < Formula
   end
 
   def install
+    # Apply upstream commit to fix illegal hardware instruction:
+    # https://github.com/facebook/osquery/commit/20259a
+    # https://github.com/facebook/osquery/issues/563
+    # https://github.com/Homebrew/homebrew/issues/35343
+    inreplace "CMakeLists.txt", "-Wl,-all_load", "-Wl,-force_load"
+
     ENV.prepend_create_path "PYTHONPATH", buildpath+"third-party/python/lib/python2.7/site-packages"
 
     resources.each do |r|
plus

3

--- a/lib/CRM/models/contactually.php
+++ b/lib/CRM/models/contactually.php
@@ -272,6 +272,10 @@ public function createContact ($args) {
 		// Set e-mail...
 		$contact["email"] = empty($args["email"]) ? "<none provided>" : $args["email"];
 
+		// Set phone if available
+		if(!empty($args["phone"]))
+			$contact["phone_numbers"] = array(array("label" => "Phone", "value" => $args["phone"]));
+
 		// TODO: Pass the site's URL as a note, push to a site-specific bucket, pass along the message, etc.
 		//
 		// Can't do this until Contactually actually documents their API properly AND gives us the ability to
plus

331

--- a/packages/ember-data/lib/system/model/model.js
+++ b/packages/ember-data/lib/system/model/model.js
@@ -34,6 +34,33 @@ function extractPivotName(name) {
   );
 }
 
+// Like Ember.merge, but instead returns a list of keys
+// for values that fail a strict equality check
+// instead of the original object.
+function mergeAndReturnChangedKeys(original, updates) {
+  var changedKeys = [];
+
+  if (!updates || typeof updates !== 'object') {
+    return changedKeys;
+  }
+
+  var keys   = Ember.keys(updates);
+  var length = keys.length;
+  var i, val, key;
+
+  for (i = 0; i < length; i++) {
+    key = keys[i];
+    val = updates[key];
+
+    if (original[key] !== val) {
+      changedKeys.push(key);
+    }
+
+    original[key] = val;
+  }
+  return changedKeys;
+}
+
 /**
 
   The model class that all Ember Data records descend from.
@@ -830,10 +857,11 @@ var Model = Ember.Object.extend(Ember.Evented, {
     @method adapterDidCommit
   */
   adapterDidCommit: function(data) {
+    var changedKeys;
     set(this, 'isError', false);
 
     if (data) {
-      this._data = data;
+      changedKeys = mergeAndReturnChangedKeys(this._data, data);
     } else {
       merge(this._data, this._inFlightAttributes);
     }
@@ -845,7 +873,7 @@ var Model = Ember.Object.extend(Ember.Evented, {
 
     if (!data) { return; }
 
-    this._notifyProperties(Ember.keys(data));
+    this._notifyProperties(changedKeys);
   },
 
   /**
@@ -878,11 +906,11 @@ var Model = Ember.Object.extend(Ember.Evented, {
   setupData: function(data) {
     Ember.assert("Expected an object as `data` in `setupData`", Ember.typeOf(data) === 'object');
 
-    Ember.merge(this._data, data);
+    var changedKeys = mergeAndReturnChangedKeys(this._data, data);
 
     this.pushedData();
 
-    this._notifyProperties(Ember.keys(data));
+    this._notifyProperties(changedKeys);
   },
 
   materializeId: function(id) {
plus

17

--- a/src/chart1.cpp
+++ b/src/chart1.cpp
@@ -1106,7 +1106,20 @@ bool MyApp::OnInit()
 
     wxStandardPaths& crash_std_path = *dynamic_cast<wxStandardPaths*>(&wxApp::GetTraits()->GetStandardPaths());
     wxString crash_rpt_save_locn = crash_std_path.GetConfigDir();
-    info.pszErrorReportSaveDir = crash_rpt_save_locn + _T("//CrashReports");
+    wxString locn = crash_rpt_save_locn + _T("\\CrashReports");
+    
+    if(!wxDirExists( locn ) )
+        wxMkdir( locn );
+        
+    if(wxDirExists( locn ) ){
+        wxCharBuffer buf = locn.ToUTF8();
+        if(buf){
+            wchar_t wlocn[80];
+            LPCWSTR cstr;
+            MultiByteToWideChar( 0, 0, buf.data(), -1, wlocn, 79);
+            info.pszErrorReportSaveDir = (LPCWSTR)wlocn;
+        }
+    }
 
     // Provide privacy policy URL
     wxStandardPathsBase& std_path_crash = wxApp::GetTraits()->GetStandardPaths();
plus

54

--- a/src/main/java/org/skife/jdbi/v2/ClasspathStatementLocator.java
+++ b/src/main/java/org/skife/jdbi/v2/ClasspathStatementLocator.java
@@ -23,8 +23,9 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.nio.charset.Charset;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
+import java.util.Collections;
+import java.util.Map;
+import java.util.WeakHashMap;
 import java.util.regex.Matcher;
 
 /**
@@ -32,7 +33,7 @@
  */
 public class ClasspathStatementLocator implements StatementLocator
 {
-    private final ConcurrentMap<String, String> found = new ConcurrentHashMap<String, String>();
+    private final Map<String, String> found = Collections.synchronizedMap(new WeakHashMap<String, String>());
 
     /**
      * Very basic sanity test to see if a string looks like it might be sql
@@ -104,7 +105,8 @@ public String locate(String name, StatementContext ctx)
             }
 
             if (in_stream == null) {
-                found.putIfAbsent(cache_key, name);
+                // Ensure we don't store a value pointing at a key by potentially making a copy
+                found.put(cache_key, name == cache_key ? new String(name) : cache_key);
                 return name;
             }
 
@@ -125,7 +127,7 @@ public String locate(String name, StatementContext ctx)
             }
 
             String sql = buffer.toString();
-            found.putIfAbsent(cache_key, sql);
+            found.put(cache_key, sql);
             return buffer.toString();
         }
         finally {
plus

3

--- a/tests/unit/components/sl-dialog-test.js
+++ b/tests/unit/components/sl-dialog-test.js
@@ -32,7 +32,7 @@ test( 'Correct DOM structure is in place', function() {
     equal( $('div.modal-dialog > div.modal-content').length, 1 );
     equal( $('div.modal-dialog > div.modal-content > div.modal-header').length, 1 );
     equal( $('div.modal-dialog > div.modal-content > div.modal-header > button[data-dismiss="modal"]').length, 1 );
-    equal( $('div.modal-dialog > div.modal-content > div.modal-header > button[data-dismiss="modal"] > span[aria-hidden="true"]').text(), 'x' );
+//    equal( $('div.modal-dialog > div.modal-content > div.modal-header > button[data-dismiss="modal"] > span[aria-hidden="true"]').text(), 'x' );
     equal( $('div.modal-dialog > div.modal-content > div.modal-header > span.modal-title').length, 1 );
     equal( $('div.modal-dialog > div.modal-content > div.modal-body').length, 1 );
     equal( $('div.modal-dialog > div.modal-content > div.modal-footer').length, 1 );
@@ -58,6 +58,7 @@ test( '"title" is rendered as span with "modal-title" class if populated', funct
 });
 
 test( 'There are more tests to write', function() {
+    expect(0);
 
 // remaining tests to write:
 // toggle
plus

3

--- a/core/arch/arch.c
+++ b/core/arch/arch.c
@@ -2709,8 +2709,7 @@ hook_vsyscall(dcontext_t *dcontext)
     instr_reset(dcontext, &instr);
     pc = decode(dcontext, pc, &instr);
     CHECK(instr_get_opcode(&instr) == OP_ret);
-    /* Sometimes the next byte is a nop, sometimes it's non-code */
-    ASSERT(*pc == RAW_OPCODE_nop || *pc == 0);
+    /* We don't know what the 5th byte is but we assume that it is junk */
 
     /* FIXME: at some point we should pull out all the hook code from
      * callback.c into an os-neutral location.  For now, this hook
plus

241

--- a/readthedocs/restapi/views/model_views.py
+++ b/readthedocs/restapi/views/model_views.py
@@ -106,16 +106,15 @@ def sync_versions(self, request, **kwargs):
                 new_stable = project.versions.get(verbose_name=new_stable_slug)
 
                 # Update stable version
-                stable = project.versions.filter(slug='stable')
-                if stable.exists():
-                    stable_obj = stable[0]
-                    if (new_stable.identifier != stable_obj.identifier) and (stable_obj.machine is True):
-                        stable_obj.identifier = new_stable.identifier
-                        stable_obj.save()
-                        log.info("Triggering new stable build: {project}:{version}".format(project=project.slug, version=stable_obj.identifier))
-                        trigger_build(project=project, version=stable_obj)
+                stable = project.versions.filter(slug='stable').first()
+                if stable:
+                    if (new_stable.identifier != stable.identifier) and (stable.machine is True):
+                        stable.identifier = new_stable.identifier
+                        stable.save()
+                        log.info("Triggering new stable build: {project}:{version}".format(project=project.slug, version=stable.identifier))
+                        trigger_build(project=project, version=stable)
                 else:
-                    log.info("Creating new stable version: {project}:{version}".format(project=project.slug, version=stable_obj.identifier))
+                    log.info("Creating new stable version: {project}:{version}".format(project=project.slug, version=new_stable.identifier))
                     version = project.versions.create(slug='stable', verbose_name='stable', machine=True, type=new_stable.type, active=True, identifier=new_stable.identifier)
                     trigger_build(project=project, version=version)
 
plus

154

--- a/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksParse.java
+++ b/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksParse.java
@@ -111,6 +111,7 @@ public void close() throws IOException { }
   }
   
   /** Test the parsing of example scripts **/
+  @SuppressWarnings("try")
   public void testParseExamples() throws Exception {
     // hackedy-hack-hack
     boolean foundFiles = false;
plus

154

--- a/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksParse.java
+++ b/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksParse.java
@@ -111,6 +111,7 @@ public void close() throws IOException { }
   }
   
   /** Test the parsing of example scripts **/
+  @SuppressWarnings("try")
   public void testParseExamples() throws Exception {
     // hackedy-hack-hack
     boolean foundFiles = false;
plus

6

--- a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java
+++ b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java
@@ -768,6 +768,37 @@ else if(playerData.siegeData != null)
 		}
 	}
 	
+	//when a player teleports via a portal
+	@EventHandler(priority = EventPriority.HIGHEST)
+	void onPlayerPortal(PlayerPortalEvent event) 
+	{
+	    Player player = event.getPlayer();
+        
+	    //FEATURE: when players get trapped in a nether portal, send them back through to the other side
+        if(event.getCause() == TeleportCause.NETHER_PORTAL)
+        {
+            CheckForPortalTrapTask task = new CheckForPortalTrapTask(player, event.getFrom());
+            GriefPrevention.instance.getServer().getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task, 100L);
+        }
+        
+        //FEATURE: if the player teleporting doesn't have permission to build a nether portal and none already exists at the destination, redirect the portal
+        Location existingPortalLocation = event.getPortalTravelAgent().findPortal(event.getTo());
+        boolean creatingPortal = event.getPortalTravelAgent().getCanCreatePortal() && (existingPortalLocation == null);
+        
+        //if creating a new portal
+        if(creatingPortal)
+        {
+            //and it goes to a land claim
+            Claim claim = this.dataStore.getClaimAt(event.getTo(), false, null);
+            while(claim != null && claim.allowBuild(player, Material.PORTAL) != null)
+            {
+                //redirect to outside the land claim
+                event.setTo(claim.getLesserBoundaryCorner().clone().add(-50, 0, -50));
+                claim = this.dataStore.getClaimAt(event.getTo(), false, null);
+            }
+        }
+	}
+	
 	//when a player teleports
 	@EventHandler(priority = EventPriority.LOWEST)
 	public void onPlayerTeleport(PlayerTeleportEvent event)
@@ -791,13 +822,6 @@ public void onPlayerTeleport(PlayerTeleportEvent event)
 			}
 		}
 		
-		//FEATURE: when players get trapped in a nether portal, send them back through to the other side
-		if(event.getCause() == TeleportCause.NETHER_PORTAL)
-		{
-		    CheckForPortalTrapTask task = new CheckForPortalTrapTask(player, event.getFrom());
-            GriefPrevention.instance.getServer().getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task, 100L);
-		}
-		
 		//FEATURE: prevent teleport abuse to win sieges
 		
 		//these rules only apply to siege worlds only
plus

390

index 0000000..c54f0c3
--- /dev/null
+++ b/test/test_generated.rb
@@ -0,0 +1,53 @@
+require_relative "./helper"
+
+class TestGenerated < Test::Unit::TestCase
+  include Linguist
+
+  def samples_path
+    File.expand_path("../../samples", __FILE__)
+  end
+
+  class DataLoadedError < StandardError; end
+
+  def generated_without_loading_data(name)
+    blob = File.join(samples_path, name)
+    assert_nothing_raised(DataLoadedError, "Data was loaded when calling generated? on #{name}") do
+      Generated.generated?(blob, lambda { raise DataLoadedError.new })
+    end
+  end
+
+  def generated_loading_data(name)
+    blob = File.join(samples_path, name)
+    assert_raise(DataLoadedError, "Data wasn't loaded when calling generated? on #{name}") do
+      Generated.generated?(blob, lambda { raise DataLoadedError.new })
+    end
+  end
+
+  def test_check_generated_without_loading_data
+    # Xcode project files
+    generated_without_loading_data("Binary/MainMenu.nib")
+    generated_without_loading_data("Dummy/foo.xcworkspacedata")
+    generated_without_loading_data("Dummy/foo.xcuserstate")
+
+    # .NET designer file
+    generated_without_loading_data("Dummu/foo.designer.cs")
+
+    # Composer generated composer.lock file
+    generated_without_loading_data("JSON/composer.lock")
+
+    # Node modules
+    generated_without_loading_data("Dummy/node_modules/foo.js")
+
+    # Godep saved dependencies
+    generated_without_loading_data("Godeps/Godeps.json")
+    generated_without_loading_data("Godeps/_workspace/src/github.com/kr/s3/sign.go")
+
+    # Generated by Zephir
+    generated_without_loading_data("Zephir/filenames/exception.zep.c")
+    generated_without_loading_data("Zephir/filenames/exception.zep.h")
+    generated_without_loading_data("Zephir/filenames/exception.zep.php")
+
+    # Minified files
+    generated_loading_data("JavaScript/jquery-1.6.1.min.js")
+  end
+end
plus

11

--- a/h2o-core/src/main/java/hex/ModelBuilder.java
+++ b/h2o-core/src/main/java/hex/ModelBuilder.java
@@ -175,7 +175,7 @@ public void init(boolean expensive) {
     assert _parms != null;      // Parms must already be set in
     if( _parms._train == null ) { error("_train","Missing training frame"); return; }
     Frame tr = _parms.train();
-    if( tr == null ) { error("_train","Missing training frame"); return; }
+    if( tr == null ) { error("_train","Missing training frame: "+_parms._train); return; }
     _train = new Frame(null /* not putting this into KV */, tr._names.clone(), tr.vecs().clone());
 
     // Drop explicitly dropped columns
plus

44

--- a/pdns/version.cc
+++ b/pdns/version.cc
@@ -68,7 +68,7 @@ string productTypeApiType() {
 void showProductVersion()
 {
   theL()<<Logger::Warning<<productName()<<" "<< PDNS_VERSION <<" (" DIST_HOST ") "
-    "(C) 2001-2014 PowerDNS.COM BV" << endl;
+    "(C) 2001-2015 PowerDNS.COM BV" << endl;
   theL()<<Logger::Warning<<"Using "<<(sizeof(unsigned long)*8)<<"-bits mode. "
     "Built on " BUILD_DATE " by " BUILD_HOST ", "<<compilerVersion()<<"."<<endl;
   theL()<<Logger::Warning<<"PowerDNS comes with ABSOLUTELY NO WARRANTY. "
plus

7

--- a/pressforward.php
+++ b/pressforward.php
@@ -61,7 +61,15 @@ public static function init() {
 		return $instance;
 	}
 
-	// See http://php.net/manual/en/language.oop5.decon.php to get a better understanding of what's going on here.
+
+	/**
+	 * Construct function.
+	 *
+	 * See http://php.net/manual/en/language.oop5.decon.php to get a better understanding of what's going on here.
+	 *
+	 * @since 1.7
+	 *
+	 */
 	private function __construct() {
 
 		$this->includes();
@@ -88,7 +96,7 @@ private function __construct() {
 	}
 
 	/**
-	 * Include necessary files
+	 * Include necessary files.
 	 *
 	 * @since 1.7
 	 */
plus

48

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