[DF] Add test for validation of custom column names

--- tree/dataframe/test/dataframe_interface.cxx
+++ tree/dataframe/test/dataframe_interface.cxx
@@ -185,3 +185,18 @@
    auto minEntry = f.Min("tdfentry_");
    EXPECT_EQ(*maxEntry, *minEntry);
 }
+
+TEST(RDataFrameInterface, InvalidDefine)
+{
+   RDataFrame df(1);
+   try {
+      df.Define("1", [] { return true; });
+   } catch (const std::runtime_error &e) {
+      EXPECT_STREQ("Cannot define column \"1\": not a valid C++ variable name.", e.what());
+   }
+   try {
+      df.Define("a-b", "true");
+   } catch (const std::runtime_error &e) {
+      EXPECT_STREQ("Cannot define column \"a-b\": not a valid C++ variable name.", e.what());
+   }
+}


update D0 sys.unc about improver task(combine it with cut variation sys.unc)

--- PWGHF/vertexingHF/AliHFSystErr.cxx
+++ PWGHF/vertexingHF/AliHFSystErr.cxx
@@ -5839,13 +5839,17 @@
     fCutsEff = new TH1F("fCutsEff","fCutsEff",50,0,50);
     fCutsEff->SetBinContent(1,0.);
     fCutsEff->SetBinContent(2,0.10);
-    fCutsEff->SetBinContent(3,0.05);
+    fCutsEff->SetBinContent(3,0.06);
     fCutsEff->SetBinContent(4,0.05);
     fCutsEff->SetBinContent(5,0.05);
     fCutsEff->SetBinContent(6,0.05);
-    for(Int_t i=7;i<=8;i++) fCutsEff->SetBinContent(i,0.05);
-    for(Int_t i=9;i<=16;i++) fCutsEff->SetBinContent(i,0.05);
-    for(Int_t i=17;i<=36;i++) fCutsEff->SetBinContent(i,0.05);
+    fCutsEff->SetBinContent(7,0.05);
+    fCutsEff->SetBinContent(8,0.06);
+    for(Int_t i=9;i<=10;i++) fCutsEff->SetBinContent(i,0.05);
+    for(Int_t i=11;i<=12;i++) fCutsEff->SetBinContent(i,0.06);
+    for(Int_t i=13;i<=16;i++) fCutsEff->SetBinContent(i,0.07);
+    for(Int_t i=17;i<=24;i++) fCutsEff->SetBinContent(i,0.07);
+    for(Int_t i=25;i<=36;i++) fCutsEff->SetBinContent(i,0.05);
     for(Int_t i=37;i<=50;i++) fCutsEff->SetBinContent(i,0.05);


fixed child process not terminating bug

fixed child process not terminating bug

--- command.cpp
+++ command.cpp
@@ -1,4 +1,6 @@
 #include "command.h"
+#include <sys/wait.h>
+
 Command::Command() {
 	//nothing?
 }
@@ -56,7 +58,15 @@
 		exit(1);
 	}
 	else {	//parent
-		//waitPID(); << Need help implemeting this to wait for child to finish
+		int status;
+		wait(&status);
+		if(status == -1)
+		{
+			cout << "There was an error with wait()!! ";
+			exit(1);
+		}
+		cout << endl;
+
 		cout << "Parent does nothing here" << endl;
 	}


Reduced scope of variables in RigidBody3DSceneParser.

--- rigidbody3dutils/RigidBody3DSceneParser.cpp
+++ rigidbody3dutils/RigidBody3DSceneParser.cpp
@@ -1,7 +1,7 @@
 // RigidBody3DSceneParser.cpp
 //
 // Breannan Smith
-// Last updated: 09/21/2015
+// Last updated: 09/22/2015

 #include "RigidBody3DSceneParser.h"

@@ -1716,8 +1716,8 @@
     }

     // Attempt to load a warm start alpha setting
