CHudFreeLookInterface: Collapse conditional within SetFreeLookState()

Same behavior, less code.

--- Runtime/GuiSys/CHudFreeLookInterface.cpp
+++ Runtime/GuiSys/CHudFreeLookInterface.cpp
@@ -84,13 +84,9 @@
     x8c_basewidget_outlinesb->SetColor(color);
   }

-  if (totalInterp == 0.f) {
-    x74_basewidget_freelookleft->SetVisibility(false, ETraversalMode::Children);
-    x80_basewidget_freelookright->SetVisibility(false, ETraversalMode::Children);
-  } else {
-    x74_basewidget_freelookleft->SetVisibility(true, ETraversalMode::Children);
-    x80_basewidget_freelookright->SetVisibility(true, ETraversalMode::Children);
-  }
+  const bool visible = totalInterp != 0.0f;
+  x74_basewidget_freelookleft->SetVisibility(visible, ETraversalMode::Children);
+  x80_basewidget_freelookright->SetVisibility(visible, ETraversalMode::Children);
 }

 CHudFreeLookInterfaceXRay::CHudFreeLookInterfaceXRay(CGuiFrame& selHud, bool inFreeLook, bool lookControlHeld,
@@ -146,10 +142,8 @@
   color.a() = x1c_freeLookInterp;
   x24_basewidget_freelook->SetColor(color);

-  if (x1c_freeLookInterp == 0.f)
-    x24_basewidget_freelook->SetVisibility(false, ETraversalMode::Children);
-  else
-    x24_basewidget_freelook->SetVisibility(true, ETraversalMode::Children);
+  const bool visible = x1c_freeLookInterp != 0.0f;
+  x24_basewidget_freelook->SetVisibility(visible, ETraversalMode::Children);
 }

 } // namespace urde


FIX: fixed ambient music volyme

FIX: fixed ambient music volyme

--- SSPSolution/SSPSolution/SoundHandler.cpp
+++ SSPSolution/SSPSolution/SoundHandler.cpp
@@ -48,6 +48,7 @@
 	if (sp != nullptr)
 	{
 		sp->grab();
+		sp->setDefaultVolume(0.1f);
 		this->m_sounds2D.push_back(sp);
 	}
 	else


When filling a sparse Blaze matrix, finalize must be called even for rows without non-zero elements!

This is not properly emphasized in the Blaze documentation.  If one fails to do this, the non-zero elements for the next row will overwrite values at the top of the matrix...

--- src/unit_PARALLEL/chrono_parallel/lcp/ChLcpSolverParallel.cpp
+++ src/unit_PARALLEL/chrono_parallel/lcp/ChLcpSolverParallel.cpp
@@ -71,6 +71,13 @@
       M_inv.append(i * 6 + 5, i * 6 + 4, body_inv_inr.GetElement(2, 1));
       M_inv.append(i * 6 + 5, i * 6 + 5, body_inv_inr.GetElement(2, 2));
       M_inv.finalize(i * 6 + 5);
+    } else {
+      M_inv.finalize(i * 6 + 0);
+      M_inv.finalize(i * 6 + 1);
+      M_inv.finalize(i * 6 + 2);
+      M_inv.finalize(i * 6 + 3);
+      M_inv.finalize(i * 6 + 4);
+      M_inv.finalize(i * 6 + 5);
     }
   }

@@ -78,6 +85,7 @@
     M_inv.append(num_bodies * 6 + i, num_bodies * 6 + i, shaft_inr[i]);
     M_inv.finalize(num_bodies * 6 + i);
   }
+
   //If this experimental feature is requested compute the real mass matrix
   if(data_container->settings.solver.scale_mass_matrix){

@@ -93,7 +101,6 @@

       for (int i = 0; i < num_bodies; i++) {
         if (data_container->host_data.active_data[i]) {
-
           real mass = body_list->at(i)->GetMass();
           ChMatrix33<>&   body_inr = body_list->at(i)->VariablesBody().GetBodyInertia();

@@ -116,8 +123,16 @@
           M.append(i * 6 + 5, i * 6 + 4, body_inr.GetElement(2, 1));
           M.append(i * 6 + 5, i * 6 + 5, body_inr.GetElement(2, 2));
           M.finalize(i * 6 + 5);
+        } else {
+          M.finalize(i * 6 + 0);
+          M.finalize(i * 6 + 1);
+          M.finalize(i * 6 + 2);
+          M.finalize(i * 6 + 3);
+          M.finalize(i * 6 + 4);
+          M.finalize(i * 6 + 5);
         }
       }
+
       for (int i = 0; i < num_shafts; i++) {
         M.append(num_bodies * 6 + i, num_bodies * 6 + i, 1.0/shaft_inr[i]);
         M.finalize(num_bodies * 6 + i);


fixed typo

fixed typo

--- Samples/WebService/Sources/WebServer.cpp
+++ Samples/WebService/Sources/WebServer.cpp
@@ -194,7 +194,7 @@
     L"variables"_k,
         Set<String>{HTTP::Methods::kGet, HTTP::Methods::kPost, HTTP::Methods::kDelete},
 #if qCompilerAndStdLib_static_inline_order_of_construction_Buggy
-        InternetMediaType{InternetMediaTypes::Types::kApplication, L"json"sv}
+        InternetMediaType{InternetMediaTypes::Types::kApplication, L"json"sv},
 #else
         InternetMediaTypes::kJSON,
 #endif


Remove useless code

Remove useless code

--- sdch_module.cc
+++ sdch_module.cc
@@ -544,6 +544,7 @@
                   "http sdch filter header: no sdch in accept-encoding");
     return ngx_http_next_header_filter(r);
   }
+
   if (header_find(&r->headers_in.headers, "avail-dictionary", &val) == 0) {
     ngx_str_set(&val, "");
   }
@@ -627,10 +628,6 @@
   // If we have actual Dictionary - do encode response
   if (dict != nullptr) {
     if (create_output_header(r, "Content-Encoding", "sdch") != NGX_OK) {
-      return NGX_ERROR;
-    }
-
-    if (x_sdch_encode_0_header(r, false) != NGX_OK) {
       return NGX_ERROR;
     }


fix cpplint issues

fix cpplint issues

--- count/empirical_data_test.cc
+++ count/empirical_data_test.cc
@@ -38,12 +38,12 @@
   // would imply that for a raw estimoate of 2.75, there are two possible
   // interpolation points.

-  // The estimate arrays are terminated by zeroes. Since there are
+  // The estimate arrays are terminated by zeroes. Since there are
   // varying numbers of elements in the tables associated with each
   // precision, we must detect the end of the array by comparing its
   // value to zero. We do so using a special floating point comparator
   // defined above, since it is not really safe to compare floats
-  // for equality otherwise.
+  // for equality otherwise.
   const double EPSILON = 0.0001;

   // We'll track the number of errors that we encounter and write the
@@ -52,7 +52,7 @@
   size_t error_count = 0;

   // There are a total of fifteen arrays (one for each precision value
-  // from precision 4..18 inclusive.
+  // from precision 4..18 inclusive.
   const size_t TABLE_COUNT = 15;

   // The tables may contain at most 201 usable values. However, the
@@ -72,12 +72,14 @@

       // Did the lhs, rhs values we're examining violate the condition?
       if (lhs >= rhs) {
-        fprintf(stderr,
-          "ERROR: lhs >= rhs: In the raw estimate table for precision %lu: \n"
-          "  Value at index %lu was: %lf\n"
-          "  Value at index %lu was: %lf\n\n",
-          table + 4, index, estimates[index], index + 1, estimates[index + 1]);
-
+        fprintf(
+            stderr,
+            "ERROR: lhs >= rhs: In the raw estimate table for precision %lu: \n"
+            "  Value at index %lu was: %lf\n"
+            "  Value at index %lu was: %lf\n\n",
+            table + 4, index, estimates[index], index + 1,
+            estimates[index + 1]);
+
         ++error_count;
       }
     }


Fix for out-of-bounds error in regionalize

--- VectorOfCities/VectorOfCities.cpp
+++ VectorOfCities/VectorOfCities.cpp
@@ -177,7 +177,7 @@

     for (std::size_t i{}; i < tries; ++i) {
         auto vecOfRand = generateRandomVectorWithoutRepetition(
-            1, sortedVec.size(), numberOfRegions);
+            0, sortedVec.size()-1, numberOfRegions);
         //      for (auto j : vecOfRand) { std::cout << j << "-";} std::cout <<
         //      "\n";
         std::size_t hl{};


:construction: chore(common): updated the common module


Only add empty paths if not optional.

Only add empty paths if not optional.

Empty paths are considered to be the same as the current directory and
loading all configs in curdir is not obvious behavior.

--- cpp/config/ConfigManager.cpp
+++ cpp/config/ConfigManager.cpp
@@ -125,13 +125,21 @@

 bool ConfigManager::addConfigFile(
    const char* path, bool include, const char* dir,
-   bool optional, bool includeSubdirectories)
+   bool optional, bool processSubdirectories)
 {
    bool rval = true;

    string userPath;
-   rval = File::expandUser(path, userPath);
-   if(rval)
+   // skip empty paths if optional
+   // empty paths will behave like current dir
+   bool addPath = path != NULL && (strlen(path) != 0 || !optional);
+
+   if(addPath)
+   {
+      rval = File::expandUser(path, userPath);
+   }
+
+   if(rval && addPath)
    {
       string fullPath;

@@ -211,7 +219,7 @@
                }
             }
             else if(
-               includeSubdirectories &&
+               processSubdirectories &&
                strcmp(name.c_str(), ".") != 0 &&
                strcmp(name.c_str(), "..") != 0 &&
                f->isDirectory())
@@ -256,6 +264,9 @@
          "Invalid config file.",
          CONFIG_EXCEPTION ".InvalidConfigFile");
       e->getDetails()["path"] = path;
+      e->getDetails()["processIncludes"] = include;
+      e->getDetails()["optional"] = optional;
+      e->getDetails()["processSubdirectories"] = processSubdirectories;
       if(dir != NULL)
       {
          e->getDetails()["dir"] = dir;
@@ -1444,7 +1455,7 @@
                rval = false;
             }

-            // if load, then load the included config file
+            // if load and non-empty path, then load the included config file
             if(rval && load)
             {
                MO_CAT_DEBUG(MO_CONFIG_CAT, "Loading include: \"%s\"", path);


Added shunting yard code

Added shunting yard code

Made it fit into our requirements

--- cpp/liquid/shunting-yard.cpp
+++ cpp/liquid/shunting-yard.cpp
@@ -193,22 +193,22 @@
       }
       double right = evaluation.top(); evaluation.pop();
       double left  = evaluation.top(); evaluation.pop();
