/* Copyright (c) 2010, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * 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.
 *
 */

struct reg_struct_init vx6953_reg_init[1] = {
	{
		10,			/*REG = 0x0112 , 10 bit */
		10,			/*REG = 0x0113*/
		9,			/*REG = 0x0301 vt_pix_clk_div*/
		4,		/*REG = 0x0305 pre_pll_clk_div*/
		133,		/*REG = 0x0307 pll_multiplier*/
		10,		/*REG = 0x0309 op_pix_clk_div*/
		0x08,		/*REG = 0x3030*/
		0x02,		/*REG = 0x0111*/
		0x01,		/*REG = 0x0b00 ,lens shading off */
		0x30,		/*REG = 0x3001*/
		0x33,		/*REG = 0x3004*/
		0x09,		/*REG = 0x3007*/
		0x1F,		/*REG = 0x3016*/
		0x03,		/*REG = 0x301d*/
		0x11,		/*REG = 0x317E*/
		0x09,		/*REG = 0x317F*/
		0x38,		/*REG = 0x3400*/
		0x00,		/*REG_0x0b06*/
		0x80,		/*REG_0x0b07*/
		0x01,		/*REG_0x0b08*/
		0x4F,		/*REG_0x0b09*/
		0x18,		/*REG_0x0136*/
		0x00,		/*/REG_0x0137*/
		0x20,		/*REG = 0x0b83*/
		0x90,		/*REG = 0x0b84*/
		0x20,		/*REG = 0x0b85*/
		0x80,		/*REG = 0x0b88*/
		0x00,		/*REG = 0x0b89*/
		0x00,		/*REG = 0x0b8a*/
	}
};
struct reg_struct vx6953_reg_pat[2] = {
	{/* Preview */
		0x03,	/*REG = 0x0202 coarse integration_time_hi*/
		0xd0,	/*REG = 0x0203 coarse_integration_time_lo*/
		0xc0,	/*REG = 0x0205 analogue_gain_code_global*/
		0x03,	/*REG = 0x0340 frame_length_lines_hi*/
		0xf0,	/*REG = 0x0341 frame_length_lines_lo*/
		0x0b,	/*REG = 0x0342  line_length_pck_hi*/
		0x74,	/*REG = 0x0343  line_length_pck_lo*/
		0x03,	/*REG = 0x3005*/
		0x00,	/*REG = 0x3010*/
		0x01,	/*REG = 0x3011*/
		0x6a,	/*REG = 0x301a*/
		0x03,	/*REG = 0x3035*/
		0x2c,	/*REG = 0x3036*/
		0x00,	/*REG = 0x3041*/
		0x24,	/*REG = 0x3042*/
		0x81,	/*REG = 0x3045*/
		0x02,	/*REG = 0x0b80 edof estimate*/
		0x01,	/*REG = 0x0900*/
		0x22,	/*REG = 0x0901*/
		0x04,	/*REG = 0x0902*/
		0x03,	/*REG = 0x0383*/
		0x03,	/*REG = 0x0387*/
		0x05,	/*REG = 0x034c*/
		0x18,	/*REG = 0x034d*/
		0x03,	/*REG = 0x034e*/
		0xd4,	/*REG = 0x034f*/
		0x02,	/*0x1716*/
		0x04,	/*0x1717*/
		0x08,	/*0x1718*/
		0x2c,	/*0x1719*/
		0x01,   /*0x3210*/
		0x02,   /*0x111*/
		0x01,   /*0x3410*/
		0x01,   /*0x3098*/
		0x05,   /*0x309D*/
		0x02,
		0x04,
	},
	{ /* Snapshot */
		0x07,/*REG = 0x0202 coarse_integration_time_hi*/
		0x00,/*REG = 0x0203 coarse_integration_time_lo*/
		0xc0,/*REG = 0x0205 analogue_gain_code_global*/
		0x07,/*REG = 0x0340 frame_length_lines_hi*/
		0xd0,/*REG = 0x0341 frame_length_lines_lo*/
		0x0b,/*REG = 0x0342 line_length_pck_hi*/
		0x8c,/*REG = 0x0343 line_length_pck_lo*/
		0x01,/*REG = 0x3005*/
		0x00,/*REG = 0x3010*/
		0x00,/*REG = 0x3011*/
		0x55,/*REG = 0x301a*/
		0x01,/*REG = 0x3035*/
		0x23,/*REG = 0x3036*/
		0x00,/*REG = 0x3041*/
		0x24,/*REG = 0x3042*/
		0xb7,/*REG = 0x3045*/
		0x01,/*REG = 0x0b80 edof application*/
		0x00,/*REG = 0x0900*/
		0x00,/*REG = 0x0901*/
		0x00,/*REG = 0x0902*/
		0x01,/*REG = 0x0383*/
		0x01,/*REG = 0x0387*/
		0x0A,/*REG = 0x034c*/
		0x30,/*REG = 0x034d*/
		0x07,/*REG = 0x034e*/
		0xA8,/*REG = 0x034f*/
		0x02,/*0x1716*/
		0x0d,/*0x1717*/
		0x07,/*0x1718*/
		0x7d,/*0x1719*/
		0x01,/*0x3210*/
		0x02,/*0x111*/
		0x01,/*0x3410*/
		0x01,/*0x3098*/
		0x05, /*0x309D*/
		0x02,
		0x00,
	}
};

struct vx6953_reg vx6953_regs = {
	.reg_pat_init = &vx6953_reg_init[0],
	.reg_pat = &vx6953_reg_pat[0],
};

{'repo_name': 'franciscofranco/hammerhead', 'stars': '122', 'repo_language': 'C', 'file_name': 'impa7.c', 'mime_type': 'text/x-c', 'hash': 5376786118257092409, 'source_dataset': 'data'}


---
 dumapp.cpp |   12 ++++--------
 dumapp.h   |   13 +++++++++----
 2 files changed, 13 insertions(+), 12 deletions(-)

--- a/dumapp.cpp
+++ b/dumapp.cpp
@@ -189,8 +189,7 @@
  * Single object form, no debug information
  * (11) = (a) ; ASW
  */
-void * DUMA_CDECL operator new( DUMA_SIZE_T size )
-throw(std::bad_alloc)
+void * DUMA_CDECL operator new( DUMA_SIZE_T size ) NEW_THROW_SPEC
 {
   return duma_new_operator(size, EFA_NEW_ELEM, true  DUMA_PARAMS_UK);
 }
@@ -253,8 +252,7 @@
  * Array object form, no debug information
  * (21) = (a) ; AAW
  */
-void * DUMA_CDECL operator new[]( DUMA_SIZE_T size )
-throw(std::bad_alloc)
+void * DUMA_CDECL operator new[]( DUMA_SIZE_T size ) NEW_THROW_SPEC
 {
   return duma_new_operator(size, EFA_NEW_ARRAY, true  DUMA_PARAMS_UK);
 }
@@ -320,8 +318,7 @@
  * Single object form with debug information
  * (31) = (a) ; ASW
  */
-void * DUMA_CDECL operator new( DUMA_SIZE_T size, const char *filename, int lineno )
-throw( std::bad_alloc )
+void * DUMA_CDECL operator new( DUMA_SIZE_T size, const char *filename, int lineno ) NEW_THROW_SPEC
 {
   return duma_new_operator(size, EFA_NEW_ELEM, true  DUMA_PARAMS_FILELINE);
 }
@@ -373,8 +370,7 @@
  * Array object form with debug information
  * (41) = (a) ; AAW
  */
-void * DUMA_CDECL operator new[]( DUMA_SIZE_T size, const char *filename, int lineno )
-throw( std::bad_alloc )
+void * DUMA_CDECL operator new[]( DUMA_SIZE_T size, const char *filename, int lineno ) NEW_THROW_SPEC
 {
   return duma_new_operator(size, EFA_NEW_ARRAY, true  DUMA_PARAMS_FILELINE);
 }
--- a/dumapp.h
+++ b/dumapp.h
@@ -64,6 +64,11 @@
   #endif
 #endif

+#if __cplusplus <= 199711L
+#define NEW_THROW_SPEC throw(std::bad_alloc)
+#else
+#define NEW_THROW_SPEC
+#endif

 #ifndef DUMA_NO_CPP_SUPPORT

@@ -81,7 +86,7 @@
     /* (12) = (b) ; ASN */
     /* (13) = (c) ; FSW */
     /* (14) = (d) ; FSN */