-    bool internal_warm_start_alpha;
-    {
+    {
+      bool internal_warm_start_alpha;
       const rapidxml::xml_attribute<>* const attrib_nd{ node.first_attribute( "internal_warm_start_alpha" ) };
       if( attrib_nd == nullptr )
       {
@@ -1733,8 +1733,8 @@
     }

     // Attempt to load a warm start beta setting
-    bool internal_warm_start_beta;
-    {
+    {
+      bool internal_warm_start_beta;
       const rapidxml::xml_attribute<>* const attrib_nd{ node.first_attribute( "internal_warm_start_beta" ) };
       if( attrib_nd == nullptr )
       {


[io] make RRawFile test pass for the unimplemented io_uring ReadV

--- io/io/test/RRawFile.cxx
+++ io/io/test/RRawFile.cxx
@@ -12,6 +12,7 @@
 #include <utility>

 #include "gtest/gtest.h"
+#include "gmock/gmock.h"

 using RRawFile = ROOT::Internal::RRawFile;

@@ -159,12 +160,20 @@
    iovec[1].fBuffer = &buffer[1];
    iovec[1].fOffset = 11;
    iovec[1].fSize = 2;
+#ifdef R__HAS_URING
+   try {
+      f->ReadV(iovec, 2);
+      FAIL() << "ReadV unimplemented for io_uring backend, should throw";
+   } catch (const std::runtime_error& err) {
+      EXPECT_THAT(err.what(), testing::HasSubstr("io_uring ReadV unimplemented!"));
+   }
+#else
    f->ReadV(iovec, 2);
-
    EXPECT_EQ(1U, iovec[0].fOutBytes);
    EXPECT_EQ(1U, iovec[1].fOutBytes);
    EXPECT_EQ('H', buffer[0]);
    EXPECT_EQ('d', buffer[1]);
+#endif
 }


Delete Epic.Game.cpp

Delete Epic.Game.cpp

--- Epic.Game.cpp
+++ Epic.Game.cpp
@@ -1,71 +0,0 @@
-#include <string.h>
-#include <fstream>
-#include <iostream>
-#include <string>
-#include <complex>
-#include <math.h>
-#include <set>
-#include <vector>
-#include <map>
-#include <queue>
-#include <stdio.h>
-#include <stack>
-#include <algorithm>
-#include <list>
-#include <ctime>
-#include <memory.h>
-#include <ctime>
-#include <assert.h>
-#define pi 3.14159
-#define mod 1000000007
-using namespace std;
-int gcd(int a, int b)
-{
-	if(b == 0)
-	{
-		return a;
-	}
-	else
-	{
-		return gcd(b , a%b);
-	}
-}
-int main()
-{
-	int a,b,n,token=0,flag=0;
-	scanf("%d%d%d",&a,&b,&n);
-	while(1)
-	{
-		if(token == 0)
-		{
-			flag = gcd(a,n);
-			n = n - flag;
-			token = 1;
-		}
-		else
-		{
-			flag = gcd(b,n);
-			n = n - flag;
-			token = 0;
-		}
-		if(n <= 0)
-		{
-			break;
-		}
-	}
-	if(token == 0)
-	{
-		printf("1");
-	}
-	else
-	{
-		printf("0");
-	}
-	return 0;
-}
-
-// function gcd(a, b)
-//     if b = 0
-//        return a;
-//     else
-//        return gcd(b, a mod b);


oops I forgot the mouse

oops I forgot the mouse

--- sadx-input-mod/input.cpp
+++ sadx-input-mod/input.cpp
@@ -259,7 +259,10 @@
 }

 DataPointer(HWND, hWnd, 0x3D0FD30);
-WNDPROC lpPrevWndFunc = nullptr;
+static WNDPROC lpPrevWndFunc = nullptr;
+
+static Sint16 mouse_x = 0;
+static Sint16 mouse_y = 0;

 namespace input
 {
@@ -271,20 +274,37 @@
 	{
 		switch (Msg)
 		{
+			case WM_LBUTTONDOWN:
+			case WM_LBUTTONUP:
+				UpdateMouseButtons(VK_LBUTTON, Msg == WM_LBUTTONDOWN);
+				break;
+			case WM_RBUTTONDOWN:
+			case WM_RBUTTONUP:
+				UpdateMouseButtons(VK_RBUTTON, Msg == WM_RBUTTONDOWN);
+				break;
+			case WM_MBUTTONDOWN:
+			case WM_MBUTTONUP:
+				UpdateMouseButtons(VK_MBUTTON, Msg == WM_MBUTTONDOWN);
+				break;
+
+			case WM_SYSKEYUP:
+			case WM_SYSKEYDOWN:
 			case WM_KEYDOWN:
 			case WM_KEYUP:
-				if (wParam <= VK_XBUTTON2)
-				{
-					UpdateMouseButtons(wParam, Msg == WM_KEYDOWN);
-				}
-				else
-				{
-					UpdateKeyboardButtons(wParam, Msg == WM_KEYDOWN);
-				}
+				UpdateKeyboardButtons(wParam, Msg == WM_KEYDOWN || Msg == WM_SYSKEYDOWN);
 				break;

 			case WM_MOUSEMOVE:
-				break;
+			{
+				auto x = (short)(lParam & 0xFFFF);
+				auto y = (short)(lParam >> 16);
+
+				UpdateCursor(x - mouse_x, y - mouse_y);
+
+				mouse_x = x;
+				mouse_y = y;
+				break;
+			}

 			case WM_MOUSEWHEEL:
 				break;
@@ -345,13 +365,6 @@
 					}
 					break;
 				}
-#if 0
-				case SDL_MOUSEMOTION:
-				{
-					UpdateCursor(event.motion.xrel, event.motion.yrel);
-					break;
-				}
-#endif
 			}
 		}

@@ -364,7 +377,7 @@
 		}
 		else
 		{
-			(NJS_POINT2I)sticks[0] = cursor;
+			*(NJS_POINT2I*)&sticks[0] = cursor;
 		}

 		for (uint i = 0; i < GAMEPAD_COUNT; i++)


ENH: still escape () but do not escape

ENH: still escape () but do not escape

--- Utilities/kwsys/SystemTools.cxx
+++ Utilities/kwsys/SystemTools.cxx
@@ -1366,17 +1366,31 @@
     {
     ret.erase(pos, 1);
     }
-  // now escape spaces if there is a space in the path
+  // escape spaces and () in the path
   if(ret.find_first_of(" ()") != kwsys_stl::string::npos)
     {
     kwsys_stl::string result = "";
     char lastch = 1;
+    bool inDollarVariable = false;
     for(const char* ch = ret.c_str(); *ch != '\0'; ++ch)
       {
         // if it is already escaped then don't try to escape it again
       if((*ch == ' ' || *ch == '(' || *ch == ')') && lastch != '\\')
         {
-        result += '\\';
+        if(*ch == '(' && lastch == '$')
+          {
+          inDollarVariable = true;
+          }
+        // if we are in a $(..... and we get a ) then do not escape
+        // the ) and but set inDollarVariable to false
+        else if(*ch == ')' && inDollarVariable)
+          {
+          inDollarVariable = false;
+          }
+        else
+          {
+          result += '\\';
+          }
         }
       result += *ch;
       lastch = *ch;


more testing

more testing

--- tests/test_LinkedList.cpp
+++ tests/test_LinkedList.cpp
@@ -6,12 +6,14 @@

 void test0() {
 	LinkedList<int> l;
+	assert(l.empty());
 	l._checkSanity();

 	auto item = l.push_back();
 	item->value = 42;
 	item = NULL;
 	l._checkSanity();
+	assert(!l.empty());
 	assert(l.size() == 1);

 	auto ret = l.pop_front();
@@ -34,6 +36,9 @@
 		l._checkSanity();
 		item->value = i;
 	}
+
+	assert(!l.empty());
+	assert(l.size() == 100);

 	for(int i = 0; i < 100; ++i) {
 		auto ret = l.pop_front();


ATO-83 -add todo for Sebastian

ATO-83 -add todo for Sebastian

--- PWGPP/TPC/macros/tpcMCValidation.C
+++ PWGPP/TPC/macros/tpcMCValidation.C
@@ -80,6 +80,9 @@
 /// \param doCheck - force check of the variables
 /// \param verbose - set verbosity for make alarms
 void makeTPCMCAlarms(TTree * treeMC, Bool_t doCheck,Int_t verbose){
+  //  TODO - Sebastian - add status bar for the dEdx - similar like int the standard QA
+  //  TODO - adding new combined status bar status plots of individual alarms to be provided
+  //  TODO - continue
   //  ==============================================================
   //  1.)  Partial alarms  (variable, variableAnchor deltaWarning,deltaError, PhysAcc)
   //                 deltaWarning and deltaError can be an expression which is understood by TTreeFormula
@@ -95,6 +98,7 @@
     sTrendVars+="QA.TPC.dcarCP0,TPC.Anchor.dcarCP0,0.02,0.05,0.02;";     // dcarCP0;  warning 0.02cm; error 0.05 cm  (nominal ~ 0.2 cm)
     sTrendVars+="QA.TPC.dcarAP1,TPC.Anchor.dcarAP1,0.02,0.05,0.02;";     // dcarAP1;  warning 0.02cm; error 0.05 cm  (nominal ~ 0.2 cm)
     sTrendVars+="QA.TPC.dcarCP1,TPC.Anchor.dcarCP1,0.02,0.05,0.02;";     // dcarCP1;  warning 0.02cm; error 0.05 cm  (nominal ~ 0.2 cm)
+    //
     // Eff ITS: TPC->ITS
     sTrendVars+="QA.ITS.EffoneSPDPt02,ITS.Anchor.EffoneSPDPt02,0.05,0.1,0.07;";
     sTrendVars+="QA.ITS.EffoneSPDPt1,ITS.Anchor.EffoneSPDPt1,0.05,0.1,0.07;";
@@ -107,11 +111,16 @@
   TStatToolkit::MakeAnchorAlias(treeMC,sTrendVars, doCheck, verbose);

   // 2.) Make aliases for Mean of MC-anchor of variables
-  treeMC->SetAlias("rDiff.meanTPCncl" , "(QA.TPC.meanTPCncl-TPC.Anchor.meanTPCncl)");
-  treeMC->SetAlias("rDiff.meanTPCnclF" ,"(QA.TPC.meanTPCnclF-TPC.Anchor.meanTPCnclF)");
+  treeMC->SetAlias("diff0.meanTPCncl" , "(QA.TPC.meanTPCncl-TPC.Anchor.meanTPCncl)");
+  treeMC->SetAlias("diff0.meanTPCnclF" ,"(QA.TPC.meanTPCnclF-TPC.Anchor.meanTPCnclF)");
+  treeMC->SetAlias("ratio.dcarAP0" ,    "(QA.TPC.dcarAP0/TPC.Anchor.dcarAP0)");
+  treeMC->SetAlias("ratio.dcarAP1" ,    "(QA.TPC.dcarAP1/TPC.Anchor.dcarAP1)");
+  treeMC->SetAlias("ratio.dcarCP0" ,    "(QA.TPC.dcarCP0/TPC.Anchor.dcarCP0)");
+  treeMC->SetAlias("ratio.dcarCP1" ,    "(QA.TPC.dcarCP1/TPC.Anchor.dcarCP1)");
+
   treeMC->SetAlias("statisticOK", "(meanTPCncl>0)");
   TString sDiffVars="";
-  sDiffVars+="rDiff.meanTPCncl;rDiff.meanTPCnclF";
+  sDiffVars+="diff0.meanTPCncl;diff0.meanTPCnclF;ratio.dcarAP0;ratio.dcarAP1;ratio.dcarCP0;ratio.dcarCP1";
   TObjArray* oaTrendVars = sDiffVars.Tokenize(";");
   Float_t entryFraction=0.8, nSigmaOutlier=6., nSigmaWarning=3., epsilon=1.0e-6, rangeFactor=0.1;
   for (Int_t iVar=0; iVar<oaTrendVars->GetEntriesFast(); iVar++) {
@@ -130,8 +139,8 @@

   // 3.) Configure combined status. Default using logical OR of problems
   TString sCombinedStatus=";";
-  sCombinedStatus+="ncl,absDiff.QA.TPC.meanTPCncl,absDiff.QA.TPC.meanTPCnclF;rDiff.QA.TPC.meanTPCncl,rDiff.QA.TPC.meanTPCnclF;"; // Status number of clusters and findable clusters
-  sCombinedStatus+="dcarResol,absDiff.QA.TPC.dcarAP0,absDiff.QA.TPC.dcarAP1,absDiff.QA.TPC.dcarCP0,absDiff.QA.TPC.dcarCP1;";  // Status: DCA resolution
+  sCombinedStatus+="ncl,absDiff.QA.TPC.meanTPCncl,absDiff.QA.TPC.meanTPCnclF;diff0.QA.TPC.meanTPCncl,diff0.QA.TPC.meanTPCnclF;"; // Status number of clusters and findable clusters
+  sCombinedStatus+="dcarResol,absDiff.QA.TPC.dcarAP0,absDiff.QA.TPC.dcarAP1,absDiff.QA.TPC.dcarCP0,absDiff.QA.TPC.dcarCP1,ratio.dcarAP0,ratio.dcarAP1;";  // Status: DCA resolution
   sCombinedStatus+="itsEffStatus,absDiff.QA.ITS.EffoneSPDPt02,absDiff.QA.ITS.EffoneSPDPt1,absDiff.QA.ITS.EffoneSPDPt10,absDiff.QA.ITS.EffTOTPt02,absDiff.QA.ITS.EffTOTPt1,absDiff.QA.ITS.EffTOTPt10;";
   // Status: ITS:TPC-ITS matching efficiency
   TStatToolkit::MakeCombinedAlias(treeMC,sCombinedStatus,doCheck, verbose);
@@ -234,6 +243,7 @@
   // DONE: In some cases different sources provided different run lists
   // DONE: MakeMultGraph should match "run graphs" and "rebinning graphs" if needed (Marian - in TStatToolkit)
   // DONE: Remove CLion convention warning (Marian)
+  // TODO: Optionally add offset to the X value in order to distinguish overlapped  graphs TStatToolkit::
   // TODO: Partially done. Add TMultiGraph "class?" to specify additional options (see bellow) (Boris, Marian) - groupName to be used for that
   // TODO: Optionally draw y value on top of the markers (for single graphs) can be coded in the class (lower priority)
   // TODO: For each tab we should provide status figure (decomposition of status to the components)
@@ -277,8 +287,9 @@
   // 2.) Number of clusters comparison ($AliPhysic_SRC/PWGPP/TPC/macros/TPCQAWebpage/MCAnchor/tabNcl.html)
   // TODO: Add all estimators fo missing chambers (Ncl, Voltage, RawQA, tracks)
   trendingDraw->MakeStatusPlot(outputDir, "nclStatus.png",
-                               "absDiff.QA.TPC.meanTPCncl;absDiff.QA.TPC.meanTPCnclF;rDiff.meanTPCncl;rDiff.meanTPCnclF;run",
-  "#Delta^{A}_{ATPCncl};#Delta^{A}_{TPCnclF};#Delta^{R}_{TPCncl};#Delta^{R}_{TPCnclF};", "defaultCut", sCriteria);
+                               "absDiff.QA.TPC.meanTPCncl;absDiff.QA.TPC.meanTPCnclF;diff0.meanTPCncl;diff0.meanTPCnclF;run",
+                               "#Delta^{A}_{ATPCncl};#Delta^{A}_{TPCnclF};#Delta^{R}_{TPCncl};#Delta^{R}_{TPCnclF};",
+                               "defaultCut", sCriteria);
   trendingDraw->MakePlot(outputDir, "meanTPCncl.png", "Number of clusters", cRange, "",
                          "QA.TPC.meanTPCncl;TPC.Anchor.meanTPCncl:run", "defaultCut", "figTemplateTRDPair",
                          "figTemplateTRDPair", 1, 0.75, 5, kTRUE);
@@ -482,6 +493,7 @@
                          "deltaPtA;TPC.Anchor.deltaPtA;deltaPtC;TPC.Anchor.deltaPtC:run", "defaultCut",
                          "figTemplateTRDPair", "figTemplateTRDPair", 1, 0.75, 6, kTRUE);

+
   // Status plots
   TString statusExpression,statusTitle;

@@ -495,10 +507,33 @@
   trendingDraw->MakeStatusPlot("./", "dcarStatus.png", statusExpression, statusTitle, "defaultCut",sCriteria);

   //
-
-
   trendingDraw->fWorkingCanvas->Clear();
   trendingDraw->fWorkingCanvas->Print(TString(outputDir) + "/report.pdf]", "pdf");
+}
+
+///
+void MakeDCAStatusPlot(){  // Example
+   // Status plots
+  TString statusExpression,statusTitle;
+  // DCA status
+  statusExpression="absDiff.QA.TPC.dcarAP0;absDiff.QA.TPC.dcarCP0;absDiff.QA.TPC.dcarAP1;absDiff.QA.TPC.dcarCP1;";
+  statusTitle="#Delta^{MC-Anchor}_{dcarAP0};#Delta^{MC-Anchor}_{dcarCP0};#Delta^{MC-Anchor}_{dcarAP1};#Delta^{MC-Anchor}_{dcarCP1};";
+  statusExpression+="ratio.dcarAP0;ratio.dcarCP0;ratio.dcarAP1;ratio.dcarCP1;";
+  statusTitle+="#Delta^{MC/Anchor-#mu}_{dcarAP0};#Delta^{MC/Anchor-#mu}_{dcarCP0};#Delta^{MC/Anchor-#mu}_{dcarAP1};#Delta^{MC/Anchor-#mu}_{dcarCP1};";
+  statusExpression+="dcarAP0;dcarAP1;dcarCP0;dcarCP1;";
+  statusTitle+="MC_{dcarAP0};MC_{dcarAP1};MC_{dcarCP0};MC_{dcarCP1};";
+  statusExpression+="TPC.Anchor.dcarAP0;TPC.Anchor.dcarAP1;TPC.Anchor.dcarCP0;TPC.Anchor.dcarCP1;";
+  statusTitle+="Anchor_{dcarAP0};Anchor_{dcarAP1};Anchor_{dcarCP0};Anchor_{dcarCP1};";
+  statusExpression+="run;";
+  trendingDraw->MakeStatusPlot("./", "dcarStatus.png", statusExpression.Data(), statusTitle.Data(), "defaultCut",sCriteria);
+}
+
+///
+void MakedEdxStatusPlot() {  //TODO - Sebastian
+  // To get the list of warning for standard QA treeMC->GetListOfAliases()->Print("","*MIP*arning")
+  // Status plots
+  TString statusExpression, statusTitle;
+
 }

@@ -528,11 +563,11 @@
   //
   TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarAP0.thead", "σAAnchor DCA1/pt=0 (cm)");
   TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarAP0.tooltip", "DCA (rφ) at infinite pt");
-  TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarAP0.html", "%2.2f{dcarCP0}")
+  TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarAP0.html", "%2.2f{dcarCP0}");
   TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarCP0.thead", "σCAnchor DCA1/pt=0 (cm)");
   TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarCP0.tooltip", "DCA (rφ) at infinite pt");
   TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarCP0.html", "%2.2f{dcarCP0}");
-  TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarCP0.html", "%2.2f{dcarCP0}")
+  TStatToolkit::AddMetadata(treeMC, "TPC.Anchor.dcarCP0.html", "%2.2f{dcarCP0}");

   //
@@ -572,7 +607,7 @@
 /// Test html link printing
 /// \param testHtml
 /*!
- Used to test correctnes of the format string e.g.:
+ Used to test correctness of the format string e.g.:
  \code
  PrintTestHtmlLink("%2.2f{dcarCP0}")
 \endcode


Fix build warning in far_tutorial_1

Fix build warning in far_tutorial_1

--- tutorials/far/tutorial_1/far_tutorial_1.cpp
+++ tutorials/far/tutorial_1/far_tutorial_1.cpp
@@ -267,7 +267,6 @@
     TopologyRefiner & refiner, Converter const & conv) {

     typedef Far::IndexArray      IndexArray;
-    typedef Far::LocalIndexArray LocalIndexArray;

     { // Face relations:
         int nfaces = conv.GetNumFaces();


Fix an invalid data deallocation bug

Fix an invalid data deallocation bug

--- io/mpi/src/TMPIFile.cxx
+++ io/mpi/src/TMPIFile.cxx
@@ -417,11 +417,8 @@
       MPI_Wait(&fMPIRequest, MPI_STATUS_IGNORE);
       delete[] fSendBuf;
    }
-   Int_t sent = MPI_Send(fSendBuf, 0, MPI_CHAR, 0, fMPIColor, fSubComm);
-   delete[] fSendBuf;
-   if (sent != MPI_SUCCESS) {
-      Error("CreateEmptyBufferAndSend", "MPI_Send() failed");
-   }
+   fSendBuf = nullptr;
+   MPI_Send(fSendBuf, 0, MPI_CHAR, 0, fMPIColor, fSubComm);
 }

 ////////////////////////////////////////////////////////////////////////////////


Use the non-touch popup frame instead of NULL.

While this change isn't really all that usable in chrome itself, it fixes a
number of the tests in browser_tests and ui_tests, and fixes a crash in some
other tests to unmask other failures.

BUG=none
TEST=some failing tests (e.g. BrowserNavigatorTest.*) should pass on the touch buildbot.

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

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

--- chrome/browser/ui/touch/frame/browser_non_client_frame_view_factory_touch.cc
+++ chrome/browser/ui/touch/frame/browser_non_client_frame_view_factory_touch.cc
@@ -6,6 +6,7 @@

 #include "chrome/browser/ui/touch/frame/touch_browser_frame_view.h"
 #include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/frame/popup_non_client_frame_view.h"

 namespace browser {

@@ -15,7 +16,7 @@
       browser_view->IsBrowserTypePanel()) {
     // TODO(anicolao): implement popups for touch
     NOTIMPLEMENTED();
-    return NULL;
+    return new PopupNonClientFrameView(frame);
   } else {
     return new TouchBrowserFrameView(frame, browser_view);
   }


Disable parallel if only one thread is enabled

--- include/etl/config.hpp
+++ include/etl/config.hpp
@@ -46,16 +46,16 @@
 constexpr const bool create_temporary = true;
 #endif

-#ifdef ETL_PARALLEL
-constexpr const bool parallel = true;
-#else
-constexpr const bool parallel = false;
-#endif
-
 #ifdef ETL_PARALLEL_THREADS
 constexpr const std::size_t threads = ETL_PARALLEL_THREADS;
 #else
 const std::size_t threads = std::thread::hardware_concurrency();
+#endif
+
+#ifdef ETL_PARALLEL
+const bool parallel = threads > 1;
+#else
+constexpr const bool parallel = false;
 #endif

 #ifdef ETL_MKL_MODE


try to eliminate the zig zaging problem

try to eliminate the zig zaging problem


deleted invalid licensing

deleted invalid licensing

--- source/APPLICATIONS/TOOLS/SimpleRescorer.C
+++ source/APPLICATIONS/TOOLS/SimpleRescorer.C
@@ -1,25 +1,6 @@
-/* Rescorer.C
-*
-* Copyright (C) 2011 Marcel Schumann
-*
-* This program free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 3 of the License, or (at
-* your option) any later version.
-*
-* This program is distributed in the hope that it will be useful, but
-* WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-// ----------------------------------------------------
-// $Maintainer: Marcel Schumann $
-// $Authors: Marcel Schumann $
-// ----------------------------------------------------
+// -*- Mode: C++; tab-width: 2; -*-
+// vi: set ts=2:
+//

 #include <BALL/FORMAT/molFileFactory.h>
 #include <BALL/FORMAT/dockResultFile.h>


Removing unused variables

Removing unused variables

--- PWGPP/ZDC/AliAnalysisTaskZDCpp.cxx
+++ PWGPP/ZDC/AliAnalysisTaskZDCpp.cxx
@@ -69,18 +69,18 @@
     fhZPASpectrum(0x0),
     fhZEM1Spectrum(0x0),
     fhZEM2Spectrum(0x0),
-    fhZNCpmc(0x0),
-    fhZNApmc(0x0),
-    fhZPCpmc(0x0),
-    fhZPApmc(0x0),
-    fhZNCCentroid(0x0),
-    fhZNACentroid(0x0),
+    fhZNCpmc(0x0),
+    fhZNApmc(0x0),
+    fhZPCpmc(0x0),
+    fhZPApmc(0x0),
+    fhZNCCentroid(0x0),
+    fhZNACentroid(0x0),
     fDebunch(0x0),
     fhTDCZNC(0x0),
     fhTDCZNA(0x0)
-{
+{
    // Default constructor
-}
+}

 //________________________________________________________________________
 AliAnalysisTaskZDCpp::AliAnalysisTaskZDCpp(const char *name):
@@ -96,18 +96,18 @@
     fhZPASpectrum(0x0),
     fhZEM1Spectrum(0x0),
     fhZEM2Spectrum(0x0),
-    fhZNCpmc(0x0),
-    fhZNApmc(0x0),
-    fhZPCpmc(0x0),
-    fhZPApmc(0x0),
-    fhZNCCentroid(0x0),
-    fhZNACentroid(0x0),
+    fhZNCpmc(0x0),
+    fhZNApmc(0x0),
+    fhZPCpmc(0x0),
+    fhZPApmc(0x0),
+    fhZNCCentroid(0x0),
+    fhZNACentroid(0x0),
     fDebunch(0x0) ,
     fhTDCZNC(0x0),
     fhTDCZNA(0x0)
-{
+{
   // Output slot #1 writes into a TList container
-  DefineOutput(1, TList::Class());
+  DefineOutput(1, TList::Class());

 }

@@ -126,7 +126,7 @@
 //________________________________________________________________________
 AliAnalysisTaskZDCpp::AliAnalysisTaskZDCpp(const AliAnalysisTaskZDCpp& ana):
   AliAnalysisTaskSE(ana),
-  fDebug(ana.fDebug),
+  fDebug(ana.fDebug),
   fIsMCInput(ana.fIsMCInput),
   fOutput(ana.fOutput),
   fhTDCZNSum(ana.fhTDCZNSum),
@@ -137,30 +137,30 @@
   fhZPASpectrum(ana.fhZPASpectrum),
   fhZEM1Spectrum(ana.fhZEM1Spectrum),
   fhZEM2Spectrum(ana.fhZEM2Spectrum),
-  fhZNCpmc(ana.fhZNCpmc),
-  fhZNApmc(ana.fhZNApmc),
-  fhZPCpmc(ana.fhZPCpmc),
-  fhZPApmc(ana.fhZPApmc),
-  fhZNCCentroid(ana.fhZNCCentroid),
-  fhZNACentroid(ana.fhZNACentroid),
+  fhZNCpmc(ana.fhZNCpmc),
+  fhZNApmc(ana.fhZNApmc),
+  fhZPCpmc(ana.fhZPCpmc),
+  fhZPApmc(ana.fhZPApmc),
+  fhZNCCentroid(ana.fhZNCCentroid),
+  fhZNACentroid(ana.fhZNACentroid),
   fDebunch(ana.fDebunch),
   fhTDCZNC(ana.fhTDCZNC),
   fhTDCZNA(ana.fhTDCZNA)
 {
   //
-  // Copy Constructor
-  //
-}
-
+  // Copy Constructor
+  //
+}
+
 //________________________________________________________________________
 AliAnalysisTaskZDCpp::~AliAnalysisTaskZDCpp()
 {
   // Destructor
   if(fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()){
     delete fOutput; fOutput=0;
-  }
-
-}
+  }
+
+}

 //________________________________________________________________________
 void AliAnalysisTaskZDCpp::UserCreateOutputObjects()
@@ -170,53 +170,53 @@
   fOutput = new TList;
   fOutput->SetOwner();
   //fOutput->SetName("output");
-
+
   fhTDCZNSum = new TH1F("fhTDCZNSum","TDC_{ZNC}+TDC_{ZNA}",60,-30.,30.);
   fhTDCZNSum->GetXaxis()->SetTitle("TDC_{ZNC}+TDC_{ZNA} (ns)");
-  fOutput->Add(fhTDCZNSum);
-
+  fOutput->Add(fhTDCZNSum);
+
   fhTDCZNDiff = new TH1F("fhTDCZNDiff","TDC_{ZNC}-TDC_{ZNA}",60,-30.,30.);
   fhTDCZNDiff->GetXaxis()->SetTitle("TDC_{ZNC}-TDC_{ZNA} (ns)");
-  fOutput->Add(fhTDCZNDiff);
-
+  fOutput->Add(fhTDCZNDiff);
+
   fhZNCSpectrum = new TH1F("fhZNCSpectrum", "ZNC signal", 200,0., 2000.);
-  fOutput->Add(fhZNCSpectrum);
+  fOutput->Add(fhZNCSpectrum);
   fhZNASpectrum = new TH1F("fhZNASpectrum", "ZNA signal", 200,0., 2000.) ;
-  fOutput->Add(fhZNASpectrum);
+  fOutput->Add(fhZNASpectrum);
   fhZPCSpectrum = new TH1F("fhZPCSpectrum", "ZPC signal", 140,0., 1400.) ;
-  fOutput->Add(fhZPCSpectrum);
+  fOutput->Add(fhZPCSpectrum);
   fhZPASpectrum = new TH1F("fhZPASpectrum", "ZPA signal", 140,0., 1400.) ;
-  fOutput->Add(fhZPASpectrum);
+  fOutput->Add(fhZPASpectrum);
   fhZEM1Spectrum = new TH1F("fhZEM1Spectrum", "ZEM1 signal", 200,0., 2500.);
-  fOutput->Add(fhZEM1Spectrum);
+  fOutput->Add(fhZEM1Spectrum);
   fhZEM2Spectrum = new TH1F("fhZEM2Spectrum", "ZEM2 signal", 200,0., 2500.);
-  fOutput->Add(fhZEM2Spectrum);
-
+  fOutput->Add(fhZEM2Spectrum);
+
   fhZNCpmc = new TH1F("fhZNCpmc","ZNC PMC",200, 0., 2000.);
-  fOutput->Add(fhZNCpmc);
-  fhZNApmc = new TH1F("fhZNApmc","ZNA PMC",200, 0., 2000.);
-  fOutput->Add(fhZNApmc);
-  fhZPCpmc = new TH1F("fhZPCpmc","ZPC PMC",140, 0., 1400.);
-  fOutput->Add(fhZPCpmc);
-  fhZPApmc = new TH1F("fhZPApmc","ZPA PMC",140, 0., 1400.);
-  fOutput->Add(fhZPApmc);
-
-  fhZNCCentroid = new TH2F("fhZNCCentroid","Centroid over ZNC",70,-3.5,3.5,70,-3.5,3.5);
-  fOutput->Add(fhZNCCentroid);
-  fhZNACentroid = new TH2F("fhZNACentroid","Centroid over ZNA",70,-3.5,3.5,70,-3.5,3.5);
-  fOutput->Add(fhZNACentroid);
-
+  fOutput->Add(fhZNCpmc);
+  fhZNApmc = new TH1F("fhZNApmc","ZNA PMC",200, 0., 2000.);
+  fOutput->Add(fhZNApmc);
+  fhZPCpmc = new TH1F("fhZPCpmc","ZPC PMC",140, 0., 1400.);
+  fOutput->Add(fhZPCpmc);
+  fhZPApmc = new TH1F("fhZPApmc","ZPA PMC",140, 0., 1400.);
+  fOutput->Add(fhZPApmc);
+
+  fhZNCCentroid = new TH2F("fhZNCCentroid","Centroid over ZNC",70,-3.5,3.5,70,-3.5,3.5);
+  fOutput->Add(fhZNCCentroid);
+  fhZNACentroid = new TH2F("fhZNACentroid","Centroid over ZNA",70,-3.5,3.5,70,-3.5,3.5);
+  fOutput->Add(fhZNACentroid);
+
   fDebunch = new TH2F("fDebunch","ZN TDC sum vs. diff", 120,-30,30,120,-30,30);
-  fOutput->Add(fDebunch);
-
+  fOutput->Add(fDebunch);
+
   fhTDCZNC = new TH1F("fhTDCZNC","TDC_{ZNC}",60,-30.,30.);
   fhTDCZNC->GetXaxis()->SetTitle("TDC_{ZNC} (ns)");
-  fOutput->Add(fhTDCZNC);
-
+  fOutput->Add(fhTDCZNC);
+
   fhTDCZNA = new TH1F("fhTDCZNA","TDC_{ZNA}",60,-30.,30.);
   fhTDCZNA->GetXaxis()->SetTitle("TDC_{ZNA} (ns)");
-  fOutput->Add(fhTDCZNA);
-
+  fOutput->Add(fhTDCZNA);
+
   PostData(1, fOutput);
 }

@@ -225,18 +225,18 @@
 {
   // Execute analysis for current event:
   if(fDebug>1) printf(" **** AliAnalysisTaskZDCpp::UserExec() \n");
-
+
   if (!InputEvent()) {
     Printf("ERROR: InputEvent not available");
     return;
   }

-
+
   AliESDEvent* esd = dynamic_cast<AliESDEvent*> (InputEvent());
   if(!esd) return;
   // Select PHYSICS events (type=7, for data)
-  //if(!fIsMCInput && esd->GetEventType()!=7) return;
-
+  //if(!fIsMCInput && esd->GetEventType()!=7) return;
+
   // ********* MC INFO *********************************
   if(fIsMCInput){

@@ -245,7 +245,7 @@
       Printf("ERROR: Could not retrieve MC event handler");
       return;
     }
-
+
     AliMCEvent* mcEvent = eventHandler->MCEvent();
     if (!mcEvent) {
       Printf("ERROR: Could not retrieve MC event");
@@ -254,45 +254,38 @@

   }
   // ****************************************************
-
+
   AliAnalysisManager *am = AliAnalysisManager::GetAnalysisManager();
-
+
   AliESDZDC *esdZDC = esd->GetESDZDC();
-
+
   if((((AliInputEventHandler*)(am->GetInputEventHandler()))->IsEventSelected())){
-
-    fhZNCSpectrum->Fill(esdZDC->GetZDCN1Energy());
+
+    fhZNCSpectrum->Fill(esdZDC->GetZDCN1Energy());
     fhZNASpectrum->Fill(esdZDC->GetZDCN2Energy());
-    fhZPCSpectrum->Fill(esdZDC->GetZDCP1Energy());
-    fhZPASpectrum->Fill(esdZDC->GetZDCP2Energy());
+    fhZPCSpectrum->Fill(esdZDC->GetZDCP1Energy());
+    fhZPASpectrum->Fill(esdZDC->GetZDCP2Energy());
     fhZEM1Spectrum->Fill(esdZDC->GetZDCEMEnergy(0)/8.);
     fhZEM2Spectrum->Fill(esdZDC->GetZDCEMEnergy(1)/8.);
-
+
     const Double_t * towZNC = esdZDC->GetZN1TowerEnergy();
     const Double_t * towZPC = esdZDC->GetZP1TowerEnergy();
     const Double_t * towZNA = esdZDC->GetZN2TowerEnergy();
     const Double_t * towZPA = esdZDC->GetZP2TowerEnergy();
-    //
-    fhZNCpmc->Fill(towZNC[0]);
-    fhZNApmc->Fill(towZNA[0]);
-    fhZPCpmc->Fill(towZPC[0]);
-    fhZPApmc->Fill(towZPA[0]);
-
+    //
+    fhZNCpmc->Fill(towZNC[0]);
+    fhZNApmc->Fill(towZNA[0]);
+    fhZPCpmc->Fill(towZPC[0]);
+    fhZPApmc->Fill(towZPA[0]);
+
     Double_t xyZNC[2]={-99.,-99.}, xyZNA[2]={-99.,-99.};
     esdZDC->GetZNCentroidInpp(xyZNC, xyZNA);
-
-    fhZNCCentroid->Fill(xyZNC[0], xyZNC[1]);
-    fhZNACentroid->Fill(xyZNA[0], xyZNA[1]);
-
-    const Double_t * towZNCLG = esdZDC->GetZN1TowerEnergyLR();
-    const Double_t * towZNALG = esdZDC->GetZN2TowerEnergyLR();
-    Double_t znclg=0., znalg=0.;
-    for(Int_t iq=0; iq<5; iq++){
-       znclg += towZNCLG[iq];
-       znalg += towZNALG[iq];
-    }
-  }
-
+
+    fhZNCCentroid->Fill(xyZNC[0], xyZNC[1]);
+    fhZNACentroid->Fill(xyZNA[0], xyZNA[1]);
+
+  }
+
   Float_t tdcC=999., tdcA=999;
   Float_t tdcSum=999., tdcDiff=999;
   for(int i=0; i<4; i++){
@@ -306,13 +299,13 @@
         tdcDiff = tdcC-tdcA;
       }
     }
-    if(tdcSum!=999.) fhTDCZNSum->Fill(tdcSum);
-    if(tdcDiff!=999.)fhTDCZNDiff->Fill(tdcDiff);
-    if(tdcSum!=999. && tdcDiff!=999.)  fDebunch->Fill(tdcDiff, tdcSum);
-  }
-
+    if(tdcSum!=999.) fhTDCZNSum->Fill(tdcSum);
+    if(tdcDiff!=999.)fhTDCZNDiff->Fill(tdcDiff);
+    if(tdcSum!=999. && tdcDiff!=999.)  fDebunch->Fill(tdcDiff, tdcSum);
+  }
+
   PostData(1, fOutput);
-
+
 }


Removed a redundant dyn_cast.  Thanks to Felipe
Cabecinhas.

git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@135429 91177308-0d34-0410-b5e6-96231b3b80d8

--- source/Expression/ASTResultSynthesizer.cpp
+++ source/Expression/ASTResultSynthesizer.cpp
@@ -219,21 +219,19 @@
     lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));

     ASTContext &Ctx(*m_ast_context);
-
-    CompoundStmt *compound_stmt = dyn_cast<CompoundStmt>(Body);
-
-    if (!compound_stmt)
-        return false;
-
-    if (compound_stmt->body_empty())
-        return false;
-
-    Stmt **last_stmt_ptr = compound_stmt->body_end() - 1;
+
+    if (!Body)
+        return false;
+
+    if (Body->body_empty())
+        return false;
+
+    Stmt **last_stmt_ptr = Body->body_end() - 1;
     Stmt *last_stmt = *last_stmt_ptr;

     while (dyn_cast<NullStmt>(last_stmt))
     {
-        if (last_stmt_ptr != compound_stmt->body_begin())
+        if (last_stmt_ptr != Body->body_begin())
         {
             last_stmt_ptr--;
             last_stmt = *last_stmt_ptr;


Only enable Minuit2 if ROOT was configured with it!

--- tutorials/roostats/rs_bernsteinCorrection.C
+++ tutorials/roostats/rs_bernsteinCorrection.C
@@ -81,8 +81,10 @@
    wks->import(*data, Rename("data"));
    wks->import(nominal);

-   // use Minuit2
-   ROOT::Math::MinimizerOptions::SetDefaultMinimizer("Minuit2");
+   if (TClass::GetClass("ROOT::Minuit2::Minuit2Minimizer")) {
+      // use Minuit2 if ROOT was built with support for it:
+      ROOT::Math::MinimizerOptions::SetDefaultMinimizer("Minuit2");
+   }

    // The tolerance sets the probability to add an unnecessary term.
    // lower tolerance will add fewer terms, while higher tolerance


INTEGRATION: CWS changefileheader (1.12.28); FILE MERGED 2008/03/31 12:33:31 rt 1.12.28.1: #i87441# Change license header to LPGL v3.

--- io/source/stm/opump.cxx
+++ io/source/stm/opump.cxx
@@ -1,35 +1,30 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
- *
- *  $RCSfile: opump.cxx,v $
- *
- *  $Revision: 1.12 $
- *
- *  last change: $Author: obo $ $Date: 2006-09-16 23:44:21 $
- *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
- *
- *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: opump.cxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/


Fixed bracket

Fixed bracket

--- PWGHF/hfe/AliAnalysisTaskHFEBeautyMCTemplatesRun2.cxx
+++ PWGHF/hfe/AliAnalysisTaskHFEBeautyMCTemplatesRun2.cxx
@@ -743,9 +743,11 @@
           fDCAConversionNewCentVar2->Fill(pt, IPVar2, centrality);
         }
         if(SourceNew == 3 && !IsAddedSignal(mcple))
+        {
           fDCADalitzNew->Fill(pt, IP);
           fDCADalitzNewVar1->Fill(pt, IPVar1);
           fDCADalitzNewVar2->Fill(pt, IPVar2);
+        }

         if(SourceNew == 0)
         {


INTEGRATION: CWS changefileheader (1.8.378); FILE MERGED 2008/03/31 13:23:36 rt 1.8.378.1: #i87441# Change license header to LPGL v3.

--- sal/inc/osl/semaphor.hxx
+++ sal/inc/osl/semaphor.hxx
@@ -1,35 +1,30 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *  $RCSfile: semaphor.hxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
  *
- *  $Revision: 1.8 $
+ * OpenOffice.org - a multi-platform office productivity suite
  *
- *  last change: $Author: rt $ $Date: 2005-09-08 14:32:32 $
+ * $RCSfile: semaphor.hxx,v $
+ * $Revision: 1.9 $
  *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
  *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
  *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
  *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/


study noise impact on clock synchronization

--- applicationsSrc/msrSync/msrSyncBlockCode.cpp
+++ applicationsSrc/msrSync/msrSyncBlockCode.cpp
@@ -29,8 +29,8 @@

 #define LIMIT_NUM_ROUNDS 10

-//#define PRINT_NODE_INFO
-#define INFO_NODE_ID 2
+#define PRINT_NODE_INFO
+#define INFO_NODE_ID 200

 msrSyncBlockCode::msrSyncBlockCode(BlinkyBlocksBlock *host): BlinkyBlocksBlockCode(host) {
   a = 1;
@@ -91,7 +91,7 @@
       round++;
       info << "MASTER sync " << round;
 #ifdef PRINT_NODE_INFO
-      cout << "MASTER SYNC " << getTime() << endl;
+      // cout << "MASTER SYNC " << getTime() << endl;
 #endif
       synchronize(NULL,getTime());
       // schedule the next sync round
@@ -136,19 +136,19 @@
 	  }
 #endif
 	  synchronize(recvInterface, globalTime);
-	}
-
-	if (round == LIMIT_NUM_ROUNDS) {
-	  // display error vector
-#ifdef PRINT_NODE_INFO
-	  if (hostBlock->blockId == INFO_NODE_ID) {
+
+	  if (round == LIMIT_NUM_ROUNDS) {
+	    // display error vector
+#ifdef PRINT_NODE_INFO
+	    // if (hostBlock->blockId == INFO_NODE_ID) {
 	    cout << "@" << hostBlock->blockId << " error: ";
 	    for (vector<uint64_t>::iterator it = error.begin() ; it != error.end(); it++){
 	      cout << *it << " ";
 	    }
 	    cout << endl;
-	  }
-#endif
+	    // }
+#endif
+	  }
 	}
       }
 	break;


Add a destructor for the HostDB regression test.

Coverity CID #1022020

--- iocore/hostdb/HostDB.cc
+++ iocore/hostdb/HostDB.cc
@@ -354,12 +354,20 @@
   }

-HostDBTestRR():Continuation(new_ProxyMutex()), nb(0), outstanding(0), success(0), failure(0), in(0) {
+  HostDBTestRR()
+    : Continuation(new_ProxyMutex()), nb(0), outstanding(0), success(0), failure(0), in(0)
+  {
     printf("starting HostDBTestRR....\n");
     fd = open("hostdb_test.config", O_RDONLY, 0);
     ink_release_assert(fd >= 0);
     read_some();
     SET_HANDLER(&HostDBTestRR::mainEvent);
+  }
+
+  ~HostDBTestRR()
+  {
+    if (fd)
+      close(fd);
   }
 };


bug found in the macro and solved it for KStar analysis in pp at 8 TeV

--- PWGLF/RESONANCES/macros/mini/AddTaskKStarPP8TeV_PID.C
+++ PWGLF/RESONANCES/macros/mini/AddTaskKStarPP8TeV_PID.C
@@ -142,7 +142,7 @@

-   if (isPP && (!isMC)) {
+   if (isPP && (!isMC)&&cutVertex) {
      cutVertex->SetCheckPileUp(rejectPileUp);   // set the check for pileup
      ::Info("AddAnalysisTaskTOFKStar", Form(":::::::::::::::::: Pile-up rejection mode: %s", (rejectPileUp)?"ON":"OFF"));
      //cutVertex->SetCheckZResolutionSPD();//A Khuntia
@@ -159,11 +159,14 @@
    cutEventUtils->SetCheckSPDClusterVsTrackletBG();*/
    //------------------------------------
    // define and fill cut set for event cut
-   AliRsnCutSet *eventCuts = new AliRsnCutSet("eventCuts", AliRsnTarget::kEvent);
+
+   AliRsnCutSet* eventCuts=0;
+   if(cutVertex){
+   eventCuts = new AliRsnCutSet("eventCuts", AliRsnTarget::kEvent);
    eventCuts->AddCut(cutVertex);
    eventCuts->SetCutScheme(Form("%s", cutVertex->GetName()));
    task->SetEventCuts(eventCuts);
-
+   }
    //
    // -- EVENT-ONLY COMPUTATIONS -------------------------------------------------------------------
    //


ccp4.hpp: use std::is_same instead of typeid (RTTI)

is_same is a compile-time check, typeid probably runtime

--- include/gemmi/ccp4.hpp
+++ include/gemmi/ccp4.hpp
@@ -12,7 +12,7 @@
 #include <cstring>   // for memcpy
 #include <array>
 #include <string>
-#include <typeinfo>  // for typeid
+#include <type_traits>  // for is_same
 #include <vector>
 #include "symmetry.hpp"
 #include "fail.hpp"      // for fail
@@ -203,13 +203,13 @@
   }

   static int mode_for_data() {
-    if (typeid(T) == typeid(std::int8_t))
+    if (std::is_same<T, std::int8_t>::value)
       return 0;
-    if (typeid(T) == typeid(std::int16_t))
+    if (std::is_same<T, std::int16_t>::value)
       return 1;
-    if (typeid(T) == typeid(float))
+    if (std::is_same<T, float>::value)
       return 2;
-    if (typeid(T) == typeid(std::uint16_t))
+    if (std::is_same<T, std::uint16_t>::value)
       return 6;
     return -1;
   }
@@ -310,7 +310,7 @@

 template<typename Stream, typename TFile, typename TMem>
 void read_data(Stream& f, std::vector<TMem>& content) {
-  if (typeid(TFile) == typeid(TMem)) {
+  if (std::is_same<TFile, TMem>::value) {
     size_t len = content.size();
     if (!f.read(content.data(), sizeof(TMem) * len))
       fail("Failed to read all the data from the map file.");
@@ -329,7 +329,7 @@

 template<typename TFile, typename TMem>
 void write_data(const std::vector<TMem>& content, FILE* f) {
-  if (typeid(TMem) == typeid(TFile)) {
+  if (std::is_same<TMem, TFile>::value) {
     size_t len = content.size();
     if (std::fwrite(content.data(), sizeof(TFile), len, f) != len)
       sys_fail("Failed to write data to the map file");


Handle missing SIZE_MAX

Handle missing SIZE_MAX

Change-Id: Id931f5339e19ce5ff635af93fe9f60f3abebe069


dense: fix crash when working directory is provided (#460)

--- apps/DensifyPointCloud/DensifyPointCloud.cpp
+++ apps/DensifyPointCloud/DensifyPointCloud.cpp
@@ -167,8 +167,8 @@
 		OPT::strOutputFileName = Util::getFileFullName(OPT::strInputFileName) + _T("_dense.mvs");

 	// init dense options
-	if (!Util::isFullPath(OPT::strDenseConfigFileName))
-		OPT::strDenseConfigFileName = MAKE_PATH(OPT::strDenseConfigFileName);
+	if (!OPT::strDenseConfigFileName.IsEmpty())
+		OPT::strDenseConfigFileName = MAKE_PATH_SAFE(OPT::strDenseConfigFileName);
 	OPTDENSE::init();
 	const bool bValidConfig(OPTDENSE::oConfig.Load(OPT::strDenseConfigFileName));
 	OPTDENSE::update();
@@ -180,7 +180,7 @@
 	OPTDENSE::nOptimize = nOptimize;
 	OPTDENSE::nEstimateColors = nEstimateColors;
 	OPTDENSE::nEstimateNormals = nEstimateNormals;
-	if (!bValidConfig)
+	if (!bValidConfig && !OPT::strDenseConfigFileName.IsEmpty())
 		OPTDENSE::oConfig.Save(OPT::strDenseConfigFileName);

 	// initialize global options


modified pick_cells method to return an "empty" vector if nnz returns  nothing

--- utility.cpp
+++ utility.cpp
@@ -1,6 +1,7 @@
 #include "bct.h"
 #include <gsl/gsl_matrix.h>
 #include <gsl/gsl_vector.h>
+#include <cassert>

 bool bct::safe_mode = false;

@@ -38,14 +39,21 @@
 gsl_vector* bct::pick_cells(const gsl_vector* srcV, const gsl_vector* pickV) {
 		int stripVindex = 0;
 		int nnzV = nnz(pickV);
-		gsl_vector* stripV = gsl_vector_alloc(nnzV);
-		for(int i = 0;i < srcV->size;i++) {
-			//1 or 1.0, does it make a difference?
-			//Nevertheless, pickV is created by logical_not method and it sets integer values
-			if(gsl_vector_get(pickV, i) == 1)
-				gsl_vector_set(stripV, stripVindex++, gsl_vector_get(srcV, i));
+		if(!(nnzV > 0)) { //Matlab returns an empty matrix in this case, here it needs to be handled differently
+			gsl_vector* stripV = gsl_vector_alloc(1);
+			gsl_vector_set(stripV, 0, 0);
+			return stripV;
 		}
-		return stripV;
+		else {
+			gsl_vector* stripV = gsl_vector_alloc(nnzV);
+			for(int i = 0;i < srcV->size;i++) {
+				//1 or 1.0, does it make a difference?
+				//Nevertheless, pickV is created by logical_not method and it sets integer values
+				if(gsl_vector_get(pickV, i) == 1)
+					gsl_vector_set(stripV, stripVindex++, gsl_vector_get(srcV, i));
+			}
+			return stripV;
+		}
 }

 /*


some fixes

some fixes

--- utility.hpp
+++ utility.hpp
@@ -33,7 +33,7 @@
 template <::std::size_t A, ::std::size_t B>
 struct expand_indices<A, B, typename ::std::enable_if<A != B>::type>
 {
-  static_assert(A < B, "A >= B");
+  static_assert(A < B, "A > B");
   using indices_type = typename catenate_indices<
     typename expand_indices<A, (A + B) / 2>::indices_type,
     typename expand_indices<(A + B) / 2 + 1, B>::indices_type


some fixes

some fixes

--- utility.hpp
+++ utility.hpp
@@ -46,7 +46,9 @@
 }

 template <::std::size_t A>
-struct make_indices : detail::expand_indices<0, A - 1>::indices_type;
+struct make_indices : detail::expand_indices<0, A - 1>::indices_type
+{
+};

 template <>
 struct make_indices<0> : indices<>


removed test code

removed test code

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@664 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CommunicationUIModule/CommunicationUIModule.cpp
+++ CommunicationUIModule/CommunicationUIModule.cpp
@@ -141,17 +141,6 @@

 		std::string error;

-        //Foundation::ScriptObject*
-        Foundation::ScriptObjectPtr test_script = Foundation::ScriptObjectPtr (scriptService->LoadScript("TestClass", error) );
-        Foundation::ScriptObjectPtr test = Foundation::ScriptObjectPtr (test_script->GetObject("TestClass"));
-		//Foundation::ScriptObject* chathandler = scriptService->LoadScript("chathandler", error); //the module
-		//chathandler = chathandler->GetObject("ChatHandler"); //instanciates a class in this module with the given name
-
-
-
-		//std::string meth = "blob";
-		//std::string syn = "";
-  //      Foundation::ScriptObject* ret2 = test->CallMethod(meth, syn, NULL);

 		Foundation::ScriptObject* script = scriptService->LoadScript("IMDemo", error);


ENH: Added wrapper for ImageIOBase.

ENH: Added wrapper for ImageIOBase.

--- Wrapping/Tcl/IO/wrap_IOBase.cxx
+++ Wrapping/Tcl/IO/wrap_IOBase.cxx
@@ -15,6 +15,7 @@

 =========================================================================*/
 #include "itkRawImageIO.h"
+#include "itkImageIOBase.h"
 #include "itkPNGImageIO.h"
 #include "itkMetaImageIO.h"
 #include "itkPNGImageIOFactory.h"
@@ -25,6 +26,7 @@
 #include "wrap_ITKIO.h"

 ITK_WRAP_CONFIG_GROUP(IOBase);
+ITK_WRAP_OBJECT(ImageIOBase);
 ITK_WRAP_OBJECT(PNGImageIO);
 ITK_WRAP_OBJECT(MetaImageIO);
 ITK_WRAP_OBJECT(PNGImageIOFactory);


내꺼 왜 스크롤이 제대로 안돼지

내꺼 왜 스크롤이 제대로 안돼지

--- X10_Project/Classes/MCScene.cpp
+++ X10_Project/Classes/MCScene.cpp
@@ -21,23 +21,31 @@
 	{
 		return false;
 	}
-
 	this->schedule(schedule_selector(MCScene::ChangeBackGroundColor), DELTA_TIME);
+
+	auto dir = Director::getInstance();
+	auto screen = dir->getVisibleSize();

 	auto backgroundGirl0 = Sprite::create("res/mc.jpg");
 	backgroundGirl0->setAnchorPoint(Point::ZERO);
 	backgroundGirl0->setPosition(Point::ZERO);
-
+	int width = backgroundGirl0->getContentSize().width;
+	int height = backgroundGirl0->getContentSize().height;
+	float scrollVelocity = 100;
+	float scaleRatio = screen.height / height;
+	backgroundGirl0->setScale(scaleRatio);
+
 	auto backgroundGirl1 = Sprite::create("res/mc.jpg");
 	backgroundGirl1->setAnchorPoint(Point::ZERO);
-	backgroundGirl1->setPosition(Point(backgroundGirl0->getContentSize().width, 0));
+	backgroundGirl1->setPosition(Point(width, 0));

-
-
+	auto moveRight = MoveTo::create(screen.width / (scrollVelocity * scaleRatio), Point(-width, 0));
+	auto moveBack = MoveTo::create(0, Point::ZERO);
+	auto scrollBG = RepeatForever::create(Sequence::create(moveRight, moveBack, NULL));
+	backgroundGirl0->runAction(scrollBG);
 	backgroundGirl0->addChild(backgroundGirl1);
-	backgroundGirl0->setScale(0.1);
 	this->addChild(backgroundGirl0);
-
+
 	auto GotoMainScene = MenuItemFont::create("Go to MainScene", CC_CALLBACK_1(MCScene::ChangeToMainScene, this));
 	auto GotoMainSceneMenu = Menu::create(GotoMainScene, NULL);
 	GotoMainSceneMenu->setPosition(200, 300);
@@ -48,9 +56,6 @@
 	taewooMission1->setName("twMissionLabel");
 	taewooMission1->setVisible(false);
 	this->addChild(taewooMission1);
-
-	auto dir = Director::getInstance();
-	auto screen = dir->getVisibleSize();

 	auto jinwookMission = Sprite::create("boy 31x40.png");
 	auto boysize = jinwookMission->getContentSize();


Working around incorrect mouse coordinates in win32 windowless mode from Firefox. https://tracker.physiomeproject.org/show_bug.cgi?id=921

--- source/three_d_drawing/graphics_buffer.cpp
+++ source/three_d_drawing/graphics_buffer.cpp
@@ -293,6 +293,14 @@
 	int height;
 	int x;
 	int y;
+    /* Work around bug in firefox 3.0 and 3.5 where mouse coordinates are always given with respect
+     * to the containing window, rather than the last SetWindow call.
+     * Try to discern the offset of the containing window by assuming we will get a full
+     * window redraw before any mouse events.
+     * See https://tracker.physiomeproject.org/show_bug.cgi?id=921
+     */
+	int mouse_x;
+	int mouse_y;
 	/* For offscreen rendering */
 	int offscreen_width;
 	int offscreen_height;
@@ -455,6 +463,8 @@
 		 buffer->height = 0;
 		 buffer->x = 0;
 		 buffer->y = 0;
+		 buffer->mouse_x = 0;
+		 buffer->mouse_y = 0;
 		 buffer->offscreen_width = 0;
 		 buffer->offscreen_height = 0;
 #ifdef WGL_ARB_pbuffer
@@ -5009,7 +5019,6 @@
    so declaring here if the headers are too old,
    however the actual function and dll was available in windows 98 */
 extern "C" {
-	bob
   WINGDIAPI BOOL  WINAPI AlphaBlend(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
 }
 #endif /* defined (WIN32_USER_INTERFACE) && (defined (__CYGWIN__) || defined (__MINGW__)) */
@@ -5021,8 +5030,8 @@
 LAST MODIFIED : 5 June 2007

 DESCRIPTION:
-Handle an external windows event.  Used to try and support windowless plugin
-mode with zinc.  Requiring development.
+Handle an external windows event.  Used to support windowless plugin
+mode with zinc.
 ==============================================================================*/
 {
   int return_code;
@@ -5057,6 +5066,16 @@
 			  buffer->offscreen_render_required = 0;
 		  }

+ 	          /* Work around bug in firefox.  See definition of mouse_x.
+   	           */
+          if (((drc->left == buffer->x) || (drc->left == buffer->x - 1))
+        	&& ((drc->top == buffer->y) || (drc->top == buffer->y - 1)) &&
+        	((drc->right - drc->left) >= buffer->width) && ((drc->bottom - drc->top) >= buffer->height))
+          {
+        	  buffer->mouse_x = buffer->x;
+        	  buffer->mouse_y = buffer->y;
+          }
+
 		  wglMakeCurrent( buffer->hDC, buffer->hRC );

 		  {
@@ -5097,7 +5116,7 @@

 			  int width = right - x;
 			  int height = bottom - y;
-
+
 			  if ((width > 0) && (height > 0))
 			  {
 #if defined (DEBUG)
@@ -5112,7 +5131,7 @@
 						  if (GRAPHICS_BUFFER_RENDER_OFFSCREEN_AND_BLEND == buffer->buffering_mode)
 						  {
 #if defined (DEBUG)
-							  printf ("Going to blend %d %d %d %d (rgba %d %d %d %d)\n",
+							  printf ("Going to blend %d %d %d %d (bgra %d %d %d %d)\n",
 								  x - buffer->x, buffer->offscreen_height - height - y + buffer->y,
 								  width, height,
 								  ((unsigned char *)buffer->device_independent_bitmap_pixels)
@@ -5134,16 +5153,79 @@
 								  };

 							  AlphaBlend(hdc, x, y, width, height,
-								  buffer->hDC, x - buffer->x,
-								  buffer->offscreen_height - height - y + buffer->y, width, height,
-								  blendfunction);
+								 buffer->hDC, x - buffer->x,
+								 buffer->offscreen_height - height - y + buffer->y, width, height,
+								 blendfunction);
+
 						  }
 						  else
 						  {
+#if defined (DEBUG)
+#if defined (DRAW_A_TEST_LINE)
+							  {
+								  int i;
+								  for (i = 0 ; i < 50 ; i++)
+									  if (ERROR_INVALID_PARAMETER ==SetPixel(buffer->hDC,
+										  x - buffer->x + i,
+										  buffer->offscreen_height - height - y + buffer->y + i, RGB(255, 200, 10)))
+										  printf("Error writing pixel to %p", buffer->hDC);
+							  }
+#endif // defined (DRAW_A_TEST_LINE)
+
+							  printf ("Going to bitblt %d %d %d %d (bgra %d %d %d %d)\n",
+								  x - buffer->x, buffer->offscreen_height - height - y + buffer->y,
+								  width, height,
+								  ((unsigned char *)buffer->device_independent_bitmap_pixels)
+								  [4 * buffer->offscreen_width * (buffer->offscreen_height - height - y + buffer->y)],
+								  ((unsigned char *)buffer->device_independent_bitmap_pixels)
+								  [4 * buffer->offscreen_width * (buffer->offscreen_height - height - y + buffer->y) + 1],
+								  ((unsigned char *)buffer->device_independent_bitmap_pixels)
+								  [4 * buffer->offscreen_width * (buffer->offscreen_height - height - y + buffer->y) + 2],
+								  ((unsigned char *)buffer->device_independent_bitmap_pixels)
+								  [4 * buffer->offscreen_width * (buffer->offscreen_height - height - y + buffer->y) + 3]);
+
+#if defined (WRITE_EVERY_PIXEL)
+							  {
+								  int i, j;
+								  unsigned int repeat = 0;
+								  unsigned long current, previous = 0;
+								  for (i = 0 ; i < buffer->offscreen_width ; i++)
+									  for (j = 0 ; j < buffer->offscreen_height ; j++)
+									  {
+										  current = ((unsigned long *)buffer->device_independent_bitmap_pixels)
+											 [i + buffer->offscreen_width * j];
+										  if (current == previous)
+										  {
+											  repeat++;
+										  }
+										  else
+										  {
+											  if (repeat > 0)
+												  printf("   Pixels %0lX %d\n", previous, repeat);
+											  previous = current;
+											  repeat = 1;
+										  }
+									  }
+								  if (repeat > 0)
+									  printf("   Pixels %0lX %d\n", previous, repeat);
+							  }
+#endif // defined (WRITE_EVERY_PIXEL)
+#endif /* defined (DEBUG) */
+
+
 							  BitBlt(hdc, x, y, width, height,
 								  buffer->hDC, x - buffer->x,
 								  buffer->offscreen_height - height - y + buffer->y,
 								  SRCCOPY);
+
+#if defined (DRAW_A_TEST_LINE)
+							  {
+								  int i;
+								  for (i = 0 ; i < 50 ; i++)
+									  if (ERROR_INVALID_PARAMETER == SetPixel(hdc, x+i, y+i, RGB(200, 20, 200)))
+										  printf("Error writing pixel to %p", hdc);
+							  }
+ #endif /* defined (DRAW_A_TEST_LINE) */
 						  }
 					  } break;
 					  case GRAPHICS_BUFFER_WIN32_COPY_PBUFFER_TYPE:
@@ -5263,14 +5345,16 @@
 	  case WM_MBUTTONUP:
 	  {
 #if defined (DEBUG)
-		  printf ("Graphics_buffer_handle_windows_event WM_MOUSEMOVE\n");
+		  printf ("Graphics_buffer_handle_windows_event WM_BUTTON %d %d %d %d\n",
+				  GET_X_LPARAM(second_message), GET_Y_LPARAM(second_message),
+				  buffer->mouse_x, buffer->mouse_y);
 #endif /* defined (DEBUG) */

 		  LPARAM offset_coordinates;

 		  offset_coordinates = MAKELPARAM(
-			  GET_X_LPARAM(second_message) - buffer->x,
-			  GET_Y_LPARAM(second_message) - buffer->y);
+			  GET_X_LPARAM(second_message) - buffer->mouse_x,
+			  GET_Y_LPARAM(second_message) - buffer->mouse_y);

 		  return_code = Graphics_buffer_win32_button_callback(&message_identifier,
 			  buffer, first_message, offset_coordinates);
@@ -7816,6 +7900,9 @@
 			In the intel workaround case we only want to destroy it at the end. */
 		if (buffer->hRC && (buffer->hRC != buffer->package->wgl_shared_context))
 		{
+#if defined (DEBUG)
+			printf("wglDeleteContext %p\n", buffer->hRC);
+#endif //defined (DEBUG)
 			wglDeleteContext(buffer->hRC);
 		}
 		switch (buffer->type)
@@ -7852,13 +7939,13 @@
 				}
 			} break;
 		}
+		if (buffer->hidden_graphics_buffer)
+		{
+			DESTROY(Graphics_buffer)(&buffer->hidden_graphics_buffer);
+		}
 		if (buffer->hidden_accelerated_window)
 		{
 			DestroyWindow(buffer->hidden_accelerated_window);
-		}
-		if (buffer->hidden_graphics_buffer)
-		{
-			DESTROY(Graphics_buffer)(&buffer->hidden_graphics_buffer);
 		}
 #endif /* defined (WIN32_USER_INTERFACE) */
 #if defined (CARBON_USER_INTERFACE)


Changes ... OK, 'fixes' - to the simple scripting feature.

--- FGFDMExec.cpp
+++ FGFDMExec.cpp
@@ -68,7 +68,7 @@
 #include "FGOutput.h"
 #include "FGConfigFile.h"

-static const char *IdSrc = "$Id: FGFDMExec.cpp,v 1.29 2001/02/25 17:05:08 jberndt Exp $";
+static const char *IdSrc = "$Id: FGFDMExec.cpp,v 1.30 2001/02/26 16:41:50 jberndt Exp $";
 static const char *IdHdr = "ID_FDMEXEC";

 char highint[5]  = {27, '[', '1', 'm', '\0'      };
@@ -356,6 +356,11 @@
             } else if (token == "set") {
               newCondition->SetParam.push_back(State->GetParameterIndex(Script.GetValue("name")));
               newCondition->SetValue.push_back(strtod(Script.GetValue("value").c_str(), NULL));
+              newCondition->Triggered.push_back(false);
+              newCondition->OriginalValue.push_back(0.0);
+              newCondition->newValue.push_back(0.0);
+              newCondition->StartTime.push_back(0.0);
+              newCondition->EndTime.push_back(0.0);
               string tempCompare = Script.GetValue("type");
               if      (tempCompare == "FG_DELTA") newCondition->Type.push_back(FG_DELTA);
               else if (tempCompare == "FG_BOOL")  newCondition->Type.push_back(FG_BOOL);
@@ -484,23 +489,25 @@

   int count=0;

-  while (iC < Conditions.end()) {
-
+  float currentTime = State->Getsim_time();
+  float newSetValue;
+
+  while (iC < Conditions.end()) {
     // determine whether the set of conditional tests for this condition equate
     // to true
     for (int i=0; i<iC->TestValue.size(); i++) {
            if (iC->Comparison[i] == "lt")
-              truth = iC->TestValue[i] <  State->GetParameter(iC->TestParam[i]);
-      else if (iC->Comparison[i] == "le")
-              truth = iC->TestValue[i] <= State->GetParameter(iC->TestParam[i]);
-      else if (iC->Comparison[i] == "eq")
-              truth = iC->TestValue[i] == State->GetParameter(iC->TestParam[i]);
-      else if (iC->Comparison[i] == "ge")
-              truth = iC->TestValue[i] >= State->GetParameter(iC->TestParam[i]);
-      else if (iC->Comparison[i] == "gt")
-              truth = iC->TestValue[i] >  State->GetParameter(iC->TestParam[i]);
-      else if (iC->Comparison[i] == "ne")
-              truth = iC->TestValue[i] != State->GetParameter(iC->TestParam[i]);
+              truth = State->GetParameter(iC->TestParam[i]) <  iC->TestValue[i];
+      else if (iC->Comparison[i] == "le")
+              truth = State->GetParameter(iC->TestParam[i]) <= iC->TestValue[i];
+      else if (iC->Comparison[i] == "eq")
+              truth = State->GetParameter(iC->TestParam[i]) == iC->TestValue[i];
+      else if (iC->Comparison[i] == "ge")
+              truth = State->GetParameter(iC->TestParam[i]) >= iC->TestValue[i];
+      else if (iC->Comparison[i] == "gt")
+              truth = State->GetParameter(iC->TestParam[i]) >  iC->TestValue[i];
+      else if (iC->Comparison[i] == "ne")
+              truth = State->GetParameter(iC->TestParam[i]) != iC->TestValue[i];
       else
               cerr << "Bad comparison" << endl;

@@ -510,9 +517,6 @@

     // if the conditions are true, do the setting of the desired parameters

-    float currentTime = State->Getsim_time();
-    float newSetValue;
-
     if (WholeTruth) {
       for (int i=0; i<iC->SetValue.size(); i++) {
         if ( ! iC->Triggered[i]) {
@@ -527,6 +531,7 @@
           case FG_BOOL:
             break;
           default:
+            cerr << "Invalid Type specified" << endl;
             break;
           }
           iC->Triggered[i] = true;
@@ -546,6 +551,7 @@
               * (iC->newValue[i] - iC->OriginalValue[i]) + iC->OriginalValue[i];
           break;
         default:
+          cerr << "Invalid Action specified" << endl;
           break;
         }
         State->SetParameter(iC->SetParam[i], newSetValue);


Add serialization prerequisites.

Add serialization prerequisites.

--- src/mlpack/prereqs.hpp
+++ src/mlpack/prereqs.hpp
@@ -51,6 +51,9 @@
 // defined, but we still need to define it (as nothing) so that the mlpack
 // serialization shim compiles.
 #include <boost/serialization/serialization.hpp>
+#include <boost/serialization/vector.hpp>
+#include <boost/serialization/map.hpp>
+#include <boost/serialization/unordered_map.hpp>
 #ifndef BOOST_PFTO
   #define BOOST_PFTO
 #endif


nicer debug print

nicer debug print

--- Adafruit_PN532.cpp
+++ Adafruit_PN532.cpp
@@ -1664,19 +1664,19 @@
     checksum += PN532_HOSTTOPN532;

     #ifdef PN532DEBUG
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_PREAMBLE, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_PREAMBLE, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_STARTCODE2, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(cmdlen, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(~cmdlen + 1, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_HOSTTOPN532, HEX);
+    PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_PREAMBLE, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_PREAMBLE, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_STARTCODE2, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)cmdlen, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)(~cmdlen + 1), HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_HOSTTOPN532, HEX);
     #endif

     for (uint8_t i=0; i<cmdlen-1; i++) {
       spi_write(cmd[i]);
       checksum += cmd[i];
       #ifdef PN532DEBUG
-        PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(cmd[i], HEX);
+        PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)cmd[i], HEX);
       #endif
     }

@@ -1688,8 +1688,8 @@
     #endif

     #ifdef PN532DEBUG
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(~checksum, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_POSTAMBLE, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)~checksum, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_POSTAMBLE, HEX);
       PN532DEBUGPRINT.println();
     #endif
   }
@@ -1719,31 +1719,31 @@
     checksum += PN532_HOSTTOPN532;

     #ifdef PN532DEBUG
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_PREAMBLE, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_PREAMBLE, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_STARTCODE2, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(cmdlen, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(~cmdlen + 1, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_HOSTTOPN532, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_PREAMBLE, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_PREAMBLE, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_STARTCODE2, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)cmdlen, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)(~cmdlen + 1), HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_HOSTTOPN532, HEX);
     #endif

     for (uint8_t i=0; i<cmdlen-1; i++) {
       i2c_send(cmd[i]);
       checksum += cmd[i];
       #ifdef PN532DEBUG
-        PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(cmd[i], HEX);
+        PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)cmd[i], HEX);
       #endif
     }

-    i2c_send(~checksum);
-    i2c_send(PN532_POSTAMBLE);
+    i2c_send((byte)~checksum);
+    i2c_send((byte)PN532_POSTAMBLE);

     // I2C STOP
     WIRE.endTransmission();

     #ifdef PN532DEBUG
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(~checksum, HEX);
-      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print(PN532_POSTAMBLE, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)~checksum, HEX);
+      PN532DEBUGPRINT.print(F(" 0x")); PN532DEBUGPRINT.print((byte)PN532_POSTAMBLE, HEX);
       PN532DEBUGPRINT.println();
     #endif


1565 - Animation doesn't work properly on Mac os x
https://tracker.physiomeproject.org/show_bug.cgi?id=1565

git-svn-id: 4705079bc6b8aadf675e3696f5c015a6aa4916e3@6257 3c1deb5b-d424-0410-962d-aba41a686d42

--- source/user_interface/event_dispatcher.cpp
+++ source/user_interface/event_dispatcher.cpp
@@ -2056,6 +2056,10 @@
 					&idle_callback->carbon_timer_ref);
 			}
 #elif defined (WX_USER_INTERFACE)
+			else
+			{
+				::wxWakeUpIdle();
+			}
 #elif defined (WIN32_SYSTEM)
 			else
 			{


Added class for building loris classes

Added class for building loris classes

--- include/loris/bind.hpp
+++ include/loris/bind.hpp
@@ -33,7 +33,7 @@

 #include "loris\loris.hpp"

-using namespace loris;
+namespace loris {

 template<> Value::operator double() {
 	return AsNumber();
@@ -110,4 +110,113 @@
 			return box(call_func(sig, std::index_sequence_for<Params...>{}, vm));
 		};
 	}
+}
+
+class ClassBuilder
+{
+public:
+	Class * def;
+
+	ClassBuilder()
+	{
+		def = NULL;
+	}
+
+	ClassBuilder Start(string className)
+	{
+		def = new Class();
+		def->name = className;
+
+		return *this;
+	}
+
+	ClassBuilder Attrib(string name)
+	{
+		assert(def != NULL);
+
+		ClassAttrib attr;
+		attr.name = name;
+		attr.isStatic = false;
+		attr.init = NULL;
+		def->attribs.push_back(attr);
+
+		return *this;
+	}
+
+	ClassBuilder StaticAttrib(string name)
+	{
+		assert(def != NULL);
+
+		ClassAttrib attr;
+		attr.name = name;
+		attr.isStatic = true;
+		attr.init = NULL;
+		def->attribs.push_back(attr);
+
+		return *this;
+	}
+
+	ClassBuilder Constructor(NativeFunction native)
+	{
+		Function* func = new Function;
+		func->name = def->name;
+		func->isStatic = false;
+		func->isNative = true;
+		func->nativeFunction = native;
+
+		def->methods[def->name] = func;
+		return *this;
+	}
+
+	ClassBuilder Destructor(NativeFunction native)
+	{
+		Function* func = new Function;
+		func->name = def->name;
+		func->isStatic = false;
+		func->isNative = true;
+		func->nativeFunction = native;
+
+		def->destructor = func;
+		return *this;
+	}
+
+	ClassBuilder Method(string name, NativeFunction native)
+	{
+		Function* func = new Function;
+		func->name = def->name;
+		func->isStatic = false;
+		func->isNative = true;
+		func->nativeFunction = native;
+
+		def->methods[name] = func;
+		return *this;
+	}
+
+	ClassBuilder StaticMethod(string name, NativeFunction native)
+	{
+		Function* func = new Function;
+		func->name = def->name;
+		func->isStatic = true;
+		func->isNative = true;
+		func->nativeFunction = native;
+
+		def->methods[name] = func;
+		return *this;
+	}
+
+	Class* Build()
+	{
+		Class* c = def;
+		def = NULL;
+
+		return c;
+	}
+};
+
+ClassBuilder CreateClass(std::string name)
+{
+	ClassBuilder builder;
+	return builder.Start(name);
+}
+
 }