-      if (!str.compare("+")) {
-        evaluation.push(left + right);
+            if (!str.compare("+")) {
+        evaluation.push(ml_add(left,right));
       } else if (!str.compare("*")) {
-        evaluation.push(left * right);
+        evaluation.push(ml_mul(left,right));
       } else if (!str.compare("-")) {
-        evaluation.push(left - right);
+        evaluation.push(ml_sub(left,right));
       } else if (!str.compare("/")) {
-        evaluation.push(left / right);
+        evaluation.push(ml_div(left,right));
       } else if (!str.compare("<<")) {
         evaluation.push((int) left << (int) right);
       } else if (!str.compare("^")) {
-        evaluation.push(pow(left, right));
+        evaluation.push(ml_power(left,right));
       } else if (!str.compare(">>")) {
         evaluation.push((int) left >> (int) right);
       } else if (!str.compare("%")) {
-        evaluation.push((int) left % (int) right);
+        evaluation.push(ml_mod(left,right));
       } else if (!str.compare("<")) {
         evaluation.push(left < right);
       } else if (!str.compare(">")) {


deadlock not debugged, but have a repeatable test now...

--- cpp/test-network-streams.cpp
+++ cpp/test-network-streams.cpp
@@ -84,8 +84,8 @@
     // Assign nt_per_chunk.  Each chunk should be no more than 512 samples.
     this->nt_per_chunk = nt_per_packet * randint(rng, 1, 512/nt_per_packet + 1);

-    // Assign nt_tot.  We require <= 1024 chunks, and <= 1GB total (summed over all beams).
-    // FIXME think about increasing the 1GB limit.  (Watch out for 32-bit overflow!)
+    // Assign nt_tot.  We require <= 1024 chunks, and <= 256 MB total (summed over all beams).
+    // FIXME think about increasing the 256 MB limit.  (Watch out for 32-bit overflow!)
     int packet_nbytes = packet_size(nbeams, nfreq_coarse_per_packet, nupfreq, nt_per_packet);
     int chunk_nbytes = packet_nbytes * (nfreq_coarse_tot / nfreq_coarse_per_packet) * (nt_per_chunk / nt_per_packet);
     int max_nchunks = min(1024, (1<<28) / chunk_nbytes);
@@ -94,6 +94,17 @@
     this->fpga_counts_per_sample = randint(rng, 1, 1025);
     this->initial_t0 = randint(rng, 0, 4097);
     this->wt_cutoff = uniform_rand(rng, 0.3, 0.7);
+
+#if 1
+    // Convenient when debugging
+    this->nbeams = 1;
+    this->nupfreq = 6;
+    this->nfreq_coarse_per_packet = 2;
+    this->nt_per_packet = 282;
+    this->nt_per_chunk = 282;
+    this->nt_tot = 36942;
+    this->initial_t0 = 329;
+#endif

     // Clunky way of generating random beam_ids
     this->recv_beam_ids.resize(nbeams);
@@ -124,7 +135,7 @@
     this->show();

     // Worst-case storage requirements for unassembled ringbuf
-    int wc_nchunks = min(nt_assembler, nt_tot) / nt_per_chunk;
+    int wc_nchunks = min(nt_assembler/nt_per_chunk + 1, nt_tot/nt_per_chunk);
     int wc_npackets = wc_nchunks  * (nt_per_chunk / nt_per_packet) * (nfreq_coarse_tot / nfreq_coarse_per_packet);
     int wc_nbytes = wc_npackets * packet_size(1, nfreq_coarse_per_packet, nupfreq, nt_per_packet);

@@ -158,7 +169,8 @@
 	 << "nfreq_coarse_per_packet=" << nfreq_coarse_per_packet << endl
 	 << "nt_per_packet=" << nt_per_packet << endl
 	 << "nt_per_chunk=" << nt_per_chunk << endl
-	 << "nt_tot=" << nt_tot << endl;
+	 << "nt_tot=" << nt_tot << endl
+	 << "initial_t0=" << initial_t0 << endl;
 }

@@ -231,7 +243,7 @@
 	tpos_initialized = true;

 	pthread_mutex_lock(&tp->tpos_lock);
-	tp->consumer_tpos[ithread] = chunk->chunk_t0;
+	tp->consumer_tpos[ithread] = tpos;
 	pthread_cond_broadcast(&tp->cond_tpos_changed);
 	pthread_mutex_unlock(&tp->tpos_lock);

@@ -298,7 +310,6 @@

     for (int ichunk = 0; ichunk < nchunks; ichunk++) {
 	int chunk_t0 = tp->initial_t0 + ichunk * nt_chunk;   // start of chunk
-	int chunk_t1 = chunk_t0 + nt_chunk;

 	for (int ibeam = 0; ibeam < nbeams; ibeam++) {
 	    int beam_id = tp->send_beam_ids[ibeam];
@@ -324,13 +335,14 @@
 	// Wait for consumer threads if necessary
 	pthread_mutex_lock(&tp->tpos_lock);
 	for (int i = 0; i < nbeams; i++) {
-	    while (tp->consumer_tpos[i] + nt_assembler < chunk_t1)
+	    while (tp->consumer_tpos[i] + nt_assembler < chunk_t0)
 		pthread_cond_wait(&tp->cond_tpos_changed, &tp->tpos_lock);
 	}
 	pthread_mutex_unlock(&tp->tpos_lock);

 	uint64_t fpga_count = (tp->initial_t0 + ichunk * nt_chunk) * tp->fpga_counts_per_sample;
 	ostream->send_chunk(&intensity[0], &weights[0], stride, fpga_count, true);
+	cout << "sent chunk " << ichunk << "/" << nchunks << endl;
     }

     // joins network thread


Increase max_http_post_body_size from 32K to 64K. Some certs have *lots* of SANs.

--- cpp/util/libevent_wrapper.cc
+++ cpp/util/libevent_wrapper.cc
@@ -273,7 +273,7 @@

 evhttp* Base::HttpNew() const {
   const ev_ssize_t max_http_header_size = 4096;
-  const ev_ssize_t max_http_post_body_size = 32768;
+  const ev_ssize_t max_http_post_body_size = 65536;
   evhttp* http_session = CHECK_NOTNULL(evhttp_new(base_.get()));
   evhttp_set_max_headers_size(http_session, max_http_header_size);
   evhttp_set_max_body_size(http_session, max_http_post_body_size);


don't call sfsconst_init () since planet lab nodes do not have an sfs user/group

--- devel/builddb.C
+++ devel/builddb.C
@@ -43,7 +43,6 @@
 main (int argc, char** argv)
 {
   setprogname (argv[0]);
-  sfsconst_init ();
   random_init ();

   if (argc != 6


Minor alignment tweaks to simple XP frame.

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@210 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- chrome/browser/simple_xp_frame.cc
+++ chrome/browser/simple_xp_frame.cc
@@ -60,7 +60,10 @@
 static const int kTopResizeBarHeight = 3;

 // Left margin on the left side of the favicon.
-static const int kFavIconMargin = 2;
+static const int kFavIconMargin = 1;
+
+// Label offset.
+static const int kLabelVerticalOffset = -1;

 // Padding between the favicon and the text.
 static const int kFavIconPadding = 4;
@@ -228,11 +231,11 @@
 void SimpleXPFrameTitleBar::Layout() {
   CSize s;
   menu_button_->GetPreferredSize(&s);
-  menu_button_->SetBounds(kFavIconMargin, 1 + (GetHeight() - s.cy) / 2,
+  menu_button_->SetBounds(kFavIconMargin, (GetHeight() - s.cy) / 2,
                           s.cx, s.cy);
   menu_button_->Layout();
   label_->SetBounds(menu_button_->GetX() + menu_button_->GetWidth() +
-                    kFavIconPadding, 0,
+                    kFavIconPadding, kLabelVerticalOffset,
                     GetWidth() - (menu_button_->GetX() +
                                   menu_button_->GetWidth() + kFavIconPadding),
                     GetHeight());


Add missing new line

Add missing new line

git-svn-id: http://src.chromium.org/svn/trunk/src@68666 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 980c14ebdb0feedcdcda47f292c5f205737d75c5

--- chrome/common/utility_messages.cc
+++ chrome/common/utility_messages.cc
@@ -9,4 +9,4 @@
 #include "chrome/common/serialized_script_value.h"

 #define IPC_MESSAGE_IMPL
-#include "chrome/common/utility_messages.h"+#include "chrome/common/utility_messages.h"


debug

debug

--- partitioning/partitioning.cpp
+++ partitioning/partitioning.cpp
@@ -235,6 +235,9 @@
 	{
 		rootForThisVersion = this->versionData[i].getRootNode();

+		if (i == 202) {
+			cout << "cacaw!" << endl;
+		}
 		// Do the partitioning for one version, and store the number of fragments
 		numFragments = getPartitioningOneVersion(rootForThisVersion, numLevelsDown,
 			&(this->offsets[versionOffset]), minFragSize, versionData[i].getVersionSize());


Simple fix correcting the lifetime scope of automated url request jobs during chrome-initiated xmlhttprequest aborts.  Two similar problems are fixed by this CL.

I found a race condition during the early-termination processing of the NpapiUrlRequest objects.  If NpapiUrlRequest::Stop is invoked before NpapiUrlRequest::OnStreamCreated, then it is possible that a new stream will be created on the Chrome-Frame side, for which an operation that has been officially cancelled within Chrome.  The fix is to add a new parameter fo the NPAPIUrlRequest, stop_requested_ that is used to track this behaviour.  If a new stream is created on a request that has been stopped, then that stream is immediately destroyed, without notification back to Chrome.

If Chrome requests an abort of a url request, then Chrome-Frame should not send any notifications back to Chrome concerning the tear-down of that request.  The delegate is revoked in NPAPIUrlRequest::Stop to achieve this behaviour.

BUG=None
TEST=None

Review URL: http://codereview.chromium.org/3530002

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@61410 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome_frame/npapi_url_request.cc
+++ chrome_frame/npapi_url_request.cc
@@ -28,6 +28,14 @@
   // this will be called on the plugin UI thread only.
   virtual unsigned long API_CALL AddRef();
   virtual unsigned long API_CALL Release();
+
+  const URLRequestStatus& status() const {
+    return status_;
+  }
+
+  NPP instance() const {
+    return instance_;
+  }

  private:
   unsigned long ref_count_;
@@ -113,6 +121,8 @@
 void NPAPIUrlRequest::Stop() {
   DLOG(INFO) << "Finished request: Url - " << url() << " result: "
       << static_cast<int>(status_.status());
+
+  status_.set_status(URLRequestStatus::CANCELED);
   if (stream_) {
     npapi::DestroyStream(instance_, stream_, NPRES_USER_BREAK);
     stream_ = NULL;
@@ -137,21 +147,28 @@
 }

 NPError NPAPIUrlRequest::OnStreamDestroyed(NPReason reason) {
-  URLRequestStatus::Status status = URLRequestStatus::FAILED;
-  switch (reason) {
-    case NPRES_DONE:
-      status_.set_status(URLRequestStatus::SUCCESS);
-      status_.set_os_error(0);
-      break;
-    case NPRES_USER_BREAK:
-      status_.set_status(URLRequestStatus::CANCELED);
-      status_.set_os_error(net::ERR_ABORTED);
-      break;
-    case NPRES_NETWORK_ERR:
-    default:
-      status_.set_status(URLRequestStatus::FAILED);
-      status_.set_os_error(net::ERR_CONNECTION_CLOSED);
-      break;
+  // If the request has been aborted, then ignore the |reason| argument.
+  // Normally the execution flow is such than NPRES_USER_BREAK will be passed
+  // when the stream is aborted, but sometimes NPRES_NETWORK_ERROR is passed
+  // instead.  To prevent Chrome from receiving a notification of a failed
+  // network connection, when Chrome actually canceled the request, we ignore
+  // the status here.
+  if (URLRequestStatus::CANCELED != status_.status()) {
+    switch (reason) {
+      case NPRES_DONE:
+        status_.set_status(URLRequestStatus::SUCCESS);
+        status_.set_os_error(0);
+        break;
+      case NPRES_USER_BREAK:
+        status_.set_status(URLRequestStatus::CANCELED);
+        status_.set_os_error(net::ERR_ABORTED);
+        break;
+      case NPRES_NETWORK_ERR:
+      default:
+        status_.set_status(URLRequestStatus::FAILED);
+        status_.set_os_error(net::ERR_CONNECTION_CLOSED);
+        break;
+    }
   }

   delegate_->OnResponseEnd(id(), status_);
@@ -207,10 +224,9 @@
         request_info.upload_data,
         static_cast<ResourceType::Type>(request_info.resource_type),
         enable_frame_busting_)) {
-    // Add to map.
     DCHECK(request_map_.find(request_id) == request_map_.end());
-    request_map_[request_id] = new_request;
     if (new_request->Start()) {
+      request_map_[request_id] = new_request;
       // Keep additional reference on request for NPSTREAM
       // This will be released in NPP_UrlNotify
       new_request->AddRef();
@@ -343,6 +359,13 @@
   if (!request)
     return NPERR_NO_ERROR;

+  // This stream is being constructed for a request that has already been
+  // canceled.  Signal its immediate termination.
+  if (URLRequestStatus::CANCELED == request->status().status()) {
+    return npapi::DestroyStream(request->instance(),
+                                stream, NPRES_USER_BREAK);
+  }
+
   DCHECK(request_map_.find(request->id()) != request_map_.end());
   // We need to return the requested stream mode if we are returning a success
   // code. If we don't do this it causes Opera to blow up.
@@ -372,8 +395,15 @@
   NPAPIUrlRequest* request = RequestFromNotifyData(stream->notifyData);
   if (!request)
     return NPERR_NO_ERROR;
-  DCHECK(request_map_.find(request->id()) != request_map_.end());
-  return request->OnStreamDestroyed(reason);
+
+  // It is possible to receive notification of a destroyed stream for a
+  // unregistered request:  EndRequest will unregister a request in response
+  // to an AutomationMsg_RequestEnd message.  EndRequest will also invoke
+  // npapi::DestroyStream, which will call back to this function.
+  if (request_map_.find(request->id()) != request_map_.end())
+    return request->OnStreamDestroyed(reason);
+
+  return NPERR_NO_ERROR;
 }

 void NPAPIUrlRequestManager::UrlNotify(const char* url, NPReason reason,


reactor: block all signals early

reactor: block all signals early

Some signals can only be handled on specific threads; we block them on all
others to prevent the wrong thread from handling a signal.  But if a
library (in our case DPDK) spawns a thread, it may inherit a permissive
signal mask and handle the signal itself, resulting in confusing.

Fix by blocking all signals early, before libraries get a chance to spawn
threads.

See scylladb/scylla#601.

--- core/reactor.cc
+++ core/reactor.cc
@@ -2309,6 +2309,19 @@

 void smp::configure(boost::program_options::variables_map configuration)
 {
+    // Mask most, to prevent threads (esp. dpdk helper threads)
+    // from servicing a signal.  Individual reactors will unmask signals
+    // as they become prepared to handle them.
+    //
+    // We leave some signals unmasked since we don't handle them ourself.
+    sigset_t sigs;
+    sigfillset(&sigs);
+    for (auto sig : {SIGHUP, SIGQUIT, SIGILL, SIGABRT, SIGFPE, SIGSEGV,
+            SIGALRM, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU}) {
+        sigdelset(&sigs, sig);
+    }
+    pthread_sigmask(SIG_BLOCK, &sigs, nullptr);
+
     smp::count = 1;
     smp::_tmain = std::this_thread::get_id();
     auto nr_cpus = resource::nr_processing_units();


openvibe-plugins-simple-visualisation :
 * corrected bug on operator with no effect

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@1411 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- openvibe-plugins/simple-visualisation/trunc/src/algorithms/ovpCAlgorithmSphericalSplineInterpolation.cpp
+++ openvibe-plugins/simple-visualisation/trunc/src/algorithms/ovpCAlgorithmSphericalSplineInterpolation.cpp
@@ -73,10 +73,10 @@
 boolean CAlgorithmSphericalSplineInterpolation::process(void)
 {
 	if(m_bFirstProcess == true)
-	{
+	{
 		//store coords as doubles
 		m_pDoubleCoords = new double[3*ip_i64ControlPointsCount];
-		//set up matrix of pointers to double coords matrix
+		//set up matrix of pointers to double coords matrix
 		m_pInsermCoords = new double* [ip_i64ControlPointsCount];
 		//fill both matrices
 		for(int i=0; i<ip_i64ControlPointsCount; i++)
@@ -86,7 +86,7 @@
 			m_pDoubleCoords[i*3+2] = (double)(*ip_pControlPointsCoords)[i*3+2];
 			m_pInsermCoords[i] = m_pDoubleCoords + 3*i;
 		}
-		m_bFirstProcess == false;
+		m_bFirstProcess = false;
 	}

 	//do we want to precompute tables?
@@ -103,7 +103,7 @@
 			m_pSplineCoefs = new double[(int)ip_i64ControlPointsCount+1];
 		}

-		//compute spline ponderation coefficients using spline values
+		//compute spline ponderation coefficients using spline values
 		//FIXME : have a working copy of control points values stored as doubles?
 		spline_coef((int)ip_i64ControlPointsCount, m_pInsermCoords, (double*)ip_pControlPointsValues->getBuffer(), m_PotTable, m_pSplineCoefs);
 	}


Modified the destructor in LnLSTM

Modified the destructor in LnLSTM


evictAll and clearAll testFix

evictAll and clearAll testFix

--- hazelcast/test/map/ClientMapTest.cpp
+++ hazelcast/test/map/ClientMapTest.cpp
@@ -48,8 +48,8 @@
 //                addTest(&ClientMapTest::testReplace, "testReplace");
 //                addTest(&ClientMapTest::testPredicateListenerWithPortableKey, "testPredicateListenerWithPortableKey");
 //                addTest(&ClientMapTest::testListener, "testListener");
+                addTest(&ClientMapTest::testEvictAllEvent, "testEvictAllEvent");
                 addTest(&ClientMapTest::testClearEvent, "testClearEvent");
-                addTest(&ClientMapTest::testEvictAllEvent, "testEvictAllEvent");
 //                addTest(&ClientMapTest::testBasicPredicate, "testBasicPredicate");
 //                addTest(&ClientMapTest::testIssue537, "testIssue537");
 //                addTest(&ClientMapTest::testMapWithPortable, "testMapWithPortable");
@@ -559,19 +559,21 @@
             void ClientMapTest::testClearEvent() {
                 util::CountDownLatch latch(1);
                 ClearListener clearListener(latch);
-                imap->addEntryListener(clearListener, false);
+                std::string listenerId = imap->addEntryListener(clearListener, false);
                 imap->put("key1", "value1");
                 imap->clear();
                 assertTrue(latch.await(120));
+                imap->removeEntryListener(listenerId);
             }

             void ClientMapTest::testEvictAllEvent() {
                 util::CountDownLatch latch(1);
                 EvictListener evictListener(latch);
-                imap->addEntryListener(evictListener, false);
+                std::string listenerId = imap->addEntryListener(evictListener, false);
                 imap->put("key1", "value1");
                 imap->evictAll();
                 assertTrue(latch.await(120));
+                imap->removeEntryListener(listenerId);
             }


Fix ToR agent DELADD operation usage

Fix ToR agent DELADD operation usage

Issue:
------
DEL_ADD operation can be triggered for a deleted or stale
entry, which will result in this entry never getting
removed and can cause vrf delete timeouts

Fix:
----
Skip DEL_ADD operation for deleted/stale ovsdb entries

Closes-Bug: 1580507
Change-Id: I5b3dba89504c3761c694d59027d758607f35036d

--- src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_entry.cc
+++ src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_entry.cc
@@ -245,5 +245,12 @@
 }

 void OvsdbDBEntry::TriggerDeleteAdd() {
+    if (IsDeleted() || stale()) {
+        // skip this operation for Deleted/stale Entry, After this operation
+        // Deleted/Stale entry would become active/non-stale which is not
+        // intended use of this API, caller must ensure the entry to be Active
+        // if this operation is required
+        return;
+    }
     GetObject()->SafeNotifyEvent(this, KSyncEntry::DEL_ADD_REQ);
 }


Limiting increment in timestamps with neteq simulation.

Bug: None
Change-Id: I9a0688bcf1c887793b5c94ea023b025aed7366a5
Reviewed-on: https://webrtc-review.googlesource.com/74840
Reviewed-by: Ivo Creusen <ab68de427b265c46935558af10238a1ba5449aeb@webrtc.org>
Commit-Queue: Minyue Li <102e225d2aadac8dd4015cd04db7d6cd89bdb304@webrtc.org>
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#23733}

--- modules/audio_coding/neteq/tools/fake_decode_from_file.cc
+++ modules/audio_coding/neteq/tools/fake_decode_from_file.cc
@@ -37,8 +37,10 @@
       ByteReader<uint32_t>::ReadLittleEndian(encoded);
   uint32_t samples_to_decode =
       ByteReader<uint32_t>::ReadLittleEndian(&encoded[4]);
-  if (samples_to_decode == 0) {
-    // Number of samples in packet is unknown.
+  if (samples_to_decode == 0 ||
+      samples_to_decode % rtc::CheckedDivExact(sample_rate_hz, 100) != 0) {
+    // Number of samples being zero or non-multiple of 10ms is considered
+    // erroneous.
     if (last_decoded_length_ > 0) {
       // Use length of last decoded packet, but since this is the total for all
       // channels, we have to divide by 2 in the stereo case.


Update sampleo

Update sampleo

--- examples/pearson-2d-main.cpp
+++ examples/pearson-2d-main.cpp
@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
-#include "pearson.h"
+#include "pearson-2d.h"

 int T_MAX;
 int mpi_my_rank;


Neat initial condition for demonstration purpose run.

--- examples/pearson-3d-main.cpp
+++ examples/pearson-3d-main.cpp
@@ -31,48 +31,67 @@
   return (double)tv.tv_sec + (double)tv.tv_usec*1e-6;
 }
 /*
-void init() {
+  void init() {
   for(int ix = navi.lower_x; ix < navi.upper_x; ++ix) {
-    for(int iy = navi.lower_y; iy < navi.upper_y; ++iy) {
-      for(int iz = navi.lower_z; iz < navi.upper_z; ++iz) {
-        double x = double(navi.offset_x + ix)/NX;
-        double y = double(navi.offset_y + iy)/NY;
-        double z = double(navi.offset_z + iz)/NZ;
-        U[ix][iy][iz] = 1.0;
-        V[ix][iy][iz] = 0.0;
-        if (z > 0.49 && z < 0.51 && x > 0.4 && x < 0.6) {
-          U[ix][iy][iz] = 0.5;
-          V[ix][iy][iz] = 0.25;
-        }
-      }
-    }
-  }
-}*/
+  for(int iy = navi.lower_y; iy < navi.upper_y; ++iy) {
+  for(int iz = navi.lower_z; iz < navi.upper_z; ++iz) {
+  double x = double(navi.offset_x + ix)/NX;
+  double y = double(navi.offset_y + iy)/NY;
+  double z = double(navi.offset_z + iz)/NZ;
+  U[ix][iy][iz] = 1.0;
+  V[ix][iy][iz] = 0.0;
+  if (z > 0.49 && z < 0.51 && x > 0.4 && x < 0.6) {
+  U[ix][iy][iz] = 0.5;
+  V[ix][iy][iz] = 0.25;
+  }
+  }
+  }
+  }
+  }*/

 typedef pair<int,pair<int,int> > Key;
 void init() {
-  map<Key ,double> seeds;
-  for(int ix = navi.lower_x; ix < navi.upper_x; ++ix) {
-    for(int iy = navi.lower_y; iy < navi.upper_y; ++iy) {
-      for(int iz = navi.lower_z; iz < navi.upper_z; ++iz) {
-        Key k (ix/16, pair<int,int>(iy/16, iz/16));
-        U[ix][iy][iz] = 1.0;
-        V[ix][iy][iz] = 0.0;
-        double s = seeds[k];
-        if (s==0) {
-          s = frand();
-          seeds[k]=s;
+  if (NZ<500){
+    for(int ix = navi.lower_x; ix < navi.upper_x; ++ix) {
+      for(int iy = navi.lower_y; iy < navi.upper_y; ++iy) {
+        for(int iz = navi.lower_z; iz < navi.upper_z; ++iz) {
+          U[ix][iy][iz] = 1.0;
+          V[ix][iy][iz] = 0.0;
+          int kx=ix/5*5, ky=iy/5*5, kz=iz/5*5;
+          if(ky==125){
+            if(kz==75 && kx==220 ||
+               kz==100 && kx == 80 ||
+               kz==150 && kx==150){
+              U[ix][iy][iz] = 0.5;
+              V[ix][iy][iz] = 0.5;
+            }
+          }
         }
-        if (s < 0.1 ) {
-          U[ix][iy][iz] = 0.5;
-          V[ix][iy][iz] = 0.25;
+      }
+    }
+  }else{
+    map<Key ,double> seeds;
+    for(int ix = navi.lower_x; ix < navi.upper_x; ++ix) {
+      for(int iy = navi.lower_y; iy < navi.upper_y; ++iy) {
+        for(int iz = navi.lower_z; iz < navi.upper_z; ++iz) {
+          Key k (ix/16, pair<int,int>(iy/16, iz/16));
+          U[ix][iy][iz] = 1.0;
+          V[ix][iy][iz] = 0.0;
+          double s = seeds[k];
+          if (s==0) {
+            s = frand();
+            seeds[k]=s;
+          }
+          if (s < 0.1 ) {
+            U[ix][iy][iz] = 0.5;
+            V[ix][iy][iz] = 0.25;
+          }
         }
       }
     }
   }
-  }
-
+}
 void write_monitor() {
   int global_position[6];
   global_position[0] = navi.offset_x + navi.lower_x;


Fix: Off-1 error in return of mod_power()

- Fb Hackercup '19 Round 1, 16

Signed-off-by: Karel Ha <70f8965fdfb04f1fc0e708a55d9e822c449f57d3@gmail.com>

--- fbhackcup/2019/round1/16.cpp
+++ fbhackcup/2019/round1/16.cpp
@@ -5,7 +5,7 @@

    * Creation Date : 09-08-2020

-   * Last Modified : Út 11. srpna 2020, 14:05:18
+   * Last Modified : Út 11. srpna 2020, 19:06:09

    * Created By : Karel Ha <mathemage@gmail.com>

@@ -63,30 +63,36 @@
 //       cout << endl; MSG(i) MSG(powers[i])
     }
   }
-  return powers[exp + 1];
+  return powers[exp];
 }

 int get_result(const string & V, int K) {
   int N = V.size();

   int init_balance = 0;    // n_B - n_A
-  int balance = -2 * N;    // i.e. -INF
+  int balance = 0;
   FOR(i, N-K, N) {
     init_balance += (V[i] == 'A') ? (-1) : 1;
     balance = max(balance, init_balance);
+//     MSG(init_balance)
   }
-//   MSG(balance)
+//   cout << endl << "inital balance: "; MSG(balance)

   int result = 0;
   FOR(j, N-K, 0) {
-//     MSG(j)
+//     MSG(j) MSG(V[j])
+//     cout << "0: "; MSG(balance)
+    balance = max(balance, 0);
     balance += (V[j] == 'A') ? (-1) : 1;
+//     cout << "1: "; MSG(balance) MSG(result)

     if (balance > K) {                  // over threshold
       balance -= 2;                     // swap 'B' for 'A'
       result += mod_power(2, j + 1);    // pay the charge
+//       MSG(mod_power(2, j + 1))
       result %= MOD;                    // TODO: use memo table of pows
     }
+//     cout << "2: "; MSG(balance) MSG(result)
   }

   return result;


INTEGRATION: CWS warnings01 (1.5.220); FILE MERGED 2006/02/21 16:41:10 aw 1.5.220.1: #i55991# Adaptions to warning free code

--- svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
+++ svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: objectcontactofobjlistpainter.cxx,v $
  *
- *  $Revision: 1.5 $
- *
- *  last change: $Author: rt $ $Date: 2005-09-09 00:02:59 $
+ *  $Revision: 1.6 $
+ *
+ *  last change: $Author: hr $ $Date: 2006-06-19 16:25:56 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -79,7 +79,7 @@
         }

         // Update Draw Hierarchy data
-        void ObjectContactPainter::EnsureValidDrawHierarchy(DisplayInfo& rDisplayInfo)
+        void ObjectContactPainter::EnsureValidDrawHierarchy(DisplayInfo& /*rDisplayInfo*/)
         {
             const sal_uInt32 nCount(maDrawHierarchy.Count());

@@ -111,9 +111,9 @@
             else
             {
                 // build new hierarchy
-                const sal_uInt32 nCount(GetPaintObjectCount());
-
-                for(sal_uInt32 a(0L); a < nCount; a++)
+                const sal_uInt32 nCount2(GetPaintObjectCount());
+
+                for(sal_uInt32 a(0L); a < nCount2; a++)
                 {
                     ViewContact& rViewContact = GetPaintObjectViewContact(a);
                     ViewObjectContact& rViewObjectContact = rViewContact.GetViewObjectContact(*this);
@@ -208,7 +208,7 @@
             return 1L;
         }

-        ViewContact& ObjectContactOfPagePainter::GetPaintObjectViewContact(sal_uInt32 nIndex) const
+        ViewContact& ObjectContactOfPagePainter::GetPaintObjectViewContact(sal_uInt32 /*nIndex*/) const
         {
             DBG_ASSERT(mpStartPage,
                 "ObjectContactOfPagePainter::GetPaintObjectViewContact: no mpStartPage set (!)");


Make the manager aware of the added page.

svn path=/trunk/KDE/kdepim/; revision=988308

--- akonadi/resources/shared/singlefileresourceconfigdialogbase.cpp
+++ akonadi/resources/shared/singlefileresourceconfigdialogbase.cpp
@@ -52,6 +52,7 @@
 void SingleFileResourceConfigDialogBase::addPage( const QString &title, QWidget *page )
 {
   ui.ktabwidget->addTab( page, title );
+  mManager->addWidget( page );
   mManager->updateWidgets();
 }


planning: fix compile warning. (#2047)

planning: fix compile warning. (#2047)

--- modules/planning/common/trajectory/trajectory_stitcher.cc
+++ modules/planning/common/trajectory/trajectory_stitcher.cc
@@ -135,8 +135,8 @@
     return ComputeReinitStitchingTrajectory(vehicle_state);
   }

-  auto time_matched_point =
-      prev_trajectory->TrajectoryPointAt(time_matched_index);
+  auto time_matched_point = prev_trajectory->TrajectoryPointAt(
+      static_cast<uint32_t>(time_matched_index));

   if (!time_matched_point.has_path_point()) {
     return ComputeReinitStitchingTrajectory(vehicle_state);
@@ -148,7 +148,8 @@

   auto frenet_sd = ComputePositionProjection(
       vehicle_state.x(), vehicle_state.y(),
-      prev_trajectory->TrajectoryPointAt(position_matched_index));
+      prev_trajectory->TrajectoryPointAt(
+          static_cast<uint32_t>(position_matched_index)));

   auto lon_diff = time_matched_point.path_point().s() - frenet_sd.first;
   auto lat_diff = frenet_sd.second;
@@ -165,7 +166,9 @@
   }

   double forward_rel_time =
-      prev_trajectory->TrajectoryPointAt(time_matched_index).relative_time() +
+      prev_trajectory
+          ->TrajectoryPointAt(static_cast<uint32_t>(time_matched_index))
+          .relative_time() +
       planning_cycle_time;

   std::size_t forward_time_index =


planning: set bounary property to avoid being flushed.

--- modules/planning/optimizer/st_graph/st_boundary_mapper.cc
+++ modules/planning/optimizer/st_graph/st_boundary_mapper.cc
@@ -109,7 +109,6 @@
       StGraphBoundary boundary;
       if (decision.has_follow()) {
         const auto ret = MapFollowDecision(obstacle, decision, &boundary);
-        boundary.set_id(path_obstacle->Id());
         if (ret.ok()) {
           AERROR << "Fail to map obstacle " << path_obstacle->Id()
                  << " with follow decision: " << decision.DebugString();
@@ -190,9 +189,9 @@
                                planning_time_);
   boundary_points.emplace_back(s_max, 0.0);

+  *boundary = StGraphBoundary(boundary_points);
   boundary->SetBoundaryType(StGraphBoundary::BoundaryType::FOLLOW);
   boundary->SetCharacteristicLength(st_boundary_config_.boundary_buffer());
-  *boundary = StGraphBoundary(boundary_points);
   boundary->set_id(stop_obstacle.Id());
   return true;
 }
@@ -407,6 +406,7 @@
   boundary->SetCharacteristicLength(characteristic_length *
                                     st_boundary_config_.follow_coeff());
   boundary->SetBoundaryType(StGraphBoundary::BoundaryType::FOLLOW);
+  boundary->set_id(obstacle.Id());
   return Status::OK();
 }


Removed unnecessary exception definitions [ci skip]

--- lib/dgsnd/wav.hh
+++ lib/dgsnd/wav.hh
@@ -7,16 +7,6 @@
 class WAV {
 public:
   struct Invalid_format_exception : public std::exception {
-    virtual const char* what() const throw() {
-      return "WAV: Invalid_format_exception";
-    }
-  } invalid_format;
-
-  struct Inaccessible_file_exception : public std::exception {
-    virtual const char* what() const throw() {
-      return "WAV: Inaccessible_file_exception";
-    }
-  } inaccessible_file;

   WAV(const std::string& fname) { open(fname); }


do not tidy XRD documents Signed-off-by: Michael Krelin <hacker@klever.net>

do not tidy XRD documents
Signed-off-by: Michael Krelin <4dcc4173d80a2817206e196a38f0dbf7850188ff@klever.net>

--- lib/discovery.cc
+++ lib/discovery.cc
@@ -159,7 +159,7 @@
 				    "XRI resolution failed with '"+status_string+"' message"
 				    ", while looking for SEP with type '"+st->uri+"'", status_code);
 			if(idis.xrd.canonical_ids.empty())
-			    throw opkele::failed_discovery(OPKELE_CP_ "No CanonicalID found for XRI identity found");
+			    throw opkele::failed_discovery(OPKELE_CP_ "No CanonicalID for XRI identity found");
 			string cid = idis.xrd.canonical_ids.begin()->second;
 			if(cids.find(cid)==cids.end()) {
 			    cids.insert(cid);
@@ -241,7 +241,7 @@

 		if(!parser_choked) {
 		    parse(0,0,true);
-		}else{
+		}else if(xmode&xmode_html){
 		    /* TODO: do not bother if we've seen xml */
 		    try {
 			util::tidy_doc_t td = util::tidy_doc_t::create();


no excesive logging, fix psSpeaker log freq

--- src/mumble/AudioInput.cpp
+++ src/mumble/AudioInput.cpp
@@ -221,8 +221,9 @@
 		speex_resampler_destroy(srsEcho);

 	appendWavHeader("psMic", 1, iSampleRate);
-	appendWavHeader("psSpeaker", 1, iEchoFreq);
+	appendWavHeader("psSpeaker", 1, iSampleRate);
 	appendWavHeader("psClean", 1, iSampleRate);
+	appendWavHeader("psSource", 1, iSampleRate);
 	delete [] psMic;
 	delete [] psClean;
 	delete [] psSpeaker;
@@ -392,12 +393,14 @@
 }

 void AudioInput::addMic(const void *data, unsigned int nsamp) {
+	/*
 	FILE *fp = fopen("/var/tmp/micdump", "a");
 	fprintf(fp, "nsamp: %d, iMicLength: %d, MicChannels: %d, iEchoChannels: %d\n", nsamp, iMicLength, iMicChannels, iEchoChannels);
 	if (srsMic)
 		fprintf(fp, "srsMic: true\n");
 	else
 		fprintf(fp, "srsMic: false\n");
+		*/

 	while (nsamp > 0) {
@@ -445,18 +448,22 @@
 							iMinBuffered = 1000;
 							delete [] qlEchoFrames.takeFirst();
 						}
+						/*
 						char buf[200];
 						sprintf(buf, "Going to takeFirst from qlist of size %d\n", qlEchoFrames.count());
 						print_time("/var/tmp/takedump", buf);
+						*/
 						echo = qlEchoFrames.takeFirst();
 					}

 				}
+				/*
 				fprintf(fp, "qlEchoFrames.size: %d\n", qlEchoFrames.size());
 				if (echo) {
 					fprintf(fp, "should be taking qlEchoFrames\n");
 				} else
 					fprintf(fp, "not taking qlEchoFrames\n");
+					*/

 				if (echo) {
 					delete [] psSpeaker;
@@ -468,7 +475,7 @@
 		}

 	}
-	fclose(fp);
+	//fclose(fp);
 }

 void AudioInput::addInternalEcho(const void *data, unsigned int nsamp) {
@@ -476,7 +483,7 @@
 }

 void AudioInput::addEcho(const void *data, unsigned int nsamp) {
-	FILE *dump = fopen("/var/tmp/dump", "a");
+	/*FILE *dump = fopen("/var/tmp/dump", "a");
 	fprintf(dump, "nsamp: %d, iEchoLength: %d, iEchoChannels: %d\n", nsamp, iEchoLength, iEchoChannels);
 	fprintf(dump, "iEchoFrameSize: %d, iEchoFreq: %d, iSampleRate:%d\n", iEchoFrameSize, iEchoFreq, iSampleRate);
 	if (bEchoMulti) {
@@ -484,6 +491,7 @@
 	} else
 		fprintf(dump, "bEchoMulti: false\n");

+
 	if (srsEcho) {
 		fprintf(dump, "srsEcho: true\n");
 	}
@@ -491,6 +499,7 @@
 		fprintf(dump, "srsEcho: false\n");
 	fprintf(dump, "qlEchoFrames.size: %d\n", qlEchoFrames.size());
 	fclose(dump);
+		*/
 	while (nsamp > 0) {
 		unsigned int left = qMin(nsamp, iEchoLength - iEchoFilled);

@@ -536,9 +545,11 @@

 			QMutexLocker l(&qmEcho);
 			qlEchoFrames.append(outbuff);
+			/*
 			char buf[200];
 			sprintf(buf, "Appended qlist of size %d\n", qlEchoFrames.count());
 			print_time("/var/tmp/appenddump", buf);
+			*/
 		}

 	}
@@ -743,6 +754,7 @@
 	iArg = g.s.iNoiseSuppress - iArg;
 	speex_preprocess_ctl(sppPreprocess, SPEEX_PREPROCESS_SET_NOISE_SUPPRESS, &iArg);

+
 	if (sesEcho && psSpeaker) {
 		speex_echo_cancellation(sesEcho, psMic, psSpeaker, psClean);
 		speex_preprocess_run(sppPreprocess, psClean);
@@ -755,6 +767,8 @@
 		speex_preprocess_run(sppPreprocess, psMic);
 		psSource = psMic;
 	}
+
+

 	sum=1.0f;
 	for (i=0;i<iFrameSize;i++)


Changed file name extension for accounts to .acct in coindb.

--- deps/CoinDB/tools/src/coindb.cpp
+++ deps/CoinDB/tools/src/coindb.cpp
@@ -305,7 +305,7 @@
     if (params.size() > 3 && !params[3].empty())
         vault.unlockChainCodes(sha256_2(params[3]));

-    std::string output_file = params.size() > 4 ? params[4] : (params[1] + ".account");
+    std::string output_file = params.size() > 4 ? params[4] : (params[1] + ".acct");
     vault.exportAccount(params[1], output_file, true, exportChainCodeUnlockKey);

     stringstream ss;
@@ -802,7 +802,7 @@
     shell.add(command(&cmd_renameaccount, "renameaccount", "rename an account", command::params(3, "db file", "old name", "new name")));
     shell.add(command(&cmd_accountinfo, "accountinfo", "display account information", command::params(2, "db file", "account name")));
     shell.add(command(&cmd_listaccounts, "listaccounts", "display list of accounts", command::params(1, "db file")));
-    shell.add(command(&cmd_exportaccount, "exportaccount", "export account to file", command::params(2, "db file", "account name"), command::params(3, "export chain code passphrase", "native chain code passphrase", "output file = *.account")));
+    shell.add(command(&cmd_exportaccount, "exportaccount", "export account to file", command::params(2, "db file", "account name"), command::params(3, "export chain code passphrase", "native chain code passphrase", "output file = *.acct")));
     shell.add(command(&cmd_importaccount, "importaccount", "import account from file", command::params(2, "db file", "account file"), command::params(2, "import chain code passphrase", "native chain code passphrase")));
     shell.add(command(&cmd_newaccountbin, "newaccountbin", "add a new account bin", command::params(3, "db file", "account name", "bin name")));
     shell.add(command(&cmd_issuescript, "issuescript", "issue a new signing script", command::params(2, "db file", "account name"), command::params(1, (std::string("bin name = ") + DEFAULT_BIN_NAME).c_str())));


JimEvans: Quieting compiler warning on x64 builds of InternetExplorerDriver.exe

r15801

--- cpp/InternetExplorerDriver/InternetExplorerDriver.cpp
+++ cpp/InternetExplorerDriver/InternetExplorerDriver.cpp
@@ -85,7 +85,7 @@
       if (arg.find(L"--port=") == 0 ||
           arg.find(L"-port=") == 0 ||
           arg.find(L"/port=") == 0) {
-        int equal_pos = arg.find(L"=");
+        size_t equal_pos = arg.find(L"=");
         std::wstring port_string = arg.substr(equal_pos + 1);
         int port_value = _wtoi(port_string.c_str());
         if (port_value > 0) {


BUG: completely disabling multi-threading for the combo metric as it segfaults on the MacMini (with 2 cores)

--- src/Components/Registrations/MultiMetricMultiResolutionRegistration/itkCombinationImageToImageMetric.hxx
+++ src/Components/Registrations/MultiMetricMultiResolutionRegistration/itkCombinationImageToImageMetric.hxx
@@ -876,6 +876,10 @@
     useMultiThread = false;
   }

+  // For now we disable multi-threading of the combo metric, since the MacMini build
+  // segfaults with it. Have to investigate this issue later
+  useMultiThread = false;
+
   /** Compute all metric values and derivatives, single-threadedly. */
   if( !useMultiThread )
   {


* KURL::lastPathComponent的实现，没考虑到本地文件的问题。本地文件应该返回文件名才对

--- third_party/WebKit/Source/platform/weborigin/KURL.cpp
+++ third_party/WebKit/Source/platform/weborigin/KURL.cpp
@@ -686,6 +686,11 @@
         --end;

     size_t start = m_string.reverseFind('/', end);
+    if (isLocalFile()) {
+        size_t start2 = m_string.reverseFind('\\', end);
+        if (start < start2)
+            start = start2;
+    }
     if (start < static_cast<unsigned>(m_portEnd))
         return String();
     ++start;
@@ -1062,7 +1067,8 @@
     return String::adopt(result);
 }

-// صһUTF88ֽڵַҲҪString::utf8()
+// صһUTF162ֽڵַ滹ҪString::utf8()
+// ǰȷuf8ڸĳ16ΪblinkظjsַǸֽڱ16
 String decodeURLEscapeSequences(const String& str)
 {
     return decodeURLEscapeSequences(str, UTF8Encoding());
@@ -1120,7 +1126,7 @@

     String returnVal = String::adopt(result);
     ASSERT(returnVal.is8Bit());
-    return returnVal;
+    return WTF::ensureUTF16String(returnVal);
 }

 // Caution: This function does not bounds check.


fix indent

fix indent

--- sal/osl/unx/uunxapi.cxx
+++ sal/osl/unx/uunxapi.cxx
@@ -93,7 +93,7 @@
  sal_Bool realpath_u(const rtl_uString* pustrFileName, rtl_uString** ppustrResolvedName)
  {
 #ifndef MACOSX // not MACOSX
-        rtl::OString fn = OUStringToOString(pustrFileName);
+    rtl::OString fn = OUStringToOString(pustrFileName);
 #else
     rtl::OString fn = macxp_resolveAliasAndConvert(pustrFileName);
 #endif


INTEGRATION: CWS warnings01 (1.66.6); FILE MERGED 2006/06/12 12:52:54 fs 1.66.6.2: #i66333# removed senseless SetMapMode 2006/03/24 15:36:26 fs 1.66.6.1: #i57457# warning-free code (unxlngi6/.pro + unxsoli4.pro)

--- dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: SelectionBrowseBox.cxx,v $
  *
- *  $Revision: 1.66 $
+ *  $Revision: 1.67 $
  *
- *  last change: $Author: obo $ $Date: 2006-01-16 15:30:24 $
+ *  last change: $Author: hr $ $Date: 2006-06-20 03:27:27 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -163,13 +163,13 @@
     }
 }

-DBG_NAME(OSelectionBrowseBox);
+DBG_NAME(OSelectionBrowseBox)
 //------------------------------------------------------------------------------
 OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
                    :EditBrowseBox( pParent,EBBF_NOROWPICTURE, WB_3DLOOK, BROWSER_COLUMNSELECTION | BROWSER_KEEPSELECTION |  BROWSER_HIDESELECT |
                                   BROWSER_HIDECURSOR | BROWSER_HLINESFULL | BROWSER_VLINESFULL )
+                   ,m_aFunctionStrings(ModuleRes(STR_QUERY_FUNCTIONS))
                    ,m_nVisibleCount(0)
-                   ,m_aFunctionStrings(ModuleRes(STR_QUERY_FUNCTIONS))
                    ,m_bOrderByUnRelated(sal_True)
                    ,m_bGroupByUnRelated(sal_True)
                    ,m_bStopTimer(sal_False)
@@ -250,7 +250,7 @@
         String sGroup = m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount() - 1);
         m_aFunctionStrings = m_aFunctionStrings.GetToken(0);

-        for (sal_Int32 i = 0; i < sizeof(eFunctions)/sizeof(eFunctions[0]) ; ++i)
+        for (size_t i = 0; i < sizeof(eFunctions)/sizeof(eFunctions[0]) ; ++i)
         {
             m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
             m_aFunctionStrings += String(ByteString(rContext.getIntlKeywordAscii(eFunctions[i])),RTL_TEXTENCODING_UTF8);
@@ -340,7 +340,7 @@
 }

 // -----------------------------------------------------------------------------
-BrowserHeader* OSelectionBrowseBox::imp_CreateHeaderBar(BrowseBox* pParent)
+BrowserHeader* OSelectionBrowseBox::imp_CreateHeaderBar(BrowseBox* /*pParent*/)
 {
     return new OSelectionBrwBoxHeader(this);
 }
@@ -388,15 +388,11 @@
     EditBrowseBox::Init();

     // set the header bar
-    BrowserHeader* pHeader = CreateHeaderBar(this);
-    pHeader->SetMouseTransparent(sal_False);
-
-    SetHeaderBar(pHeader);
+    BrowserHeader* pNewHeaderBar = CreateHeaderBar(this);
+    pNewHeaderBar->SetMouseTransparent(sal_False);
+
+    SetHeaderBar(pNewHeaderBar);
     SetMode(m_nMode);
-
-
-    SetMapMode( MapMode(MAP_TWIP) );
-    GetDataWindow().SetMapMode( GetMapMode() );

     Font    aFont( GetDataWindow().GetFont() );
     aFont.SetWeight( WEIGHT_NORMAL );
@@ -446,8 +442,6 @@

     pController->clearFields();

-    sal_uInt16 nCurCol  = GetCurColumnId();
-    long nCurRow        = GetCurRow();
     DeactivateCell();

     RemoveColumns();
@@ -460,8 +454,6 @@
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
     SetUpdateMode(sal_False);

-    OQueryController* pController = static_cast<OQueryController*>(static_cast<OQueryController*>(getDesignView()->getController()));
-
     OTableFields::reverse_iterator aIter = getFields().rbegin();
     for(sal_uInt16 nId=getFields().size();aIter != getFields().rend();++aIter,--nId)
     {
@@ -491,8 +483,6 @@
 CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
-    OQueryController* pController = static_cast<OQueryController*>(static_cast<OQueryController*>(getDesignView()->getController()));
-
     OTableFieldDescRef pEntry = getFields()[nColId-1];
     DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetController : keine FieldDescription !");

@@ -521,16 +511,14 @@
 }

 //------------------------------------------------------------------------------
-void OSelectionBrowseBox::InitController(CellControllerRef& rController, long nRow, sal_uInt16 nColId)
+void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColId)
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
     OSL_ENSURE(nColId != BROWSER_INVALIDID,"An Invalid Id was set!");
     if ( nColId == BROWSER_INVALIDID )
         return;
-    OQueryController* pController = static_cast<OQueryController*>(static_cast<OQueryController*>(getDesignView()->getController()));
-
     USHORT nPos = GetColumnPos(nColId);
-    if ( nPos == 0 || nPos == BROWSER_ENDOFSELECTION || nPos > getFields().size() )
+    if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() )
         return;
     OTableFieldDescRef pEntry = getFields()[nPos-1];
     DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
@@ -641,7 +629,6 @@
         if ( !sOldLocalizedFunctionName.Equals(sFunctionName) || _pEntry->IsGroupBy() )
         {
             // append undo action for the function field
-            ::rtl::OUString sOldLocalizedFunctionName = _pEntry->GetFunction();
             _pEntry->SetFunctionType(FKT_NONE);
             _pEntry->SetFunction(::rtl::OUString());
             _pEntry->SetGroupBy(sal_False);
@@ -780,10 +767,10 @@
                 ::rtl::OUString sColumnAlias = OSQLParseTreeIterator::getColumnAlias(pChild);
                 if ( sColumnAlias.getLength() ) // we found an as clause
                 {
-                    String sOldAlias = aSelEntry->GetFieldAlias();
+                    String aSelectionAlias = aSelEntry->GetFieldAlias();
                     aSelEntry->SetFieldAlias( sColumnAlias );
                     // append undo
-                    appendUndoAction(sOldAlias,aSelEntry->GetFieldAlias(),BROW_COLUMNALIAS_ROW,_bListAction);
+                    appendUndoAction(aSelectionAlias,aSelEntry->GetFieldAlias(),BROW_COLUMNALIAS_ROW,_bListAction);
                     if ( m_bVisibleRow[BROW_COLUMNALIAS_ROW] )
                         RowModified(GetBrowseRow(BROW_COLUMNALIAS_ROW), nColumnId);
                 }
@@ -833,8 +820,8 @@

                             // now parse the parameters
                             ::rtl::OUString sParameters;
-                            for(sal_uInt32 i = 2; i < nFunCount; ++i) // we only want to parse the parameters of the function
-                                pColumnRef->getChild(i)->parseNodeToStr(sParameters,xMetaData,&pParser->getContext(),sal_True,bQuote);
+                            for(sal_uInt32 function = 2; function < nFunCount; ++function) // we only want to parse the parameters of the function
+                                pColumnRef->getChild(function)->parseNodeToStr(sParameters,xMetaData,&pParser->getContext(),sal_True,bQuote);

                             aSelEntry->SetFunctionType(nFunctionType);
                             aSelEntry->SetField(sParameters);
@@ -884,10 +871,10 @@
                         // now parse the hole statement
                         sal_uInt32 nFunCount = pColumnRef->count();
                         ::rtl::OUString sParameters;
-                        for(sal_uInt32 i = 0; i < nFunCount; ++i)
-                            pColumnRef->getChild(i)->parseNodeToStr(sParameters,xMetaData,&pParser->getContext(),sal_True,bQuote);
-
-                        ::rtl::OUString sOldAlias = aSelEntry->GetAlias();
+                        for(sal_uInt32 function = 0; function < nFunCount; ++function)
+                            pColumnRef->getChild(function)->parseNodeToStr(sParameters,xMetaData,&pParser->getContext(),sal_True,bQuote);
+
+                        ::rtl::OUString aSelectionAlias = aSelEntry->GetAlias();
                         aSelEntry->SetAlias(::rtl::OUString());

                         sal_Int32 nNewFunctionType = aSelEntry->GetFunctionType() | FKT_NUMERIC | FKT_OTHER;
@@ -899,7 +886,7 @@
                         aSelEntry->SetTabWindow(NULL);

                         aSelEntry->SetField(sParameters);
-                        notifyTableFieldChanged(sOldAlias,aSelEntry->GetAlias(),_bListAction, nColumnId);
+                        notifyTableFieldChanged(aSelectionAlias,aSelEntry->GetAlias(),_bListAction, nColumnId);
                     }
                     else
                     {
@@ -926,10 +913,11 @@
                 }
                 if ( i > 0 && InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).isEmpty() ) // may we have to append more than one field
                 { // the field could not be isnerted
-                    String sTitle(ModuleRes(STR_STAT_WARNING));
-                    String sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST));
-                    sErrorMsg.SearchAndReplaceAscii("$name$",aSelEntry->GetField());
-                    OSQLMessageBox aDlg(this,sTitle,sErrorMsg,WB_OK | WB_DEF_OK,OSQLMessageBox::Warning);
+                    String sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) );
+                    sErrorMessage.SearchAndReplaceAscii("$name$",aSelEntry->GetField());
+                    OSQLMessageBox aDlg( this,
+                        String( ModuleRes( STR_STAT_WARNING ) ), sErrorMessage,
+                        WB_OK | WB_DEF_OK, OSQLMessageBox::Warning );
                     aDlg.Execute();
                     bError = sal_True;
                 }
@@ -939,10 +927,11 @@
     }
     else // something different which we have to check (may be a select statement)
     {
-        String sTitle(ModuleRes(STR_STAT_WARNING));
-        String sErrorMsg(ModuleRes(STR_QRY_COLUMN_NOT_FOUND));
-        sErrorMsg.SearchAndReplaceAscii("$name$",_sFieldName);
-        OSQLMessageBox aDlg(this,sTitle,sErrorMsg,WB_OK | WB_DEF_OK,OSQLMessageBox::Warning);
+        String sErrorMessage( ModuleRes( STR_QRY_COLUMN_NOT_FOUND ) );
+        sErrorMessage.SearchAndReplaceAscii("$name$",_sFieldName);
+        OSQLMessageBox aDlg( this,
+            String( ModuleRes( STR_STAT_WARNING ) ), sErrorMessage,
+            WB_OK | WB_DEF_OK, OSQLMessageBox::Warning );
         aDlg.Execute();
         bError = sal_True;
     }
@@ -955,9 +944,9 @@
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
     OTableFieldDescRef pEntry = NULL;
     OQueryController* pController = static_cast<OQueryController*>(getDesignView()->getController());
-    USHORT nPos = GetColumnPos(GetCurColumnId());
-    if(getFields().size() > static_cast<USHORT>(nPos - 1))
-        pEntry = getEntry(nPos - 1);
+    USHORT nCurrentColumnPos = GetColumnPos(GetCurColumnId());
+    if(getFields().size() > static_cast<USHORT>(nCurrentColumnPos - 1))
+        pEntry = getEntry(nCurrentColumnPos - 1);

     sal_Bool bWasEmpty = pEntry.isValid() ? pEntry->IsEmpty() : sal_False;
     sal_Bool bError         = sal_False;
@@ -1342,7 +1331,7 @@
         // ColId ist bei mir gleichbedeutend mit Position, und da sollte die Bedingung natuerlich zutreffen

     sal_uInt16 nCurCol = GetCurColumnId();
-    long nCurRow = GetCurRow();
+    long nCurrentRow = GetCurRow();

     DeactivateCell();

@@ -1358,7 +1347,7 @@
     Rectangle aInvalidRect = GetInvalidRect( _nColumnId );
     Invalidate( aInvalidRect );

-    ActivateCell( nCurRow, nCurCol );
+    ActivateCell( nCurrentRow, nCurCol );

     pController->setModified();

@@ -1366,7 +1355,7 @@
 }

 //------------------------------------------------------------------------------
-void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId, sal_Bool bActivate)
+void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId )
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
     OQueryController* pController = static_cast<OQueryController*>(getDesignView()->getController());
@@ -1464,9 +1453,7 @@
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
     sal_Int8 nDropAction = DND_ACTION_NONE;
-    if  (   (rEvt.GetColumnId() >= 0)
-        &&  (rEvt.GetRow() >= -1)
-        )
+    if  ( rEvt.GetRow() >= -1 )
     {
         if ( IsEditing() )
         {
@@ -1543,7 +1530,7 @@
         {
             pEntry = *aIter;
             if (pEntry->GetAlias() == ::rtl::OUString(rAliasName) )
-                RemoveField(GetColumnId(nPos), sal_False);
+                RemoveField( GetColumnId( nPos ) );
         }

         if (bWasEditing)
@@ -1609,13 +1596,12 @@
 void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColumnPostion)
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
-    OQueryController* pController = static_cast<OQueryController*>(getDesignView()->getController());
         // das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn
     DBG_ASSERT(_nColumnPostion == BROWSER_INVALIDID || (_nColumnPostion <= (long)getFields().size()), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
         // -1 heisst ganz hinten, Count heisst ganz hinten, der Rest bezeichnet eine richtige Position

     sal_uInt16 nCurCol = GetCurColumnId();
-    long nCurRow = GetCurRow();
+    long nCurrentRow = GetCurRow();

     DeactivateCell();

@@ -1653,7 +1639,7 @@
     Rectangle aInvalidRect = GetInvalidRect( pEntry->GetColumnId() );
     Invalidate( aInvalidRect );

-    ActivateCell( nCurRow, nCurCol );
+    ActivateCell( nCurrentRow, nCurCol );
     static_cast<OQueryController*>(getDesignView()->getController())->setModified();

     invalidateUndoRedo();
@@ -1724,8 +1710,6 @@
 sal_uInt16 OSelectionBrowseBox::FieldsCount()
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
-    OQueryController* pController = static_cast<OQueryController*>(getDesignView()->getController());
-
     OTableFields::iterator aIter = getFields().begin();
     sal_uInt16 nCount = 0;

@@ -1743,8 +1727,6 @@
 OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(USHORT& _rColumnPosition )
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
-    OQueryController* pController = static_cast<OQueryController*>(getDesignView()->getController());
-
     OTableFields::iterator aIter = getFields().begin();
     OTableFields::iterator aEnd  = getFields().end();

@@ -1827,7 +1809,7 @@
     }
 }
 //------------------------------------------------------------------------------
-void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const String& rValue, const sal_uInt16 nLevel, const char* pOp )
+void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const String& rValue, const sal_uInt16 nLevel )
 {
     Reference< XConnection> xConnection = static_cast<OQueryController*>(getDesignView()->getController())->getConnection();
     if(!xConnection.is())
@@ -1967,8 +1949,6 @@
         case BROW_VIS_ROW:
             {
                 OTableFieldDescRef  pEntry = getEntry(GetColumnPos(GetCurColumnId()) - 1);
-
-                sal_Bool bOldValue = pEntry->IsVisible();

                 sal_uInt16 nIdx = m_pOrderCell->GetSelectEntryPos();
                 if(!m_bOrderByUnRelated && nIdx > 0 &&
@@ -2109,7 +2089,7 @@
 //------------------------------------------------------------------------------
 sal_Bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const
 {
-    DBG_ASSERT(_nWhich>=0 && _nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !");
+    DBG_ASSERT(_nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !");
     return m_bVisibleRow[_nWhich];
 }

@@ -2117,7 +2097,7 @@
 void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis)
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
-    DBG_ASSERT(_nWhich>=0 && _nWhich<m_bVisibleRow.size(), "OSelectionBrowseBox::SetRowVisible : invalid parameter !");
+    DBG_ASSERT(_nWhich<m_bVisibleRow.size(), "OSelectionBrowseBox::SetRowVisible : invalid parameter !");

     sal_Bool bWasEditing = IsEditing();
     if (bWasEditing)
@@ -2456,7 +2436,7 @@
 }

 //------------------------------------------------------------------------------
-sal_uInt16 OSelectionBrowseBox::GetDefaultColumnWidth(const String& rName) const
+sal_uInt16 OSelectionBrowseBox::GetDefaultColumnWidth(const String& /*rName*/) const
 {
     DBG_CHKTHIS(OSelectionBrowseBox,NULL);
     // die Baissklasse macht das von dem Text abhaengig, ich habe aber keine Spaltenueberschriften, daher haette ich
@@ -2684,7 +2664,7 @@
     return ::rtl::OUString(aLabel.GetToken(nToken));
 }
 // -----------------------------------------------------------------------------
-::rtl::OUString OSelectionBrowseBox::GetAccessibleName( ::svt::AccessibleBrowseBoxObjType _eObjType,sal_Int32 _nPosition) const
+::rtl::OUString OSelectionBrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType _eObjType,sal_Int32 _nPosition) const
 {
     ::rtl::OUString sRetText;
     switch( _eObjType )
@@ -2693,7 +2673,7 @@
             sRetText = GetRowDescription(_nPosition);
             break;
         default:
-            sRetText = EditBrowseBox::GetAccessibleDescription(_eObjType,_nPosition);
+            sRetText = EditBrowseBox::GetAccessibleObjectDescription(_eObjType,_nPosition);
     }
     return sRetText;
 }


[sw/silicon_creator] Fix parameterized test instantiation

Signed-off-by: Alphan Ulusoy <23b245cc5a07aacf75a9db847b24c67dee1707bf@google.com>

--- sw/device/silicon_creator/lib/sigverify/sigverify_unittest.cc
+++ sw/device/silicon_creator/lib/sigverify/sigverify_unittest.cc
@@ -186,7 +186,7 @@
 }

 INSTANTIATE_TEST_SUITE_P(NonTestOperationalStatesDeathTest,
-                         SigverifyInNonTestStates,
+                         SigverifyInNonTestStatesDeathTest,
                          testing::ValuesIn(kLcStatesNonTestOperational));

 class SigverifyInTestStates : public SigverifyInLcState {};