-    void * DUMA_CDECL operator new(DUMA_SIZE_T) throw(std::bad_alloc);
+    void * DUMA_CDECL operator new(DUMA_SIZE_T) NEW_THROW_SPEC;
     void * DUMA_CDECL operator new(DUMA_SIZE_T, const std::nothrow_t &) throw();
     void   DUMA_CDECL operator delete(void *) throw();
     void   DUMA_CDECL operator delete(void *, const std::nothrow_t &)   throw();
@@ -91,7 +96,7 @@
     /* (22) = (b) ; AAN */
     /* (23) = (c) ; FAW */
     /* (24) = (d) ; FAN */
-    void * DUMA_CDECL operator new[](DUMA_SIZE_T) throw(std::bad_alloc);
+    void * DUMA_CDECL operator new[](DUMA_SIZE_T) NEW_THROW_SPEC;
     void * DUMA_CDECL operator new[](DUMA_SIZE_T, const std::nothrow_t &) throw();
     void   DUMA_CDECL operator delete[](void *) throw();
     void   DUMA_CDECL operator delete[](void *, const std::nothrow_t &)   throw();
@@ -103,7 +108,7 @@
       /* (32) = (b) ; ASN */
       /* (33) = (c) ; FSW */
       /* (34) = (d) ; FSN */
-      void * DUMA_CDECL operator new(DUMA_SIZE_T, const char *, int) throw(std::bad_alloc);
+      void * DUMA_CDECL operator new(DUMA_SIZE_T, const char *, int) NEW_THROW_SPEC;
       void * DUMA_CDECL operator new(DUMA_SIZE_T, const std::nothrow_t &, const char *, int) throw();
       void   DUMA_CDECL operator delete(void *, const char *, int) throw();
       void   DUMA_CDECL operator delete(void *, const std::nothrow_t &, const char *, int) throw();
@@ -113,7 +118,7 @@
       /* (42) = (b) ; AAN */
       /* (43) = (c) ; FAW */
       /* (44) = (d) ; FAN */
-      void * DUMA_CDECL operator new[](DUMA_SIZE_T, const char *, int) throw(std::bad_alloc);
+      void * DUMA_CDECL operator new[](DUMA_SIZE_T, const char *, int) NEW_THROW_SPEC;
       void * DUMA_CDECL operator new[](DUMA_SIZE_T, const std::nothrow_t &, const char *, int) throw();
       void   DUMA_CDECL operator delete[](void *, const char *, int) throw();
       void   DUMA_CDECL operator delete[](void *, const std::nothrow_t &, const char *, int) throw();

{'repo_name': 'hanwckf/rt-n56u', 'stars': '1587', 'repo_language': 'C', 'file_name': 'ak4396.h', 'mime_type': 'text/x-c', 'hash': 3495495365071743016, 'source_dataset': 'data'}


<?xml version="1.0" encoding="iso-8859-1"?>