Avoid memory leaks in the case where several tables of type CORNERING_COEFF are defined

--- src/models/FGLGear.cpp
+++ src/models/FGLGear.cpp
@@ -60,7 +60,7 @@
 GLOBAL DATA
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

-static const char *IdSrc = "$Id: FGLGear.cpp,v 1.93 2011/12/03 15:55:48 bcoconni Exp $";
+static const char *IdSrc = "$Id: FGLGear.cpp,v 1.94 2012/03/24 18:29:58 bcoconni Exp $";
 static const char *IdHdr = ID_LGEAR;

 // Body To Structural (body frame is rotated 180 deg about Y and lengths are given in
@@ -165,6 +165,7 @@
     force_type = force_table->GetAttributeValue("type");
     if (force_type == "CORNERING_COEFF") {
       ForceY_Table = new FGTable(PropertyManager, force_table);
+      break;
     } else {
       cerr << "Undefined force table for " << name << " contact point" << endl;
     }


+fixed init order

+fixed init order

git-svn-id: 06a2cde72a096d93ff72b88e3e6711b8f00772a4@706 d397654b-2ff0-0310-9e29-ba003691a0f9

--- include/mapnik/map.hpp
+++ include/mapnik/map.hpp
@@ -68,9 +68,9 @@
         std::map<std::string,feature_type_style> styles_;
         std::map<std::string,FontSet> fontsets_;
         std::vector<Layer> layers_;