fix compile errors

fix compile errors

--- paddle/fluid/operators/reader/create_double_buffer_reader_op.cc
+++ paddle/fluid/operators/reader/create_double_buffer_reader_op.cc
@@ -20,8 +20,8 @@
 namespace operators {
 namespace reader {

-static constexpr size_t kChannelSize = 2;
-static constexpr size_t kCacheSize = 4;  // kChannelSize + 2
+static constexpr size_t kCacheSize = 2;
+static constexpr size_t kChannelSize = 0;  // kCacheSize - 2

 class DoubleBufferReader : public framework::DecoratedReader {
  public:
@@ -36,7 +36,7 @@
       ReaderBase* reader, platform::Place target_place = platform::CPUPlace())
       : DecoratedReader(reader), place_(target_place) {
 #ifdef PADDLE_WITH_CUDA
-    for (size_t i = 0; i < kChannelSize + 2; ++i) {
+    for (size_t i = 0; i < kCacheSize; ++i) {
       if (platform::is_gpu_place(place_)) {
         ctxs_.emplace_back(new platform::CUDADeviceContext(
             boost::get<platform::CUDAPlace>(place_)));
@@ -51,17 +51,17 @@
   void ReInit() override;

   void StartPrefetcher() {
-    buffer_ = framework::MakeChannel<Item>(kChannelSize);
+    channel_ = framework::MakeChannel<Item>(kChannelSize);
     prefetcher_ = std::thread([this] { PrefetchThreadFunc(); });
   }

   void EndPrefetcher() {
-    buffer_->Close();
-    if (prefecther_.joinable()) {
+    channel_->Close();
+    if (prefetcher_.joinable()) {
       prefetcher_.join();
     }
-    delete buffer_;
-    buffer_ = nullptr;
+    delete channel_;
+    channel_ = nullptr;
   }

   ~DoubleBufferReader() { EndPrefetcher(); }
@@ -70,7 +70,7 @@
   void PrefetchThreadFunc();

   std::thread prefetcher_;
-  framework::Channel<Item>* buffer_;
+  framework::Channel<Item>* channel_;
   platform::Place place_;
   std::vector<std::unique_ptr<platform::DeviceContext>> ctxs_;
 };
@@ -127,9 +127,9 @@
 };

 bool DoubleBufferReader::HasNext() const {
-  while (!buffer_->IsClosed() && !buffer_->CanReceive()) {
-  }
-  return buffer_->CanReceive()
+  while (!channel_->IsClosed() && !channel_->CanReceive()) {
+  }
+  return channel_->CanReceive();
 }

 void DoubleBufferReader::ReadNext(std::vector<framework::LoDTensor>* out) {
@@ -138,8 +138,8 @@
   }

   Item batch;
-  buffer_->Receive(&batch);
-  *out = batch.payload_;
+  channel_->Receive(&batch);
+  *out = batch.payloads_;
   if (batch.ctx_) {
     batch.ctx_->Wait();
   }
@@ -167,26 +167,26 @@
       gpu_batch.resize(cpu_batch.size());
       for (size_t i = 0; i < cpu_batch.size(); ++i) {
         framework::TensorCopy(cpu_batch[i], place_, *gpu_ctx, &gpu_batch[i]);
-        gpu_batch[i].set_lod(batch.payloads_[i].lod());
+        gpu_batch[i].set_lod(cpu_batch[i].lod());
       }
-      batch.payload_ = gpu_batch;
+      batch.payloads_ = gpu_batch;
       batch.ctx_ = gpu_ctx;
     } else {
       // CPUPlace
-      batch.payload_ = cpu_batch;
+      batch.payloads_ = cpu_batch;
     }
     ++cached_tensor_id;
     cached_tensor_id %= kCacheSize;

     try {
-      buffer_->Send(&batch);
+      channel_->Send(&batch);
     } catch (paddle::platform::EnforceNotMet e) {
       VLOG(5) << "WARNING: The double buffer channel has been closed. The "
                  "prefetch thread will terminate.";
       break;
     }
   }
-  buffer_->Close();
+  channel_->Close();
   VLOG(5) << "Prefetch thread terminates.";
 }


Fix test (StoreScriptImported shifted enum values) Adds test for StoreScriptImported. Makes invalid instruction test resistant to future changes.

--- tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -507,8 +507,16 @@

     {
         QDeclarativeInstruction i;
+        i.line = 48;
+        i.type = QDeclarativeInstruction::StoreImportedScript;
+        i.storeScript.value = 2;
+        data->bytecode << i;
+    }
+
+    {
+        QDeclarativeInstruction i;
         i.line = 50;
-        i.type = (QDeclarativeInstruction::Type)(QDeclarativeInstruction::Defer + 1); // Non-existant
+        i.type = (QDeclarativeInstruction::Type)(1234); // Non-existant
         data->bytecode << i;
     }

@@ -564,7 +572,8 @@
         << "45\t\t47\tPOP_VALUE\t\t35\t8"
         << "46\t\t48\tDEFER\t\t\t7"
         << "47\t\tNA\tDEFER\t\t\t7"
-        << "48\t\t50\tXXX UNKOWN INSTRUCTION\t47"
+        << "48\t\t48\tSTORE_IMPORTED_SCRIPT\t2"
+        << "49\t\t50\tXXX UNKOWN INSTRUCTION\t1234"
         << "-------------------------------------------------------------------------------";

     messages = QStringList();


Set timer to correct value for 60Hz.

Set timer to correct value for 60Hz.

--- Chip8/chip8.cpp
+++ Chip8/chip8.cpp
@@ -30,7 +30,7 @@
   // set up timer
   _timer = new QTimer(this);
   connect(_timer, SIGNAL(timeout()), this, SLOT(timerTick()));
-  _timer->start(100);
+  _timer->start(17);

   // key event handler
   QApplication::instance()->installEventFilter(this);


Fix signed unsigned comparison

Fix signed unsigned comparison

--- mesh/mesh.cpp
+++ mesh/mesh.cpp
@@ -4584,7 +4584,7 @@
    }

    std::vector<int> v2v(GetNV());
-   for (int i=0; i<v2v.size(); i++)
+   for (size_t i=0; i<v2v.size(); i++)
    {
       v2v[i] = i;
    }


removed unnecessary include from probability

--- himan-plugins/source/probability.cpp
+++ himan-plugins/source/probability.cpp
@@ -18,8 +18,6 @@
 #include <iostream>

 #include <math.h>
-
-#include <stdio.h>

 namespace himan
 {


Add initializer in NetworkMenuButton to avoid crash.

BUG=chromium-os:17031
TEST=Check chash reports for crash.

Review URL: http://codereview.chromium.org/7283025

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@91046 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/chromeos/status/network_menu_button.cc
+++ chrome/browser/chromeos/status/network_menu_button.cc
@@ -103,6 +103,7 @@
       NetworkMenu(),
       icon_(NULL),
       right_badge_(NULL),
+      top_left_badge_(NULL),
       left_badge_(NULL),
       mobile_data_bubble_(NULL),
       check_for_promo_(true),


Disable two page cycler tests that fail on Chrome OS.

BUG=130930
TBR=rdevlin.cronin@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10500014

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@140237 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/page_cycler/page_cycler_browsertest.cc
+++ chrome/browser/page_cycler/page_cycler_browsertest.cc
@@ -322,6 +322,10 @@

 // Test that PageCycler will visit all the urls from a cache directory
 // successfully while in playback mode.
+#if defined(OS_CHROMEOS)
+// TODO(rdevlin.cronin): Perhaps page cycler isn't completely implemented on
+// ChromeOS?
+#else
 IN_PROC_BROWSER_TEST_F(PageCyclerCachedBrowserTest, PlaybackMode) {
   const size_t kNumIterations = 1;
   ScopedTempDir temp;
@@ -379,3 +383,4 @@

   ASSERT_FALSE(errors[0].compare(expected_error));
 }
+#endif


Perform password import from Keychain in the muted mode.

This will decrese the amount of times the Keychain prompt is shown to the user.

BUG=514838

Review URL: https://codereview.chromium.org/1330293002

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#348133}


Remove special case for rank(lhs) == rank(rhs) since that is covered already and it was skipping the feasibility check

--- tensorflow/compiler/tf2tensorrt/convert/convert_nodes.cc
+++ tensorflow/compiler/tf2tensorrt/convert/convert_nodes.cc
@@ -418,15 +418,6 @@
           "Cannot broadcast weights with non-trivial batch dimension");
     }
     TF_RETURN_IF_ERROR(RemoveBatchDimension(operand_r_new_dims));