<project>
  <fileVersion>2</fileVersion>
  <configuration>
    <name>Debug</name>
    <toolchain>
      <name>ARM</name>
    </toolchain>
    <debug>1</debug>
    <settings>
      <name>General</name>
      <archiveVersion>3</archiveVersion>
      <data>
        <version>22</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>1</debug>
        <option>
          <name>ExePath</name>
          <state>Debug\Exe</state>
        </option>
        <option>
          <name>ObjPath</name>
          <state>Debug\Obj</state>
        </option>
        <option>
          <name>ListPath</name>
          <state>Debug\List</state>
        </option>
        <option>
          <name>Variant</name>
          <version>21</version>
          <state>38</state>
        </option>
        <option>
          <name>GEndianMode</name>
          <state>0</state>
        </option>
        <option>
          <name>Input variant</name>
          <version>3</version>
          <state>1</state>
        </option>
        <option>
          <name>Input description</name>
          <state>Full formatting.</state>
        </option>
        <option>
          <name>Output variant</name>
          <version>2</version>
          <state>1</state>
        </option>
        <option>
          <name>Output description</name>
          <state>Full formatting.</state>
        </option>
        <option>
          <name>GOutputBinary</name>
          <state>0</state>
        </option>
        <option>
          <name>FPU</name>
          <version>2</version>
          <state>0</state>
        </option>
        <option>
          <name>OGCoreOrChip</name>
          <state>1</state>
        </option>
        <option>
          <name>GRuntimeLibSelect</name>
          <version>0</version>
          <state>2</state>
        </option>
        <option>
          <name>GRuntimeLibSelectSlave</name>
          <version>0</version>
          <state>2</state>
        </option>
        <option>
          <name>RTDescription</name>
          <state>Use the full configuration of the C/C++ runtime library. Full locale interface, C locale, file descriptor support, multibytes in printf and scanf, and hex floats in strtod.</state>
        </option>
        <option>
          <name>OGProductVersion</name>
          <state>5.10.0.159</state>
        </option>
        <option>
          <name>OGLastSavedByProductVersion</name>
          <state>7.20.1.7306</state>
        </option>
        <option>
          <name>GeneralEnableMisra</name>
          <state>0</state>
        </option>
        <option>
          <name>GeneralMisraVerbose</name>
          <state>0</state>
        </option>
        <option>
          <name>OGChipSelectEditMenu</name>
          <state>STM32F411RE	ST STM32F411RE</state>
        </option>
        <option>
          <name>GenLowLevelInterface</name>
          <state>1</state>
        </option>
        <option>
          <name>GEndianModeBE</name>
          <state>1</state>
        </option>
        <option>
          <name>OGBufferedTerminalOutput</name>
          <state>0</state>
        </option>
        <option>
          <name>GenStdoutInterface</name>
          <state>0</state>
        </option>
        <option>
          <name>GeneralMisraRules98</name>
          <version>0</version>
          <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
        </option>
        <option>
          <name>GeneralMisraVer</name>
          <state>0</state>
        </option>
        <option>
          <name>GeneralMisraRules04</name>
          <version>0</version>
          <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
        </option>
        <option>
          <name>RTConfigPath2</name>
          <state>$TOOLKIT_DIR$\INC\c\DLib_Config_Full.h</state>
        </option>
        <option>
          <name>GFPUCoreSlave</name>
          <version>21</version>
          <state>38</state>
        </option>
        <option>
          <name>GBECoreSlave</name>
          <version>21</version>
          <state>38</state>
        </option>
        <option>
          <name>OGUseCmsis</name>
          <state>0</state>
        </option>
        <option>
          <name>OGUseCmsisDspLib</name>
          <state>0</state>
        </option>
        <option>
          <name>GRuntimeLibThreads</name>
          <state>0</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>ICCARM</name>
      <archiveVersion>2</archiveVersion>
      <data>
        <version>31</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>1</debug>
        <option>
          <name>CCOptimizationNoSizeConstraints</name>
          <state>0</state>
        </option>
        <option>
          <name>CCDefines</name>
          {% for s in symbols %}
            <state>{{s}}</state>
          {% endfor %}
        </option>
        <option>
          <name>CCPreprocFile</name>
          <state>0</state>
        </option>
        <option>
          <name>CCPreprocComments</name>
          <state>0</state>
        </option>
        <option>
          <name>CCPreprocLine</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListCFile</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListCMnemonics</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListCMessages</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListAssFile</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListAssSource</name>
          <state>0</state>
        </option>
        <option>
          <name>CCEnableRemarks</name>
          <state>0</state>
        </option>
        <option>
          <name>CCDiagSuppress</name>
          <state>Pa050,Pa084,Pa093,Pa082</state>
        </option>
        <option>
          <name>CCDiagRemark</name>
          <state></state>
        </option>
        <option>
          <name>CCDiagWarning</name>
          <state></state>
        </option>
        <option>
          <name>CCDiagError</name>
          <state></state>
        </option>
        <option>
          <name>CCObjPrefix</name>
          <state>1</state>
        </option>
        <option>
          <name>CCAllowList</name>
          <version>1</version>
          <state>00000000</state>
        </option>
        <option>
          <name>CCDebugInfo</name>
          <state>1</state>
        </option>
        <option>
          <name>IEndianMode</name>
          <state>1</state>
        </option>
        <option>
          <name>IProcessor</name>
          <state>1</state>
        </option>
        <option>
          <name>IExtraOptionsCheck</name>
          <state>0</state>
        </option>
        <option>
          <name>IExtraOptions</name>
          <state></state>
        </option>
        <option>
          <name>CCLangConformance</name>
          <state>0</state>
        </option>
        <option>
          <name>CCSignedPlainChar</name>
          <state>1</state>
        </option>
        <option>
          <name>CCRequirePrototypes</name>
          <state>0</state>
        </option>
        <option>
          <name>CCMultibyteSupport</name>
          <state>0</state>
        </option>
        <option>
          <name>CCDiagWarnAreErr</name>
          <state>0</state>
        </option>
        <option>
          <name>CCCompilerRuntimeInfo</name>
          <state>0</state>
        </option>
        <option>
          <name>IFpuProcessor</name>
          <state>1</state>
        </option>
        <option>
          <name>OutputFile</name>
          <state>$FILE_BNAME$.o</state>
        </option>
        <option>
          <name>CCLibConfigHeader</name>
          <state>1</state>
        </option>
        <option>
          <name>PreInclude</name>
          <state></state>
        </option>
        <option>
          <name>CompilerMisraOverride</name>
          <state>0</state>
        </option>
        <option>
          <name>CCIncludePath2</name>
        {% for path in include_paths %}
          <state>$PROJ_DIR$\{{path}}</state>
        {% endfor %}
        </option>
        <option>
          <name>CCStdIncCheck</name>
          <state>0</state>
        </option>
        <option>
          <name>CCCodeSection</name>
          <state>.text</state>
        </option>
        <option>
          <name>IInterwork2</name>
          <state>0</state>
        </option>
        <option>
          <name>IProcessorMode2</name>
          <state>1</state>
        </option>
        <option>
          <name>CCOptLevel</name>
          <state>0</state>
        </option>
        <option>
          <name>CCOptStrategy</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>CCOptLevelSlave</name>
          <state>0</state>
        </option>
        <option>
          <name>CompilerMisraRules98</name>
          <version>0</version>
          <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
        </option>
        <option>
          <name>CompilerMisraRules04</name>
          <version>0</version>
          <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
        </option>
        <option>
          <name>CCPosIndRopi</name>
          <state>0</state>
        </option>
        <option>
          <name>CCPosIndRwpi</name>
          <state>0</state>
        </option>
        <option>
          <name>CCPosIndNoDynInit</name>
          <state>0</state>
        </option>
        <option>
          <name>IccLang</name>
          <state>2</state>
        </option>
        <option>
          <name>IccCDialect</name>
          <state>1</state>
        </option>
        <option>
          <name>IccAllowVLA</name>
          <state>1</state>
        </option>
        <option>
          <name>IccCppDialect</name>
          <state>2</state>
        </option>
        <option>
          <name>IccExceptions</name>
          <state>0</state>
        </option>
        <option>
          <name>IccRTTI</name>
          <state>0</state>
        </option>
        <option>
          <name>IccStaticDestr</name>
          <state>1</state>
        </option>
        <option>
          <name>IccCppInlineSemantics</name>
          <state>0</state>
        </option>
        <option>
          <name>IccCmsis</name>
          <state>1</state>
        </option>
        <option>
          <name>IccFloatSemantics</name>
          <state>1</state>
        </option>
        <option>
          <name>CCNoLiteralPool</name>
          <state>0</state>
        </option>
        <option>
          <name>CCOptStrategySlave</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>CCGuardCalls</name>
          <state>1</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>AARM</name>
      <archiveVersion>2</archiveVersion>
      <data>
        <version>9</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>1</debug>
        <option>
          <name>AObjPrefix</name>
          <state>1</state>
        </option>
        <option>
          <name>AEndian</name>
          <state>1</state>
        </option>
        <option>
          <name>ACaseSensitivity</name>
          <state>1</state>
        </option>
        <option>
          <name>MacroChars</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>AWarnEnable</name>
          <state>0</state>
        </option>
        <option>
          <name>AWarnWhat</name>
          <state>0</state>
        </option>
        <option>
          <name>AWarnOne</name>
          <state></state>
        </option>
        <option>
          <name>AWarnRange1</name>
          <state></state>
        </option>
        <option>
          <name>AWarnRange2</name>
          <state></state>
        </option>
        <option>
          <name>ADebug</name>
          <state>1</state>
        </option>
        <option>
          <name>AltRegisterNames</name>
          <state>0</state>
        </option>
        <option>
          <name>ADefines</name>
          <state></state>
        </option>
        <option>
          <name>AList</name>
          <state>0</state>
        </option>
        <option>
          <name>AListHeader</name>
          <state>1</state>
        </option>
        <option>
          <name>AListing</name>
          <state>1</state>
        </option>
        <option>
          <name>Includes</name>
          <state>0</state>
        </option>
        <option>
          <name>MacDefs</name>
          <state>0</state>
        </option>
        <option>
          <name>MacExps</name>
          <state>1</state>
        </option>
        <option>
          <name>MacExec</name>
          <state>0</state>
        </option>
        <option>
          <name>OnlyAssed</name>
          <state>0</state>
        </option>
        <option>
          <name>MultiLine</name>
          <state>0</state>
        </option>
        <option>
          <name>PageLengthCheck</name>
          <state>0</state>
        </option>
        <option>
          <name>PageLength</name>
          <state>80</state>
        </option>
        <option>
          <name>TabSpacing</name>
          <state>8</state>
        </option>
        <option>
          <name>AXRef</name>
          <state>0</state>
        </option>
        <option>
          <name>AXRefDefines</name>
          <state>0</state>
        </option>
        <option>
          <name>AXRefInternal</name>
          <state>0</state>
        </option>
        <option>
          <name>AXRefDual</name>
          <state>0</state>
        </option>
        <option>
          <name>AProcessor</name>
          <state>1</state>
        </option>
        <option>
          <name>AFpuProcessor</name>
          <state>1</state>
        </option>
        <option>
          <name>AOutputFile</name>
          <state>$FILE_BNAME$.o</state>
        </option>
        <option>
          <name>AMultibyteSupport</name>
          <state>0</state>
        </option>
        <option>
          <name>ALimitErrorsCheck</name>
          <state>0</state>
        </option>
        <option>
          <name>ALimitErrorsEdit</name>
          <state>100</state>
        </option>
        <option>
          <name>AIgnoreStdInclude</name>
          <state>1</state>
        </option>
        <option>
          <name>AUserIncludes</name>
          <state></state>
        </option>
        <option>
          <name>AExtraOptionsCheckV2</name>
          <state>0</state>
        </option>
        <option>
          <name>AExtraOptionsV2</name>
          <state></state>
        </option>
        <option>
          <name>AsmNoLiteralPool</name>
          <state>0</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>OBJCOPY</name>
      <archiveVersion>0</archiveVersion>
      <data>
        <version>1</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>1</debug>
        <option>
          <name>OOCOutputFormat</name>
          <version>2</version>
          <state>2</state>
        </option>
        <option>
          <name>OCOutputOverride</name>
          <state>0</state>
        </option>
        <option>
          <name>OOCOutputFile</name>
          <state>{{name}}.bin</state>
        </option>
        <option>
          <name>OOCCommandLineProducer</name>
          <state>1</state>
        </option>
        <option>
          <name>OOCObjCopyEnable</name>
          <state>1</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>CUSTOM</name>
      <archiveVersion>3</archiveVersion>
      <data>
        <extensions></extensions>
        <cmdline></cmdline>
      </data>
    </settings>
    <settings>
      <name>BICOMP</name>
      <archiveVersion>0</archiveVersion>
      <data/>
    </settings>
    <settings>
      <name>BUILDACTION</name>
      <archiveVersion>1</archiveVersion>
      <data>
        <prebuild></prebuild>
        <postbuild></postbuild>
      </data>
    </settings>
    <settings>
      <name>ILINK</name>
      <archiveVersion>0</archiveVersion>
      <data>
        <version>16</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>1</debug>
        <option>
          <name>IlinkOutputFile</name>
          <state>cpp.out</state>
        </option>
        <option>
          <name>IlinkLibIOConfig</name>
          <state>1</state>
        </option>
        <option>
          <name>XLinkMisraHandler</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkInputFileSlave</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkDebugInfoEnable</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkKeepSymbols</name>
          <state></state>
        </option>
        <option>
          <name>IlinkRawBinaryFile</name>
          <state></state>
        </option>
        <option>
          <name>IlinkRawBinarySymbol</name>
          <state></state>
        </option>
        <option>
          <name>IlinkRawBinarySegment</name>
          <state></state>
        </option>
        <option>
          <name>IlinkRawBinaryAlign</name>
          <state></state>
        </option>
        <option>
          <name>IlinkDefines</name>
          <state></state>
        </option>
        <option>
          <name>IlinkConfigDefines</name>
          <state></state>
        </option>
        <option>
          <name>IlinkMapFile</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogFile</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogInitialization</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogModule</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogSection</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogVeneer</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkIcfOverride</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkIcfFile</name>
          <state>$PROJ_DIR$\{{linker_script}}</state>
        </option>
        <option>
          <name>IlinkIcfFileSlave</name>
          <state></state>
        </option>
        <option>
          <name>IlinkEnableRemarks</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkSuppressDiags</name>
          <state></state>
        </option>
        <option>
          <name>IlinkTreatAsRem</name>
          <state></state>
        </option>
        <option>
          <name>IlinkTreatAsWarn</name>
          <state></state>
        </option>
        <option>
          <name>IlinkTreatAsErr</name>
          <state></state>
        </option>
        <option>
          <name>IlinkWarningsAreErrors</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkUseExtraOptions</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkExtraOptions</name>
          <state>--skip_dynamic_initialization</state>
        </option>
        <option>
          <name>IlinkLowLevelInterfaceSlave</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkAutoLibEnable</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkAdditionalLibs</name>
        {% for library in libraries %}
          <state>$PROJ_DIR$\{{library}}</state>
        {% endfor %}
        {% for object in object_files %}
          <state>$PROJ_DIR$\{{object}}</state>
        {% endfor %}
        </option>
        <option>
          <name>IlinkOverrideProgramEntryLabel</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkProgramEntryLabelSelect</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkProgramEntryLabel</name>
          <state>__iar_program_start</state>
        </option>
        <option>
          <name>DoFill</name>
          <state>0</state>
        </option>
        <option>
          <name>FillerByte</name>
          <state>0xFF</state>
        </option>
        <option>
          <name>FillerStart</name>
          <state>0x0</state>
        </option>
        <option>
          <name>FillerEnd</name>
          <state>0x0</state>
        </option>
        <option>
          <name>CrcSize</name>
          <version>0</version>
          <state>1</state>
        </option>
        <option>
          <name>CrcAlign</name>
          <state>1</state>
        </option>
        <option>
          <name>CrcPoly</name>
          <state>0x11021</state>
        </option>
        <option>
          <name>CrcCompl</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>CrcBitOrder</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>CrcInitialValue</name>
          <state>0x0</state>
        </option>
        <option>
          <name>DoCrc</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkBE8Slave</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkBufferedTerminalOutput</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkStdoutInterfaceSlave</name>
          <state>1</state>
        </option>
        <option>
          <name>CrcFullSize</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkIElfToolPostProcess</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogAutoLibSelect</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogRedirSymbols</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogUnusedFragments</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkCrcReverseByteOrder</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkCrcUseAsInput</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkOptInline</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkOptExceptionsAllow</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkOptExceptionsForce</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkCmsis</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkOptMergeDuplSections</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkOptUseVfe</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkOptForceVfe</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkStackAnalysisEnable</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkStackControlFile</name>
          <state></state>
        </option>
        <option>
          <name>IlinkStackCallGraphFile</name>
          <state></state>
        </option>
        <option>
          <name>CrcAlgorithm</name>
          <version>0</version>
          <state>1</state>
        </option>
        <option>
          <name>CrcUnitSize</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>IlinkThreadsSlave</name>
          <state>1</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>IARCHIVE</name>
      <archiveVersion>0</archiveVersion>
      <data>
        <version>0</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>1</debug>
        <option>
          <name>IarchiveInputs</name>
          <state></state>
        </option>
        <option>
          <name>IarchiveOverride</name>
          <state>0</state>
        </option>
        <option>
          <name>IarchiveOutput</name>
          <state>###Unitialized###</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>BILINK</name>
      <archiveVersion>0</archiveVersion>
      <data/>
    </settings>
  </configuration>
  <configuration>
    <name>Release</name>
    <toolchain>
      <name>ARM</name>
    </toolchain>
    <debug>0</debug>
    <settings>
      <name>General</name>
      <archiveVersion>3</archiveVersion>
      <data>
        <version>22</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>0</debug>
        <option>
          <name>ExePath</name>
          <state>Release\Exe</state>
        </option>
        <option>
          <name>ObjPath</name>
          <state>Release\Obj</state>
        </option>
        <option>
          <name>ListPath</name>
          <state>Release\List</state>
        </option>
        <option>
          <name>Variant</name>
          <version>21</version>
          <state>0</state>
        </option>
        <option>
          <name>GEndianMode</name>
          <state>0</state>
        </option>
        <option>
          <name>Input variant</name>
          <version>3</version>
          <state>1</state>
        </option>
        <option>
          <name>Input description</name>
          <state>Full formatting.</state>
        </option>
        <option>
          <name>Output variant</name>
          <version>2</version>
          <state>1</state>
        </option>
        <option>
          <name>Output description</name>
          <state>Full formatting.</state>
        </option>
        <option>
          <name>GOutputBinary</name>
          <state>0</state>
        </option>
        <option>
          <name>FPU</name>
          <version>2</version>
          <state>0</state>
        </option>
        <option>
          <name>OGCoreOrChip</name>
          <state>0</state>
        </option>
        <option>
          <name>GRuntimeLibSelect</name>
          <version>0</version>
          <state>1</state>
        </option>
        <option>
          <name>GRuntimeLibSelectSlave</name>
          <version>0</version>
          <state>1</state>
        </option>
        <option>
          <name>RTDescription</name>
          <state>Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state>
        </option>
        <option>
          <name>OGProductVersion</name>
          <state>5.10.0.159</state>
        </option>
        <option>
          <name>OGLastSavedByProductVersion</name>
          <state>6.30.1.53141</state>
        </option>
        <option>
          <name>GeneralEnableMisra</name>
          <state>0</state>
        </option>
        <option>
          <name>GeneralMisraVerbose</name>
          <state>0</state>
        </option>
        <option>
          <name>OGChipSelectEditMenu</name>
          <state>default    None</state>
        </option>
        <option>
          <name>GenLowLevelInterface</name>
          <state>0</state>
        </option>
        <option>
          <name>GEndianModeBE</name>
          <state>0</state>
        </option>
        <option>
          <name>OGBufferedTerminalOutput</name>
          <state>0</state>
        </option>
        <option>
          <name>GenStdoutInterface</name>
          <state>0</state>
        </option>
        <option>
          <name>GeneralMisraRules98</name>
          <version>0</version>
          <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
        </option>
        <option>
          <name>GeneralMisraVer</name>
          <state>0</state>
        </option>
        <option>
          <name>GeneralMisraRules04</name>
          <version>0</version>
          <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
        </option>
        <option>
          <name>RTConfigPath2</name>
          <state>$TOOLKIT_DIR$\INC\c\DLib_Config_Normal.h</state>
        </option>
        <option>
          <name>GFPUCoreSlave</name>
          <version>21</version>
          <state>0</state>
        </option>
        <option>
          <name>GBECoreSlave</name>
          <version>21</version>
          <state>0</state>
        </option>
        <option>
          <name>OGUseCmsis</name>
          <state>0</state>
        </option>
        <option>
          <name>OGUseCmsisDspLib</name>
          <state>0</state>
        </option>
        <option>
          <name>GRuntimeLibThreads</name>
          <state>0</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>ICCARM</name>
      <archiveVersion>2</archiveVersion>
      <data>
        <version>31</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>0</debug>
        <option>
          <name>CCOptimizationNoSizeConstraints</name>
          <state>0</state>
        </option>
        <option>
          <name>CCDefines</name>
          <state>NDEBUG</state>
        </option>
        <option>
          <name>CCPreprocFile</name>
          <state>0</state>
        </option>
        <option>
          <name>CCPreprocComments</name>
          <state>0</state>
        </option>
        <option>
          <name>CCPreprocLine</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListCFile</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListCMnemonics</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListCMessages</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListAssFile</name>
          <state>0</state>
        </option>
        <option>
          <name>CCListAssSource</name>
          <state>0</state>
        </option>
        <option>
          <name>CCEnableRemarks</name>
          <state>0</state>
        </option>
        <option>
          <name>CCDiagSuppress</name>
          <state></state>
        </option>
        <option>
          <name>CCDiagRemark</name>
          <state></state>
        </option>
        <option>
          <name>CCDiagWarning</name>
          <state></state>
        </option>
        <option>
          <name>CCDiagError</name>
          <state></state>
        </option>
        <option>
          <name>CCObjPrefix</name>
          <state>1</state>
        </option>
        <option>
          <name>CCAllowList</name>
          <version>1</version>
          <state>11111110</state>
        </option>
        <option>
          <name>CCDebugInfo</name>
          <state>0</state>
        </option>
        <option>
          <name>IEndianMode</name>
          <state>1</state>
        </option>
        <option>
          <name>IProcessor</name>
          <state>1</state>
        </option>
        <option>
          <name>IExtraOptionsCheck</name>
          <state>0</state>
        </option>
        <option>
          <name>IExtraOptions</name>
          <state></state>
        </option>
        <option>
          <name>CCLangConformance</name>
          <state>0</state>
        </option>
        <option>
          <name>CCSignedPlainChar</name>
          <state>1</state>
        </option>
        <option>
          <name>CCRequirePrototypes</name>
          <state>0</state>
        </option>
        <option>
          <name>CCMultibyteSupport</name>
          <state>0</state>
        </option>
        <option>
          <name>CCDiagWarnAreErr</name>
          <state>0</state>
        </option>
        <option>
          <name>CCCompilerRuntimeInfo</name>
          <state>0</state>
        </option>
        <option>
          <name>IFpuProcessor</name>
          <state>1</state>
        </option>
        <option>
          <name>OutputFile</name>
          <state>$FILE_BNAME$.o</state>
        </option>
        <option>
          <name>CCLibConfigHeader</name>
          <state>1</state>
        </option>
        <option>
          <name>PreInclude</name>
          <state></state>
        </option>
        <option>
          <name>CompilerMisraOverride</name>
          <state>0</state>
        </option>
        <option>
          <name>CCIncludePath2</name>
          <state></state>
        </option>
        <option>
          <name>CCStdIncCheck</name>
          <state>0</state>
        </option>
        <option>
          <name>CCCodeSection</name>
          <state>.text</state>
        </option>
        <option>
          <name>IInterwork2</name>
          <state>1</state>
        </option>
        <option>
          <name>IProcessorMode2</name>
          <state>1</state>
        </option>
        <option>
          <name>CCOptLevel</name>
          <state>3</state>
        </option>
        <option>
          <name>CCOptStrategy</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>CCOptLevelSlave</name>
          <state>3</state>
        </option>
        <option>
          <name>CompilerMisraRules98</name>
          <version>0</version>
          <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
        </option>
        <option>
          <name>CompilerMisraRules04</name>
          <version>0</version>
          <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
        </option>
        <option>
          <name>CCPosIndRopi</name>
          <state>0</state>
        </option>
        <option>
          <name>CCPosIndRwpi</name>
          <state>0</state>
        </option>
        <option>
          <name>CCPosIndNoDynInit</name>
          <state>0</state>
        </option>
        <option>
          <name>IccLang</name>
          <state>2</state>
        </option>
        <option>
          <name>IccCDialect</name>
          <state>1</state>
        </option>
        <option>
          <name>IccAllowVLA</name>
          <state>1</state>
        </option>
        <option>
          <name>IccCppDialect</name>
          <state>1</state>
        </option>
        <option>
          <name>IccExceptions</name>
          <state>1</state>
        </option>
        <option>
          <name>IccRTTI</name>
          <state>1</state>
        </option>
        <option>
          <name>IccStaticDestr</name>
          <state>1</state>
        </option>
        <option>
          <name>IccCppInlineSemantics</name>
          <state>0</state>
        </option>
        <option>
          <name>IccCmsis</name>
          <state>1</state>
        </option>
        <option>
          <name>IccFloatSemantics</name>
          <state>0</state>
        </option>
        <option>
          <name>CCNoLiteralPool</name>
          <state>0</state>
        </option>
        <option>
          <name>CCOptStrategySlave</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>CCGuardCalls</name>
          <state>1</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>AARM</name>
      <archiveVersion>2</archiveVersion>
      <data>
        <version>9</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>0</debug>
        <option>
          <name>AObjPrefix</name>
          <state>1</state>
        </option>
        <option>
          <name>AEndian</name>
          <state>1</state>
        </option>
        <option>
          <name>ACaseSensitivity</name>
          <state>1</state>
        </option>
        <option>
          <name>MacroChars</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>AWarnEnable</name>
          <state>0</state>
        </option>
        <option>
          <name>AWarnWhat</name>
          <state>0</state>
        </option>
        <option>
          <name>AWarnOne</name>
          <state></state>
        </option>
        <option>
          <name>AWarnRange1</name>
          <state></state>
        </option>
        <option>
          <name>AWarnRange2</name>
          <state></state>
        </option>
        <option>
          <name>ADebug</name>
          <state>0</state>
        </option>
        <option>
          <name>AltRegisterNames</name>
          <state>0</state>
        </option>
        <option>
          <name>ADefines</name>
          <state></state>
        </option>
        <option>
          <name>AList</name>
          <state>0</state>
        </option>
        <option>
          <name>AListHeader</name>
          <state>1</state>
        </option>
        <option>
          <name>AListing</name>
          <state>1</state>
        </option>
        <option>
          <name>Includes</name>
          <state>0</state>
        </option>
        <option>
          <name>MacDefs</name>
          <state>0</state>
        </option>
        <option>
          <name>MacExps</name>
          <state>1</state>
        </option>
        <option>
          <name>MacExec</name>
          <state>0</state>
        </option>
        <option>
          <name>OnlyAssed</name>
          <state>0</state>
        </option>
        <option>
          <name>MultiLine</name>
          <state>0</state>
        </option>
        <option>
          <name>PageLengthCheck</name>
          <state>0</state>
        </option>
        <option>
          <name>PageLength</name>
          <state>80</state>
        </option>
        <option>
          <name>TabSpacing</name>
          <state>8</state>
        </option>
        <option>
          <name>AXRef</name>
          <state>0</state>
        </option>
        <option>
          <name>AXRefDefines</name>
          <state>0</state>
        </option>
        <option>
          <name>AXRefInternal</name>
          <state>0</state>
        </option>
        <option>
          <name>AXRefDual</name>
          <state>0</state>
        </option>
        <option>
          <name>AProcessor</name>
          <state>1</state>
        </option>
        <option>
          <name>AFpuProcessor</name>
          <state>1</state>
        </option>
        <option>
          <name>AOutputFile</name>
          <state>$FILE_BNAME$.o</state>
        </option>
        <option>
          <name>AMultibyteSupport</name>
          <state>0</state>
        </option>
        <option>
          <name>ALimitErrorsCheck</name>
          <state>0</state>
        </option>
        <option>
          <name>ALimitErrorsEdit</name>
          <state>100</state>
        </option>
        <option>
          <name>AIgnoreStdInclude</name>
          <state>0</state>
        </option>
        <option>
          <name>AUserIncludes</name>
          <state></state>
        </option>
        <option>
          <name>AExtraOptionsCheckV2</name>
          <state>0</state>
        </option>
        <option>
          <name>AExtraOptionsV2</name>
          <state></state>
        </option>
        <option>
          <name>AsmNoLiteralPool</name>
          <state>0</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>OBJCOPY</name>
      <archiveVersion>0</archiveVersion>
      <data>
        <version>1</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>0</debug>
        <option>
          <name>OOCOutputFormat</name>
          <version>2</version>
          <state>0</state>
        </option>
        <option>
          <name>OCOutputOverride</name>
          <state>0</state>
        </option>
        <option>
          <name>OOCOutputFile</name>
          <state>5.srec</state>
        </option>
        <option>
          <name>OOCCommandLineProducer</name>
          <state>1</state>
        </option>
        <option>
          <name>OOCObjCopyEnable</name>
          <state>0</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>CUSTOM</name>
      <archiveVersion>3</archiveVersion>
      <data>
        <extensions></extensions>
        <cmdline></cmdline>
      </data>
    </settings>
    <settings>
      <name>BICOMP</name>
      <archiveVersion>0</archiveVersion>
      <data/>
    </settings>
    <settings>
      <name>BUILDACTION</name>
      <archiveVersion>1</archiveVersion>
      <data>
        <prebuild></prebuild>
        <postbuild></postbuild>
      </data>
    </settings>
    <settings>
      <name>ILINK</name>
      <archiveVersion>0</archiveVersion>
      <data>
        <version>16</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>0</debug>
        <option>
          <name>IlinkOutputFile</name>
          <state>cpp.out</state>
        </option>
        <option>
          <name>IlinkLibIOConfig</name>
          <state>1</state>
        </option>
        <option>
          <name>XLinkMisraHandler</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkInputFileSlave</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkDebugInfoEnable</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkKeepSymbols</name>
          <state></state>
        </option>
        <option>
          <name>IlinkRawBinaryFile</name>
          <state></state>
        </option>
        <option>
          <name>IlinkRawBinarySymbol</name>
          <state></state>
        </option>
        <option>
          <name>IlinkRawBinarySegment</name>
          <state></state>
        </option>
        <option>
          <name>IlinkRawBinaryAlign</name>
          <state></state>
        </option>
        <option>
          <name>IlinkDefines</name>
          <state></state>
        </option>
        <option>
          <name>IlinkConfigDefines</name>
          <state></state>
        </option>
        <option>
          <name>IlinkMapFile</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogFile</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogInitialization</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogModule</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogSection</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogVeneer</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkIcfOverride</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkIcfFile</name>
          <state>$TOOLKIT_DIR$\CONFIG\generic.icf</state>
        </option>
        <option>
          <name>IlinkIcfFileSlave</name>
          <state></state>
        </option>
        <option>
          <name>IlinkEnableRemarks</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkSuppressDiags</name>
          <state></state>
        </option>
        <option>
          <name>IlinkTreatAsRem</name>
          <state></state>
        </option>
        <option>
          <name>IlinkTreatAsWarn</name>
          <state></state>
        </option>
        <option>
          <name>IlinkTreatAsErr</name>
          <state></state>
        </option>
        <option>
          <name>IlinkWarningsAreErrors</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkUseExtraOptions</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkExtraOptions</name>
          <state></state>
        </option>
        <option>
          <name>IlinkLowLevelInterfaceSlave</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkAutoLibEnable</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkAdditionalLibs</name>
          <state></state>
        </option>
        <option>
          <name>IlinkOverrideProgramEntryLabel</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkProgramEntryLabelSelect</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkProgramEntryLabel</name>
          <state></state>
        </option>
        <option>
          <name>DoFill</name>
          <state>0</state>
        </option>
        <option>
          <name>FillerByte</name>
          <state>0xFF</state>
        </option>
        <option>
          <name>FillerStart</name>
          <state>0x0</state>
        </option>
        <option>
          <name>FillerEnd</name>
          <state>0x0</state>
        </option>
        <option>
          <name>CrcSize</name>
          <version>0</version>
          <state>1</state>
        </option>
        <option>
          <name>CrcAlign</name>
          <state>1</state>
        </option>
        <option>
          <name>CrcPoly</name>
          <state>0x11021</state>
        </option>
        <option>
          <name>CrcCompl</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>CrcBitOrder</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>CrcInitialValue</name>
          <state>0x0</state>
        </option>
        <option>
          <name>DoCrc</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkBE8Slave</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkBufferedTerminalOutput</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkStdoutInterfaceSlave</name>
          <state>1</state>
        </option>
        <option>
          <name>CrcFullSize</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkIElfToolPostProcess</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogAutoLibSelect</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogRedirSymbols</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkLogUnusedFragments</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkCrcReverseByteOrder</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkCrcUseAsInput</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkOptInline</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkOptExceptionsAllow</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkOptExceptionsForce</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkCmsis</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkOptMergeDuplSections</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkOptUseVfe</name>
          <state>1</state>
        </option>
        <option>
          <name>IlinkOptForceVfe</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkStackAnalysisEnable</name>
          <state>0</state>
        </option>
        <option>
          <name>IlinkStackControlFile</name>
          <state></state>
        </option>
        <option>
          <name>IlinkStackCallGraphFile</name>
          <state></state>
        </option>
        <option>
          <name>CrcAlgorithm</name>
          <version>0</version>
          <state>1</state>
        </option>
        <option>
          <name>CrcUnitSize</name>
          <version>0</version>
          <state>0</state>
        </option>
        <option>
          <name>IlinkThreadsSlave</name>
          <state>1</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>IARCHIVE</name>
      <archiveVersion>0</archiveVersion>
      <data>
        <version>0</version>
        <wantNonLocal>1</wantNonLocal>
        <debug>0</debug>
        <option>
          <name>IarchiveInputs</name>
          <state></state>
        </option>
        <option>
          <name>IarchiveOverride</name>
          <state>0</state>
        </option>
        <option>
          <name>IarchiveOutput</name>
          <state>###Unitialized###</state>
        </option>
      </data>
    </settings>
    <settings>
      <name>BILINK</name>
      <archiveVersion>0</archiveVersion>
      <data/>
    </settings>
  </configuration>
  {{source_files}}