+        aspect_fix_mode aspectFixMode_;
         Envelope<double> currentExtent_;
-        aspect_fix_mode aspectFixMode_;
-
+
     public:

         typedef std::map<std::string,feature_type_style>::const_iterator const_style_iterator;


适当调整缓冲池的大小

适当调整缓冲池的大小

--- include/mozart/any.hpp
+++ include/mozart/any.hpp
@@ -44,7 +44,7 @@
 			return "false";
 	}
 }
-#define COV_ANY_POOL_SIZE 128
+#define COV_ANY_POOL_SIZE 96
 namespace cov {
 	template<typename _Tp> class compare_helper {
 		template<typename T,typename X=bool>struct matcher;


Prettied some comments

Prettied some comments

--- Mapper/Mapper.cpp
+++ Mapper/Mapper.cpp
@@ -216,7 +216,7 @@
   ////////////////////////////////
   // Yaw Control Initialization //
   ////////////////////////////////
-	yaw_pid.old 			= 0;	 	// Initialize old imu data
+	yaw_pid.old 		= 0;	 	// Initialize old imu data
 	yaw_pid.setpoint 	= 0;		// Initialize setpoint

 	yaw_pid.derr = 0;
@@ -235,7 +235,7 @@
   //////////////////////////////////
   // Depth Control Initialization //
   //////////////////////////////////
-	depth_pid.setpoint	= 2;		// Range-from-bottom setpoint (meters)
+	depth_pid.setpoint			= 2;		// Range-from-bottom setpoint (meters)
 	depth_pid.old				= 0;		// Initialize old depth
 	depth_pid.dt				= DT;		// Initialize depth controller time step


Added handles.clear()

Added handles.clear()

--- include/stx/handle.hpp
+++ include/stx/handle.hpp
@@ -40,6 +40,10 @@
 		m_handles.emplace_back(std::move(h));
 		return *this;
 	}
+
+	void clear() {
+		m_handles.clear();
+	}
 };

 } // namespace stx