-  }
-
-  // If the rank of the tensors is already the same, we can't do anything
-  // further.
-  if (operand_l_new_dims->nbDims == operand_r_new_dims->nbDims) {
-    VLOG(2) << "Broadcasted operands to [L] "
-            << DebugString(*operand_l_new_dims) << " and [R] "
-            << DebugString(*operand_r_new_dims);
-    return Status::OK();
   }

   const nvinfer1::Dims* higher_rank =


[bus][pci] Make sure there's a fallback range in release mode

--- dev/bus/pci/bus_mgr/resource.cpp
+++ dev/bus/pci/bus_mgr/resource.cpp
@@ -38,6 +38,8 @@
                 DEBUG_ASSERT_MSG(0, "uhandled pci resource type %d\n", type);
         }
     }
+    static resource_range zero = {};
+    return zero;
 }

 status_t resource_allocator::set_range(const resource_range &range, bool prefetchable) {


Change ConvertAxis is_weights to use_implicit_batch and move output to end of args list

--- tensorflow/compiler/tf2tensorrt/convert/convert_nodes.cc
+++ tensorflow/compiler/tf2tensorrt/convert/convert_nodes.cc
@@ -521,16 +521,11 @@
 }

 // Convert an axis from TF format to TRT format while validating. TF format
-// includes the batch dimension, while TRT does not. TF can also use negative
-// indices.
-// TODO(tmorris): Use this method in more ops.
+// includes the batch dimension, while TRT does not if implicit batching is used
+// (i.e. for tensors). TF can also use negative indices.
 Status ConvertAxis(int tf_axis, int trt_nb_dims, absl::string_view node_name,
-                   int* trt_axis, bool is_weights=false) {
-  int tf_nb_dims = trt_nb_dims;
-  if (!is_weights) {
-    tf_nb_dims = trt_nb_dims + 1;
-  }
-
+                   bool use_implicit_batch, int* trt_axis) {
+  const int tf_nb_dims = trt_nb_dims + (use_implicit_batch ? 1 : 0);
   // Check bounds.
   if (tf_axis < -tf_nb_dims || tf_axis >= tf_nb_dims) {
     return errors::InvalidArgument(
@@ -540,16 +535,13 @@
   // Make negative axis positive.
   if (tf_axis < 0) tf_axis += tf_nb_dims;
   // Don't allow axis to be the batch dimension.
-  if (tf_axis == 0 && !is_weights) {
+  if (use_implicit_batch && tf_axis == 0) {
     return errors::Unimplemented(
         "TensorRT does not allow manipulation of the batch dimension, at ",
         node_name);
   }
-  // Remove batch dimension.
-  *trt_axis = tf_axis;
-  if (!is_weights){
-    *trt_axis = tf_axis - 1;
-  }
+  // Remove batch dimension if it is implicit.
+  *trt_axis = use_implicit_batch ? tf_axis - 1 : tf_axis;
   return Status::OK();
 }

@@ -2069,8 +2061,8 @@
   // Use rank = nbDims + 1 for ConvertAxis's bounds checking to account for
   // ExpandDim's ability to add an axis at end of the shape.
   int trt_axis;
-  TF_RETURN_IF_ERROR(
-      ConvertAxis(axis[0], dims.nbDims + 1, node_def.name(), &trt_axis));
+  TF_RETURN_IF_ERROR(ConvertAxis(axis[0], dims.nbDims + 1, node_def.name(),
+                                 /*use_implicit_batch=*/true, &trt_axis));
   if (params->validation_only) return Status::OK();

   // ExpandDims: Insert new dim of size 1.
@@ -2105,8 +2097,8 @@
   for (int tf_axis : squeeze_dims) {
     // Make sure axis is valid.
     int trt_axis;
-    TF_RETURN_IF_ERROR(
-        ConvertAxis(tf_axis, dims.nbDims, node_def.name(), &trt_axis));
+    TF_RETURN_IF_ERROR(ConvertAxis(tf_axis, dims.nbDims, node_def.name(),
+                                   /*use_implicit_batch=*/true, &trt_axis));
     // Make sure target dimension is size 1.
     if (input_dims[trt_axis] != 1) {
       return errors::InvalidArgument(
@@ -3301,9 +3293,9 @@
   }
   for (int i = 0; i < tf_axes_list.size(); i++) {
     int trt_axis;
-    TF_RETURN_IF_ERROR(ConvertAxis(tf_axes_list[i],
-                                   tensor->getDimensions().nbDims,
-                                   node_def.name(), &trt_axis));
+    TF_RETURN_IF_ERROR(
+        ConvertAxis(tf_axes_list[i], tensor->getDimensions().nbDims,
+                    node_def.name(), /*use_implicit_batch=*/true, &trt_axis));
     axes |= (1 << trt_axis);
   }

@@ -3370,8 +3362,8 @@
   const nvinfer1::Dims dims = inputs.at(0).GetTrtDims();
   const int64 tf_axis = attrs.get<int64>("axis");
   int trt_axis;
-  TF_RETURN_IF_ERROR(
-      ConvertAxis(tf_axis, dims.nbDims + 1, node_def.name(), &trt_axis));
+  TF_RETURN_IF_ERROR(ConvertAxis(tf_axis, dims.nbDims + 1, node_def.name(),
+                                 /*use_implicit_batch=*/true, &trt_axis));

   // Compute expanded dimensions and then reshape input tensors.
   std::vector<int> tensor_dims(dims.d, dims.d + dims.nbDims);
@@ -3518,8 +3510,8 @@
   const nvinfer1::Dims dims = input.GetTrtDims();
   // Convert axis.
   int trt_axis;
-  TF_RETURN_IF_ERROR(
-      ConvertAxis(tf_axis, dims.nbDims, node_def.name(), &trt_axis));
+  TF_RETURN_IF_ERROR(ConvertAxis(tf_axis, dims.nbDims, node_def.name(),
+                                 /*use_implicit_batch=*/true, &trt_axis));
   // Dimension must equal num_splits for Unstack (when squeeze_after is true)
   if (squeeze_after && dims.d[trt_axis] != num_splits) {
     return errors::InvalidArgument(
@@ -3647,8 +3639,8 @@
   }
   int trt_axis = 0;
   const auto dim = inputs.at(0).GetTrtDims();
-  TF_RETURN_IF_ERROR(
-      ConvertAxis(axis[0], dim.nbDims, node_def.name(), &trt_axis));
+  TF_RETURN_IF_ERROR(ConvertAxis(axis[0], dim.nbDims, node_def.name(),
+                                 /*use_implicit_batch=*/true, &trt_axis));
   // Check that dimensions match on non-concatenate axis.
   TF_RETURN_IF_ERROR(VerifyShapesMatch(
       absl::Span<const TRT_TensorOrWeights>(inputs).first(num_inputs), trt_axis,
@@ -3837,7 +3829,8 @@
   }
   int trt_axis = 0;
   TF_RETURN_IF_ERROR(ConvertAxis(axis[0], inputs.at(0).GetTrtDims().nbDims,
-                                 node_def.name(), &trt_axis, inputs.at(0).is_weights()));
+                                 node_def.name(), inputs.at(0).is_tensor(),
+                                 &trt_axis));
   const TRT_TensorOrWeights& indices_tensor = inputs.at(1);
   if (indices_tensor.batch_size() != 1) {
     return errors::InvalidArgument("Only indices with batch 1 are supported.");
@@ -4153,8 +4146,8 @@
   int tf_axis = inputs.at(1).weights().GetSpan<int>()[0];
   int trt_axis;
   nvinfer1::Dims dims = inputs.at(0).GetTrtDims();
-  TF_RETURN_IF_ERROR(
-      ConvertAxis(tf_axis, dims.nbDims, node_def.name(), &trt_axis));
+  TF_RETURN_IF_ERROR(ConvertAxis(tf_axis, dims.nbDims, node_def.name(),
+                                 /*use_implicit_batch=*/true, &trt_axis));
   nvinfer1::TopKOperation topk_op;
   if (node_def.op() == "ArgMin") {
     topk_op = nvinfer1::TopKOperation::kMIN;


Always ask the user when adding a search engine from JS.

When adding a search provider from JS, and the autogenerated keyword clashes with an existing search engine, ask the user.

BUG=15060
TEST=as described in the bug

Review URL: http://codereview.chromium.org/2155001

git-svn-id: http://src.chromium.org/svn/trunk/src@48143 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: c67ec90c4df0cd49978c88525f062c937e508e1c

--- chrome/browser/search_engines/template_url_fetcher.cc
+++ chrome/browser/search_engines/template_url_fetcher.cc
@@ -124,14 +124,18 @@
         !model || !model->loaded() ||
         !model->CanReplaceKeyword(keyword_, template_url->url()->url(),
                                   &existing_url)) {
-      // TODO(pamg): If we're coming from JS (not autodetected) and this URL
-      // already exists in the model, consider bringing up the
-      // EditKeywordController to edit it.  This would be helpful feedback in
+      if (autodetected_ || !model || !model->loaded()) {
+        fetcher_->RequestCompleted(this);
+        // WARNING: RequestCompleted deletes us.
+        return;
+      }
+      // If we're coming from JS (neither autodetected nor failure to load the
+      // template URL model) and this URL already exists in the model, we bring
+      // up the EditKeywordController to edit it.  This is helpful feedback in
       // the case of clicking a button twice, and annoying in the case of a
       // page that calls AddSearchProvider() in JS without a user action.
-      fetcher_->RequestCompleted(this);
-      // WARNING: RequestCompleted deletes us.
-      return;
+      keyword_.clear();
+      existing_url = NULL;
     }

     if (existing_url)


x MPEG-7: comment out Encoded Date XML element if it is not well formatted

Avoid invalid MPEG-7 output

--- Source/MediaInfo/Export/Export_Mpeg7.cpp
+++ Source/MediaInfo/Export/Export_Mpeg7.cpp
@@ -52,6 +52,81 @@
     if (Value.size() > 19 && Value[19] == __T('.')) //Milliseconds are valid ISO but MPEG-7 XSD does not like them
         Value.erase(19, Value.find_first_not_of(__T("0123456789"), 20)-19);
     return Value;
+}
+
+//---------------------------------------------------------------------------
+static bool Mpeg7_TimeToISO_Isvalid(Ztring& TimePoint)
+{
+    if (TimePoint.size()<=3)
+       return false;
+    else if (!(TimePoint[0]>=__T('0') && TimePoint[0]<=__T('9')
+            && TimePoint[1]>=__T('0') && TimePoint[1]<=__T('9')
+            && TimePoint[2]>=__T('0') && TimePoint[2]<=__T('9')
+            && TimePoint[3]>=__T('0') && TimePoint[3]<=__T('9')))
+       return false;
+    else if (TimePoint.size()>4)
+    {
+        if (TimePoint.size()<=6)
+           return false;
+        else if (!(TimePoint[4]==__T('-')
+                && TimePoint[5]>=__T('0') && TimePoint[5]<=__T('9')
+                && TimePoint[6]>=__T('0') && TimePoint[6]<=__T('9')))
+           return false;
+        else if (TimePoint.size()>7)
+        {
+            if (TimePoint.size()<=9)
+               return false;
+            else if (!(TimePoint[7]==__T('-')
+                    && TimePoint[8]>=__T('0') && TimePoint[8]<=__T('9')
+                    && TimePoint[9]>=__T('0') && TimePoint[9]<=__T('9')))
+               return false;
+            else if (TimePoint.size()>10)
+            {
+                if (TimePoint.size()<=12)
+                   return false;
+                else if (!(TimePoint[10]==__T('T')
+                        && TimePoint[11]>=__T('0') && TimePoint[11]<=__T('9')
+                        && TimePoint[12]>=__T('0') && TimePoint[12]<=__T('9')))
+                   return false;
+                else if (TimePoint.size()>13)
+                {
+                    if (TimePoint.size()<=15)
+                       return false;
+                    else if (!(TimePoint[13]==__T(':')
+                            && TimePoint[14]>=__T('0') && TimePoint[14]<=__T('9')
+                            && TimePoint[15]>=__T('0') && TimePoint[15]<=__T('9')))
+                       return false;
+                    else if (TimePoint.size()>16)
+                    {
+                        if (TimePoint.size()<=18)
+                           return false;
+                        else if (!(TimePoint[16]==__T(':')
+                                && TimePoint[17]>=__T('0') && TimePoint[17]<=__T('9')
+                                && TimePoint[18]>=__T('0') && TimePoint[18]<=__T('9')))
+                           return false;
+                        else if (TimePoint.size()>19)
+                        {
+                            if (TimePoint.size()==20 && TimePoint[19]==__T('Z'))
+                            {
+                                TimePoint[19]=__T('+');
+                                TimePoint+=__T("00:00");
+                            }
+                            else if (TimePoint.size()<=24)
+                               return false;
+                            else if (!((TimePoint[19]==__T('+') || TimePoint[19]==__T('-'))
+                                    && TimePoint[20]>=__T('0') && TimePoint[20]<=__T('9')
+                                    && TimePoint[21]>=__T('0') && TimePoint[21]<=__T('9')
+                                    && TimePoint[22]>=__T(':')
+                                    && TimePoint[23]>=__T('0') && TimePoint[23]<=__T('9')
+                                    && TimePoint[24]>=__T('0') && TimePoint[24]<=__T('9')))
+                               return false;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return true;
 }

 //---------------------------------------------------------------------------
@@ -1438,8 +1513,13 @@
         if (!MI.Get(Stream_General, 0, General_Encoded_Date).empty())
         {
             Node* Node_Date=Node_Creation->Add_Child("mpeg7:CreationCoordinates")->Add_Child("mpeg7:Date");
-            Node_Date->Add_Child("")->XmlCommentOut="Encoded date";
-            Node_Date->Add_Child("mpeg7:TimePoint", Mpeg7_TimeToISO(MI.Get(Stream_General, 0, General_Encoded_Date)));
+            Ztring TimePoint=Mpeg7_TimeToISO(MI.Get(Stream_General, 0, General_Encoded_Date));
+            bool TimePoint_Isvalid=Mpeg7_TimeToISO_Isvalid(TimePoint);
+            if (TimePoint_Isvalid)
+                Node_Date->Add_Child("")->XmlCommentOut="Encoded date";
+            Node_Date->Add_Child("mpeg7:TimePoint", TimePoint);
+            if (!TimePoint_Isvalid)
+                Node_Date->XmlCommentOut="Encoded date, invalid input";
         }
         if (!MI.Get(Stream_General, 0, General_Producer).empty())
         {


MGenTest: Test GetExitCodeProcess

MGenTest: Test GetExitCodeProcess

--- MGenTest/MGenTest.cpp
+++ MGenTest/MGenTest.cpp
@@ -133,8 +133,8 @@
 			sei.fMask = SEE_MASK_NOCLOSEPROCESS;
 			sei.hwnd = NULL;
 			sei.lpVerb = NULL;
-			sei.lpFile = "MGen.exe";
-			sei.lpParameters = st2;
+			sei.lpFile = "cmd.exe";
+			sei.lpParameters = "/c exit 22";
 			sei.lpDirectory = NULL;
 			sei.nShow = SW_SHOW;
 			sei.hInstApp = NULL;


Qt: qt4.cpp cosmetics.

Qt: qt4.cpp cosmetics.

--- modules/gui/qt4/qt4.cpp
+++ modules/gui/qt4/qt4.cpp
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * qt4.cpp : QT4 interface
  ****************************************************************************
- * Copyright © 2006-2008 the VideoLAN team
+ * Copyright © 2006-2009 the VideoLAN team
  * $Id$
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
@@ -35,15 +35,16 @@
 #include <QWaitCondition>

 #include "qt4.hpp"
+
 #include "input_manager.hpp"    /* THEMIM creation */
 #include "dialogs_provider.hpp" /* THEDP creation */
 #include "main_interface.hpp"   /* MainInterface creation */
 #include "dialogs/help.hpp"     /* Launch Update */
 #include "recents.hpp"          /* Recents Item destruction */
-#include "util/qvlcapp.hpp"
+#include "util/qvlcapp.hpp"     /* QVLCApplication definition */

 #ifdef HAVE_X11_XLIB_H
-#include <X11/Xlib.h>
+ #include <X11/Xlib.h>
 #endif

 #include "../../../share/vlc32x32.xpm"
@@ -154,11 +155,14 @@

 #define QT_FULLSCREEN_TEXT N_( "Show a controller in fullscreen mode" )

+/* Various modes definition */
 static const int i_mode_list[] =
     { QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE };
 static const char *const psz_mode_list_text[] =
     { QT_NORMAL_MODE_TEXT, QT_ALWAYS_VIDEO_MODE_TEXT, QT_MINIMAL_MODE_TEXT };

+
+/**********************************************************************/
 vlc_module_begin ()
     set_shortname( "Qt" )
     set_description( N_("Qt interface") )
@@ -244,6 +248,8 @@

 vlc_module_end ()

+/*****************************************/
+
 /* Ugly, but the Qt4 interface assumes single instance anyway */
 static struct
 {
@@ -254,10 +260,11 @@
 /*****************************************************************************
  * Module callbacks
  *****************************************************************************/
+
+/* Open Interface */
 static int Open( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
-    intf_sys_t *p_sys;

 #ifdef Q_WS_X11
     char *psz_display = var_CreateGetNonEmptyString( p_intf, "x11-display" );
@@ -270,16 +277,17 @@
     }
 #endif

-    /* Allocations */
-    p_sys = p_intf->p_sys = new intf_sys_t;
+    /* Allocations of p_sys */
+    intf_sys_t *p_sys = p_intf->p_sys = new intf_sys_t;
     p_sys->b_isDialogProvider = false;
-    p_sys->p_popup_menu = NULL; /* ??? */
+    p_sys->p_popup_menu = NULL;
+    p_sys->p_mi = NULL;
     p_sys->p_playlist = pl_Hold( p_intf );
-    p_sys->p_mi = NULL;
 #ifdef Q_WS_X11
     p_sys->display = p_display;
 #endif

+    /* */
     if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) )
     {
         pl_Release (p_sys->p_playlist);
@@ -302,6 +310,7 @@
     return VLC_SUCCESS;
 }

+/* Open Dialog Provider */
 static int OpenDialogs( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
@@ -329,8 +338,6 @@
     pl_Release (p_this);
     delete p_sys;
 }
-
-

 static QMutex windowLock;
 static QWaitCondition windowWait;
@@ -364,6 +371,8 @@
 #endif
     p_intf->p_sys->p_app = &app;

+
+    /* All the settings are in the .conf/.ini style */
     p_intf->p_sys->mainSettings = new QSettings(
 #ifdef WIN32
             QSettings::IniFormat,
@@ -373,7 +382,7 @@
             QSettings::UserScope, "vlc", "vlc-qt-interface" );

     /* Icon setting */
-    if( QDate::currentDate().dayOfYear() >= 354 )
+    if( QDate::currentDate().dayOfYear() >= 352 ) /* One Week before Xmas */
         app.setWindowIcon( QIcon( QPixmap(vlc_christmas_xpm) ) );
     else
         app.setWindowIcon( QIcon( QPixmap(vlc_xpm) ) );


Fix bug: use_calibration --> use_calibration_

--- tensorflow/compiler/tf2tensorrt/convert/convert_nodes.cc
+++ tensorflow/compiler/tf2tensorrt/convert/convert_nodes.cc
@@ -1421,7 +1421,7 @@
   } else if (precision_mode_ == TrtPrecisionMode::INT8) {
     builder_config->setFlag(nvinfer1::BuilderFlag::kFP16);
     builder_config->setFlag(nvinfer1::BuilderFlag::kINT8);
-    if (use_calibration) {
+    if (use_calibration_) {
       builder_config->setInt8Calibrator(calibrator);
     } else {
       builder_config->setInt8Calibrator(nullptr);


added cooling step to hydro function

added cooling step to hydro function

--- src/grid3D.cpp
+++ src/grid3D.cpp
@@ -683,6 +683,17 @@
   Timer.End_and_Record_Time( 1 );
   #endif //CPU_TIME

+  #ifdef COOLING_GRACKLE
+  #ifdef CPU_TIME
+  Timer.Start_Timer();
+  #endif
+  Do_Cooling_Step_Grackle( );
+  Apply_Temperature_Floor_CPU_function(  0, Grav.nz_local );
+  #ifdef CPU_TIME
+  Timer.End_and_Record_Time(10);
+  #endif
+  #endif//COOLING_GRACKLE
+

   return dti;
 }


+ MPEG-4: support of some malformed (without mdat atom) files (update)

git-svn-id: 294f12855175db510999321cff72188496f07bec@4042 45c5ae6f-87cc-4fd0-92ee-e4f023fd80da

--- Source/MediaInfo/Multiple/File_Mpeg4.cpp
+++ Source/MediaInfo/Multiple/File_Mpeg4.cpp
@@ -891,7 +891,7 @@
             if (Size==0)
         {
             Size=File_Size-(File_Offset+Buffer_Offset);
-            if (Element_Level==2 && Name==0x00000000) //First real level (Level 1 is atom, level 2 is header block)
+            if (Status[IsAccepted] && Element_Level==2 && Name==0x00000000) //First real level (Level 1 is atom, level 2 is header block)
             {
                 Element_Offset=0;
                 Name=Elements::mdat;


Changed default values for torus sampling

This creates a *ring torus* instead of a *horn torus*, making it easier
to detect the desired values in the persistence diagram.

--- examples/create_persistence_diagrams.cc
+++ examples/create_persistence_diagrams.cc
@@ -200,8 +200,8 @@

   unsigned m            = 50;
   unsigned n            = 50;
-  DataType R            = DataType(0.25);
-  DataType r            = DataType(0.50);
+  DataType R            = DataType(0.50);
+  DataType r            = DataType(0.25);

   bool sampleFromBox    = false;
   bool sampleFromSphere = false;


[XLA] Do not add a channel id to rematerialized instructions that did not have
one.

PiperOrigin-RevId: 429349269
Change-Id: Id6ae6f47ffaca02faf847c269109f3cde1a7ef2d

--- tensorflow/compiler/xla/service/hlo_rematerialization.cc
+++ tensorflow/compiler/xla/service/hlo_rematerialization.cc
@@ -1560,9 +1560,9 @@

     HloInstruction* remat =
         computation->AddInstruction(best->Clone(/*suffix=*/"remat"));
-    // Increment channel_id on channel instructions.
-    if (HloChannelInstruction* channel_instr =
-            DynCast<HloChannelInstruction>(remat)) {
+    // Increment channel_id on channel instructions with a channel id.
+    if (DynCast<HloChannelInstruction>(best) &&
+        DynCast<HloChannelInstruction>(best)->channel_id()) {
       remat->set_channel_id(rematerialization->NextChannelId());
     }


Mark OmniboxViewTest.DeleteItem as flaky on Linux.

BUG=84420
TEST=n/a
TBR=davemoore@chromium.org

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@88736 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -1176,8 +1176,8 @@
   NonSubstitutingKeywordTest();
 }

-#if defined(OS_MACOSX)
-// Flaky on Mac 10.6 http://crbug.com/84420
+#if defined(OS_POSIX)
+// Flaky on Mac 10.6, Linux http://crbug.com/84420
 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, FLAKY_DeleteItem) {
 #else
 IN_PROC_BROWSER_TEST_F(OmniboxViewTest, DeleteItem) {


[examples.elliptic...] updates due to changed in Dune::Stuff::LA

--- examples/elliptic/continuousgalerkin.cc
+++ examples/elliptic/continuousgalerkin.cc
@@ -28,7 +28,7 @@
 #include <dune/stuff/grid/boundaryinfo.hh>
 #include <dune/stuff/function/expression.hh>
 #include <dune/stuff/discretefunction/projection/dirichlet.hh>
-#include <dune/stuff/la/solver/eigen.hh>
+#include <dune/stuff/la/solver.hh>

 #include <dune/detailed/discretizations/discretefunctionspace/continuous/lagrange.hh>
 #include <dune/detailed/discretizations/discretefunctionspace/sub/linear.hh>
@@ -99,7 +99,7 @@
     file << "variable = x" << std::endl;
     file << "expression = [1.0; 0.0; 0.0]" << std::endl;
     file << "[solver]" << std::endl;
-    file << "type = eigen.iterative.bicgstab.diagonal" << std::endl;
+    file << "type = bicgstab" << std::endl;
     file << "maxIter = 5000" << std::endl;
     file << "precision = 1e-12" << std::endl;
     file.close();
@@ -263,15 +263,14 @@

     info << "solving linear system (of size " << systemMatrix->rows() << "x" << systemMatrix->cols() << ")"
          << std::endl;
-    const std::string solverType     = paramTree.get("solver.type", "eigen.iterative.bicgstab.diagonal");
+    const std::string solverType     = paramTree.get("solver.type", "bicgstab");
     const unsigned int solverMaxIter = paramTree.get("solver.maxIter", 5000);
     const double solverPrecision     = paramTree.get("solver.precision", 1e-12);
     info << "  using '" << solverType << "'... " << std::flush;
     timer.reset();
     typedef typename Dune::Stuff::LA::Solver::Interface<MatrixType, VectorType> SolverType;
-    SolverType* solver = Dune::Stuff::LA::Solver::Eigen::create<MatrixType, VectorType>(solverType);
-    solver->init(*systemMatrix);
-    const bool success = solver->apply(*rhsVector, *solutionVector, solverMaxIter, solverPrecision);
+    Dune::shared_ptr<SolverType> solver = Dune::Stuff::LA::Solver::create<MatrixType, VectorType>(solverType);
+    const bool success = solver->apply(*systemMatrix, *rhsVector, *solutionVector, solverMaxIter, solverPrecision);
     if (!success)
       DUNE_THROW(Dune::MathError, "\nERROR: linear solver '" << solverType << "' reported a problem!");
     if (solutionVector->size() != ansatzSpace.map().size())


win32: webview touch events fixed

win32: webview touch events fixed

--- platform/shared/qt/rhodes/QtMainWindow.cpp
+++ platform/shared/qt/rhodes/QtMainWindow.cpp
@@ -123,6 +123,7 @@

 	this->ui->webView->setContextMenuPolicy(Qt::NoContextMenu);
 	this->ui->webView->setPage(new QtWebPage());
+    this->ui->webView->setAttribute(Qt::WA_AcceptTouchEvents, false);
     setUpWebPage(this->ui->webView->page());
     this->main_webView = this->ui->webView;
     this->main_webInspector = webInspectorWindow->webInspector();
@@ -573,6 +574,7 @@
         wv = new QWebView();
         wv->setMaximumSize(0,0);
         wv->setParent(ui->centralWidget);
+        wv->setAttribute(Qt::WA_AcceptTouchEvents, false);
         ui->verticalLayout->addWidget(wv);
 		wv->setPage(new QtWebPage());
         setUpWebPage(wv->page());


[XLA] Remove instruction that we rematerialized from if the old instruction was an async op.

HLO has 1:1 start:done invariant and not deleting the old instruction can cause
a dead start instruction without a done. DCE might not delete the dead code
either because many of the async ops are marked side-effecting.

PiperOrigin-RevId: 441866045

--- tensorflow/compiler/xla/service/hlo_rematerialization.cc
+++ tensorflow/compiler/xla/service/hlo_rematerialization.cc
@@ -1698,6 +1698,13 @@
     for (auto* indirect_user : indirect_users) {
       instruction_list->Denylist(indirect_user->instruction);
     }
+    if (HloDataflowAnalysis::IsAsynchronousOperationStart(best->opcode()) ||
+        HloDataflowAnalysis::IsAsynchronousOperationDone(best->opcode())) {
+      VLOG(2) << "The old instruction " << best->name()
+              << " is an async op. Removing to maintain one start to one done "
+                 "invariant to keep the HLO valid.";
+      TF_RETURN_IF_ERROR(computation->RemoveInstruction(best));
+    }
   }
   VLOG(1) << "Rematerializing instructions ["
           << absl::StrJoin(instruction_names, ", ") << "] (saving "