</project>

{'repo_name': 'tmk/tmk_core', 'stars': '108', 'repo_language': 'C', 'file_name': 'hook.txt', 'mime_type': 'text/x-c', 'hash': -462794495350774413, 'source_dataset': 'data'}


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>

<head>
</head>

<body bgcolor="white">

This package consists similariy and distance measures.

</body>
</html>

{'repo_name': 'rapidminer/rapidminer-studio', 'stars': '349', 'repo_language': 'Java', 'file_name': 'CiteTaglet.java', 'mime_type': 'text/plain', 'hash': 2322311370909255972, 'source_dataset': 'data'}


{% if page.sc_project %}

{% endif %}

{'repo_name': 'tiepvupsu/tiepvupsu.github.io', 'stars': '455', 'repo_language': 'Jupyter Notebook', 'file_name': 'algolia.js', 'mime_type': 'text/plain', 'hash': 584503128599000775, 'source_dataset': 'data'}


<?php
/*
 * @package     Complex
 * @author      Frank Wikström <frank@mossadal.se>
 * @copyright   2016 Frank Wikström
 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
 *
 */
namespace MathParser\Extensions;

use MathParser\Extensions\Math as Math;
use MathParser\Extensions\Rational as Rational;

use MathParser\Exceptions\SyntaxErrorException;
use MathParser\Exceptions\DivisionByZeroException;