bool improvements

bool improvements

Change-Id: Ic5d82c2361a79a19f6675db30ea06dde91123ac1


fix bug in reduce impl

fix bug in reduce impl

--- PthreadTest/CVTest2GlobalQueue.cpp
+++ PthreadTest/CVTest2GlobalQueue.cpp
@@ -20,15 +20,22 @@

 void *ThreadFunction(void *thread_label) {
     long thread_id = (long) thread_label;
-    pthread_mutex_lock(&mutex);
+
     long local_result = 1;
     while (!is_end) {
+        pthread_mutex_lock(&mutex);
         global_vec.push_back(local_result);
         if (global_vec.size() >= 2) {
+            vector<int> local_vec;
+            for (auto i = 0; i < 2; i++) {
+                local_vec.push_back(global_vec.back());
+                global_vec.erase(global_vec.end() - 1);
+            }
+            pthread_mutex_unlock(&mutex);
+            //Do the computation After release the lock
             local_result = 0;
-            for (auto i = 0; i < 2; i++) {
-                local_result += global_vec.back();
-                global_vec.erase(global_vec.end() - 1);
+            for (auto integer:local_vec) {
+                local_result += integer;
             }
         }
         else {
@@ -40,10 +47,13 @@
                 idle_count++;
                 while (pthread_cond_wait(&cond_var, &mutex) != 0);
             }
+            pthread_mutex_unlock(&mutex);
+
         }
     }
+#pragma omp critical
     cout << "Thread " << thread_id << " ready to exit" << endl;
-    pthread_mutex_unlock(&mutex);
+
     return NULL;
 }