/**
* Implementation of complex number arithmetic with the
* standard transcendental functions.
*
* ## Example:
* ~~~{.php}
* $z = new Complex(3, 4);           // creates the complex number 3+4i
* $w = new Complex(-1, 1);          // creates the complex number -1+i
* $product = Complex::mul($z, $w)   // computes the product (3+4i)(-1+i)
* ~~~
*
*
*/
class Complex
{
    /**
     * float $x real part
     */
    private $x;
    /**
     * float $y real part
     */
    private $y;

    /**
     * Constructor
     *
     * Construct a complex number with given real and imaginary part
     *
     * @param float $real real part
     * @param float $imag imaginary part
     */
    public function __construct($real, $imag)
    {
        $this->x = $real;
        $this->y = $imag;
    }

    /**
     * Real part
     *
     * @retval float real part
     */
    public function r()
    {
        return $this->x;
    }

    /**
     * Imaginary part
     *
     * @retval float imaginary part
     */
    public function i()
    {
        return $this->y;
    }

    /**
     * Modulus (absolute value)
     *
     * Return the modulus of the complex number z=x+iy, i.e.
     * sqrt(x^2 + y^2)
     *
     * @retval float modulus
     */
    public function abs()
    {
        return hypot($this->x, $this->y);
    }

    /**
     * Argument (principal value)
     *
     * Returns the prinicpal argument of the complex number,
     * i.e. a number t with -pi < t <= pi, such that z = rexp(i*t) for
     * some positive real r
     * @retval float argument
     */
    public function arg()
    {
        return atan2($this->y, $this->x);
    }

    /**
     * test if the complex number is NAN
     *
     * @retval bool
     */
    public function is_nan()
    {
        return is_nan($this->x) || is_nan($this->y);
    }

    /**
     * check whether a string represents a signed real number
     *
     * @param string $value
     * @retval bool true if $value is a signed real number
     */
    private static function isSignedReal($value)
    {
        return preg_match('~^\-?\d+([,|.]\d+)?$~', $value);
    }

    /**
     * convert string to floating point number, if possible
     *
     * decimal commas accepted
     *
     * @param string $value
     * @throws SyntaxErrorException if the string cannot be parsed
     * @retval float
     */
    private static function parseReal($value)
    {
        if ($value == '') return null;

        $x = str_replace(',', '.', $value);
        if (static::isSignedReal($x)) return floatval($x);
        else throw new SyntaxErrorException();
    }

    /**
     * convert data to a complex number, if possible
     *
     *
     * @param mixed $value (Complex, Rational, int, float and strings accepted)
     * @throws SyntaxErrorException if the string cannot be parsed
     * @retval Complex
     */
    public static function parse($value)
    {
        if ($value instanceof Complex) return $value;
        if ($value instanceof Rational) return new Complex($value.p/$value.q, 0);

        if (is_int($value)) return new Complex($value, 0);
        if (is_float($value)) return new Complex($value, 0);

        if (!is_string($value)) throw new SyntaxErrorException();

        // Match complex numbers with an explicit i
        $matches = array();

        $valid = \preg_match(
            '#^([-,\+])?([0-9/,\.]*?)([-,\+]?)([0-9/,\.]*?)i$#',
            \trim($value),
            $matches
        );

        if ($valid == 1) {
            $real = $matches[2];
            if ($real === '') {
                $matches[3] = $matches[1];
                $real = '0';
            }
            $imaginary = $matches[4];
            if ($imaginary === '') $imaginary = '1';

            if ($matches[1] && $matches[1] == '-') {
                $real = '-' . $real;
            }
            if ($matches[3] && $matches[3] == '-') {
                $imaginary = '-' . $imaginary;
            }

            try {
                $a = Rational::parse($real);
                $realPart = $a->p/$a->q;
            } catch(SyntaxErrorException $e)
            {
                $realPart = static::parseReal($real);
            }

            try {
                $b = Rational::parse($imaginary);
                $imaginaryPart = $b->p/$b->q;
            } catch(SyntaxErrorException $e)
            {
                $imaginaryPart = static::parseReal($imaginary);
            }

        }
        else {
            // That failed, try matching a rational number
            try {

                $a = Rational::parse($value);
                $realPart = $a->p/$a->q;
                $imaginaryPart = 0;

            } catch(SyntaxErrorException $e) {
                // Final attempt, try matching a real number
                $realPart = static::parseReal($value);
                $imaginaryPart = 0;
            }
        }

        $z = new Complex($realPart, $imaginaryPart);

        return $z;
    }