ERR: Added error control to limit number of warnings.

--- include/vtkDecimate.hh
+++ include/vtkDecimate.hh
@@ -55,25 +55,29 @@
 // there are no edges radiating from the vertex that have a dihedral angle
 // greater than a user-specified edge angle (i.e., feature angle), and
 // topology is not altered, then that vertex is deleted. The resulting
-// hole is then patched by re-triangulation. The process creates over
+// hole is then patched by re-triangulation. The process continues over
 // the entire vertex list (this constitutes an iteration). Iterations
 // proceed until a target reduction is reached or a maximum iteration
 // count is exceeded.
-//
-// There are a number of additional parameters you can set to control the
-// decimation algorithm. The error may be increased over each iteration
-// with the error increment. Edge preservation may be disabled or enabled.
-// You can turn on/off edge vertex deletion. (Edge vertices are vertices that
-// lie along boundaries of meshes.) Sub iterations are iterations that are
-// performed without changing the decimation criterion. The aspect ratio
-// controls the shape of the triangles that are created, and is the ratio
-// of maximum edge length to minimum edge length. The degree is the number
-// of triangles using a single vertex. Vertices of high degree are considered
-// "complex" and are never deleted.
+//
+// There are a number of additional parameters you can set to control
+// the decimation algorithm. The Error ivar may be increased over each
+// iteration with the ErrorIncrement. (These two variables have the
+// largest effect.) Edge preservation (i.e., PreserveEdges ivar) may
+// be disabled or enabled. You can turn on/off edge vertex deletion
+// (i.e., BoundaryVertexDeletion ivar). (Edge vertices are vertices
+// that lie along boundaries of meshes.) Sub iterations are iterations
+// that are performed without changing the decimation criterion. The
+// AspectRatio ivar controls the shape of the triangles that are
+// created, and is the ratio of maximum edge length to minimum edge
+// length. The Degree is the number of triangles using a single
+// vertex. Vertices of high degree are considered "complex" and are
+// never deleted.
 //
 // This implementation has been adapted for a global error bound decimation
 // criterion. That is, the error is a global bound on distance to original
-// surface.
+// surface. This is an improvement over the original Siggraph paper ("Decimation
+// of Triangle Meshes", Proc Siggraph `92.)

 #ifndef __vtkDecimate_h
 #define __vtkDecimate_h
@@ -225,6 +229,13 @@
   vtkSetClampMacro(Degree,int,25,VTK_CELL_SIZE);
   vtkGetMacro(Degree,int);

+  // Description:
+  // Control the printout of warnings. This flag limits the number of warnings
+  // regarding non-manifold geometry and complex vertices. If set to zero, no
+  // warnings will appear.
+  vtkSetClampMacro(MaximumNumberOfSquawks,int,0,VTK_LARGE_INTEGER);
+  vtkGetMacro(MaximumNumberOfSquawks,int);
+
 protected:
   void Execute();

@@ -243,6 +254,7 @@
   int Degree; // maximum number of triangles incident on vertex
   int Stats[VTK_NUMBER_STATISTICS]; // keep track of interesting statistics
   int GenerateErrorScalars; // turn on/off vertex error scalar generation
+  int MaximumNumberOfSquawks; //control number of error messages

   void CreateOutput(int numPts, int numTris, int numEliminated,
                     vtkPointData *pd, vtkPoints *inPts);


Box::calc_event optimiert

Box::calc_event optimiert

--- Harte_Kugeln/src_sonstiges/Box.tpp
+++ Harte_Kugeln/src_sonstiges/Box.tpp
@@ -201,6 +201,13 @@
 			v_act_t[i] = (vec_abmessung[i] - pos[i]) / v[i];
 	}

+	timeT max_time = std::max(k1.collision_time(), k2.collision_time());
+	// needed for initialization
+	if (max_time == 0_s) {
+		v_res_t([&](const timeT& t){if(t > max_time) max_time = t;});
+		max_time = max_time * (double)versuche;
+	}
+
 	const auto d2 = Pow(k1.radius() + k2.radius(), 2, 1);
 	const auto d2v2 = d2 * v2;

@@ -210,7 +217,7 @@
 	auto sr2 = 0. *m*m *mps*mps;
 	const auto sr20 = 0. *m*m *mps*mps;