    /**
     * convert data to a floating point number, if possible
     *
     *
     * @param mixed $value (float, int, Rational)
     * @throws SyntaxErrorException if the string cannot be parsed
     * @retval float
     */
    private static function toFloat($x)
    {
        if (is_float($x)) return $x;
        if (is_int($x)) return $x;
        if (is_string($x)) {
            $r = Rational::parse($x);
            return $r->p/$r->q;
        }
        throw new SyntaxErrorException();
    }

    /**
     * create a complex number from its real and imaginary parts
     *
     *
     * @param mixed $real (float, int, Rational)
     * @param mixed $imag (float, int, Rational)
     * @throws SyntaxErrorException if the string cannot be parsed
     * @retval float
     */
    public static function create($real, $imag)
    {
        $x = static::toFloat($real);
        $y = static::toFloat($imag);

        return new Complex($x, $y);
    }

    /**
     * add two complex numbers
     *
     * Complex::add($z, $w) computes and returns $z+$w
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @param mixed $w (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function add($z, $w) {
        if (!($z instanceof Complex)) $z = static::parse($z);
        if (!($w instanceof Complex)) $w = static::parse($w);

        return static::create($z->x + $w->x, $z->y + $w->y);
    }

    /**
     * subtract two complex numbers
     *
     * Complex::sub($z, $w) computes and returns $z-$w
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @param mixed $w (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function sub($z, $w) {
        if (!($z instanceof Complex)) $z = static::parse($z);
        if (!($w instanceof Complex)) $w = static::parse($w);

        return static::create($z->x - $w->x, $z->y - $w->y);
    }

    /**
     * multiply two complex numbers
     *
     * Complex::mul($z, $w) computes and returns $z*$w
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @param mixed $w (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function mul($z, $w) {
        if (!($z instanceof Complex)) $z = static::parse($z);
        if (!($w instanceof Complex)) $w = static::parse($w);

        return static::create($z->x * $w->x - $z->y * $w->y, $z->x * $w->y + $z->y * $w->x);
    }

    /**
     * divide two complex numbers
     *
     * Complex::div($z, $w) computes and returns $z/$w
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @param mixed $w (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function div($z, $w) {
        if (!($z instanceof Complex)) $z = static::parse($z);
        if (!($w instanceof Complex)) $w = static::parse($w);

        $d = $w->x * $w->x + $w->y * $w->y;

        if ($d == 0) throw new DivisionByZeroException();

        return static::create(($z->x * $w->x + $z->y * $w->y)/$d, (-$z->x * $w->y + $z->y * $w->x)/$d);
    }

    /**
     * powers of two complex numbers
     *
     * Complex::pow($z, $w) computes and returns the principal value of $z^$w
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @param mixed $w (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function pow($z, $w) {
        // If exponent is an integer, compute the power using a square-and-multiply algorithm
        if (is_int($w)) return static::powi($z, $w);

        // Otherwise compute the principal branch: z^w = exp(wlog z)
        return static::exp(static::mul($w, static::log($z)));
    }

    /**
     * integer power of a complex number
     *
     * Complex::powi($z, $n) computes and returns $z^$n where $n is an integer
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @param int $n
     * @retval Complex
     */
    private static function powi($z, $n) {
        if ($n < 0) return static::div(1,static::powi($z, -$n));

        if ($n == 0) return new Complex(1,0);

        $y = new Complex(1,0);
        while ($n > 1) {
            if ($n % 2 == 0) {
                $n = $n / 2;
            } else {
                $y = static::mul($z, $y);
                $n = ($n-1)/2;
            }
            $z = static::mul($z, $z);
        }

        return static::mul($z, $y);
    }

    // Transcendental functions

    /**
     * complex sine function
     *
     * Complex::sin($z) computes and returns sin($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function sin($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::create(sin($z->x)*cosh($z->y), cos($z->x)*sinh($z->y));
    }

    /**
     * complex cosine function
     *
     * Complex::cos($z) computes and returns cos($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function cos($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::create(cos($z->x)*cosh($z->y), -sin($z->x)*sinh($z->y));
    }

    /**
     * complex tangent function
     *
     * Complex::tan($z) computes and returns tan($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function tan($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $d = cos($z->x)*cos($z->x) + sinh($z->y)*sinh($z->y);
        return static::create(sin($z->x)*cos($z->x)/$d, sinh($z->y)*cosh($z->y)/$d);
    }

    /**
     * complex cotangent function
     *
     * Complex::cot($z) computes and returns cot($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function cot($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $d = sin($z->x)*sin($z->x) + sinh($z->y)*sinh($z->y);
        return static::create(sin($z->x)*cos($z->x)/$d, -sinh($z->y)*cosh($z->y)/$d);
    }

    /**
     * complex inverse sine function
     *
     * Complex::arcsin($z) computes and returns the principal branch of arcsin($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function arcsin($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $I = new Complex(0,1);
        $iz = static::mul($z, $I);                                       // iz
        $temp = static::sqrt(static::sub(1, static::mul($z, $z)));       // sqrt(1-z^2)
        return static::div(static::log(static::add($iz, $temp)), $I);
    }

    /**
     * complex inverse cosine function
     *
     * Complex::arccos($z) computes and returns the principal branch of arccos($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function arccos($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $I = new Complex(0,1);
        $temp = static::mul(static::sqrt(static::sub(1, static::mul($z, $z))), $I);
        return static::div(static::log(static::add($z, $temp)), $I);
    }

    /**
     * complex inverse tangent function
     *
     * Complex::arctan($z) computes and returns the principal branch of arctan($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function arctan($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $I = new Complex(0,1);
        $iz = static::mul($z, $I);
        $w = static::div( static::add(1, $iz), static::sub(1, $iz) );
        $logw = static::log($w);
        return static::div($logw, new Complex(0,2));
    }

    /**
     * complex inverse cotangent function
     *
     * Complex::arccot($z) computes and returns the principal branch of arccot($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function arccot($z)
    {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::sub(M_PI/2, static::arctan($z));
    }

    /**
     * complex exponential function
     *
     * Complex::exp($z) computes and returns exp($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */    public static function exp($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $r = exp($z->x);
        return new Complex($r*cos($z->y), $r*sin($z->y));
    }

    /**
     * complex logarithm function
     *
     * Complex::log($z) computes and returns the principal branch of log($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */    public static function log($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $r = $z->abs();
        $theta = $z->arg();

        if ($r == 0) return new Complex(NAN, NAN);

        return new Complex(log($r), $theta);
    }

    /**
     * complex hyperbolic sine function
     *
     * Complex::sinh($z) computes and returns sinh($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
     public static function sinh($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::create(sinh($z->x)*cos($z->y), cosh($z->x)*sin($z->y));
    }

    /**
     * complex hyperbolic cosine function
     *
     * Complex::cosh($z) computes and returns cosh($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function cosh($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::create(cosh($z->x)*cos($z->y), sinh($z->x)*sin($z->y));
    }

    /**
     * complex hyperbolic tangent function
     *
     * Complex::tanh($z) computes and returns tanh($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function tanh($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $d = sinh($z->x)*sinh($z->x) + cos($z->y)*cos($z->y);
        return static::create(sinh($z->x)*cosh($z->x)/$d, sin($z->y)*cos($z->y)/$d);
    }

    /**
     * complex inverse hyperbolic sine function
     *
     * Complex::arsinh($z) computes and returns the principal branch of arsinh($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function arsinh($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::log(static::add($z, static::sqrt(static::add(1, static::mul($z, $z)))));
    }

    /**
     * complex inverse hyperbolic cosine function
     *
     * Complex::arcosh($z) computes and returns the principal branch of arcosh($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function arcosh($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::log(static::add($z, static::sqrt(static::add(-1, static::mul($z, $z)))));
    }

    /**
     * complex inverse hyperbolic tangent function
     *
     * Complex::artanh($z) computes and returns the principal branch of artanh($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function artanh($z) {
        if (!($z instanceof Complex)) $z = static::parse($z);

        return static::div(static::log(static::div(static::add(1,$z), static::sub(1,$z))),2);
    }

    /**
     * complex square root function
     *
     * Complex::sqrt($z) computes and returns the principal branch of sqrt($z)
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval Complex
     */
    public static function sqrt($z)
    {
        if (!($z instanceof Complex)) $z = static::parse($z);

        $r = sqrt($z->abs());
        $theta = $z->arg()/2;

        return new Complex($r*cos($theta), $r*sin($theta));
    }

    /**
     * string representation of a complex number
     *
     *
     * @param mixed $z (Complex, or parsable to Complex)
     * @retval string
     */
    public function __toString()
    {
        // TODO: use Number:: helper functions.

        $realAsRational = Rational::fromFloat($this->x);
        if ($realAsRational->q <= 100) {
            $real = "$realAsRational";
        } else $real = sprintf('%f', $this->x);

        $imagAsRational = Rational::fromFloat($this->y);
        if ($imagAsRational->q <= 100) {
            $imag = $imagAsRational->signed();
        } else $imag = sprintf('%+f', $this->y);

        if ($this->y == 0) return $real;
        if ($this->x == 0) {
            if ($this->y == 1) return 'i';
            if ($this->y == -1) return '-i';
            if ($imag[0] == '+') $imag = substr($imag, 1);
            return "${imag}i";
        }

        if ($this->y == 1) $imag = '+';
        if ($this->y == -1) $imag = '-';
        return "$real${imag}i";
    }

    public function signed()
    {
        $str = (string)($this);
        if ($str[0] != '-') return "+$str";

        return $str;
    }
}

{'repo_name': 'CalderaWP/Caldera-Forms', 'stars': '156', 'repo_language': 'JavaScript', 'file_name': 'shortcode.php', 'mime_type': 'text/x-php', 'hash': -7839350122282637911, 'source_dataset': 'data'}


<?php

/*
 * This file is part of `Composer as a service`.
 *
 * (c) Pascal Borreli <pascal@borreli.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Ayaline\Bundle\ComposerBundle\Controller;

use Sonata\NotificationBundle\Backend\AMQPBackendDispatcher;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
use Symfony\Component\Form\FormError;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class ComposerController
{
    /**
     * @var EngineInterface
     */
    private $templating;

    /**
     * @var FormInterface
     */
    private $composerForm;

    /**
     * @var AMQPBackendDispatcher
     */
    private $sonataNotificationsBackend;

    /**
     * @param EngineInterface       $templating
     * @param FormInterface         $composerForm
     * @param AMQPBackendDispatcher $sonataNotificationsBackend
     */
    public function __construct(
        EngineInterface $templating,
        FormInterface $composerForm,
        AMQPBackendDispatcher $sonataNotificationsBackend
    ) {
        $this->templating = $templating;
        $this->composerForm = $composerForm;
        $this->sonataNotificationsBackend = $sonataNotificationsBackend;
    }

    /**
     * @return Response
     */
    public function indexAction()
    {
        return $this->templating->renderResponse(
            'AyalineComposerBundle:Composer:index.html.twig',
            ['form' => $this->composerForm->createView()]
        );
    }

    /**
     * @param Request $request
     *
     * @return JsonResponse
     */
    public function uploadComposerAction(Request $request)
    {
        $this->composerForm->handleRequest($request);

        if ($this->composerForm->isValid()) {
            $data = $this->composerForm->getData();
            $this->sonataNotificationsBackend->createAndPublish('upload.composer', [
                'body'               => $data['body'],
                'channelName'        => $request->getSession()->get('channelName'),
                'hasDevDependencies' => $data['hasDevDependencies'],
            ]);

            return new JsonResponse(['status' => 'ok']);
        }

        $errors = array_map(function (FormError $error) {
            return $error->getMessage();
        }, $this->composerForm->get('body')->getErrors());

        return new JsonResponse(['status' => 'ko', 'message' => $errors]);
    }
}

{'repo_name': 'pborreli/composer-service', 'stars': '175', 'repo_language': 'PHP', 'file_name': 'default.pp', 'mime_type': 'text/plain', 'hash': 9055912529583276381, 'source_dataset': 'data'}


#include "tree_ctrs.h"

namespace NCatboostCuda {
    void TTreeCtrDataSet::BuildFeatureIndex() {
        CB_ENSURE(InverseCtrIndex.size() == 0, "Error: build could be done only once");

        for (const ui32 feature : CatFeatures) {
            TFeatureTensor tensor = BaseFeatureTensor;
            tensor.AddCatFeature(feature);
            const auto& configs = GetCtrsConfigsForTensor(tensor);
            for (auto& config : configs) {
                TCtr ctr;
                ctr.FeatureTensor = tensor;
                ctr.Configuration = config;
                const ui32 idx = static_cast<const ui32>(InverseCtrIndex.size());
                InverseCtrIndex[ctr] = idx;
                Ctrs.push_back(ctr);
                const auto borderCount = FeaturesManager.GetCtrBinarization(ctr).BorderCount;
                MaxBorderCount = Max<ui32>(MaxBorderCount, borderCount);
                const ui32 bordersSize = 1 + borderCount;
                const ui32 offset = static_cast<const ui32>(CtrBorderSlices.size() ? CtrBorderSlices.back().Right
                                                                                : 0);
                const TSlice bordersSlice = TSlice(offset, offset + bordersSize);
                CtrBorderSlices.push_back(bordersSlice);
            }
        }

        TFeaturesMapping featuresMapping = CreateFeaturesMapping();

        auto bordersMapping = featuresMapping.Transform([&](TSlice deviceSlice) {
            ui32 size = 0;
            for (ui32 feature = static_cast<ui32>(deviceSlice.Left); feature < deviceSlice.Right; ++feature) {
                size += CtrBorderSlices[feature].Size();
            }
            return size;
        });
        CtrBorders.Reset(bordersMapping);

        if (CtrBorderSlices.size()) {
            //borders are so small, that it should be almost always faster to write all border vec then by parts
            TVector<float> borders(CtrBorderSlices.back().Right);
            bool needWrite = false;

            for (ui32 i = 0; i < Ctrs.size(); ++i) {
                const auto& ctr = Ctrs[i];
                AreCtrBordersComputed.push_back(false);
                if (FeaturesManager.IsKnown(ctr)) {
                    const auto& ctrBorders = FeaturesManager.GetBorders(FeaturesManager.GetId(ctr));
                    const ui64 offset = CtrBorderSlices[i].Left;
                    borders[offset] = ctrBorders.size();
                    std::copy(ctrBorders.begin(), ctrBorders.end(), borders.begin() + offset + 1);
                    CB_ENSURE(ctrBorders.size() < CtrBorderSlices[i].Size());
                    AreCtrBordersComputed.back() = true;
                    needWrite = true;
                }
            }
            if (needWrite) {
                CtrBorders.Write(borders);
            }
        }
    }
}

{'repo_name': 'catboost/catboost', 'stars': '5254', 'repo_language': 'C++', 'file_name': 'lz4_12.cpp', 'mime_type': 'text/x-c', 'hash': -9197557133935569985, 'source_dataset': 'data'}