-	for (unsigned i = 0; i < versuche; t_ges += forward(
+	for (unsigned i = 0; t_ges < max_time && i < versuche; t_ges += forward(
 			pos, v, v_act_t, v_res_t, v_res_pos), ++i) {
 		r = pos - pos_2;
 		rv = r * v;


Partially revert recent constraints changes

--- libmesh/src/fe/fe_base.C
+++ libmesh/src/fe/fe_base.C
@@ -2087,6 +2087,10 @@
                   // vertex dofs to constrain via lexicographic
                   // ordering on point locations

+                  // FIXME: This code doesn't yet properly handle
+                  // cases where multiple different periodic BCs
+                  // intersect.
+                  /*
                   std::set<unsigned int> my_constrained_dofs;

 		  for (unsigned int n = 0; n != elem->n_nodes(); ++n)
@@ -2259,15 +2263,54 @@
                           (my_node->dof_number
                              (sys_number, variable_number, i));
                     }
+                  */
+
+                  // FIXME: old code for disambiguating periodic BCs:
+                  // this is not threadsafe nor safe to run on a
+                  // non-serialized mesh.
+                  std::vector<bool> recursive_constraint(n_side_dofs, false);
+
+	          for (unsigned int is = 0; is != n_side_dofs; ++is)
+	            {
+	              const unsigned int i = neigh_side_dofs[is];
+	              const unsigned int their_dof_g = neigh_dof_indices[i];
+                      libmesh_assert(their_dof_g != DofObject::invalid_id);
+
+		      {
+			Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
+
+                        if (!dof_map.is_constrained_dof(their_dof_g))
+                          continue;
+                      }
+
+                      DofConstraintRow& their_constraint_row =
+                        constraints[their_dof_g].first;
+
+	              for (unsigned int js = 0; js != n_side_dofs; ++js)
+	                {
+	                  const unsigned int j = my_side_dofs[js];
+	                  const unsigned int my_dof_g = my_dof_indices[j];
+                          libmesh_assert(my_dof_g != DofObject::invalid_id);
+
+                          if (their_constraint_row.count(my_dof_g))
+                            recursive_constraint[js] = true;
+	                }
+                    }
+

 	          for (unsigned int js = 0; js != n_side_dofs; ++js)
 	            {
+                      // FIXME: old code path
+                      if (recursive_constraint[js])
+                        continue;
+
 	              const unsigned int j = my_side_dofs[js];
 	              const unsigned int my_dof_g = my_dof_indices[j];
                       libmesh_assert(my_dof_g != DofObject::invalid_id);

-                      if (!my_constrained_dofs.count(my_dof_g))
-                        continue;
+                      // FIXME: new code path
+                      // if (!my_constrained_dofs.count(my_dof_g))
+                      //  continue;

 		      DofConstraintRow* constraint_row;

@@ -2293,9 +2336,17 @@

                           // Periodic constraints should never be
                           // self-constraints
-		          libmesh_assert(their_dof_g != my_dof_g);
+		          // libmesh_assert(their_dof_g != my_dof_g);

 		          const Real their_dof_value = Ue[is](js);
+
+		          if (their_dof_g == my_dof_g)
+		            {
+		              libmesh_assert(std::abs(their_dof_value-1.) < 1.e-5);
+		              for (unsigned int k = 0; k != n_side_dofs; ++k)
+		                libmesh_assert(k == is || std::abs(Ue[k](js)) < 1.e-5);
+		              continue;
+		            }

 		          if (std::abs(their_dof_value) < 10*TOLERANCE)
 		            continue;


client: do not start xcap renewal if one is already in progress. Fixes potential crash if second renewal returns and the file handle has been closed in the meantime.

git-svn-id: 4a24f560d5bb049edaa12cbc2145b2f5ee41c6a2@3625 f8528748-c2c0-11dd-ba5c-d3b7c2b3b534

--- cpp/src/libxtreemfs/file_handle_implementation.cpp
+++ cpp/src/libxtreemfs/file_handle_implementation.cpp
@@ -961,15 +961,26 @@
 void XCapManager::RenewXCapAsync(const RPCOptions& options) {
   // TODO(mberlin): Only renew after some time has elapsed.
   // TODO(mberlin): Cope with local clocks which have a high clock skew.
-  if (Logging::log->loggingActive(LEVEL_DEBUG)) {
+  {
+    boost::mutex::scoped_lock lock(mutex_);
+    if (xcap_renewal_pending_) {
+      if (Logging::log->loggingActive(LEVEL_DEBUG)) {
+        Logging::log->getLog(LEVEL_DEBUG)
+            << "XCap renew already in progress, ignoring. file_id: "
+            << GetFileId() << " Expiration in: "
+            << (xcap_.expire_time_s() - time(NULL))
+            << endl;
+      }
+      return;
+    }
+    xcap_renewal_pending_ = true;
+  }
+
+    if (Logging::log->loggingActive(LEVEL_DEBUG)) {
     Logging::log->getLog(LEVEL_DEBUG)
         << "Renew XCap for file_id: " << GetFileId()
         << " Expiration in: " << (xcap_.expire_time_s() - time(NULL))
         << endl;
-  }
-  {
-    boost::mutex::scoped_lock lock(mutex_);
-    xcap_renewal_pending_ = true;
   }

   XCap xcap;


added a name field to cgisession to identify which app set that session this is just for convenience in debugging and so on.

--- code/session.cgi.cc
+++ code/session.cgi.cc
@@ -132,8 +132,9 @@
   } while(db.fetchRow());

   db.query("delete from cgisession where account_id=%i", account_id);
-  db.query("insert into cgisession values ('%s', %i, %i, %i)",
-	   session_id.c_str(), account_id, duration, time(NULL));
+  db.query("insert into cgisession values ('%s', %i, %i, %i, '%s')",
+	   session_id.c_str(), account_id, duration,
+	   time(NULL), cookiename.c_str());
 }


ERR: Was not passing cell data.

ERR: Was not passing cell data.

--- graphics/vtkStructuredPointsGeometryFilter.cxx
+++ graphics/vtkStructuredPointsGeometryFilter.cxx
@@ -112,7 +112,7 @@
       outPD->CopyData(pd,startIdx,ptIds[0]);

       cellId = newVerts->InsertNextCell(1,ptIds);
-      outCD->CopyData(cd,startIdx,ptIds[0]);
+      outCD->CopyData(cd,startIdx,cellId);
       break;

     case 1: // --------------------- build line -----------------------


Threading working 100%

Threading working 100%

--- project/Benji/kinect.cpp
+++ project/Benji/kinect.cpp
@@ -38,7 +38,6 @@
 #include <vector>
 #include <ctime>
 #include <boost/thread/thread.hpp>
-#include <boost/thread/mutex.hpp>
 #include "pcl/common/common_headers.h"
 #include "pcl/common/eigen.h"
 #include "pcl/common/transforms.h"
@@ -160,19 +159,17 @@
 	boost::mutex::scoped_lock lock(mtx);
   while (!viewer->wasStopped ())
   {
-    viewer->spinOnce ();
-		printf("waiting on lock\n");
 		while(!data_rdy)
     	condition.wait(lock);
+    viewer->spinOnce ();
     if(vis_cloud){
 			printf("vis_cloud\n");
       pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud;
       vis_cloud.swap(cloud);
-
       if(!viewer->updatePointCloud (cloud, "Kinect Cloud")){
-	viewer->addPointCloud<pcl::PointXYZRGB> (cloud, "Kinect Cloud");
-	viewer->setPointCloudRenderingProperties
-	  (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "Kinect Cloud");
+				viewer->addPointCloud<pcl::PointXYZRGB> (cloud, "Kinect Cloud");
+				viewer->setPointCloudRenderingProperties
+	  			(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "Kinect Cloud");
       }
     }
     if(vis_meshes){
@@ -262,7 +259,7 @@
   glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
   glEnable(GL_DEPTH_TEST);
   glutInitWindowSize(600,600);
-  glutInitWindowPosition(100, 100);
+  glutInitWindowPosition(100, 500);
   glutCreateWindow("Final OpenGL");

   glutDisplayFunc(display);
@@ -370,12 +367,7 @@
   proj.setModelType (pcl::SACMODEL_PLANE);

   printf("Start the main loop.\n");
-	thrd2.interrupt();
-	printf("Thread2 interrupted\n");
   while (GO){
-			printf("top of main loop\n");
-			thrd2.interrupt();
-
 			device->updateState();
       device->getDepth(mdepth);
       device->getRGB(mrgb);


Update pwm.cpp

Update pwm.cpp

--- pi/pwm.cpp
+++ pi/pwm.cpp
@@ -52,7 +52,7 @@
 		clock_t finish = clock() + time_to_complete * CLOCKS_PER_SEC;
 		while (clock() < finish) {
 			// pulse for however long we need to to achieve brightness.
-				cout << sin((PI/2) * (1/time_to_complete)) << endl;
+				cout << sin((PI/2) * (1/clock())) << endl;
 				Pulse(out1, sin((PI/2) * (1/time_to_complete)));
 				Wait(sin((PI/2) * (1/time_to_complete)));
 		}


Fix windows compile

Fix windows compile

git-svn-id: 6cc2fa9b7d2830c930c171b991ffcd5e23f23d5e@1519 1509560c-5e2a-0410-865c-31c25e1cfdef

--- project/sdl/SDLSound.cpp
+++ project/sdl/SDLSound.cpp
@@ -163,7 +163,9 @@
       int pos = mDynamicFillPos & (BUF_SIZE-1);
       mDynamicFillPos += floats;

-      int first = std::min( floats, BUF_SIZE-pos );
+      int first = BUF_SIZE-pos;
+      if (floats<first)
+         first = floats;
       for(int i=0;i<first;i++)
          mDynamicBuffer[pos+i] = *buffer++ * 16385;

@@ -216,7 +218,7 @@

    double getDataPosition()
    {
-      int pos = (sSoundPos-mDynamicStartPos)*1000.0/mFrequency;
+      return (sSoundPos-mDynamicStartPos)*1000.0/mFrequency;
    }
    bool needsData()
    {


* [Cerberus] More debug output.

* [Cerberus] More debug output.

--- examples/cerberus/render.cpp
+++ examples/cerberus/render.cpp
@@ -258,12 +258,12 @@
                           << hadesmem::ErrorCodeWinLast{last_error});
     }

-    HADESMEM_DETAIL_TRACE_FORMAT_A(
-      "Saving current clip cursor: Left [%ld] Top [%ld] Right [%ld] Bottom [%ld]",
-      clip_cursor.left,
-      clip_cursor.top,
-      clip_cursor.right,
-      clip_cursor.bottom);
+    HADESMEM_DETAIL_TRACE_FORMAT_A("Saving current clip cursor: Left [%ld] Top "
+                                   "[%ld] Right [%ld] Bottom [%ld]",
+                                   clip_cursor.left,
+                                   clip_cursor.top,
+                                   clip_cursor.right,
+                                   clip_cursor.bottom);

     auto& old_clip_cursor = GetOldClipCursor();
     old_clip_cursor = clip_cursor;
@@ -288,6 +288,13 @@
     auto const ensure_reset_clip_cursor_hook_flag =
       hadesmem::detail::MakeScopeWarden(reset_clip_cursor_hook_flag_fn);

+    HADESMEM_DETAIL_TRACE_FORMAT_A(
+      "Setting new clip cursor: Left [%ld] Top [%ld] Right [%ld] Bottom [%ld]",
+      new_clip_cursor.left,
+      new_clip_cursor.top,
+      new_clip_cursor.right,
+      new_clip_cursor.bottom);
+
     if (!::ClipCursor(&new_clip_cursor))
     {
       DWORD const last_error = ::GetLastError();
@@ -310,19 +317,19 @@

     auto& clip_cursor = GetOldClipCursor();

-    HADESMEM_DETAIL_TRACE_FORMAT_A(
-      "Restoring old clip cursor: Left [%ld] Top [%ld] Right [%ld] Bottom [%ld]",
-      clip_cursor.left,
-      clip_cursor.top,
-      clip_cursor.right,
-      clip_cursor.bottom);
+    HADESMEM_DETAIL_TRACE_FORMAT_A("Restoring old clip cursor: Left [%ld] Top "
+                                   "[%ld] Right [%ld] Bottom [%ld]",
+                                   clip_cursor.left,
+                                   clip_cursor.top,
+                                   clip_cursor.right,
+                                   clip_cursor.bottom);

     if (!::ClipCursor(&clip_cursor))
     {
       DWORD const last_error = ::GetLastError();
       HADESMEM_DETAIL_THROW_EXCEPTION(
-        hadesmem::Error{} << hadesmem::ErrorString{ "ClipCursor failed." }
-      << hadesmem::ErrorCodeWinLast{ last_error });
+        hadesmem::Error{} << hadesmem::ErrorString{"ClipCursor failed."}
+                          << hadesmem::ErrorCodeWinLast{last_error});
     }
   }


revert #401 as while it does surpress hieght painting touching the center of terrains, it also locks out terrain painting dragging

--- Engine/source/gui/worldEditor/terrainEditor.cpp
+++ Engine/source/gui/worldEditor/terrainEditor.cpp
@@ -1897,9 +1897,6 @@
       selChanged = gMouse != gLastMouse;
    }

-   if ( mMouseDown )
-      return;
-
    mCurrentAction->process( mMouseBrush, event, true, TerrainAction::Update );
 }


Flips conditionals to ensure 65802 safety.

--- Machines/Oric/Oric.cpp
+++ Machines/Oric/Oric.cpp
@@ -413,7 +413,7 @@
 		// to satisfy CPU::MOS6502::BusHandler
 		forceinline Cycles perform_bus_operation(CPU::MOS6502::BusOperation operation, uint16_t address, uint8_t *value) {
 			if(address > ram_top_) {
-				if(isReadOperation(operation)) *value = paged_rom_[address - ram_top_ - 1];
+				if(!isWriteOperation(operation)) *value = paged_rom_[address - ram_top_ - 1];

 				// 024D = 0 => fast; otherwise slow
 				// E6C9 = read byte: return byte in A
@@ -432,39 +432,39 @@
 			} else {
 				if((address & 0xff00) == 0x0300) {
 					if(address < 0x0310 || (disk_interface == DiskInterface::None)) {
-						if(isReadOperation(operation)) *value = via_.read(address);
+						if(!isWriteOperation(operation)) *value = via_.read(address);
 						else via_.write(address, *value);
 					} else {
 						switch(disk_interface) {
 							default: break;
 							case DiskInterface::BD500:
-								if(isReadOperation(operation)) *value = bd500_.read(address);
+								if(!isWriteOperation(operation)) *value = bd500_.read(address);
 								else bd500_.write(address, *value);
 							break;
 							case DiskInterface::Jasmin:
 								if(address >= 0x3f4) {
-									if(isReadOperation(operation)) *value = jasmin_.read(address);
+									if(!isWriteOperation(operation)) *value = jasmin_.read(address);
 									else jasmin_.write(address, *value);
 								}
 							break;
 							case DiskInterface::Microdisc:
 								switch(address) {
 									case 0x0310: case 0x0311: case 0x0312: case 0x0313:
-										if(isReadOperation(operation)) *value = microdisc_.read(address);
+										if(!isWriteOperation(operation)) *value = microdisc_.read(address);
 										else microdisc_.write(address, *value);
 									break;
 									case 0x314: case 0x315: case 0x316: case 0x317:
-										if(isReadOperation(operation)) *value = microdisc_.get_interrupt_request_register();
+										if(!isWriteOperation(operation)) *value = microdisc_.get_interrupt_request_register();
 										else microdisc_.set_control_register(*value);
 									break;
 									case 0x318: case 0x319: case 0x31a: case 0x31b:
-										if(isReadOperation(operation)) *value = microdisc_.get_data_request_register();
+										if(!isWriteOperation(operation)) *value = microdisc_.get_data_request_register();
 									break;
 								}
 							break;
 							case DiskInterface::Pravetz:
 								if(address >= 0x0320) {
-									if(isReadOperation(operation)) *value = pravetz_rom_[pravetz_rom_base_pointer_ + (address & 0xff)];
+									if(!isWriteOperation(operation)) *value = pravetz_rom_[pravetz_rom_base_pointer_ + (address & 0xff)];
 									else {
 										switch(address) {
 											case 0x380:	case 0x381:	case 0x382:	case 0x383:
@@ -476,13 +476,13 @@
 								} else {
 									flush_diskii();
 									const int disk_value = diskii_.read_address(address);
-									if(isReadOperation(operation) && disk_value != diskii_.DidNotLoad) *value = uint8_t(disk_value);
+									if(!isWriteOperation(operation) && disk_value != diskii_.DidNotLoad) *value = uint8_t(disk_value);
 								}
 							break;
 						}
 					}
 				} else {
-					if(isReadOperation(operation))
+					if(!isWriteOperation(operation))
 						*value = ram_[address];
 					else {
 						if(address >= 0x9800 && address <= 0xc000) update_video();


Changed linkage, namespace inclusion of rvalue

--- rvalue.cpp
+++ rvalue.cpp
@@ -4,7 +4,7 @@

 using namespace std;

-jl_value_t *rPrimitive(const nj::Primitive &prim)
+static jl_value_t *rPrimitive(const nj::Primitive &prim)
 {
    jl_value_t *res = 0;

@@ -100,7 +100,7 @@
    return res;
 }

-template<typename V,typename E> jl_array_t *rArray(const shared_ptr<nj::Value> &array,jl_datatype_t *jl_element_type)
+template<typename V,typename E> static jl_array_t *rArray(const shared_ptr<nj::Value> &array,jl_datatype_t *jl_element_type)
 {
    const nj::Array<V,E> &a = static_cast<nj::Array<V,E>&>(*array);
    jl_value_t *jl_atype = jl_apply_array_type(jl_element_type,a.dims().size());
@@ -113,7 +113,7 @@
 }

-jl_array_t *rArray(const shared_ptr<nj::Value> &array)
+static jl_array_t *rArray(const shared_ptr<nj::Value> &array)
 {
    jl_array_t *res = 0;
    const nj::Array_t *atype = static_cast<const nj::Array_t*>(array->type());
@@ -135,7 +135,7 @@
    return res;
 }

-jl_value_t *rvalue(const shared_ptr<nj::Value> &value)
+jl_value_t *nj::rvalue(const shared_ptr<nj::Value> &value)
 {
    if(value->isPrimitive())
    {