text
stringlengths
1
1.04M
language
stringclasses
25 values
Live Updates of Today Match between India vs Hong Kong from Dubai International Cricket Stadium, Dubai. Check commentary and full scoreboard of the match. 14.6 overs (1 Run) Full and straight, at 142 clicks, nicely clipped away to deep square leg for one. 14.5 overs (0 Run) OUT! TIMBER! Avesh Khan does get a wicket in the end! Avesh bowls this one a touch slower and angles it in on a length from around off. Aizaz Khan has to take it on at this stage and backs away as he looks to slog it away. Aizaz swings wildly though and ends up missing the ball completely. The ball castles into the middle stump and Hong Kong lose their fourth wicket. 14.4 overs (4 Runs) FOUR! Just over! Short again, around middle, Aizaz Khan takes it on with the pull shot and just manages to clear Suryakumar Yadav who was leaping for the catch at mid-wicket and the ball goes into the fence. 14.3 overs (2 Runs) In the air but falls safely! Here comes the bouncer, over middle and leg, Aizaz Khan looks for the pull but gets hurried on and the top edge is found. The ball goes high and lands in between the chasing keeper and the fine leg fielder. They come back for two and Avesh Khan dislodges the bails at the striker's end. The umpire goes upstairs for a run-out appeal but the batter is safely home. 14.2 overs (0 Run) Full and close to the 140 KPH mark. This is close to the off pole and Aizaz Khan looks to smoke it down the ground but is beaten for pace. 14.1 overs (1 Run) Pacy delivery, on a hard length and angled in from around off. Kinchit Shah looks to swing across the line but gets an inside edge onto the body. The ball rolls away towards cover and they scamper through for one. 13.6 overs (1 Run) Good comeback from Arshdeep Singh after being hit for a boundary first up. Banged in short and over off, Kinchit Shah gets a bit hurried on but manages to pull it towards deep mid-wicket for a run. 13.5 overs (1 Run) Shorter in length and attacking the body of the batter. Aizaz Khan manages to pull it behind square on the leg side and picks up a single. 13.4 overs (0 Run) On a fuller length and pushed wide, outside off. Aizaz Khan stays leg-side of the ball and tries to reach it but can't. 13.3 overs (0 Run) Switches to around the wicket for the right-hander and serves a shortish delivery at the body. Aizaz Khan looks to pull but gets an inside edge down to the keeper. 13.2 overs (1 Run) Slower one, around the top of off, this is forced down to long on for a single. 13.1 overs (4 Runs) FOUR! Just like Avesh, Arshdeep Singh too hasn't quite got it right in this game. Fuller delivery, offering width to the batter, Kinchit Shah opens the face of the bat and lifts it over short third man for a boundary. Arshdeep Singh (2-0-25-1) is back into the attack. 12.6 overs (1 Run) Avesh gets it really full this time and bowls it around off. Shah jams it out towards mid off and sets off for the quick single. Shah puts in the dive as Dinesh Karthik fumbles. 12.5 overs (6 Runs) SIX! Avesh Khan continues to struggle with the ball. Pitched up, well outside off, Kinchit Shah gets a bit low and powers it over the cover fence for a maximum. 12.4 overs (1 Run) Around the top of off, nicely dabbed down to third man for a single. 12.3 overs (0 Run) A good bumper now! This is bowled at 140 clicks and over middle, Aizaz Khan ducks under it. 12.2 overs (4 Runs) FOUR! On a hard length, outside off, Aizaz Khan hangs back and throws his hands at it. The ball goes off the outside edge and through the vacant slip cordon for a boundary. 12.1 overs (1 Run) A length ball, around off, this is driven through cover-point for a single. 11.6 overs (0 Run) Fires it in at the stumps, Aizaz Khan blocks it out. 4-0-15-1 - Fantastic effort from Ravindra Jadeja. Avesh Khan is back on. His first over went for 11 runs and he will look to redeem himself. 11.5 overs (1 Run) Around off, this is cut away late and towards short third man for yet another single. 11.4 overs (1 Run) Quicker and flatter, close to the off pole. Aizaz Khan cuts it away towards short third man where Avesh Khan makes a good diving stop and keeps it down to a single. 11.3 overs (1 Run) Flatter and on the pads, this is turned through mid-wicket for one more. 11.2 overs (1 Run) Around off, pushed through extra cover for a single. Aizaz Khan walks in next. 119 needed off 53 balls. 11.1 overs (0 Run) OUT! CAUGHT! Babar Hayat was looking a bit on the edge out there and ends up throwing his wicket away. Ravindra Jadeja shortens the length and bowls it around off. Hayat hangs deep and looks to muscle it across the line. He loses his shape while going for the shot and the ball turns away as well. The top edge is found and the ball lobs up around the backward point region where Avesh Khan takes a simple catch. India are in cruise control at the moment. 10.6 overs (0 Run) A googly now, a bit quicker and leaving the left-hander. Shah taps it towards extra cover. 10.5 overs (4 Runs) FOUR! Nicely done! A bit of a half volley around leg, Kinchit Shah gets down on one knee and sweeps it well behind square leg for a boundary. 10.4 overs (1 Run) Tossed up on leg, Babar Hayat steps out and mistimes the lofted shot towards deep mid-wicket for just a single. 10.3 overs (2 Runs) Drifted onto the pads, Babar Hayat steps out and just pushes it through wide mid on. The batters push for two and a fumble in the deep allows them to come back with ease. 10.2 overs (1 Run) Floats it up a bit, on a length and pushes it outside off. Kinchit Shah waits for it and eases it towards covers for one more. 10.1 overs (1 Run) On a nagging length, close to the off pole. Hayat goes back and dabs it down to cover-point for a run.
english
This will make your jaw drop. Literally. At the 2010 Gymnastics World Championships in Poland, the supremely talented team from Ukraine put on a performance that left everyone stunned. The flexibility and athleticism that the three girls displayed seemed to defy all the laws of the human body, as they stretched and danced their way to glory. Watch the amazing clip below; the moves at the 1. 20 and 2. 25 marks are guaranteed to blow your mind! P. S. Despite this spectacular showing, the team only stood third in the tournament, behind Russia and Great Britain. Makes you wonder what kind of out-of-the-world performance the top two teams produced, doesn’t it?
english
--- title: "Database Checkpoints (SQL Server) | Microsoft Docs" description: Learn about checkpoints, known good points from which the SQL Server Database Engine can start applying changes contained in the log during recovery. ms.date: 04/23/2019 ms.prod: sql ms.prod_service: "database-engine, sql-database" ms.reviewer: "" ms.custom: "" ms.technology: supportability ms.topic: conceptual helpviewer_keywords: - "automatic checkpoints" - "transaction logs [SQL Server], checkpoints" - "logs [SQL Server], active" - "pages [SQL Server], dirty" - "MinLSN" - "checkpoints [SQL Server]" - "pages [SQL Server], flushing" - "dirty pages" - "transaction logs [SQL Server], active logs" - "recovery interval option [SQL Server]" - "buffer cache [SQL Server]" - "logs [SQL Server], checkpoints" - "Minimum Recovery LSN" - "flushing pages" - "active logs" ms.assetid: 98a80238-7409-4708-8a7d-5defd9957185 author: "MashaMSFT" ms.author: "mathoma" monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Database Checkpoints (SQL Server) [!INCLUDE [SQL Server Azure SQL Database](../../includes/applies-to-version/sql-asdb.md)] A *checkpoint* creates a known good point from which the [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] can start applying changes contained in the log during recovery after an unexpected shutdown or crash. ## <a name="Overview"></a> Overview For performance reasons, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] performs modifications to database pages in memory-in the buffer cache-and does not write these pages to disk after every change. Rather, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] periodically issues a checkpoint on each database. A *checkpoint* writes the current in-memory modified pages (known as *dirty pages*) and transaction log information from memory to disk and, also records the information in the transaction log. The [!INCLUDE[ssDE](../../includes/ssde-md.md)] supports several types of checkpoints: automatic, indirect, manual, and internal. The following table summarizes the types of **checkpoints:** |Name|[!INCLUDE[tsql](../../includes/tsql-md.md)] Interface|Description| |----------|----------------------------------|-----------------| |Automatic|EXEC sp_configure **'**recovery interval**','**_seconds_**'**|Issued automatically in the background to meet the upper time limit suggested by the **recovery interval** server configuration option. Automatic checkpoints run to completion. Automatic checkpoints are throttled based on the number of outstanding writes and whether the [!INCLUDE[ssDE](../../includes/ssde-md.md)] detects an increase in write latency above 50 milliseconds.<br /><br /> For more information, see [Configure the recovery interval Server Configuration Option](../../database-engine/configure-windows/configure-the-recovery-interval-server-configuration-option.md).| |Indirect|ALTER DATABASE ... SET TARGET_RECOVERY_TIME **=**_target\_recovery\_time_ { SECONDS &#124; MINUTES }|Issued in the background to meet a user-specified target recovery time for a given database. Beginning with [!INCLUDE[ssSQL15_md](../../includes/sssql15-md.md)], the default value is 1 minute. The default is 0 for older versions, which indicates that the database will use automatic checkpoints, whose frequency depends on the recovery interval setting of the server instance.<br /><br /> For more information, see [Change the Target Recovery Time of a Database &#40;SQL Server&#41;](../../relational-databases/logs/change-the-target-recovery-time-of-a-database-sql-server.md).| |Manual|CHECKPOINT [*checkpoint_duration*]|Issued when you execute a [!INCLUDE[tsql](../../includes/tsql-md.md)] CHECKPOINT command. The manual checkpoint occurs in the current database for your connection. By default, manual checkpoints run to completion. Throttling works the same way as for automatic checkpoints. Optionally, the *checkpoint_duration* parameter specifies a requested amount of time, in seconds, for the checkpoint to complete.<br /><br /> For more information, see [CHECKPOINT &#40;Transact-SQL&#41;](../../t-sql/language-elements/checkpoint-transact-sql.md).| |Internal|None.|Issued by various server operations such as backup and database-snapshot creation to guarantee that disk images match the current state of the log.| > [!NOTE] > The **-k** [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] advanced setup option enables a database administrator to throttle checkpoint I/O behavior based on the throughput of the I/O subsystem for some types of checkpoints. The **-k** setup option applies to automatic checkpoints and any otherwise unthrottled manual and internal checkpoints. For automatic, manual, and internal checkpoints, only modifications made after the latest checkpoint need to be rolled forward during database recovery. This reduces the time required to recover a database. > [!IMPORTANT] > Long-running, uncommitted transactions increase recovery time for all checkpoint types. ## <a name="InteractionBwnSettings"></a> Interaction of the TARGET_RECOVERY_TIME and 'recovery interval' Options The following table summarizes the interaction between the server-wide **sp_configure '**recovery interval**'** setting and the database-specific `ALTER DATABASE ... TARGET_RECOVERY_TIME` setting. |TARGET_RECOVERY_TIME|'recovery interval'|Type of Checkpoint Used| |----------------------------|-------------------------|-----------------------------| |0|0|automatic checkpoints whose target recovery interval is 1 minute.| |0|>0|Automatic checkpoints whose target recovery interval is specified by the user-defined setting of the **sp_configure 'recovery interval'** option.| |>0|Not applicable.|Indirect checkpoints whose target recovery time is determined by the TARGET_RECOVERY_TIME setting, expressed in seconds.| ## <a name="AutomaticChkpt"></a> Automatic checkpoints An automatic checkpoint occurs each time the number of log records reaches the number the [!INCLUDE[ssDE](../../includes/ssde-md.md)] estimates it can process during the time specified in the **recovery interval** server configuration option. For more information, see [Configure the recovery interval Server Configuration Option](../../database-engine/configure-windows/configure-the-recovery-interval-server-configuration-option.md). In every database without a user-defined target recovery time, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] generates automatic checkpoints. The frequency depends on the **recovery interval** advanced server configuration option, which specifies the maximum time that a given server instance should use to recover a database during a system restart. The [!INCLUDE[ssDE](../../includes/ssde-md.md)] estimates the maximum number of log records it can process within the recovery interval. When a database using automatic checkpoints reaches this maximum number of log records, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] issues an checkpoint on the database. The time interval between automatic checkpoints can be **highly** variable. A database with a substantial transaction workload will have more frequent checkpoints than a database used primarily for read-only operations. Under the simple recovery model, an automatic checkpoint is also queued if the log becomes 70 percent full. Under the simple recovery model, unless some factor is delaying log truncation, an automatic checkpoint truncates the unused section of the transaction log. By contrast, under the full and bulk-logged recovery models, once a log backup chain has been established, automatic checkpoints do not cause log truncation. For more information, see [The Transaction Log &#40;SQL Server&#41;](../../relational-databases/logs/the-transaction-log-sql-server.md). After a system crash, the length of time required to recover a given database depends largely on the amount of random I/O needed to redo pages that were dirty at the time of the crash. This means that the **recovery interval** setting is unreliable. It cannot determine an accurate recovery duration. Furthermore, when an automatic checkpoint is in progress, the general I/O activity for data increases significantly and quite unpredictably. ### <a name="PerformanceImpact"></a> Impact of recovery interval on recovery performance For an online transaction processing (OLTP) system using short transactions, **recovery interval** is the primary factor determining recovery time. However, the **recovery interval** option does not affect the time required to undo a long-running transaction. Recovery of a database with a long-running transaction can take much longer than the time specified in the **recovery interval** setting. For example, if a long-running transaction took two hours to perform updates before the server instance became disabled, the actual recovery takes considerably longer than the **recovery interval** value to recover the long transaction. For more information about the impact of a long running transaction on recovery time, see [The Transaction Log &#40;SQL Server&#41;](../../relational-databases/logs/the-transaction-log-sql-server.md). For more information about the recovery process, see [Restore and Recovery Overview (SQL Server)](../../relational-databases/backup-restore/restore-and-recovery-overview-sql-server.md#TlogAndRecovery). Typically, the default values provides optimal recovery performance. However, changing the recovery interval might improve performance in the following circumstances: - If recovery routinely takes significantly longer than 1 minute when long-running transactions are not being rolled back. - If you notice that frequent checkpoints are impairing performance on a database. If you decide to increase the **recovery interval** setting, we recommend increasing it gradually by small increments and evaluating the effect of each incremental increase on recovery performance. This approach is important because as the **recovery interval** setting increases, database recovery takes that many times longer to complete. For example, if you change **recovery interval** to 10 minutes, recovery takes approximately 10 times longer to complete than when **recovery interval** is set to 1 minute. ## <a name="IndirectChkpt"></a> Indirect checkpoints Indirect checkpoints, introduced in [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)], provide a configurable database-level alternative to automatic checkpoints. This can be configured by specifying the **target recovery time** database configuration option. For more information, see [Change the Target Recovery Time of a Database &#40;SQL Server&#41;](../../relational-databases/logs/change-the-target-recovery-time-of-a-database-sql-server.md). In the event of a system crash, indirect checkpoints provide potentially faster, more predictable recovery time than automatic checkpoints. Indirect checkpoints offer the following advantages: - An online transactional workload on a database configured for indirect checkpoints can experience performance degradation. Indirect checkpoints ensure that the number of dirty pages are below a certain threshold so the database recovery completes within the target recovery time. The **recovery interval** configuration option uses the number of transactions to determine the recovery time, as opposed to **indirect checkpoints** which makes use of the number of dirty pages. When indirect checkpoints are enabled on a database receiving a large number of DML operations, the background writer can start aggressively flushing dirty buffers to disk to ensure that the time required to perform recovery is within the target recovery time set of the database. This can cause additional I/O activity on certain systems which can contribute to a performance bottleneck if the disk subsystem is operating above or nearing the I/O threshold. - Indirect checkpoints enable you to reliably control database recovery time by factoring in the cost of random I/O during REDO. This enables a server instance to stay within an upper-bound limit on recovery times for a given database (except when a long-running transaction causes excessive UNDO times). - Indirect checkpoints reduce checkpoint-related I/O spiking by continually writing dirty pages to disk in the background. However, an online transactional workload on a database configured for indirect checkpoints can experience performance degradation. This is because the background writer used by indirect checkpoint sometimes increases the total write load for a server instance. > [!IMPORTANT] > Indirect checkpoint is the default behavior for new databases created in [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)], including the Model and TempDB databases. > Databases that were upgraded in-place, or restored from a previous version of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], will use the previous automatic checkpoint behavior unless explicitly altered to use indirect checkpoint. ### <a name="ctp23"></a> Improved indirect checkpoint scalability Prior to [!INCLUDE[ssNoVersion](../../includes/sssqlv15-md.md)], you may experience non-yielding scheduler errors when there is a database that generates a large number of dirty pages, such as `tempdb`. [!INCLUDE[sql-server-2019](../../includes/sssqlv15-md.md)] introduces improved scalability for indirect checkpoint, which should help avoid these errors on databases that have a heavy `UPDATE`/`INSERT` workload. ## <a name="EventsCausingChkpt"></a> Internal checkpoints Internal Checkpoints are generated by various server components to guarantee that disk images match the current state of the log. Internal checkpoint are generated in response to the following events: - Database files have been added or removed by using ALTER DATABASE. - A database backup is taken. - A database snapshot is created, whether explicitly or internally for DBCC CHECKDB. - An activity requiring a database shutdown is performed. For example, AUTO_CLOSE is ON and the last user connection to the database is closed, or a database option change is made that requires a restart of the database. - An instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is stopped by stopping the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (MSSQLSERVER) service . Either action causes a checkpoint in each database in the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. - Bringing a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] failover cluster instance (FCI) offline. ## <a name="RelatedTasks"></a> Related tasks **To change the recovery interval on a server instance** - [Configure the recovery interval Server Configuration Option](../../database-engine/configure-windows/configure-the-recovery-interval-server-configuration-option.md) **To configure indirect checkpoints on a database** - [Change the Target Recovery Time of a Database &#40;SQL Server&#41;](../../relational-databases/logs/change-the-target-recovery-time-of-a-database-sql-server.md) **To issue a manual checkpoint on a database** - [CHECKPOINT &#40;Transact-SQL&#41;](../../t-sql/language-elements/checkpoint-transact-sql.md) ## See also [The Transaction Log &#40;SQL Server&#41;](../../relational-databases/logs/the-transaction-log-sql-server.md) [SQL Server Transaction Log Architecture and Management Guide](../../relational-databases/sql-server-transaction-log-architecture-and-management-guide.md)
markdown
<!DOCTYPE html> <html> <meta charset="UTF-8"> <head> <title>Topic 08 -- Abstracts with Biological Entities (English) - 75 Topics / Sub-Topic Model 22 - 15 Topics</title> <style> table { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #ddd; padding: 8px; } tr:nth-child(even){background-color: #f2f2f2;} tr:hover {background-color: #ddd;} th { padding-top: 12px; padding-bottom: 12px; text-align: left; background-color: #0099FF; color: white; } </style> </head> <body> <h2>Topic 08 -- Abstracts with Biological Entities (English) - 75 Topics / Sub-Topic Model 22 - 15 Topics</h2> <table border="1" class="dataframe"> <thead> <tr style="text-align: right;"> <th></th> <th>cite ad</th> <th>title</th> <th>authors</th> <th>publish year</th> <th>publish time</th> <th>dataset</th> <th>abstract mentions covid</th> <th>pmcid</th> <th>pubmed id</th> <th>doi</th> <th>cord uid</th> <th>topic weight</th> <th>Similarity scispacy</th> <th>Similarity specter</th> </tr> </thead> <tbody> <tr> <th id="rbbom0l0";>1</th> <td>Zambriski_2013</td> <td>Description of fecal shedding of Cryptosporidium parvum oocysts in experimentally challenged dairy calves</td> <td>Zambriski, <NAME>.; Nydam, <NAME>.; <NAME>.; Bellosa, <NAME>.; Burton, <NAME>, <NAME>, <NAME>.; Ollivett, <NAME>; <NAME>.</td> <td>2013</td> <td>2013-01-13</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7088138" target="_blank">PMC7088138</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/23315189.0" target="_blank">23315189.0</a></td> <td><a href="https://doi.org/10.1007/s00436-012-3258-2" target="_blank">10.1007/s00436-012-3258-2</a></td> <td>rbbom0l0</td> <td>0.816616</td> <td><a href="Topic_08.html#z3i864xv">Uehlinger_2007</a></td> <td></td> </tr> <tr> <th id="rbf4av79";>2</th> <td>Zambriski_2013</td> <td>Cryptosporidium parvum: Determination of ID50 and the dose–response relationship in experimentally challenged dairy calves</td> <td><NAME>.; <NAME>.; <NAME>.; <NAME>.; <NAME>.; <NAME>.</td> <td>2013</td> <td>2013-10-18</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7116995" target="_blank">PMC7116995</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/23680540.0" target="_blank">23680540.0</a></td> <td><a href="https://doi.org/10.1016/j.vetpar.2013.04.022" target="_blank">10.1016/j.vetpar.2013.04.022</a></td> <td>rbf4av79</td> <td>0.788968</td> <td><a href="Topic_11.html#nedbi9aq">Gerber_2016</a>, <a href="Topic_08.html#rbbom0l0">Zambriski_2013</a></td> <td><a href="Topic_08.html#gws16hfr">Naciri_1993</a></td> </tr> <tr> <th id="ig8lqpcr";>3</th> <td>Ballou_2011</td> <td>Effects of intravenous Escherichia coli dose on the pathophysiological response of colostrum-fed Jersey calves</td> <td><NAME>.; <NAME>.; <NAME>.; <NAME>.</td> <td>2011</td> <td>2011-05-15</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7112639" target="_blank">PMC7112639</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/21420179.0" target="_blank">21420179.0</a></td> <td><a href="https://doi.org/10.1016/j.vetimm.2011.02.008" target="_blank">10.1016/j.vetimm.2011.02.008</a></td> <td>ig8lqpcr</td> <td>0.774009</td> <td><a href="Topic_11.html#nedbi9aq">Gerber_2016</a>, <a href="Topic_11.html#czgk6hzy">Zhou_2019</a></td> <td><a href="Topic_03.html#8g3f81pc">Parreño_2004</a></td> </tr> <tr> <th id="0tcmgws2";>4</th> <td>Niine_2018</td> <td>Cryptosporidium outbreak in calves on a large dairy farm: Effect of treatment and the association with the inflammatory response and short-term weight gain</td> <td><NAME>; <NAME>; <NAME>; <NAME></td> <td>2018</td> <td>2018-04-30</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7111845" target="_blank">PMC7111845</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/29304439.0" target="_blank">29304439.0</a></td> <td><a href="https://doi.org/10.1016/j.rvsc.2017.12.015" target="_blank">10.1016/j.rvsc.2017.12.015</a></td> <td>0tcmgws2</td> <td>0.756707</td> <td><a href="Topic_11.html#nedbi9aq">Gerber_2016</a>, <a href="Topic_01.html#tizeu01t">Brückmann_2000</a></td> <td></td> </tr> <tr> <th id="5oge12e4";>5</th> <td>Castro-Hermida_2008</td> <td>Activity of an anti-inflammatory drug against cryptosporidiosis in neonatal lambs</td> <td>Castro-Hermida, <NAME>; <NAME>; <NAME>; <NAME>; <NAME>; <NAME>; del Águila, Carmen</td> <td>2008</td> <td>2008-08-17</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7131681" target="_blank">PMC7131681</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/18579312.0" target="_blank">18579312.0</a></td> <td><a href="https://doi.org/10.1016/j.vetpar.2008.05.012" target="_blank">10.1016/j.vetpar.2008.05.012</a></td> <td>5oge12e4</td> <td>0.602164</td> <td><a href="Topic_11.html#nedbi9aq">Gerber_2016</a>, <a href="Topic_01.html#00bwhaga">Aydogdu_2019</a></td> <td><a href="Topic_06.html#fs6x66in">Smee_1991</a></td> </tr> <tr> <th id="fgvu1wcx";>6</th> <td>Schnyder_2009</td> <td>Prophylactic and therapeutic efficacy of nitazoxanide against Cryptosporidium parvum in experimentally challenged neonatal calves</td> <td><NAME>.; <NAME>.; <NAME>.; <NAME>.</td> <td>2009</td> <td>2009-03-09</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7117045" target="_blank">PMC7117045</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/19062195.0" target="_blank">19062195.0</a></td> <td><a href="https://doi.org/10.1016/j.vetpar.2008.10.094" target="_blank">10.1016/j.vetpar.2008.10.094</a></td> <td>fgvu1wcx</td> <td>0.597136</td> <td><a href="Topic_08.html#5oge12e4">Castro-Hermida_2008</a>, <a href="Topic_11.html#nedbi9aq">Gerber_2016</a>, <a href="Topic_08.html#z3i864xv">Uehlinger_2007</a></td> <td><a href="Topic_08.html#5oge12e4">Castro-Hermida_2008</a>, <a href="Topic_08.html#gws16hfr">Naciri_1993</a></td> </tr> <tr> <th id="z3i864xv";>7</th> <td>Uehlinger_2007</td> <td>Efficacy of vaccination in preventing giardiasis in calves</td> <td>Uehlinger, <NAME>.; O’Handley, <NAME>.; Greenwood, <NAME>.; Guselle, <NAME>.; Gabor, <NAME>.; <NAME>, <NAME>.; Steuart, <NAME>.; Barkema, <NAME>.</td> <td>2007</td> <td>2007-05-15</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7126623" target="_blank">PMC7126623</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/17350765.0" target="_blank">17350765.0</a></td> <td><a href="https://doi.org/10.1016/j.vetpar.2007.01.013" target="_blank">10.1016/j.vetpar.2007.01.013</a></td> <td>z3i864xv</td> <td>0.569734</td> <td><a href="Topic_09.html#t0mqxrmq">Elvinger_1996</a></td> <td><a href="Topic_04.html#a6ia8kxf">Bellinzoni_1989</a>, <a href="Topic_03.html#8g3f81pc">Parreño_2004</a></td> </tr> <tr> <th id="ft0rc88k";>8</th> <td>Klein_2008</td> <td>Preventive and therapeutic efficacy of halofuginone-lactate against Cryptosporidium parvum in spontaneously infected calves: A centralised, randomised, double-blind, placebo-controlled study</td> <td><NAME></td> <td>2008</td> <td>2008-09-30</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7110609" target="_blank">PMC7110609</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/17606389.0" target="_blank">17606389.0</a></td> <td><a href="https://doi.org/10.1016/j.tvjl.2007.05.007" target="_blank">10.1016/j.tvjl.2007.05.007</a></td> <td>ft0rc88k</td> <td>0.555713</td> <td><a href="Topic_04.html#a6ia8kxf">Bellinzoni_1989</a>, <a href="Topic_08.html#5oge12e4">Castro-Hermida_2008</a></td> <td><a href="Topic_08.html#5oge12e4">Castro-Hermida_2008</a>, <a href="Topic_08.html#gws16hfr">Naciri_1993</a></td> </tr> <tr> <th id="u5mhh829";>9</th> <td>Keidel_2013</td> <td>Integration of halofuginone lactate treatment and disinfection with p-chloro-m-cresol to control natural cryptosporidiosis in calves</td> <td><NAME>; <NAME></td> <td>2013</td> <td>2013-09-23</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7115792" target="_blank">PMC7115792</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/23561324.0" target="_blank">23561324.0</a></td> <td><a href="https://doi.org/10.1016/j.vetpar.2013.03.003" target="_blank">10.1016/j.vetpar.2013.03.003</a></td> <td>u5mhh829</td> <td>0.546100</td> <td><a href="Topic_04.html#a6ia8kxf">Bellinzoni_1989</a>, <a href="Topic_11.html#nedbi9aq">Gerber_2016</a></td> <td><a href="Topic_08.html#gws16hfr">Naciri_1993</a></td> </tr> <tr> <th id="gws16hfr";>10</th> <td>Naciri_1993</td> <td>The effect of halofuginone lactate on experimental Cryptosporidium parvum infections in calves</td> <td><NAME>; <NAME>; <NAME>.; <NAME>.</td> <td>1993</td> <td>1993-01-31</td> <td>PMC</td> <td>N</td> <td></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/8447063.0" target="_blank">8447063.0</a></td> <td><a href="https://doi.org/10.1016/0304-4017(93)90075-x" target="_blank">10.1016/0304-4017(93)90075-x</a></td> <td>gws16hfr</td> <td>0.536106</td> <td><a href="Topic_11.html#nedbi9aq">Gerber_2016</a>, <a href="Topic_08.html#z3i864xv">Uehlinger_2007</a>, <a href="Topic_08.html#5oge12e4">Castro-Hermida_2008</a></td> <td><a href="Topic_08.html#5oge12e4">Castro-Hermida_2008</a></td> </tr> <tr> <th id="tonamcth";>11</th> <td>Imboden_2012</td> <td>Antibody fusions reduce onset of experimental Cryptosporidium parvum infection in calves</td> <td>Imboden, Michael; Schaefer, <NAME>.; <NAME>.; <NAME>; <NAME>.</td> <td>2012</td> <td>2012-08-13</td> <td>None</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3387522" target="_blank">PMC3387522</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/22455725.0" target="_blank">22455725.0</a></td> <td><a href="https://doi.org/10.1016/j.vetpar.2012.02.014" target="_blank">10.1016/j.vetpar.2012.02.014</a></td> <td>tonamcth</td> <td>0.518771</td> <td></td> <td></td> </tr> <tr> <th id="2padgvji";>12</th> <td>Mundt_2005</td> <td>Pathology and treatment of Eimeria zuernii coccidiosis in calves: Investigations in an infection model</td> <td><NAME>.; <NAME>.; <NAME>.; <NAME>.; <NAME>.</td> <td>2005</td> <td>2005-12-31</td> <td>PMC</td> <td>N</td> <td></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/16023406.0" target="_blank">16023406.0</a></td> <td><a href="https://doi.org/10.1016/j.parint.2005.06.003" target="_blank">10.1016/j.parint.2005.06.003</a></td> <td>2padgvji</td> <td>0.499160</td> <td><a href="Topic_08.html#z3i864xv">Uehlinger_2007</a></td> <td></td> </tr> <tr> <th id="q5rqedq3";>13</th> <td>Lee_S_2010</td> <td>Embryo vaccination of chickens using a novel adjuvant formulation stimulates protective immunity against Eimeria maxima infection</td> <td><NAME>; <NAME>.; <NAME>.; <NAME>; <NAME>; Lillehoj, <NAME>.; <NAME>.; <NAME></td> <td>2010</td> <td>2010-11-16</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7127098" target="_blank">PMC7127098</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/20956029.0" target="_blank">20956029.0</a></td> <td><a href="https://doi.org/10.1016/j.vaccine.2010.09.051" target="_blank">10.1016/j.vaccine.2010.09.051</a></td> <td>q5rqedq3</td> <td>0.479089</td> <td></td> <td><a href="Topic_01.html#s6t8sp5w">Lee_S_2010</a>, <a href="Topic_04.html#a6ia8kxf">Bellinzoni_1989</a></td> </tr> <tr> <th id="0h28a3az";>14</th> <td>Chartier_1996</td> <td>Prophylaxis using paromomycin of natural cryptosporidial infection in neonatal kids</td> <td><NAME>.; <NAME>; <NAME></td> <td>1996</td> <td>1996-01-31</td> <td>PMC</td> <td>N</td> <td></td> <td></td> <td><a href="https://doi.org/10.1016/0167-5877(95)00511-0" target="_blank">10.1016/0167-5877(95)00511-0</a></td> <td>0h28a3az</td> <td>0.473406</td> <td><a href="Topic_11.html#nedbi9aq">Gerber_2016</a>, <a href="Topic_08.html#z3i864xv">Uehlinger_2007</a></td> <td><a href="Topic_08.html#5oge12e4">Castro-Hermida_2008</a>, <a href="Topic_08.html#gws16hfr">Naciri_1993</a></td> </tr> <tr> <th id="5k4f183k";>15</th> <td>Özpinar_1996</td> <td>Dose-dependent effects of specific egg-yolk antibodies on diarrhea of newborn calves</td> <td><NAME>.; <NAME>.; <NAME>.; <NAME>.; <NAME>.; <NAME>.; <NAME>.</td> <td>1996</td> <td>1996-06-30</td> <td>PMC</td> <td>N</td> <td></td> <td></td> <td><a href="https://doi.org/10.1016/0167-5877(95)00561-7" target="_blank">10.1016/0167-5877(95)00561-7</a></td> <td>5k4f183k</td> <td>0.457599</td> <td></td> <td><a href="Topic_03.html#8g3f81pc">Parreño_2004</a></td> </tr> <tr> <th id="cosh3wv6";>16</th> <td>Buehl_2006</td> <td>Canine Isosporosis – Epidemiology of Field and Experimental Infections</td> <td><NAME>.; <NAME>.; <NAME>.; <NAME>.; <NAME>.</td> <td>2006</td> <td>2006-11-21</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7165684" target="_blank">PMC7165684</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/17123427.0" target="_blank">17123427.0</a></td> <td><a href="https://doi.org/10.1111/j.1439-0450.2006.00973.x" target="_blank">10.1111/j.1439-0450.2006.00973.x</a></td> <td>cosh3wv6</td> <td>0.446922</td> <td></td> <td></td> </tr> <tr> <th id="s6t8sp5w";>17</th> <td>Lee_S_2010</td> <td>The effects of a novel adjuvant complex/Eimeria profilin vaccine on the intestinal host immune response against live E. acervulina challenge infection</td> <td><NAME>; <NAME>.; <NAME>.; <NAME>; <NAME>.; <NAME></td> <td>2010</td> <td>2010-09-07</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7127425" target="_blank">PMC7127425</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/20637765.0" target="_blank">20637765.0</a></td> <td><a href="https://doi.org/10.1016/j.vaccine.2010.06.116" target="_blank">10.1016/j.vaccine.2010.06.116</a></td> <td>s6t8sp5w</td> <td>0.429976</td> <td></td> <td><a href="Topic_08.html#q5rqedq3">Lee_S_2010</a></td> </tr> <tr> <th id="u43000o5";>18</th> <td>Lassen_2015</td> <td>Systemic acute phase proteins response in calves experimentally infected with Eimeria zuernii</td> <td><NAME>; <NAME>; <NAME>; <NAME></td> <td>2015</td> <td>2015-09-15</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7116924" target="_blank">PMC7116924</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/26215927.0" target="_blank">26215927.0</a></td> <td><a href="https://doi.org/10.1016/j.vetpar.2015.06.024" target="_blank">10.1016/j.vetpar.2015.06.024</a></td> <td>u43000o5</td> <td>0.424108</td> <td></td> <td><a href="Topic_02.html#p9si8rhc">Røntved_2000</a></td> </tr> <tr> <th id="54lhjvt8";>19</th> <td>Straub_1995</td> <td>Studies on the suitability of alpha-hybrid interferon application in cattle</td> <td>Straub, <NAME></td> <td>1995</td> <td>1995-09-30</td> <td>PMC</td> <td>N</td> <td></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/8549112.0" target="_blank">8549112.0</a></td> <td><a href="https://doi.org/10.1016/0147-9571(95)00013-x" target="_blank">10.1016/0147-9571(95)00013-x</a></td> <td>54lhjvt8</td> <td>0.410152</td> <td><a href="Topic_08.html#5oge12e4">Castro-Hermida_2008</a></td> <td></td> </tr> <tr> <th id="tizeu01t";>20</th> <td>Brückmann_2000</td> <td>Alterations of growth hormone, cortisol, luteinizing hormone, and insulin concentrations in early-postnatal calves affected with diarrhea</td> <td><NAME>.; <NAME>.; <NAME>.; <NAME>.</td> <td>2000</td> <td>2000-02-29</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7127462" target="_blank">PMC7127462</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/10764975.0" target="_blank">10764975.0</a></td> <td><a href="https://doi.org/10.1016/s0739-7240(99)00078-8" target="_blank">10.1016/s0739-7240(99)00078-8</a></td> <td>tizeu01t</td> <td>0.379209</td> <td><a href="Topic_11.html#nedbi9aq">Gerber_2016</a></td> <td></td> </tr> <tr> <th id="crsokkk1";>21</th> <td>Galassi_1986</td> <td>Clinical results obtained in cattle and swine by means of biological immunostimulators</td> <td><NAME>.; <NAME>.; <NAME>.; <NAME></td> <td>1986</td> <td>1986-12-31</td> <td>PMC</td> <td>N</td> <td></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/2431832.0" target="_blank">2431832.0</a></td> <td><a href="https://doi.org/10.1016/0147-9571(86)90023-8" target="_blank">10.1016/0147-9571(86)90023-8</a></td> <td>crsokkk1</td> <td>0.356733</td> <td></td> <td></td> </tr> <tr> <th id="8v3qjwpf";>22</th> <td>Enemark_2003</td> <td>Pathogenicity of Cryptosporidium parvum—evaluation of an animal infection model</td> <td><NAME>; <NAME>; <NAME>; <NAME>; <NAME>; <NAME>; <NAME></td> <td>2003</td> <td>2003-04-02</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7125529" target="_blank">PMC7125529</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/12651216.0" target="_blank">12651216.0</a></td> <td><a href="https://doi.org/10.1016/s0304-4017(03)00034-7" target="_blank">10.1016/s0304-4017(03)00034-7</a></td> <td>8v3qjwpf</td> <td>0.344795</td> <td></td> <td></td> </tr> <tr> <th id="1o4xwrki";>23</th> <td>Klein_2008</td> <td>Effect of Cryptosporidium parvum infection on the absorptive capacity and paracellular permeability of the small intestine in neonatal calves</td> <td><NAME>; <NAME>; <NAME>; <NAME></td> <td>2008</td> <td>2008-03-25</td> <td>PMC</td> <td>N</td> <td><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7126284" target="_blank">PMC7126284</a></td> <td><a href="https://www.ncbi.nlm.nih.gov/pubmed/18248900.0" target="_blank">18248900.0</a></td> <td><a href="https://doi.org/10.1016/j.vetpar.2007.11.020" target="_blank">10.1016/j.vetpar.2007.11.020</a></td> <td>1o4xwrki</td> <td>0.314485</td> <td><a href="Topic_11.html#nedbi9aq">Gerber_2016</a>, <a href="Topic_01.html#92j0adg6">Marinaro_2010</a></td> <td></td> </tr> </tbody> </table> </body> </html>
html
<reponame>Bigsby/PoC<gh_stars>0 { "styles": [ { "path": "angular-material.min.css", "order": 0 } ], "scripts": { "path": "lib/angular.min", "dependants": [ "lib/angular-sanitize.min", "lib/angular-animate.min", "lib/angular_1_router", "lib/angular-aria.min", "lib/angular-material.min", "lib/angular-messages.min" ] } }
json
<reponame>webuidesigning/css_animation17_motionx .flip-in-x { -webkit-animation: flip-in-x 1.2s; animation: flip-in-x 1.2s; } @keyframes flip-in-x { 0% { transform: perspective(500px) rotateX(70deg); opacity: .2; } 30% { transform: perspective(500px) rotateX(-50deg); } 45% { transform: perspective(500px) rotateX(30deg); } 65% { transform: perspective(500px) rotateX(-20deg); } 85% { transform: perspective(500px) rotateX(10deg); } 100% { transform: perspective(500px) rotateX(0deg); } } @-webkit-keyframes flip-in-x { 0% { -webkit-transform: perspective(500px) rotateX(70deg); opacity: .2; } 30% { -webkit-transform: perspective(500px) rotateX(-50deg); } 45% { -webkit-transform: perspective(500px) rotateX(30deg); } 65% { -webkit-transform: perspective(500px) rotateX(-20deg); } 85% { -webkit-transform: perspective(500px) rotateX(10deg); } 100% { -webkit-transform: perspective(500px) rotateX(0deg); } }
css
#include "pmm.hpp" #include "paging.hpp" #include "vga.hpp" #include <mem/mmap.hpp> #include <scheduler/lock_guard.hpp> #include <util/math.hpp> #include <util/util.hpp> Bitmap PMM::bitmap; uintptr_t PMM::highestPage = 0; TicketLock PMM::s_lock; uintptr_t PMM::s_lastUsedIndex = 0; // Defined in linker.ld, indicate the end of kernel code/data extern uint32_t end; void PMM::Initialize(MMap &mmap) { Vga term; term.Clear(); mmap.Print(term); uintptr_t usableMemory = mmap.UsableMemory(); term << "Total memory: " << usableMemory; // First, calculate how big the bitmap needs to be. for (size_t i = 0; i < mmap.GetNumInfos(); i++) { auto info = mmap.GetInfo(i); if (info.type != MULTIBOOT_MEMORY_AVAILABLE) continue; uintptr_t top = info.addr + info.length; if (top > highestPage) highestPage = top; } size_t bitmap_size = kmath::div_roundup(highestPage, PAGE_SIZE) / 8; // Second, find a location with enough free pages to host the bitmap. for (size_t i = 0; i < mmap.GetNumInfos(); i++) { auto info = mmap.GetInfo(i); if (info.type != MULTIBOOT_MEMORY_AVAILABLE) continue; if (info.length >= bitmap_size) { auto *bitmap_addr = (uint8_t *)(info.addr + 0); // Initialise entire bitmap to 1 (non-free) memset(bitmap_addr, 0xff, bitmap_size); bitmap.SetData(bitmap_addr, bitmap_size); info.length -= bitmap_size; info.addr += bitmap_size; break; } // Third, populate free bitmap entries according to memory map. for (size_t i = 0; i < mmap.GetNumInfos(); i++) { auto info = mmap.GetInfo(i); if (info.type != MULTIBOOT_MEMORY_AVAILABLE) continue; for (uintptr_t j = 0; j < info.length; j += PAGE_SIZE) bitmap.Unset((info.addr + j) / PAGE_SIZE); } } } void *PMM::InnerAlloc(uintptr_t count, uintptr_t limit) { uintptr_t p = 0; while (s_lastUsedIndex < limit) { if (!bitmap.IsSet(s_lastUsedIndex++)) { if (++p == count) { uintptr_t page = s_lastUsedIndex - count; for (uintptr_t i = page; i < s_lastUsedIndex; i++) { bitmap.Set(i); } return (void *)(page * PAGE_SIZE); } } else { p = 0; } } return nullptr; } uintptr_t PMM::AllocBlock() { TicketLockGuard(s_lock); uintptr_t limit = highestPage / PAGE_SIZE; while (s_lastUsedIndex < limit) { if (!bitmap.IsSet(s_lastUsedIndex++)) { return s_lastUsedIndex; } } return 0; } void *PMM::Alloc(uintptr_t count) { TicketLockGuard(s_lock); uintptr_t l = s_lastUsedIndex; void *ret = InnerAlloc(count, highestPage / PAGE_SIZE); if (ret == nullptr) { // reset our last used index s_lastUsedIndex = 0; ret = InnerAlloc(count, l); } return ret; } void *PMM::AllocZ(uintptr_t count) { void *ret = Alloc(count); if (ret == nullptr) { return nullptr; } memset(ret, 0, PAGE_SIZE); return ret; }
cpp
The Department of Medical Education (DME), Madhya Pradesh, has revised the MP NEET UG Counselling 2022 dates for admission to MBBS and BDS programmes against the round-2 and mop-up round. The dme. mponline. gov. in is hosting the MP NEET UG 2022 second round and mop-up round counselling dates. As per the revised NEET UG round-2 dates, the department has asked the medical aspirants to report to the allotted medical and dental college in person for document verifications and admission between December 1 and December 3. Candidates will also be allowed to upgrade seats against the MP NEET UG round-2 counselling. The dates for willingness for upgradation for mop-up round by admitted candidates of second round and candidates of first round who opted for upgradation in second round through candidate login is from December 1 to December 3. While fresh registration by new candidates for the MP NEET UG mop-up round for admission to MBBS and BDS courses is underway and will continue till December 7. The revised merit list of registered candidates and eligible candidate list will be released on December 8. The department will also announce the vacancies on December 8. Choice filling and choice locking which is a must for candidates in mop-up round can be done between December 9 and December 11. The MP NEET UG mop-up round allotment result will be declared on December 14, while reporting to the allotted medical and dental college in person for document verification and admissions will have to be done from December 15 to December 17. MP NEET UG college level admission against stray vacancy round for selected candidates will be done on December 21.
english
<filename>libs/ssl-config/src/test/java/org/elasticsearch/common/ssl/SslDiagnosticsTests.java /* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.common.ssl; import org.elasticsearch.common.Nullable; import org.elasticsearch.test.ESTestCase; import org.hamcrest.Matchers; import org.mockito.Mockito; import javax.net.ssl.SSLSession; import javax.security.auth.x500.X500Principal; import java.io.IOException; import java.nio.file.Path; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.CertificateEncodingException; import java.security.cert.CertificateException; import java.security.cert.CertificateParsingException; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; public class SslDiagnosticsTests extends ESTestCase { // Some constants for use in mock certificates private static final byte[] MOCK_ENCODING_1 = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 }; private static final String MOCK_FINGERPRINT_1 = "1f8ac10f23c5b5bc1167bda84b833e5c057a77d2"; private static final byte[] MOCK_ENCODING_2 = { 0x62, 0x63, 0x64, 0x65, 0x66, 0x67 }; private static final String MOCK_FINGERPRINT_2 = "836d472783f4a210cfa3ab5621f757d1a2964aca"; private static final byte[] MOCK_ENCODING_3 = { 0x63, 0x64, 0x65, 0x66, 0x67, 0x68 }; private static final String MOCK_FINGERPRINT_3 = "da8e062d74919f549a9764c24ab0fcde3af3719f"; private static final byte[] MOCK_ENCODING_4 = { 0x64, 0x65, 0x66, 0x67, 0x68, 0x69 }; private static final String MOCK_FINGERPRINT_4 = "5d96965bfae50bf2be0d6259eb87a6cc9f5d0b26"; public void testDiagnosticMessageWhenServerProvidesAFullCertChainThatIsTrusted() throws Exception { X509Certificate[] chain = loadCertChain("cert1/cert1.crt", "ca1/ca.crt"); final SSLSession session = session("192.168.1.1"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca1/ca.crt", "ca2/ca.crt", "ca3/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.1];" + " the server provided a certificate with subject name [CN=cert1] and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate has subject alternative names [DNS:localhost,IP:127.0.0.1];" + " the certificate is issued by [CN=Test CA 1];" + " the certificate is signed by" + " (subject [CN=Test CA 1] fingerprint [2b7b0416391bdf86502505c23149022d2213dadc] {trusted issuer})" + " which is self-issued; the [CN=Test CA 1] certificate is trusted in this ssl context ([xpack.http.ssl])")); } public void testDiagnosticMessageWhenServerProvidesAFullCertChainThatIsntTrusted() throws Exception { X509Certificate[] chain = loadCertChain("cert1/cert1.crt", "ca1/ca.crt"); final SSLSession session = session("192.168.1.1"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca2/ca.crt", "ca3/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.1];" + " the server provided a certificate with subject name [CN=cert1] and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate has subject alternative names [DNS:localhost,IP:127.0.0.1];" + " the certificate is issued by [CN=Test CA 1];" + " the certificate is signed by (subject [CN=Test CA 1] fingerprint [2b7b0416391bdf86502505c23149022d2213dadc])" + " which is self-issued; the [CN=Test CA 1] certificate is not trusted in this ssl context ([xpack.http.ssl])")); } public void testDiagnosticMessageWhenServerFullCertChainIsntTrustedButMimicIssuerExists() throws Exception { X509Certificate[] chain = loadCertChain("cert1/cert1.crt", "ca1/ca.crt"); final SSLSession session = session("192.168.1.1"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca1-b/ca.crt", "ca2/ca.crt", "ca3/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.1];" + " the server provided a certificate with subject name [CN=cert1] and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate has subject alternative names [DNS:localhost,IP:127.0.0.1];" + " the certificate is issued by [CN=Test CA 1];" + " the certificate is signed by (subject [CN=Test CA 1] fingerprint [2b7b0416391bdf86502505c23149022d2213dadc])" + " which is self-issued; the [CN=Test CA 1] certificate is not trusted in this ssl context ([xpack.http.ssl]);" + " this ssl context does trust a certificate with subject [CN=Test CA 1]" + " but the trusted certificate has fingerprint [b095bf2526be20783e1f26dfd69c7aae910e3663]")); } public void testDiagnosticMessageWhenServerProvidesEndCertificateOnlyAndTheCertAuthIsTrusted() throws Exception { X509Certificate[] chain = loadCertChain("cert1/cert1.crt"); final SSLSession session = session("192.168.1.1"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca1/ca.crt", "ca2/ca.crt", "ca3/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.1];" + " the server provided a certificate with subject name [CN=cert1] and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate has subject alternative names [DNS:localhost,IP:127.0.0.1];" + " the certificate is issued by [CN=Test CA 1]" + " but the server did not provide a copy of the issuing certificate in the certificate chain;" + " the issuing certificate with fingerprint [2b7b0416391bdf86502505c23149022d2213dadc]" + " is trusted in this ssl context ([xpack.http.ssl])")); } public void testDiagnosticMessageWhenServerProvidesEndCertificateOnlyButTheCertAuthIsNotTrusted() throws Exception { X509Certificate[] chain = loadCertChain("cert1/cert1.crt"); final SSLSession session = session("192.168.1.1"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca2/ca.crt", "ca3/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.1];" + " the server provided a certificate with subject name [CN=cert1] and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate has subject alternative names [DNS:localhost,IP:127.0.0.1];" + " the certificate is issued by [CN=Test CA 1]" + " but the server did not provide a copy of the issuing certificate in the certificate chain;" + " this ssl context ([xpack.http.ssl]) is not configured to trust that issuer")); } public void testDiagnosticMessageWhenServerProvidesEndCertificateOnlyWithMimicIssuer() throws Exception { X509Certificate[] chain = loadCertChain("cert1/cert1.crt"); final SSLSession session = session("192.168.1.1"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca1-b/ca.crt", "ca2/ca.crt", "ca3/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.1];" + " the server provided a certificate with subject name [CN=cert1] and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate has subject alternative names [DNS:localhost,IP:127.0.0.1];" + " the certificate is issued by [CN=Test CA 1]" + " but the server did not provide a copy of the issuing certificate in the certificate chain;" + " this ssl context ([xpack.http.ssl]) trusts [1] certificate with subject name [CN=Test CA 1]" + " and fingerprint [b095bf2526be20783e1f26dfd69c7aae910e3663] but the signatures do not match")); } public void testDiagnosticMessageWhenServerProvidesEndCertificateWithMultipleMimicIssuers() throws Exception { X509Certificate[] chain = loadCertChain("cert1/cert1.crt"); final SSLSession session = session("192.168.1.9"); final X509Certificate ca1b = loadCertificate("ca1-b/ca.crt"); final Map<String, List<X509Certificate>> trustIssuers = trust(ca1b, cloneCertificateAsMock(ca1b)); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.9];" + " the server provided a certificate with subject name [CN=cert1] and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate has subject alternative names [DNS:localhost,IP:127.0.0.1];" + " the certificate is issued by [CN=Test CA 1]" + " but the server did not provide a copy of the issuing certificate in the certificate chain;" + " this ssl context ([xpack.http.ssl]) trusts [2] certificates with subject name [CN=Test CA 1]" + " and fingerprint [b095bf2526be20783e1f26dfd69c7aae910e3663], fingerprint [" + MOCK_FINGERPRINT_1 + "]" + " but the signatures do not match")); } public void testDiagnosticMessageWhenServerProvidePartialChainFromTrustedCA() throws Exception { final X509Certificate rootCA = mockCertificateWithIssuer("CN=root-ca,DC=example,DC=com", MOCK_ENCODING_1, Collections.emptyList(), null); final X509Certificate issuingCA = mockCertificateWithIssuer("CN=issuing-ca,DC=example,DC=com", MOCK_ENCODING_2, Collections.emptyList(), rootCA); final X509Certificate localCA = mockCertificateWithIssuer("CN=ca,OU=windows,DC=example,DC=com", MOCK_ENCODING_3, Collections.emptyList(), issuingCA); final X509Certificate endCert = mockCertificateWithIssuer("CN=elastic1,OU=windows,DC=example,DC=com", MOCK_ENCODING_4, Collections.emptyList(), localCA); final X509Certificate[] chain = { endCert, localCA, issuingCA }; final SSLSession session = session("192.168.1.5"); final Map<String, List<X509Certificate>> trustIssuers = trust(issuingCA, rootCA); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.security.authc.realms.ldap.ldap1.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.5];" + " the server provided a certificate with subject name [CN=elastic1,OU=windows,DC=example,DC=com]" + " and fingerprint [" + MOCK_FINGERPRINT_4 + "];" + " the certificate does not have any subject alternative names;" + " the certificate is issued by [CN=ca,OU=windows,DC=example,DC=com];" + " the certificate is" + " signed by (subject [CN=ca,OU=windows,DC=example,DC=com] fingerprint [" + MOCK_FINGERPRINT_3 + "])" + " signed by (subject [CN=issuing-ca,DC=example,DC=com] fingerprint [" + MOCK_FINGERPRINT_2 + "] {trusted issuer})" + " which is issued by [CN=root-ca,DC=example,DC=com] (but that issuer certificate was not provided in the chain);" + " the issuing certificate with fingerprint [" + MOCK_FINGERPRINT_1 + "]" + " is trusted in this ssl context ([xpack.security.authc.realms.ldap.ldap1.ssl])")); } public void testDiagnosticMessageWhenServerProvidePartialChainFromUntrustedCA() throws Exception { final X509Certificate rootCA = mockCertificateWithIssuer("CN=root-ca,DC=example,DC=com", MOCK_ENCODING_1, Collections.emptyList(), null); final X509Certificate issuingCA = mockCertificateWithIssuer("CN=issuing-ca,DC=example,DC=com", MOCK_ENCODING_2, Collections.emptyList(), rootCA); final X509Certificate localCA = mockCertificateWithIssuer("CN=ca,OU=windows,DC=example,DC=com", MOCK_ENCODING_3, Collections.emptyList(), issuingCA); final X509Certificate endCert = mockCertificateWithIssuer("CN=elastic1,OU=windows,DC=example,DC=com", MOCK_ENCODING_4, Collections.emptyList(), localCA); final X509Certificate[] chain = { endCert, localCA, issuingCA }; final SSLSession session = session("192.168.1.6"); final Map<String, List<X509Certificate>> trustIssuers = trust(Collections.emptyList()); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.security.authc.realms.ldap.ldap1.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.6];" + " the server provided a certificate with subject name [CN=elastic1,OU=windows,DC=example,DC=com]" + " and fingerprint [" + MOCK_FINGERPRINT_4 + "];" + " the certificate does not have any subject alternative names;" + " the certificate is issued by [CN=ca,OU=windows,DC=example,DC=com];" + " the certificate is" + " signed by (subject [CN=ca,OU=windows,DC=example,DC=com] fingerprint [" + MOCK_FINGERPRINT_3 + "])" + " signed by (subject [CN=issuing-ca,DC=example,DC=com] fingerprint [" + MOCK_FINGERPRINT_2 + "])" + " which is issued by [CN=root-ca,DC=example,DC=com] (but that issuer certificate was not provided in the chain);" + " this ssl context ([xpack.security.authc.realms.ldap.ldap1.ssl]) is not configured to trust that issuer")); } public void testDiagnosticMessageWhenServerProvidesASelfSignedCertThatIsDirectlyTrusted() throws Exception { X509Certificate[] chain = loadCertChain("ca1/ca.crt"); final SSLSession session = session("192.168.1.1"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca1/ca.crt", "ca2/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.1];" + " the server provided a certificate with subject name [CN=Test CA 1]" + " and fingerprint [2b7b0416391bdf86502505c23149022d2213dadc];" + " the certificate does not have any subject alternative names;" + " the certificate is self-issued; the [CN=Test CA 1] certificate is trusted in this ssl context ([xpack.http.ssl])")); } public void testDiagnosticMessageWhenServerProvidesASelfSignedCertThatIsNotTrusted() throws Exception { X509Certificate[] chain = loadCertChain("ca1/ca.crt"); final SSLSession session = session("192.168.10.10"); final Map<String, List<X509Certificate>> trustIssuers = Collections.emptyMap(); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.10.10];" + " the server provided a certificate with subject name [CN=Test CA 1]" + " and fingerprint [2b7b0416391bdf86502505c23149022d2213dadc];" + " the certificate does not have any subject alternative names;" + " the certificate is self-issued; the [CN=Test CA 1] certificate is not trusted in this ssl context ([xpack.http.ssl])")); } public void testDiagnosticMessageWhenServerProvidesASelfSignedCertWithMimicName() throws Exception { X509Certificate[] chain = loadCertChain("ca1/ca.crt"); final SSLSession session = session("192.168.1.1"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca1-b/ca.crt", "ca2/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.1];" + " the server provided a certificate with subject name [CN=Test CA 1]" + " and fingerprint [2b7b0416391bdf86502505c23149022d2213dadc];" + " the certificate does not have any subject alternative names;" + " the certificate is self-issued; the [CN=Test CA 1] certificate is not trusted in this ssl context ([xpack.http.ssl]);" + " this ssl context does trust a certificate with subject [CN=Test CA 1]" + " but the trusted certificate has fingerprint [b095bf2526be20783e1f26dfd69c7aae910e3663]")); } public void testDiagnosticMessageWithEmptyChain() throws Exception { X509Certificate[] chain = new X509Certificate[0]; final SSLSession session = session("192.168.1.2"); final Map<String, List<X509Certificate>> trustIssuers = Collections.emptyMap(); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.http.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.2];" + " the server did not provide a certificate")); } public void testDiagnosticMessageWhenServerProvidesAnEmailSubjAltName() throws Exception { final String subjectName = "CN=foo,DC=example,DC=com"; final X509Certificate certificate = mockCertificateWithIssuer(subjectName, MOCK_ENCODING_1, Collections.singletonList(List.of(1, "<EMAIL>")), null); X509Certificate[] chain = new X509Certificate[] { certificate }; final SSLSession session = session("192.168.1.3"); final Map<String, List<X509Certificate>> trustIssuers = trust(certificate); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.monitoring.exporters.elastic-cloud.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.3];" + " the server provided a certificate with subject name [CN=foo,DC=example,DC=com]" + " and fingerprint [" + MOCK_FINGERPRINT_1 + "];" + " the certificate does not have any DNS/IP subject alternative names;" + " the certificate is self-issued;" + " the [CN=foo,DC=example,DC=com] certificate is trusted in this ssl context ([xpack.monitoring.exporters.elastic-cloud.ssl])")); } public void testDiagnosticMessageWhenACertificateHasAnInvalidEncoding() throws Exception { final String subjectName = "CN=foo,DC=example,DC=com"; final X509Certificate certificate = mockCertificateWithIssuer(subjectName, new byte[0], Collections.emptyList(), null); Mockito.when(certificate.getEncoded()).thenThrow(new CertificateEncodingException("MOCK INVALID ENCODING")); X509Certificate[] chain = new X509Certificate[] { certificate }; final SSLSession session = session("192.168.1.6"); final Map<String, List<X509Certificate>> trustIssuers = trust(Collections.emptyList()); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.security.transport.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.6];" + " the server provided a certificate with subject name [CN=foo,DC=example,DC=com]" + " and invalid encoding [java.security.cert.CertificateEncodingException: MOCK INVALID ENCODING];" + " the certificate does not have any subject alternative names;" + " the certificate is self-issued;" + " the [CN=foo,DC=example,DC=com] certificate is not trusted in this ssl context ([xpack.security.transport.ssl])")); } public void testDiagnosticMessageForClientCertificate() throws Exception { X509Certificate[] chain = loadCertChain("cert1/cert1.crt"); final SSLSession session = session("192.168.1.7"); final Map<String, List<X509Certificate>> trustIssuers = trust("ca1/ca.crt"); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.CLIENT, session, "xpack.security.transport.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with client at [192.168.1.7];" + " the client provided a certificate with subject name [CN=cert1]" + " and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate is issued by [CN=Test CA 1]" + " but the client did not provide a copy of the issuing certificate in the certificate chain;" + " the issuing certificate with fingerprint [2b7b0416391bdf86502505c23149022d2213dadc]" + " is trusted in this ssl context ([xpack.security.transport.ssl])")); } public void testDiagnosticMessageWhenCaHasNewIssuingCertificate() throws Exception { // From time to time, CAs issue updated certificates based on the same underlying key-pair. // For example, they might move to new signature algorithms (dropping SHA-1), or the certificate might be // expiring and need to be reissued with a new expiry date. // In this test, we assume that the server provides a certificate that is signed by the new CA cert, and we trust the old CA cert // Our diagnostic message should make clear that we trust the CA, but using a different cert fingerprint. // Note: This would normally succeed, so we wouldn't have an exception to diagnose, but it's possible that the hostname is wrong. final X509Certificate newCaCert = loadCertificate("ca1/ca.crt"); final X509Certificate oldCaCert = cloneCertificateAsMock(newCaCert); X509Certificate[] chain = loadCertChain("cert1/cert1.crt", "ca1/ca.crt"); // uses "new" CA final SSLSession session = session("192.168.1.4"); final Map<String, List<X509Certificate>> trustIssuers = trust(oldCaCert); final String message = SslDiagnostics.getTrustDiagnosticFailure(chain, SslDiagnostics.PeerType.SERVER, session, "xpack.security.authc.realms.saml.saml1.ssl", trustIssuers); assertThat(message, Matchers.equalTo("failed to establish trust with server at [192.168.1.4];" + " the server provided a certificate with subject name [CN=cert1] and fingerprint [3bebe388a66362784afd6c51a9000961a4e10050];" + " the certificate has subject alternative names [DNS:localhost,IP:127.0.0.1];" + " the certificate is issued by [CN=Test CA 1];" + " the certificate is signed by (subject [CN=Test CA 1]" + " fingerprint [2b7b0416391bdf86502505c23149022d2213dadc] {trusted issuer})" + " which is self-issued;" + " the [CN=Test CA 1] certificate is trusted in this ssl context ([xpack.security.authc.realms.saml.saml1.ssl])" + " because we trust a certificate with fingerprint [1f8ac10f23c5b5bc1167bda84b833e5c057a77d2]" + " for the same public key")); } public X509Certificate cloneCertificateAsMock(X509Certificate clone) throws CertificateParsingException, CertificateEncodingException { final X509Certificate cert = Mockito.mock(X509Certificate.class); final X500Principal principal = clone.getSubjectX500Principal(); Mockito.when(cert.getSubjectX500Principal()).thenReturn(principal); Mockito.when(cert.getSubjectAlternativeNames()).thenReturn(clone.getSubjectAlternativeNames()); Mockito.when(cert.getIssuerX500Principal()).thenReturn(clone.getIssuerX500Principal()); Mockito.when(cert.getPublicKey()).thenReturn(clone.getPublicKey()); Mockito.when(cert.getEncoded()).thenReturn(new byte[] { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 }); return cert; } public X509Certificate mockCertificateWithIssuer(String principal, byte[] encoding, List<List<?>> subjAltNames, @Nullable X509Certificate issuer) throws CertificateException { final X509Certificate cert = Mockito.mock(X509Certificate.class); final X500Principal x500Principal = new X500Principal(principal); final PublicKey key = Mockito.mock(PublicKey.class); Mockito.when(cert.getSubjectX500Principal()).thenReturn(x500Principal); Mockito.when(cert.getSubjectAlternativeNames()).thenReturn(subjAltNames); final X500Principal issuerPrincipal = issuer == null ? x500Principal : issuer.getSubjectX500Principal(); Mockito.when(cert.getIssuerX500Principal()).thenReturn(issuerPrincipal); Mockito.when(cert.getPublicKey()).thenReturn(key); Mockito.when(cert.getEncoded()).thenReturn(encoding); return cert; } private X509Certificate[] loadCertChain(String... names) throws CertificateException, IOException { final List<Path> paths = Stream.of(names).map(p -> "/certs/" + p).map(this::getDataPath).collect(Collectors.toList()); return PemUtils.readCertificates(paths).stream().map(X509Certificate.class::cast).toArray(X509Certificate[]::new); } private X509Certificate loadCertificate(String name) throws CertificateException, IOException { final Path path = getDataPath("/certs/" + name); final List<Certificate> certificates = PemUtils.readCertificates(Collections.singleton(path)); if (certificates.size() == 1) { return (X509Certificate) certificates.get(0); } else { throw new IllegalStateException("Expected 1 certificate in [" + path.toAbsolutePath() + "] but found [" + certificates.size() + "] - " + certificates); } } private Map<String, List<X509Certificate>> trust(String... certNames) throws CertificateException, IOException { final List<Path> paths = Stream.of(certNames).map(p -> "/certs/" + p).map(this::getDataPath).collect(Collectors.toList()); return trust(PemUtils.readCertificates(paths)); } private Map<String, List<X509Certificate>> trust(X509Certificate... caCerts) { return trust(Arrays.asList(caCerts)); } private Map<String, List<X509Certificate>> trust(Collection<? extends Certificate> caCerts) { return caCerts.stream() .map(X509Certificate.class::cast) .collect(Collectors.toMap(x -> x.getSubjectX500Principal().getName(), List::of, (List<X509Certificate> a, List<X509Certificate> b) -> { List<X509Certificate> merge = new ArrayList<>(); merge.addAll(a); merge.addAll(b); return merge; })); } private SSLSession session(String peerHost) { final SSLSession mock = Mockito.mock(SSLSession.class); Mockito.when(mock.getPeerHost()).thenReturn(peerHost); return mock; } }
java
{"place_name": "West Lebanon", "state_name": "New Hampshire", "state_abbrv": "NH", "lat": "43.644", "long": "-72.3007"}
json
<filename>createStudentTeams.py import json import os import sys from dotenv import load_dotenv import urllib import logging load_dotenv() # Import WebClient from Python SDK (github.com/slackapi/python-slack-sdk) from slack_sdk import WebClient from slack_sdk.errors import SlackApiError def createChannel(channel): isPrivate = False if "type" in channel: isPrivate = (channel["type"].upper() == "PRIVATE") print("Creating channel: {} private: {}".format(channel["name"],isPrivate)) # WebClient insantiates a client that can call API methods # When using Bolt, you can use either `app.client` or the `client` passed to listeners. client = WebClient(token=os.getenv("SLACK_USER_OAUTH_TOKEN")) logger = logging.getLogger(__name__) try: # Call the conversations.create method using the WebClient # conversations_create requires the channels:manage bot scope result = client.conversations_create( # The name of the conversation name=channel["name"], is_private=isPrivate ) # Log the result which includes information like the ID of the conversation logger.info(result) channel["slackChannelId"] = result["channel"]["id"] print("Successful creation, channel has id {}".format(result["channel"]["id"])) return channel except SlackApiError as e: raise Exception("Error creating conversation: {}".format(e)) def setChannelPurpose(channel): # WebClient insantiates a client that can call API methods # When using Bolt, you can use either `app.client` or the `client` passed to listeners. client = WebClient(token=os.getenv("SLACK_USER_OAUTH_TOKEN")) logger = logging.getLogger(__name__) try: # Call the conversations.create method using the WebClient # conversations_create requires the channels:manage bot scope result = client.conversations_setPurpose( # The name of the conversation channel=channel["slackChannelId"], purpose=channel["description"] ) # Log the result which includes information like the ID of the conversation logger.info(result) except SlackApiError as e: raise Exception("Error creating conversation: {}".format(e)) def getAllUsers(): # WebClient insantiates a client that can call API methods # When using Bolt, you can use either `app.client` or the `client` passed to listeners. client = WebClient(token=os.getenv("SLACK_USER_OAUTH_TOKEN")) logger = logging.getLogger(__name__) try: result = client.users_list() # Log the result which includes information like the ID of the conversation logger.info(result) return result["members"] except SlackApiError as e: raise Exception("Error creating conversation: {}".format(e)) def addMember(channel, member): # TODO check if member is self if so then we can't add it, or we can just ignore this error print("Adding {} ({}) to channel {}".format(member["name"], member["slackUserId"], channel["name"])) # WebClient insantiates a client that can call API methods # When using Bolt, you can use either `app.client` or the `client` passed to listeners. client = WebClient(token=os.getenv("SLACK_USER_OAUTH_TOKEN")) logger = logging.getLogger(__name__) try: # Call the conversations.create method using the WebClient # conversations_create requires the channels:manage bot scope result = client.conversations_invite( # The name of the conversation channel=channel["slackChannelId"], users=member["slackUserId"] ) # Log the result which includes information like the ID of the conversation logger.info(result) except SlackApiError as e: raise Exception("Error creating conversation: {}".format(e)) def addMembers(team, admins=None): if admins: for admin in admins: addMember(team, admin) if "members" in team: for member in team["members"]: addMember(team, member) class TeamBuilder: def __init__(self, teamsJsonFile, users): self.teamsJsonFile = teamsJsonFile self.data = None self.users = users def loadFile(self, fileName=None): if not fileName: fileName = self.teamsJsonFile with open(fileName) as inFile: self.data = json.load(inFile) def findUser(self, user): for u in self.users: if u["name"] == user: return u["id"] raise Exception("could not find {} in users".format(user)) def build(self): if not self.data: self.loadFile() admins = self.data["admins"] for index, admin in enumerate(admins): slackUserId = self.findUser(admin) admins[index] = { "name": admin, "slackUserId": slackUserId } teams = self.data["teams"] for index, team in enumerate(teams): if "members" in team: for index, member in enumerate(team["members"]): slackUserId = self.findUser(member) team["members"][index] = { "name": member, "slackUserId": slackUserId } for index, team in enumerate(teams): team = createChannel(team) setChannelPurpose(team) addMembers(team, self.data["admins"]) if __name__ == "__main__": teamsJsonFile = None argIndex = 1 while argIndex < len(sys.argv): if argIndex == len(sys.argv)-1: teamsJsonFile = sys.argv[argIndex] argIndex += 1 if not teamsJsonFile: raise Exception("no teams json file specified") users = getAllUsers() teams = TeamBuilder(teamsJsonFile, users) teams.build()
python
{"word":"endaspidean","definition":"Having the anterior scutes extending around the tarsus on the inner side; -- said of certain birds."}
json
<reponame>A2Zi/Springbok-Framework .fb-button,.wlive-button,.google-button{ font-family:"lucida grande",tahoma,verdana,arial,sans-serif; display: inline-block; height:16px; line-height:16px; padding:0 6px 0 20px; font-size:10px; text-shadow: none; text-decoration:none; } .fb-button:hover,.fb-button:focus,.wlive-button:hover,.wlive-button:focus,.google-button:hover,.google-button:focus{ text-decoration:none;outline:none; } .fb-button{ background:#627aac url('COREIMG/social/facebook_18.png') no-repeat; color:#EFEFEF; padding: 0 0 0 1px; border:1px solid #29447e; border-bottom:1px solid #1a356e; border-right:1px solid #3B5998; } .fb-button span{ margin-left:17px; padding:2px 6px 3px; border-top: 1px solid #879AC0; line-height:10px; display: block; text-shadow: none; } .fb-button:hover{ color:#FFF; } .wlive-button{ background:#eee url('COREIMG/social/wlive_16.png') no-repeat; color:#333; border:1px solid #777; } .wlive-button:hover{ color:#000; } .google-button{ background:#357AE8 url('COREIMG/social/google_16.png') no-repeat; color:#EFEFEF; border:1px solid #3079ED; } .google-button:hover{ color:#FFF; }
css
Manish Malhotra's Diwali 2022 bash: Shloka Mehta and Radhika Merchant added oodles of glam to the star-studded Diwali party on Thursday night. Twinning and winning, Shloka and Radhika's ethnic looks are sure to leave fashion lovers taking notes this festive season. Check out their photos and videos inside! 'Tis the season of celebrations! While there's time for Diwali 2022, the Bollywood brigade is busy hosting the most lavish Diwali parties in Mumbai. A day after Kriti Sanon and film producer Ramesh Taurani hosted two separate parties, designer Manish Malhotra brought the house down with his star-studded party on Thursday night. The who's who of the entertainment world arrived in style. From Katrina Kaif-Vicky Kaushal to Aishwarya Rai and Abhishek Bachchan to the star kids of Bollywood - Suhana Khan, Ibrahim Ali Khan, Sara Ali Khan, Ananya Panday, Janhvi Kapoor, Khushi Kapoor among others - MM's Diwali 2022 bash was attended by one and all. Present at the party were also Shloka Mehta and Radhika Merchant, who left everyone spellbound with their simplicity. Shloka, who is married to Akash Ambani, chose the prettiest saree for the festivities. Glittering in the combination of white, silver and peach, Shloka looked flawless. She kept her hair open with a middle parting and rounded off her look with minimalistic accessories. Radhika, who is in a relationship with Anant Ambani, painted a pretty picture in a white lehenga. The diva also kept her look on the minimal end and added elegant jewels to complete her ethnic look. Both Shloka and Radhika were all smiles as they posed for the paparazzi. The duo first posed when they were entering the bash and later, while exiting, they extended warm Diwali wishes to the photographers. Here, check out Shloka Mehta and Radhika Merchant's video from Manish Malhotra's Diwali 2022 bash: Shloka and Radhika's ethnic looks certainly serve style goals for this festive season. Apart from their choice of outfits, it's also the colours of their dresses that will leave fashion lovers taking notes this festive season. Ajit Pawar Claims To Have Support Of 40 MLAs; Who Is Controlling NCP Now Ajit Or Sharad Pawar? Ajit Ditches Sharad Pawar | Why Priyanka Chaturvedi Calls Maha Politics As Politics Of Opportunism?
english
Every month I pick out 5 projects from Intel® Developer Mesh that I find interesting and share them with you. There is a diverse array of projects on the site, so narrowing it down to just five can be difficult! I hope you’ll join me in getting to know more about the creative things our innovators are working on through this post and by delving into Mesh to see all of the other innovations. Imagine being able to control each and every PC game virtually using a single device. Wouldn’t that be cool? Intel AI Student Ambassador Suryaveer Singh thinks that he can put a controller together with some basic sensors – orientation sensor, heart beat sensor, etc. – to develop a single device that can control every PC game virtually. By calibrating the device to the user’s preferences the controller should be easy for anyone to use. I don’t know about you, but the idea of being able to play a bunch of PC games – virtually – with just one controller sounds pretty cool to me. London currently uses pigeons to monitor air quality in London. Intel® Software Innovator Peter Mabelieves that we could get better results by using our own cars to monitor the air quality throughout the city. If Londoners were to attach monitors to their vehicles, and the data were uploaded to the cloud and analyzed, then people could avoid heavily polluted areas and find alternative routes or plan their days around it so that they are out and about when there is less pollution in their area. Another thing the city could do would be to install air filters, trees, or even just warning signs in the most heavily polluted areas of the city. A thought I have is that just being aware of something, can help to decrease the problem – if people are aware of the pollution levels then they might make choices that would lead to lower pollution. There are many diseases that can destroy a farmers crops; and a different way to deal with each. Intel® AI Student Ambassador Vaibhav Patel has proposed a mobile application that can easily identify what is affecting the plant. It’s as simple as the farmer uploading a photo of the leaf to the application’s server, then the server will use a trained convolutional neural network (CNN) model to classify the disease type. It is much easier to fix a problem, once you know what is causing it. This seems like a great tool for farmers, but I can also see the casual home gardener getting a lot of use out of this too. Intel® Software Innovator Paulo Pinheiro tested his latest project Tollia on the Bandeirantes Highway in Sao Paulo, Brazil. Paulo combined robotics, artificial intelligence, and the Internet of things to develop a system to be used on toll highways that can detect traffic jams, pedestrians on the road, stopped vehicles, cars stuck in the emergency lane, and even vehicles going the wrong way. The goal of this system is to monitor the traffic and problem behaviors on the toll highway and in turn improve the traffic statistics and security. With autonomous cars in the our future, I can see systems like this being easily adopted across other roadways to not only better predict traffic times but to avoid obstacles and hazards as well. The “Internet of Things” is made up of sensors collecting data, sending that data to the cloud, and then processing that data for what you need. Intel® Software Innovator Paul Langdon’s latest project IoT Analytics Gateway utilizes a “Serverless Framework” to efficiently collect anonymous sensor and usage data from over 20,000 live connected IoT devices deployed across the U.S. This allows for a way to collect real-time statistics in a low-cost manner. With more and more IoT devices being connected everyday this could be a great way to get more connected data to then use in machine learning platforms.
english
Thursday September 24, 2020, Amazon India on Wednesday announced the launch of a new fulfilment centre (FC) in Ahmedabad, third in the city, ahead of the festive season. Spread over more than two lakh square feet area, the new FC will help sellers offer a wider selection within the region and neighbouring states, it said in a statement. With this infrastructure expansion, Amazon.in will now offer storage capacity of more than 1.5 million cubic feet across three FCs to its more than 80,000 sellers in Gujarat. The company recently launched a new sort centre and expanded the capacity of an existing sort centre for faster delivery of customer orders in Gujarat, it added. Speaking about the development, Prakash Kumar Dutta, Director of Fulfilment Centres & Supply Chain, Amazon India, said: "With this expansion, SMBs in Gujarat will benefit both in terms of economic growth and reach to a wider customer base. With the new launches, we will be able to continue to seamlessly cater to the growing demand from customers so they can stay home and stay safe, while creating thousands of job opportunities in the state." Our commitment to the safety of our customers and teams remains our primary focus and we are proud to provide a trusted, safe and reliable experience for all our stakeholders,” added Prakash. “Amazon’s latest fulfilment Centre in Ahmedabad will support growth and generate new employment for our youth. We are committed to create sustainable livelihood and economic development of the state and thus welcome the world to Gujarat. I am sure the investment made in Gujarat will yield very good returns while strengthening the business ecosystem in our state,“ said Vijay Rupani, Chief Minister, Gujarat. The ecommerce giant on Tuesday said it has added four new Indian languages to its platform, a move that will help expand access to online shopping to 200-300 million customers. The addition of four languages -- Kannada, Malayalam, Tamil, and Telugu -- comes ahead of the festive season that accounts for a significant chunk of ecommerce sales in the country. (Disclaimer: Additional background information has been added to this PTI copy for context)
english
Former England skipper Michael Vaughan lauded Indian wicketkeeper-batter Rishabh Pant for his incredible knock against Sri Lanka on Day 1 of the first Test at the Punjab Cricket Association (PCA) stadium in Mohali on Friday. Pant joined forces with Shreyas Iyer after Hanuma Vihari, who scored 58 from 128 balls departed to Vishwa Fernando in the 47th over. Pant and Iyer build their innings playing some spectacular shots against the Sri Lankan bowlers. Sri Lanka all-rounder Dhananjaya de Silva broke the partnership of the former Delhi Capitals pair as he sent Iyer packing back to the dressing room by trapping him leg-before the wicket. However, Iyer’s dismissal didn’t stop a rampant Pant from playing a vintage knock. Pant smashed Sri Lanka spinner Lasith Embuldeniya for 22 runs in the 76th over, the southpaw hit three sixes and a boundary to the left-arm spinner. Pant smashed nine boundaries and four sixes to race his score to run-a-ball 96. Pant wasn’t successful in reaching his fifth Test hundred as he was bowled by Sri Lanka pacer Suranga Lakmal at the end of the day. Pant was involved in a 102-runs stand with all-rounder Ravindra Jadeja. Vaughan was left awestruck with the Indian player’s flamboyant knock against Sri Lanka. Vaughan said he loves watching Pant bar and would not afford to miss a single ball of his innings. “Absolutely love watching @RishabhPant17!! A player who you can’t love .. don’t want to miss a ball he faces .. no idea what’s going on his head .. but it’s always a must watch .. I reckon he is the greatest modern day player entertainer,” Vaughan tweeted. India ended Day 1 at 357 for six wickets as Jadeja (45) was batting along with his spin bowling partner Ravichandran Ashwin (10).
english
Handsome actor John Abraham turns 42 today. From being a model to actor to a producer, he has worked his way up. This half Malayalee and half Parsi has smitten everyone with his cute smile. Making his debut with Jism in 2003, the actor began with a bang, winning a nomination at the Filmfare Best Debut Award. He then went on to add some great films to his kitty such as Zinda, Dhoom, Water, Dostana, New York and Shootout At Wadala. His first production Vicky Donor too earned commercial success. He also produced Madras Café that fared well too. He has also announced his next production, Hamara Bajaj. Well, there is no stopping this man for getting more fabulous at 42. Happy birthday ! ! !
english
/** * * @param {*} object * @param {*} path * @returns {*} return resolved value */ function get(object, path) { return 4 } module.exports = get
javascript
<gh_stars>1-10 /* * Copyright 2018 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.kaushiknsanji.novalines.interfaces; import android.view.View; /** * A View Interface for the Popup Menu actions shown * on the News Article Card items 'R.layout.news_article_item' * * @author <NAME> */ public interface IArticleActionView extends IGenericView { /** * Method that returns the Root {@link View} * of the Activity/Fragment implementing {@link IArticleActionView} * * @return The Root {@link View} of the implementing Activity/Fragment */ View getRootView(); }
java
{ "_args": [ [ "kdbush", "/bluesky/fireweather/fwf" ] ], "_from": "kdbush@latest", "_hasShrinkwrap": false, "_id": "kdbush@3.0.0", "_inCache": true, "_installable": true, "_location": "/kdbush", "_nodeVersion": "10.9.0", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/kdbush_3.0.0_1536310495834_0.4486660538682752" }, "_npmUser": { "email": "<EMAIL>", "name": "mourner" }, "_npmVersion": "6.3.0", "_phantomChildren": {}, "_requested": { "name": "kdbush", "raw": "kdbush", "rawSpec": "", "scope": null, "spec": "latest", "type": "tag" }, "_requiredBy": [ "#USER" ], "_resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", "_shasum": "f8484794d47004cc2d85ed3a79353dbe0abc2bf0", "_shrinkwrap": null, "_spec": "kdbush", "_where": "/bluesky/fireweather/fwf", "author": { "name": "<NAME>" }, "bugs": { "url": "https://github.com/mourner/kdbush/issues" }, "dependencies": {}, "description": "A very fast static 2D index for points based on kd-tree.", "devDependencies": { "eslint": "^5.5.0", "eslint-config-mourner": "^3.0.0", "esm": "^3.0.82", "rollup": "^0.65.2", "rollup-plugin-buble": "^0.19.2", "rollup-plugin-terser": "^2.0.2", "tape": "^4.9.1" }, "directories": {}, "dist": { "fileCount": 9, "integrity": "<KEY> "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkjzgCRA9TVsSAnZWagAAav4P/A3fZnP6ViURv6gD1Dcp\n/fwocGVrxIbzpU/tWQREkDjfRh+hKUWfaOjrvqRHZcCvF3JAN3tD6cbDc5NQ\nO2ANqagLXmwwrwNfE95usR+qBoBgkV1YE5PTqZK5KI7LyLKML9WGEh4FcPIg\nI8HurwyBvuoX3RnWT29Ao+csjnd1ZFhJDMetTEylL4+VjMYPq6iEBw0kfIa+\npmbLvWcZE2GkxDaWFratZ8cqQ1RvdAEipCBvGujZQh95bYoOboL/WgJi8umy\nsy3mApBkiiOqbbhCTitN2gqtkg2OplDTuxqKLcj2+elmzNfsKugQOtpMOQB2\nuKeP0nLAQ5HdtsDPeSu84/a+/ktXgl0Q5UhEWqrGEQIRppX5sIJwyZVmyaIv\nKtfPcaYj88biRD+Hy21eJdJsRkOPq6JwZ/DYrz2HZlSLdhhyxeDB67c1PsRX\nHXeTGjSiWf7H9U8o5Y5OJBauDmpKFY82fr1UOK9+eN/hbZY9C1zXqNZZERAd\nnZv4kqNZs5S1SAKoeXoFged90I4jZO1M/tZrhtvEYxxNvnfh/f+6d3ScxTP3\nd0AtUkgzmXEnrlxkZKocFQ/srl9g6bcsd+982+nphjOu6CawIkLDVILvHfCO\nwHDUYVVPkfT3Zgwur0x2hAe6bWPCcrvNU8j8QPWX1CLjbZ4DJzNTkJTi2E2J\nkn+2\r\n=ouTa\r\n-----END PGP SIGNATURE-----\r\n", "shasum": "f8484794d47004cc2d85ed3a79353dbe0abc2bf0", "tarball": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", "unpackedSize": 16951 }, "eslintConfig": { "extends": "mourner" }, "gitHead": "5ff01fb69666443270db1f136b79ba4588645ab8", "homepage": "https://github.com/mourner/kdbush#readme", "jsdelivr": "kdbush.min.js", "keywords": [ "algorithms", "data structures", "geometry", "index", "kd-tree", "points", "spatial" ], "license": "ISC", "main": "kdbush.js", "maintainers": [ { "name": "mourner", "email": "<EMAIL>" } ], "module": "src/index.js", "name": "kdbush", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/mourner/kdbush.git" }, "scripts": { "bench": "node -r esm bench.js", "build": "rollup -c", "prepublishOnly": "npm run build", "pretest": "eslint src test.js bench.js rollup.config.js", "test": "tape -r esm test.js" }, "unpkg": "kdbush.min.js", "version": "3.0.0" }
json
<gh_stars>0 use crate::error::{RegistryError, RegistryResult}; use crate::{db::SchemaRegistryDb, types::VersionedUuid}; use jsonschema::JSONSchema; use serde_json::Value; use uuid::Uuid; pub async fn build_full_schema(schema: &mut Value, conn: &SchemaRegistryDb) -> RegistryResult<()> { if let Some(defs) = schema .get_mut("definitions") .and_then(|val| val.as_object_mut()) { let schemas_to_retrieve: Vec<(String, Uuid)> = defs .iter() .filter_map(|(key, value)| { value .as_str() .and_then(|val| Uuid::parse_str(val).ok()) .map(|id| (key.clone(), id)) }) .collect(); for (key, id) in schemas_to_retrieve { let (_version, definition) = conn.get_schema_definition(&VersionedUuid::any(id)).await?; defs[&key] = definition; } } JSONSchema::compile(&schema).map_err(RegistryError::InvalidJsonSchema)?; Ok(()) }
rust
A free program for Android, by SkyDivers. EA Sports FC Mobile: Start of a new era without the name "FIFA" A free program for Android, by Crazy Fire Action Hero Games. A free program for Android, by CoolAppPub. A free app for Android, by Gaming League.
english
<gh_stars>100-1000 { "name": "preact-photon", "version": "1.3.0", "description": "Preact + Photon = <3", "main": "preact-photon.js", "scripts": { "build": "babel -f $npm_package_main -s -o $npm_package_main < src/index.js", "test": "eslint src test && mocha --compilers js:babel/register test/**/*.js", "prepublish": "npm run build", "release": "npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish" }, "keywords": [ "preact", "photon", "electron" ], "repository": { "type": "git", "url": "https://github.com/developit/preact-photon.git" }, "author": "<NAME> <<EMAIL>>", "license": "MIT", "bugs": { "url": "https://github.com/developit/preact-photon/issues" }, "homepage": "https://github.com/developit/preact-photon", "implicitDependencies": { "photon": "git+https://github.com/connors/photon.git#v0.1-alpha" }, "peerDependencies": { "preact": "*" }, "devDependencies": { "babel": "^5.8.23", "babel-eslint": "^7.0.0", "chai": "^3.5.0", "eslint": "^3.1.0", "mocha": "^3.0.0", "preact": "^7.2.0", "preact-render-to-string": "^3.0.0" } }
json
<reponame>gedion/ethiocovid19rt.com import React from 'react'; import { Col, Badge, Row } from 'reactstrap'; const CivicEngagementDetail = () => { return ( <section className="section section-sm"> <Row className="row-grid align-items-center"> <Col className="order-md-2" md="6"> <img alt="..." className="img-fluid floating" src={require('../assets/images/acr_toolkit_logo.webp')} /> </Col> <Col className="order-md-1" md="6"> <div className="pr-md-5"> <h3>Join the effort</h3> <p> The kit comes with three pre-built pages to help you get started faster. You can change the text and images and you're good to go. </p> <ul className="list-unstyled mt-5"> <li className="py-2"> <a href="https://medium.com/africa-covid-19-response-toolkit"> <div className="d-flex align-items-center"> <div> <Badge className="badge-circle mr-3" color="success"> <i className="fa fa-book" aria-hidden="true" /> </Badge> </div> <div> <h6 className="mb-0">Read our blog</h6> </div> </div> </a> </li> <li className="py-2"> <a href="https://airtable.com/embed/shr2J750ULFDomQMO/tblqMZstgKApLYxQq?backgroundColor=gray&viewControls=on&blocks=hide"> <div className="d-flex align-items-center"> <div> <Badge className="badge-circle mr-3" color="success"> <i className="fa fa-money" aria-hidden="true" /> </Badge> </div> <div> <h6 className="mb-0">Donate or find funding</h6> </div> </div> </a> </li> <li className="py-2"> <a href="https://docs.google.com/forms/d/<KEY>"> <div className="d-flex align-items-center"> <div> <Badge className="badge-circle mr-3" color="success"> <i className="ni ni-satisfied" /> </Badge> </div> <div> <h6 className="mb-0">Join our team</h6> </div> </div> </a> </li> </ul> </div> </Col> </Row> </section> ); }; export default CivicEngagementDetail;
javascript
extern crate rumqtt_fuzzer; extern crate slog; use rumqtt_fuzzer::{Fuzzer, MqHarness}; const LOCAL_BROKER: &'static str = "localhost:1883"; const BROKER: &'static str = "perf-mqtt-broker.atherengineering.in:5000"; fn main() { let pack = Fuzzer::make_packet(199); // Publish Subscribe callbacks test MqHarness::spawn_pub_sub_with_tls("test/big/qos1/stress", pack, 500, None, "big_publish_alot.log", BROKER); // Publish Ack test //MqHarness::spawn_pubacks_test("test/big/qos1/stress", pack, 100000, None, "big_publish_alot.log", BROKER); // Userdata publish test // let userdata = b"arandommqttuser:<PASSWORD>".to_vec(); // let pack = Fuzzer::make_packet(50); // MqHarness::spawn_userdata_publish_test("test/big/qos1/stress", pack, 10000, None, "big_publish_alot.log", BROKER, userdata); }
rust
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UIKitInteractionResponder = void 0; const IUIKitInteractionType_1 = require("./IUIKitInteractionType"); const UIKitInteractionPayloadFormatter_1 = require("./UIKitInteractionPayloadFormatter"); class UIKitInteractionResponder { constructor(baseContext) { this.baseContext = baseContext; } successResponse() { return { success: true, }; } errorResponse() { return { success: false, }; } openModalViewResponse(viewData) { const { appId, triggerId } = this.baseContext; return Object.assign({ success: true }, UIKitInteractionPayloadFormatter_1.formatModalInteraction(viewData, { appId, triggerId, type: IUIKitInteractionType_1.UIKitInteractionType.MODAL_OPEN })); } updateModalViewResponse(viewData) { const { appId, triggerId } = this.baseContext; return Object.assign({ success: true }, UIKitInteractionPayloadFormatter_1.formatModalInteraction(viewData, { appId, triggerId, type: IUIKitInteractionType_1.UIKitInteractionType.MODAL_UPDATE })); } viewErrorResponse(errorInteraction) { const { appId, triggerId } = this.baseContext; return { appId, triggerId, success: false, type: IUIKitInteractionType_1.UIKitInteractionType.ERRORS, viewId: errorInteraction.viewId, errors: errorInteraction.errors, }; } } exports.UIKitInteractionResponder = UIKitInteractionResponder; //# sourceMappingURL=UIKitInteractionResponder.js.map
javascript
package builtins import ( "fmt" "github.com/prologic/monkey-lang/object" "github.com/prologic/monkey-lang/typing" ) // Print ... func Print(args ...object.Object) object.Object { if err := typing.Check( "print", args, typing.MinimumArgs(1), ); err != nil { return newError(err.Error()) } fmt.Println(args[0].String()) return nil }
go
<filename>src/main/java/com/yapp/project/review/dto/response/TextReviewSimpleResponse.java package com.yapp.project.review.dto.response; import lombok.Getter; import lombok.RequiredArgsConstructor; @Getter @RequiredArgsConstructor public class TextReviewSimpleResponse { private final Long postId; private final Long reviewerId; private final String title; private final String content; }
java
{"2010":"","2016":"","Department":"Червонозаводський районний суд м. Харкова","Region":"Харківська область","Position":"Суддя Червонозаводського районного суду м. Харкова","Name":"<NAME>","Link":"","Note":"","AdditionalNote":"","декларації 2015":"","Youtube":"","ПІБ2":"","Кількість справ":"","Оскаржені":"","Кількість скарг":"3","Кількість дисциплінарних стягнень":"","Клейма":"4","Фото":"http://picua.org/img/2016-10/24/s1x53csfa6l95ud21234gk0q7.jpg","Як живе":"","Декларація доброчесності судді подано у 2016 році (вперше)":"","Декларація родинних зв’язків судді подано у 2016 році":"","key":"korekyan_nataliya_raviliyivna","field8":"","Link 2015":"","field9":"","Декларації 2013":"","Декларації 2014":"","Декларації 2015":"","Декларації 2016":"","type":"judge","analytics":[{"y":2015,"i":229093,"k":95.1,"ka":2,"ff":43.5,"ffa":1,"j":3},{"y":2016,"i":250257,"k":95.1,"ka":2,"ff":43.5,"ffa":1}],"declarationsLinks":[{"id":"nacp_815961e5-8c9a-447a-b05f-ec23fda98de6","year":2015,"provider":"declarations.com.ua.opendata"},{"id":"nacp_def24d43-ae54-47a5-a71f-dd33edb6550a","year":2016,"provider":"declarations.com.ua.opendata"}]}
json
# Desafio DIO Google Cloud Platform Dataproc **Bootcamp Carrefour Data Engineer** * Criando um Ecossistema Hadoop Totalmente Gerenciado com Google Cloud * Resolvido em: 15/09/2021
markdown
The Supreme Court on Tuesday agreed to hear on January 23 plea of Rapido, the bike taxi and auto aggregator, challenging the Bombay High Court order which directed it to stop operation in Maharashtra immediately as it does not have a license to operate bike taxi or rickshaw services. A bench headed by Chief Justice of India DY Chandrachud agreed to list the matter for Monday after it was mentioned before it. Senior advocate Mukul Rohatgi mentioned the matter for urgent hearing and said the company has thousands of employees. The Bombay High Court last week directed Roppen Transportation Services Private Limited, which operates bike taxi aggregator Rapido, to shut operations immediately as the startup is yet to receive a licence to operate from the Maharashtra government. Accordingly, the bike taxi aggregator Rapido was to close down all its services till January 20. The High Court pulled up a Pune-based bike taxi aggregator for operating without procuring a licence from the Maharashtra government and directed it to suspend the services immediately. Roppen Transportation moved the High Court against a communication issued to it by the Maharashtra government on December 29, 2022, refusing to grant them a bike taxi aggregator licence. The government cited the reason that there was no state policy on licensing of bike taxis and there was no fare structure policy. The State government has told the High Court that a committee has been set up to explore the formulation of guidelines for bike taxis in the State. Affiliate links may be automatically generated - see our ethics statement for details.
english
It is worth watching Tiger Woods play golf on the course. His swagger on the greens is unmatched. Woods has a habit of flipping his driver after hitting a shot. The PGA Tour shared a video of Tiger Woods in which he was seen lifting a ball from the ground with the help of a driver. He did it with absolute perfection, and undoubtedly, fans were impressed with his style. The comments section was overloaded with fans praising the star, saying: "Anything he does looks like magic." "He's on the putting surface. It's a practice green! Lol. Why is this even a thing?" "Perfect formula! This gentleman is one of the greatest golfers of history, - Fathom." Tiger Woods is unarguably the greatest golfer of all time. He has won 15 major tournaments, the second-most in history. Moreover, Tiger holds the record for being the No. 1 golfer for the longest time. Having won 110 professional tournaments, 82 PGA Tours, 41 European Tours, and five Masters, there is no match for Tiger Woods. However, the star golfer has been dealing with injuries and thus could not concentrate on his career for a while now, but fans hope to see his best shots soon. Tiger Woods recently competed at the PNC Championship alongside his 13-year-old son, Charlie, and finished at T8. When will Tiger Woods play in 2023? The 15-time major champion was most recently seen competing at the PNC Championship, which ended on December 18. It was his third appearance at the championship, and he has yet to register his first victory. Woods also played in a television exhibition series called "The Match", but lost to Justin Thomas and his college buddy, Jordan Spieth. Tiger Woods was slated to play at the Hero World Challenge, but at the last moment, he developed plantar fasciitis and stepped down from the competition. However, he still served as the host of the event. During the pre-tournament press conference, Woods revealed: "I can hit the golf ball and hit whatever shot you want, I just can't walk." He went on to say: "And so I've had a few setbacks during the year that I still was able to somehow play through, but this one, I just can't. " He is now focused on next year's tournament. According to Golf.com, Tiger stated in one of his interviews: "The goal (for the next year) is to play just one major Championship and maybe one or two more." The first major tournament of 2023 (The Masters) will take place in April at Augusta National Golf Club. It is important to note that the last time Tiger Woods clinched a trophy was in 2019, when he won The Masters. - Venue: Augusta National, Augusta, Ga. - Venue: Oak Hill, Rochester, N.Y. - Venue: LA Country Club, Los Angeles, Calif.
english
Feeding Program for the Kids POWERED BY STEEM | Thank you for Supporting Our Activity - "Act of Kindness v2" Thank you Steem! Thank you Everyone! These are the words that we always utter in our mouth for making this activity memorable. We may be the ones who exerted the effort to make this activity into reality, but you all are the reason why this happened. In behalf of the kids in our community, we thank you! Over 40 kids enjoyed their afternoon healthy snack combo of - Lugaw - Vegetable Lumpia - Calamansi Juice, all composed of healthy ingredients. We learned last time that we need to start early for us not to be drained in the afternoon. So me and my friends @belsoronz and @jassennessaj started buying the necessary ingredients for the feeding program. We also realized this thing from our last feeding program: Because we have a lot of muslim brothers and sisters in our area and since Ramadan had just ended, we decided to remove pork as an ingredient to our vegetable lumpia for them to enjoy the snack too. So early in the morning, we gathered together at around 5 am and started going to the Public Market in our area. We bought the necessary ingredients for the Lumpia-Lugaw-Juice combo. We started buying the vegetable lumpia ingredients, these were the ingredients we bought: - 3 kilo Tawgi (beansprouts) - 4packs of lumpia wrapper (good for 200 pcs) - 3 pcs magic sarap (seasoning) Other expenses: - 1 sack of coconut husk (to be used as wood) - 2 pcs butane gas (refill) Then we started buying the ingredients for Lugaw (porridge in English term). We also made sure that the porridge tastes good while maintaining its nutritional value. So, we bought these ingredients: - 3pcs Magic Sarap (seasoning) Other expenses: Then finally, we bought a simple recipe for our calamansi juice: - 2-packs of Tang powdered juice (orange) In the morning, we started cooking for the vegetable lumpia since we will still put them in a lumpia wrapper. With the help of our neighbor volunteers, we're so glad that we finished the lumpia wrap at around 10:00 in the morning. Then we paused the cooking because we have to prepare for a big tarpaulin of THANK YOU STEEM with the Steem logos and SK (sir @stephenkendal's promotional logo) - thank you sir for making this event happen. For our handmade tarpaulin to happen we bought: - 1 black paint (for background) - 1/2 masking tape. Then we started working back again for the lugaw and vegetable lumpia after painting the Thank you Steem tarp. We started preparing the lugaw. These are the pictures I gathered how I created the nutritious lugaw (porridge) and soon I'll be making a detailed tutorial about it soon. Then we cooked the lumpia finally using deep fry. It was about 200+ pcs after we finished. Thank you to my friend @jassennessaj who led the preparation and cooking of the vegetable lumpia. We helped each other to make sure it will be delivered by 3:30-4:30 pm. Then we mixed together the calamansi juice and tang orange for the juices. It was about 1 jar that will be shared by the kids. This is how it looks. Thank you so much Steemit! I am so happy sir @stephenkendal for giving me a chance to participate in events like this. Ever since I was a kid, I always look to the day that I'll help back to the kids soon. I appreciate your kindness sir and I am very happy today. You made my day memorable sir. We are planning for our next feeding program which will be for the Sitio Caimitohan next time around. Tomorrow we will share our expenses all around. GOD BLESS YOU AND I LOVE YOU ALL.
english
<gh_stars>1-10 import * as React from "react"; import styled from "styled-components"; import ScrollMenu from "react-horizontal-scrolling-menu"; import { faBoxOpen, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; export interface CardItemSpecs { name: string; description: string; img?: string; value?: any; header?: () => React.ReactNode; } export interface CardVerticalListProps { items: Array<CardItemSpecs>; onSelected: (item: CardItemSpecs) => void; disableHoverAnimaions?: boolean; } interface ItemComponentProps { theme?: any; disableHoverAnimaions?: boolean; } const Arrow = styled.div` font-size: 1vw; `; const itemHoverStyle = ` &:hover .ItemHeader { height: 40%; } &:hover .ItemSelectBoxIcon { padding-top: 0.5vw; font-size: 3.5vw; } &:hover .ItemImage { opacity: 0; } `; const Item = styled.div<ItemComponentProps>` border-radius: 0.5vw; background: #ffffff; box-shadow: 0 2px 0 rgba(90,97,105,.11), 0 4px 8px rgba(90,97,105,.12), 0 10px 10px rgba(90,97,105,.06), 0 7px 70px rgba(90,97,105,.1); margin: 1vw; height: 20vw; width: 15vw; cursor: pointer; ${(props: ItemComponentProps) => ((props.disableHoverAnimaions) ? ("") : (itemHoverStyle))} `; const ItemInner = styled.div` width: 100%; height: 100%; overflow: hidden; `; const ItemHeader = styled.div<ItemComponentProps>` height: 0%; width: 100%; background: ${(props: ItemComponentProps) => props.theme.colors.primaryGradient}; text-align: center; transition: height 0.6s ease; `; const ItemImage = styled.img` position: relative; width: 5vw; height: 5vw; left: -1.3vw; top: -21.3vw; transition: all 0.6s ease; `; const ItemSelectBoxIcon = styled.div` color: white; font-size: 6vw; padding-top: 4vw; transition: all 0.6s ease; `; const ItemSelectBoxText = styled.div` font-size: 1vw; white-space: normal; color: white; font-weight: bold; `; const ItemTitle = styled.div` text-align: center; margin-top: 0.5vw; margin-bottom: 1vw; font-size: 1.8vw; white-space: normal; `; const ItemDescription = styled.div` font-size: 1vw; padding: 1vw; white-space: normal; text-align: center; `; const Container = styled.div<ItemComponentProps>` width: 100%; height: 100%; font-family: ${(props: ItemComponentProps) => props.theme.primaryFont}; `; class CardVerticalList extends React.Component<CardVerticalListProps, undefined> { constructor(props) { super(props); } render() { const menu = this.props.items.map(item => { const { img, name, description, header } = item; return ( <Item key={name} className="menu-item" disableHoverAnimaions={this.props.disableHoverAnimaions}> <ItemInner> <ItemHeader className="ItemHeader"> { (header) ? (header()) : ( <> <ItemSelectBoxIcon className="ItemSelectBoxIcon"> <FontAwesomeIcon icon={faBoxOpen.iconName} /> </ItemSelectBoxIcon> <ItemSelectBoxText> Use that communication channel </ItemSelectBoxText> </> ) } </ItemHeader> <ItemTitle> {name} </ItemTitle> <ItemDescription> {description} </ItemDescription> </ItemInner> { (img) ? ( <ItemImage className="ItemImage" src={img}/> ) : (null) } </Item> ); }); return ( <Container> <ScrollMenu data={menu} arrowLeft={ <Arrow className="arrow-prev"> &lt; </Arrow> } arrowRight={ <Arrow className="arrow-next"> &gt; </Arrow> } selected={null} onSelect={(key) => { this.props.onSelected(this.props.items.find(item => item.name === key)); }} /> </Container> ); } } export default CardVerticalList;
typescript
{"station_g":[{"pref_cd":6,"line_cd":99211,"line_name":"フラワー長井線","station_cd":9921109,"station_name":"南長井"}]}
json
<reponame>DebryA/project-psi<filename>style.css /*.jumbotron { background-image: url(bg2.jpeg); background-size: cover; height: 100vh; text-align: center; margin-top: -120px; } .jumbotron .display-4{ color: white; margin-top: 200px; } */ .carousel-item { height: 670px; } .carousel-item img { margin-top: -120px; } .carousel-item .display-4{ margin-top: -270px; } .carousel-item hr{ border-color:blanchedalmond; width: 70px; border-width: 3px; } .carousel-item .btn{ background-color:transparent; border-color: blanchedalmond; padding-right: 15px; padding-left: 15px; margin-top: 40px; } footer{ align-items: center; justify-content: center; background-color: transparent; } .container-footer{ margin-left: 430px; margin-right: 220px; } .foot h5{ padding: 0px 30px; color: gray; font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; }
css
Google announced plenty of new products and features at its Made by Google event this week, and one of the more useful releases is already available. The Magnifier app, which the company says lets users "magnify small text, see object details, or zoom in on faraway text like street signs or restaurant menus behind a service counter" will be included on the Pixel 8 and Pixel 8 Pro when they officially hit the streets next week, but it's available to download on Pixel phones now (the 5 or later). Also: Google Pixel 8 vs. Google Pixel 8 Pro: Which one is right for you? Magnifier functions much like a camera app in that there's a capture button in the middle, a toggle button to switch between front and rear cameras, zoom in and out buttons – pinching also works – and a button to turn on the flashlight (side note, it has a brightness slider, something my native flashlight doesn't have and I didn't even know my phone could do). But it's a vast improvement over just using your phone to zoom in. Once an image is captured, the contrast is immediately enhanced to make text pop. There are sliders for brightness and contrast if you want to adjust further, plus filters to apply like inverted, grayscale, blue on white, red on black, and yellow on white -- all useful for colorblindness. There's also a Google Lens button that offers up translation, text-to-speech, search, shopping, or copy and paste. Just using the app while sitting on my couch, I was able to read a code on an Amazon box sitting across the room and a piece of Halloween decor sitting below my TV when I couldn't read either before. While those admittedly aren't super useful cases, it's easy to see how this could be very beneficial reading a far away menu board, a street sign, or say, small words on a pill bottle, for example. Images taken on the Magnifier app aren't saved automatically, but they can be if you want to reference them later. There's no indication if the magnifier app will be brought to a larger Android audience or if it will remain a Pixel exclusive, but the app is available in the Google Play store.
english
We face a collective concern across the globe, within our region, neighborhoods and for some, even at home. Violence against women manifests in many forms. The obvious ones are sexual assault/harassment, human trafficking, murder & physical abuse. However the more subtle but just as concerning manifestations of violence against women show up as bullying, intimidation, verbal/emotional/psychological abuse as well. We need to do more as a collective to create platforms, engage the right conversations & raise awareness about this topic so that the focus is an ongoing one until genuine solutions and a reduction violence against women is sustained. Among the many amazing initiatives that already exist, I ask that we stand together in solidarity on Friday 12th February 2021 to Wear Purple in Protest Against Violence Towards Women. In addition to wearing this colour, by signing, it would be most appreciated if you could either: 2. Posting a photo of yourself in purple on Friday 12th Feb 2021 and share why you chose to support this initiative. Thank you sincerely.
english
<reponame>cowboygneox/boto3_type_annotations<filename>boto3_type_annotations_with_docs/boto3_type_annotations/managedblockchain/client.py from typing import Optional from botocore.client import BaseClient from typing import Dict from botocore.paginate import Paginator from botocore.waiter import Waiter from typing import Union class Client(BaseClient): def can_paginate(self, operation_name: str = None): """ Check if an operation can be paginated. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is ``create_foo``, and you\'d normally invoke the operation as ``client.create_foo(**kwargs)``, if the ``create_foo`` operation can be paginated, you can use the call ``client.get_paginator(\"create_foo\")``. :return: ``True`` if the operation can be paginated, ``False`` otherwise. """ pass def create_member(self, ClientRequestToken: str, InvitationId: str, NetworkId: str, MemberConfiguration: Dict) -> Dict: """ Creates a member within a Managed Blockchain network. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateMember>`_ **Request Syntax** :: response = client.create_member( ClientRequestToken='string', InvitationId='string', NetworkId='string', MemberConfiguration={ 'Name': 'string', 'Description': 'string', 'FrameworkConfiguration': { 'Fabric': { 'AdminUsername': 'string', 'AdminPassword': '<PASSWORD>' } } } ) **Response Syntax** :: { 'MemberId': 'string' } **Response Structure** - *(dict) --* - **MemberId** *(string) --* The unique identifier of the member. :type ClientRequestToken: string :param ClientRequestToken: **[REQUIRED]** A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an AWS SDK or the AWS CLI. This field is autopopulated if not provided. :type InvitationId: string :param InvitationId: **[REQUIRED]** The unique identifier of the invitation that is sent to the member to join the network. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network in which the member is created. :type MemberConfiguration: dict :param MemberConfiguration: **[REQUIRED]** Member configuration parameters. - **Name** *(string) --* **[REQUIRED]** The name of the member. - **Description** *(string) --* An optional description of the member. - **FrameworkConfiguration** *(dict) --* **[REQUIRED]** Configuration properties of the blockchain framework relevant to the member. - **Fabric** *(dict) --* Attributes of Hyperledger Fabric for a member on a Managed Blockchain network that uses Hyperledger Fabric. - **AdminUsername** *(string) --* **[REQUIRED]** The user name for the member\'s initial administrative user. - **AdminPassword** *(string) --* **[REQUIRED]** The password for the member\'s initial administrative user. The ``AdminPassword`` must be at least eight characters long and no more than 32 characters. It must contain at least one uppercase letter, one lowercase letter, and one digit. It cannot have a single quote(‘), double quote(“), forward slash(/), backward slash(\), @, or a space. :rtype: dict :returns: """ pass def create_network(self, ClientRequestToken: str, Name: str, Framework: str, FrameworkVersion: str, VotingPolicy: Dict, MemberConfiguration: Dict, Description: str = None, FrameworkConfiguration: Dict = None) -> Dict: """ Creates a new blockchain network using Amazon Managed Blockchain. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateNetwork>`_ **Request Syntax** :: response = client.create_network( ClientRequestToken='string', Name='string', Description='string', Framework='HYPERLEDGER_FABRIC', FrameworkVersion='string', FrameworkConfiguration={ 'Fabric': { 'Edition': 'STARTER'|'STANDARD' } }, VotingPolicy={ 'ApprovalThresholdPolicy': { 'ThresholdPercentage': 123, 'ProposalDurationInHours': 123, 'ThresholdComparator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUAL_TO' } }, MemberConfiguration={ 'Name': 'string', 'Description': 'string', 'FrameworkConfiguration': { 'Fabric': { 'AdminUsername': 'string', 'AdminPassword': '<PASSWORD>' } } } ) **Response Syntax** :: { 'NetworkId': 'string', 'MemberId': 'string' } **Response Structure** - *(dict) --* - **NetworkId** *(string) --* The unique identifier for the network. - **MemberId** *(string) --* The unique identifier for the first member within the network. :type ClientRequestToken: string :param ClientRequestToken: **[REQUIRED]** A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an AWS SDK or the AWS CLI. This field is autopopulated if not provided. :type Name: string :param Name: **[REQUIRED]** The name of the network. :type Description: string :param Description: An optional description for the network. :type Framework: string :param Framework: **[REQUIRED]** The blockchain framework that the network uses. :type FrameworkVersion: string :param FrameworkVersion: **[REQUIRED]** The version of the blockchain framework that the network uses. :type FrameworkConfiguration: dict :param FrameworkConfiguration: Configuration properties of the blockchain framework relevant to the network configuration. - **Fabric** *(dict) --* Hyperledger Fabric configuration properties for a Managed Blockchain network that uses Hyperledger Fabric. - **Edition** *(string) --* **[REQUIRED]** The edition of Amazon Managed Blockchain that the network uses. For more information, see `Amazon Managed Blockchain Pricing <https://aws.amazon.com/managed-blockchain/pricing/>`__ . :type VotingPolicy: dict :param VotingPolicy: **[REQUIRED]** The voting rules used by the network to determine if a proposal is approved. - **ApprovalThresholdPolicy** *(dict) --* Defines the rules for the network for voting on proposals, such as the percentage of ``YES`` votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created. - **ThresholdPercentage** *(integer) --* The percentage of votes among all members that must be ``YES`` for a proposal to be approved. For example, a ``ThresholdPercentage`` value of ``50`` indicates 50%. The ``ThresholdComparator`` determines the precise comparison. If a ``ThresholdPercentage`` value of ``50`` is specified on a network with 10 members, along with a ``ThresholdComparator`` value of ``GREATER_THAN`` , this indicates that 6 ``YES`` votes are required for the proposal to be approved. - **ProposalDurationInHours** *(integer) --* The duration from the time that a proposal is created until it expires. If members cast neither the required number of ``YES`` votes to approve the proposal nor the number of ``NO`` votes required to reject it before the duration expires, the proposal is ``EXPIRED`` and ``ProposalActions`` are not carried out. - **ThresholdComparator** *(string) --* Determines whether the vote percentage must be greater than the ``ThresholdPercentage`` or must be greater than or equal to the ``ThreholdPercentage`` to be approved. :type MemberConfiguration: dict :param MemberConfiguration: **[REQUIRED]** Configuration properties for the first member within the network. - **Name** *(string) --* **[REQUIRED]** The name of the member. - **Description** *(string) --* An optional description of the member. - **FrameworkConfiguration** *(dict) --* **[REQUIRED]** Configuration properties of the blockchain framework relevant to the member. - **Fabric** *(dict) --* Attributes of Hyperledger Fabric for a member on a Managed Blockchain network that uses Hyperledger Fabric. - **AdminUsername** *(string) --* **[REQUIRED]** The user name for the member\'s initial administrative user. - **AdminPassword** *(string) --* **[REQUIRED]** The password for the member\'s initial administrative user. The ``AdminPassword`` must be at least eight characters long and no more than 32 characters. It must contain at least one uppercase letter, one lowercase letter, and one digit. It cannot have a single quote(‘), double quote(“), forward slash(/), backward slash(\), @, or a space. :rtype: dict :returns: """ pass def create_node(self, ClientRequestToken: str, NetworkId: str, MemberId: str, NodeConfiguration: Dict) -> Dict: """ Creates a peer node in a member. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateNode>`_ **Request Syntax** :: response = client.create_node( ClientRequestToken='string', NetworkId='string', MemberId='string', NodeConfiguration={ 'InstanceType': 'string', 'AvailabilityZone': 'string' } ) **Response Syntax** :: { 'NodeId': 'string' } **Response Structure** - *(dict) --* - **NodeId** *(string) --* The unique identifier of the node. :type ClientRequestToken: string :param ClientRequestToken: **[REQUIRED]** A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an AWS SDK or the AWS CLI. This field is autopopulated if not provided. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network in which this node runs. :type MemberId: string :param MemberId: **[REQUIRED]** The unique identifier of the member that owns this node. :type NodeConfiguration: dict :param NodeConfiguration: **[REQUIRED]** The properties of a node configuration. - **InstanceType** *(string) --* **[REQUIRED]** The Amazon Managed Blockchain instance type for the node. - **AvailabilityZone** *(string) --* **[REQUIRED]** The Availability Zone in which the node exists. :rtype: dict :returns: """ pass def create_proposal(self, ClientRequestToken: str, NetworkId: str, MemberId: str, Actions: Dict, Description: str = None) -> Dict: """ Creates a proposal for a change to the network that other members of the network can vote on, for example, a proposal to add a new member to the network. Any member can create a proposal. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateProposal>`_ **Request Syntax** :: response = client.create_proposal( ClientRequestToken='string', NetworkId='string', MemberId='string', Actions={ 'Invitations': [ { 'Principal': 'string' }, ], 'Removals': [ { 'MemberId': 'string' }, ] }, Description='string' ) **Response Syntax** :: { 'ProposalId': 'string' } **Response Structure** - *(dict) --* - **ProposalId** *(string) --* The unique identifier of the proposal. :type ClientRequestToken: string :param ClientRequestToken: **[REQUIRED]** A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an AWS SDK or the AWS CLI. This field is autopopulated if not provided. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network for which the proposal is made. :type MemberId: string :param MemberId: **[REQUIRED]** The unique identifier of the member that is creating the proposal. This identifier is especially useful for identifying the member making the proposal when multiple members exist in a single AWS account. :type Actions: dict :param Actions: **[REQUIRED]** The type of actions proposed, such as inviting a member or removing a member. The types of ``Actions`` in a proposal are mutually exclusive. For example, a proposal with ``Invitations`` actions cannot also contain ``Removals`` actions. - **Invitations** *(list) --* The actions to perform for an ``APPROVED`` proposal to invite an AWS account to create a member and join the network. - *(dict) --* An action to invite a specific AWS account to create a member and join the network. The ``InviteAction`` is carried out when a ``Proposal`` is ``APPROVED`` . - **Principal** *(string) --* **[REQUIRED]** The AWS account ID to invite. - **Removals** *(list) --* The actions to perform for an ``APPROVED`` proposal to remove a member from the network, which deletes the member and all associated member resources from the network. - *(dict) --* An action to remove a member from a Managed Blockchain network as the result of a removal proposal that is ``APPROVED`` . The member and all associated resources are deleted from the network. - **MemberId** *(string) --* **[REQUIRED]** The unique identifier of the member to remove. :type Description: string :param Description: A description for the proposal that is visible to voting members, for example, \"Proposal to add Example Corp. as member.\" :rtype: dict :returns: """ pass def delete_member(self, NetworkId: str, MemberId: str) -> Dict: """ Deletes a member. Deleting a member removes the member and all associated resources from the network. ``DeleteMember`` can only be called for a specified ``MemberId`` if the principal performing the action is associated with the AWS account that owns the member. In all other cases, the ``DeleteMember`` action is carried out as the result of an approved proposal to remove a member. If ``MemberId`` is the last member in a network specified by the last AWS account, the network is deleted also. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/DeleteMember>`_ **Request Syntax** :: response = client.delete_member( NetworkId='string', MemberId='string' ) **Response Syntax** :: {} **Response Structure** - *(dict) --* :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network from which the member is removed. :type MemberId: string :param MemberId: **[REQUIRED]** The unique identifier of the member to remove. :rtype: dict :returns: """ pass def delete_node(self, NetworkId: str, MemberId: str, NodeId: str) -> Dict: """ Deletes a peer node from a member that your AWS account owns. All data on the node is lost and cannot be recovered. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/DeleteNode>`_ **Request Syntax** :: response = client.delete_node( NetworkId='string', MemberId='string', NodeId='string' ) **Response Syntax** :: {} **Response Structure** - *(dict) --* :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network that the node belongs to. :type MemberId: string :param MemberId: **[REQUIRED]** The unique identifier of the member that owns this node. :type NodeId: string :param NodeId: **[REQUIRED]** The unique identifier of the node. :rtype: dict :returns: """ pass def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = None): """ Generate a presigned url given a client, its method, and arguments :type ClientMethod: string :param ClientMethod: The client method to presign for :type Params: dict :param Params: The parameters normally passed to ``ClientMethod``. :type ExpiresIn: int :param ExpiresIn: The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds) :type HttpMethod: string :param HttpMethod: The http method to use on the generated url. By default, the http method is whatever is used in the method\'s model. :returns: The presigned url """ pass def get_member(self, NetworkId: str, MemberId: str) -> Dict: """ Returns detailed information about a member. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetMember>`_ **Request Syntax** :: response = client.get_member( NetworkId='string', MemberId='string' ) **Response Syntax** :: { 'Member': { 'NetworkId': 'string', 'Id': 'string', 'Name': 'string', 'Description': 'string', 'FrameworkAttributes': { 'Fabric': { 'AdminUsername': 'string', 'CaEndpoint': 'string' } }, 'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED', 'CreationDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* - **Member** *(dict) --* The properties of a member. - **NetworkId** *(string) --* The unique identifier of the network to which the member belongs. - **Id** *(string) --* The unique identifier of the member. - **Name** *(string) --* The name of the member. - **Description** *(string) --* An optional description for the member. - **FrameworkAttributes** *(dict) --* Attributes relevant to a member for the blockchain framework that the Managed Blockchain network uses. - **Fabric** *(dict) --* Attributes of Hyperledger Fabric relevant to a member on a Managed Blockchain network that uses Hyperledger Fabric. - **AdminUsername** *(string) --* The user name for the initial administrator user for the member. - **CaEndpoint** *(string) --* The endpoint used to access the member's certificate authority. - **Status** *(string) --* The status of a member. * ``CREATING`` - The AWS account is in the process of creating a member. * ``AVAILABLE`` - The member has been created and can participate in the network. * ``CREATE_FAILED`` - The AWS account attempted to create a member and creation failed. * ``DELETING`` - The member and all associated resources are in the process of being deleted. Either the AWS account that owns the member deleted it, or the member is being deleted as the result of an ``APPROVED`` ``PROPOSAL`` to remove the member. * ``DELETED`` - The member can no longer participate on the network and all associated resources are deleted. Either the AWS account that owns the member deleted it, or the member is being deleted as the result of an ``APPROVED`` ``PROPOSAL`` to remove the member. - **CreationDate** *(datetime) --* The date and time that the member was created. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network to which the member belongs. :type MemberId: string :param MemberId: **[REQUIRED]** The unique identifier of the member. :rtype: dict :returns: """ pass def get_network(self, NetworkId: str) -> Dict: """ Returns detailed information about a network. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetNetwork>`_ **Request Syntax** :: response = client.get_network( NetworkId='string' ) **Response Syntax** :: { 'Network': { 'Id': 'string', 'Name': 'string', 'Description': 'string', 'Framework': 'HYPERLEDGER_FABRIC', 'FrameworkVersion': 'string', 'FrameworkAttributes': { 'Fabric': { 'OrderingServiceEndpoint': 'string', 'Edition': 'STARTER'|'STANDARD' } }, 'VpcEndpointServiceName': 'string', 'VotingPolicy': { 'ApprovalThresholdPolicy': { 'ThresholdPercentage': 123, 'ProposalDurationInHours': 123, 'ThresholdComparator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUAL_TO' } }, 'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED', 'CreationDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* - **Network** *(dict) --* An object containing network configuration parameters. - **Id** *(string) --* The unique identifier of the network. - **Name** *(string) --* The name of the network. - **Description** *(string) --* Attributes of the blockchain framework for the network. - **Framework** *(string) --* The blockchain framework that the network uses. - **FrameworkVersion** *(string) --* The version of the blockchain framework that the network uses. - **FrameworkAttributes** *(dict) --* Attributes of the blockchain framework that the network uses. - **Fabric** *(dict) --* Attributes of Hyperledger Fabric for a Managed Blockchain network that uses Hyperledger Fabric. - **OrderingServiceEndpoint** *(string) --* The endpoint of the ordering service for the network. - **Edition** *(string) --* The edition of Amazon Managed Blockchain that Hyperledger Fabric uses. For more information, see `Amazon Managed Blockchain Pricing <https://aws.amazon.com/managed-blockchain/pricing/>`__ . - **VpcEndpointServiceName** *(string) --* The VPC endpoint service name of the VPC endpoint service of the network. Members use the VPC endpoint service name to create a VPC endpoint to access network resources. - **VotingPolicy** *(dict) --* The voting rules for the network to decide if a proposal is accepted. - **ApprovalThresholdPolicy** *(dict) --* Defines the rules for the network for voting on proposals, such as the percentage of ``YES`` votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created. - **ThresholdPercentage** *(integer) --* The percentage of votes among all members that must be ``YES`` for a proposal to be approved. For example, a ``ThresholdPercentage`` value of ``50`` indicates 50%. The ``ThresholdComparator`` determines the precise comparison. If a ``ThresholdPercentage`` value of ``50`` is specified on a network with 10 members, along with a ``ThresholdComparator`` value of ``GREATER_THAN`` , this indicates that 6 ``YES`` votes are required for the proposal to be approved. - **ProposalDurationInHours** *(integer) --* The duration from the time that a proposal is created until it expires. If members cast neither the required number of ``YES`` votes to approve the proposal nor the number of ``NO`` votes required to reject it before the duration expires, the proposal is ``EXPIRED`` and ``ProposalActions`` are not carried out. - **ThresholdComparator** *(string) --* Determines whether the vote percentage must be greater than the ``ThresholdPercentage`` or must be greater than or equal to the ``ThreholdPercentage`` to be approved. - **Status** *(string) --* The current status of the network. - **CreationDate** *(datetime) --* The date and time that the network was created. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network to get information about. :rtype: dict :returns: """ pass def get_node(self, NetworkId: str, MemberId: str, NodeId: str) -> Dict: """ Returns detailed information about a peer node. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetNode>`_ **Request Syntax** :: response = client.get_node( NetworkId='string', MemberId='string', NodeId='string' ) **Response Syntax** :: { 'Node': { 'NetworkId': 'string', 'MemberId': 'string', 'Id': 'string', 'InstanceType': 'string', 'AvailabilityZone': 'string', 'FrameworkAttributes': { 'Fabric': { 'PeerEndpoint': 'string', 'PeerEventEndpoint': 'string' } }, 'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED'|'FAILED', 'CreationDate': datetime(2015, 1, 1) } } **Response Structure** - *(dict) --* - **Node** *(dict) --* Properties of the node configuration. - **NetworkId** *(string) --* The unique identifier of the network that the node is in. - **MemberId** *(string) --* The unique identifier of the member to which the node belongs. - **Id** *(string) --* The unique identifier of the node. - **InstanceType** *(string) --* The instance type of the node. - **AvailabilityZone** *(string) --* The Availability Zone in which the node exists. - **FrameworkAttributes** *(dict) --* Attributes of the blockchain framework being used. - **Fabric** *(dict) --* Attributes of Hyperledger Fabric for a peer node on a Managed Blockchain network that uses Hyperledger Fabric. - **PeerEndpoint** *(string) --* The endpoint that identifies the peer node for all services except peer channel-based event services. - **PeerEventEndpoint** *(string) --* The endpoint that identifies the peer node for peer channel-based event services. - **Status** *(string) --* The status of the node. - **CreationDate** *(datetime) --* The date and time that the node was created. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network to which the node belongs. :type MemberId: string :param MemberId: **[REQUIRED]** The unique identifier of the member that owns the node. :type NodeId: string :param NodeId: **[REQUIRED]** The unique identifier of the node. :rtype: dict :returns: """ pass def get_paginator(self, operation_name: str = None) -> Paginator: """ Create a paginator for an operation. :type operation_name: string :param operation_name: The operation name. This is the same name as the method name on the client. For example, if the method name is ``create_foo``, and you\'d normally invoke the operation as ``client.create_foo(**kwargs)``, if the ``create_foo`` operation can be paginated, you can use the call ``client.get_paginator(\"create_foo\")``. :raise OperationNotPageableError: Raised if the operation is not pageable. You can use the ``client.can_paginate`` method to check if an operation is pageable. :rtype: L{botocore.paginate.Paginator} :return: A paginator object. """ pass def get_proposal(self, NetworkId: str, ProposalId: str) -> Dict: """ Returns detailed information about a proposal. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetProposal>`_ **Request Syntax** :: response = client.get_proposal( NetworkId='string', ProposalId='string' ) **Response Syntax** :: { 'Proposal': { 'ProposalId': 'string', 'NetworkId': 'string', 'Description': 'string', 'Actions': { 'Invitations': [ { 'Principal': 'string' }, ], 'Removals': [ { 'MemberId': 'string' }, ] }, 'ProposedByMemberId': 'string', 'ProposedByMemberName': 'string', 'Status': 'IN_PROGRESS'|'APPROVED'|'REJECTED'|'EXPIRED'|'ACTION_FAILED', 'CreationDate': datetime(2015, 1, 1), 'ExpirationDate': datetime(2015, 1, 1), 'YesVoteCount': 123, 'NoVoteCount': 123, 'OutstandingVoteCount': 123 } } **Response Structure** - *(dict) --* - **Proposal** *(dict) --* Information about a proposal. - **ProposalId** *(string) --* The unique identifier of the proposal. - **NetworkId** *(string) --* The unique identifier of the network for which the proposal is made. - **Description** *(string) --* The description of the proposal. - **Actions** *(dict) --* The actions to perform on the network if the proposal is ``APPROVED`` . - **Invitations** *(list) --* The actions to perform for an ``APPROVED`` proposal to invite an AWS account to create a member and join the network. - *(dict) --* An action to invite a specific AWS account to create a member and join the network. The ``InviteAction`` is carried out when a ``Proposal`` is ``APPROVED`` . - **Principal** *(string) --* The AWS account ID to invite. - **Removals** *(list) --* The actions to perform for an ``APPROVED`` proposal to remove a member from the network, which deletes the member and all associated member resources from the network. - *(dict) --* An action to remove a member from a Managed Blockchain network as the result of a removal proposal that is ``APPROVED`` . The member and all associated resources are deleted from the network. - **MemberId** *(string) --* The unique identifier of the member to remove. - **ProposedByMemberId** *(string) --* The unique identifier of the member that created the proposal. - **ProposedByMemberName** *(string) --* The name of the member that created the proposal. - **Status** *(string) --* The status of the proposal. Values are as follows: * ``IN_PROGRESS`` - The proposal is active and open for member voting. * ``APPROVED`` - The proposal was approved with sufficient ``YES`` votes among members according to the ``VotingPolicy`` specified for the ``Network`` . The specified proposal actions are carried out. * ``REJECTED`` - The proposal was rejected with insufficient ``YES`` votes among members according to the ``VotingPolicy`` specified for the ``Network`` . The specified ``ProposalActions`` are not carried out. * ``EXPIRED`` - Members did not cast the number of votes required to determine the proposal outcome before the proposal expired. The specified ``ProposalActions`` are not carried out. * ``ACTION_FAILED`` - One or more of the specified ``ProposalActions`` in a proposal that was approved could not be completed because of an error. - **CreationDate** *(datetime) --* The date and time that the proposal was created. - **ExpirationDate** *(datetime) --* The date and time that the proposal expires. This is the ``CreationDate`` plus the ``ProposalDurationInHours`` that is specified in the ``ProposalThresholdPolicy`` . After this date and time, if members have not cast enough votes to determine the outcome according to the voting policy, the proposal is ``EXPIRED`` and ``Actions`` are not carried out. - **YesVoteCount** *(integer) --* The current total of ``YES`` votes cast on the proposal by members. - **NoVoteCount** *(integer) --* The current total of ``NO`` votes cast on the proposal by members. - **OutstandingVoteCount** *(integer) --* The number of votes remaining to be cast on the proposal by members. In other words, the number of members minus the sum of ``YES`` votes and ``NO`` votes. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network for which the proposal is made. :type ProposalId: string :param ProposalId: **[REQUIRED]** The unique identifier of the proposal. :rtype: dict :returns: """ pass def get_waiter(self, waiter_name: str = None) -> Waiter: """ Returns an object that can wait for some condition. :type waiter_name: str :param waiter_name: The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. :returns: The specified waiter object. :rtype: botocore.waiter.Waiter """ pass def list_invitations(self, MaxResults: int = None, NextToken: str = None) -> Dict: """ Returns a listing of all invitations made on the specified network. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListInvitations>`_ **Request Syntax** :: response = client.list_invitations( MaxResults=123, NextToken='string' ) **Response Syntax** :: { 'Invitations': [ { 'InvitationId': 'string', 'CreationDate': datetime(2015, 1, 1), 'ExpirationDate': datetime(2015, 1, 1), 'Status': 'PENDING'|'ACCEPTED'|'ACCEPTING'|'REJECTED'|'EXPIRED', 'NetworkSummary': { 'Id': 'string', 'Name': 'string', 'Description': 'string', 'Framework': 'HYPERLEDGER_FABRIC', 'FrameworkVersion': 'string', 'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED', 'CreationDate': datetime(2015, 1, 1) } }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* - **Invitations** *(list) --* The invitations for the network. - *(dict) --* An invitation to an AWS account to create a member and join the network. - **InvitationId** *(string) --* The unique identifier for the invitation. - **CreationDate** *(datetime) --* The date and time that the invitation was created. - **ExpirationDate** *(datetime) --* The date and time that the invitation expires. This is the ``CreationDate`` plus the ``ProposalDurationInHours`` that is specified in the ``ProposalThresholdPolicy`` . After this date and time, the invitee can no longer create a member and join the network using this ``InvitationId`` . - **Status** *(string) --* The status of the invitation: * ``PENDING`` - The invitee has not created a member to join the network, and the invitation has not yet expired. * ``ACCEPTING`` - The invitee has begun creating a member, and creation has not yet completed. * ``ACCEPTED`` - The invitee created a member and joined the network using the ``InvitationID`` . * ``REJECTED`` - The invitee rejected the invitation. * ``EXPIRED`` - The invitee neither created a member nor rejected the invitation before the ``ExpirationDate`` . - **NetworkSummary** *(dict) --* A summary of network configuration properties. - **Id** *(string) --* The unique identifier of the network. - **Name** *(string) --* The name of the network. - **Description** *(string) --* An optional description of the network. - **Framework** *(string) --* The blockchain framework that the network uses. - **FrameworkVersion** *(string) --* The version of the blockchain framework that the network uses. - **Status** *(string) --* The current status of the network. - **CreationDate** *(datetime) --* The date and time that the network was created. - **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. :type MaxResults: integer :param MaxResults: The maximum number of invitations to return. :type NextToken: string :param NextToken: The pagination token that indicates the next set of results to retrieve. :rtype: dict :returns: """ pass def list_members(self, NetworkId: str, Name: str = None, Status: str = None, IsOwned: bool = None, MaxResults: int = None, NextToken: str = None) -> Dict: """ Returns a listing of the members in a network and properties of their configurations. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListMembers>`_ **Request Syntax** :: response = client.list_members( NetworkId='string', Name='string', Status='CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED', IsOwned=True|False, MaxResults=123, NextToken='string' ) **Response Syntax** :: { 'Members': [ { 'Id': 'string', 'Name': 'string', 'Description': 'string', 'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED', 'CreationDate': datetime(2015, 1, 1), 'IsOwned': True|False }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* - **Members** *(list) --* An array of ``MemberSummary`` objects. Each object contains details about a network member. - *(dict) --* A summary of configuration properties for a member. - **Id** *(string) --* The unique identifier of the member. - **Name** *(string) --* The name of the member. - **Description** *(string) --* An optional description of the member. - **Status** *(string) --* The status of the member. * ``CREATING`` - The AWS account is in the process of creating a member. * ``AVAILABLE`` - The member has been created and can participate in the network. * ``CREATE_FAILED`` - The AWS account attempted to create a member and creation failed. * ``DELETING`` - The member and all associated resources are in the process of being deleted. Either the AWS account that owns the member deleted it, or the member is being deleted as the result of an ``APPROVED`` ``PROPOSAL`` to remove the member. * ``DELETED`` - The member can no longer participate on the network and all associated resources are deleted. Either the AWS account that owns the member deleted it, or the member is being deleted as the result of an ``APPROVED`` ``PROPOSAL`` to remove the member. - **CreationDate** *(datetime) --* The date and time that the member was created. - **IsOwned** *(boolean) --* An indicator of whether the member is owned by your AWS account or a different AWS account. - **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network for which to list members. :type Name: string :param Name: The optional name of the member to list. :type Status: string :param Status: An optional status specifier. If provided, only members currently in this status are listed. :type IsOwned: boolean :param IsOwned: An optional Boolean value. If provided, the request is limited either to members that the current AWS account owns (``true`` ) or that other AWS accounts own (``false`` ). If omitted, all members are listed. :type MaxResults: integer :param MaxResults: The maximum number of members to return in the request. :type NextToken: string :param NextToken: The pagination token that indicates the next set of results to retrieve. :rtype: dict :returns: """ pass def list_networks(self, Name: str = None, Framework: str = None, Status: str = None, MaxResults: int = None, NextToken: str = None) -> Dict: """ Returns information about the networks in which the current AWS account has members. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListNetworks>`_ **Request Syntax** :: response = client.list_networks( Name='string', Framework='HYPERLEDGER_FABRIC', Status='CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED', MaxResults=123, NextToken='string' ) **Response Syntax** :: { 'Networks': [ { 'Id': 'string', 'Name': 'string', 'Description': 'string', 'Framework': 'HYPERLEDGER_FABRIC', 'FrameworkVersion': 'string', 'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED', 'CreationDate': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* - **Networks** *(list) --* An array of ``NetworkSummary`` objects that contain configuration properties for each network. - *(dict) --* A summary of network configuration properties. - **Id** *(string) --* The unique identifier of the network. - **Name** *(string) --* The name of the network. - **Description** *(string) --* An optional description of the network. - **Framework** *(string) --* The blockchain framework that the network uses. - **FrameworkVersion** *(string) --* The version of the blockchain framework that the network uses. - **Status** *(string) --* The current status of the network. - **CreationDate** *(datetime) --* The date and time that the network was created. - **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. :type Name: string :param Name: The name of the network. :type Framework: string :param Framework: An optional framework specifier. If provided, only networks of this framework type are listed. :type Status: string :param Status: An optional status specifier. If provided, only networks currently in this status are listed. :type MaxResults: integer :param MaxResults: The maximum number of networks to list. :type NextToken: string :param NextToken: The pagination token that indicates the next set of results to retrieve. :rtype: dict :returns: """ pass def list_nodes(self, NetworkId: str, MemberId: str, Status: str = None, MaxResults: int = None, NextToken: str = None) -> Dict: """ Returns information about the nodes within a network. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListNodes>`_ **Request Syntax** :: response = client.list_nodes( NetworkId='string', MemberId='string', Status='CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED'|'FAILED', MaxResults=123, NextToken='string' ) **Response Syntax** :: { 'Nodes': [ { 'Id': 'string', 'Status': 'CREATING'|'AVAILABLE'|'CREATE_FAILED'|'DELETING'|'DELETED'|'FAILED', 'CreationDate': datetime(2015, 1, 1), 'AvailabilityZone': 'string', 'InstanceType': 'string' }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* - **Nodes** *(list) --* An array of ``NodeSummary`` objects that contain configuration properties for each node. - *(dict) --* A summary of configuration properties for a peer node. - **Id** *(string) --* The unique identifier of the node. - **Status** *(string) --* The status of the node. - **CreationDate** *(datetime) --* The date and time that the node was created. - **AvailabilityZone** *(string) --* The Availability Zone in which the node exists. - **InstanceType** *(string) --* The EC2 instance type for the node. - **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network for which to list nodes. :type MemberId: string :param MemberId: **[REQUIRED]** The unique identifier of the member who owns the nodes to list. :type Status: string :param Status: An optional status specifier. If provided, only nodes currently in this status are listed. :type MaxResults: integer :param MaxResults: The maximum number of nodes to list. :type NextToken: string :param NextToken: The pagination token that indicates the next set of results to retrieve. :rtype: dict :returns: """ pass def list_proposal_votes(self, NetworkId: str, ProposalId: str, MaxResults: int = None, NextToken: str = None) -> Dict: """ Returns the listing of votes for a specified proposal, including the value of each vote and the unique identifier of the member that cast the vote. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListProposalVotes>`_ **Request Syntax** :: response = client.list_proposal_votes( NetworkId='string', ProposalId='string', MaxResults=123, NextToken='string' ) **Response Syntax** :: { 'ProposalVotes': [ { 'Vote': 'YES'|'NO', 'MemberName': 'string', 'MemberId': 'string' }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* - **ProposalVotes** *(list) --* The listing of votes. - *(dict) --* Properties of an individual vote that a member cast for a proposal. - **Vote** *(string) --* The vote value, either ``YES`` or ``NO`` . - **MemberName** *(string) --* The name of the member that cast the vote. - **MemberId** *(string) --* The unique identifier of the member that cast the vote. - **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network. :type ProposalId: string :param ProposalId: **[REQUIRED]** The unique identifier of the proposal. :type MaxResults: integer :param MaxResults: The maximum number of votes to return. :type NextToken: string :param NextToken: The pagination token that indicates the next set of results to retrieve. :rtype: dict :returns: """ pass def list_proposals(self, NetworkId: str, MaxResults: int = None, NextToken: str = None) -> Dict: """ Returns a listing of proposals for the network. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListProposals>`_ **Request Syntax** :: response = client.list_proposals( NetworkId='string', MaxResults=123, NextToken='string' ) **Response Syntax** :: { 'Proposals': [ { 'ProposalId': 'string', 'Description': 'string', 'ProposedByMemberId': 'string', 'ProposedByMemberName': 'string', 'Status': 'IN_PROGRESS'|'APPROVED'|'REJECTED'|'EXPIRED'|'ACTION_FAILED', 'CreationDate': datetime(2015, 1, 1), 'ExpirationDate': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** - *(dict) --* - **Proposals** *(list) --* The summary of each proposal made on the network. - *(dict) --* Properties of a proposal. - **ProposalId** *(string) --* The unique identifier of the proposal. - **Description** *(string) --* The description of the proposal. - **ProposedByMemberId** *(string) --* The unique identifier of the member that created the proposal. - **ProposedByMemberName** *(string) --* The name of the member that created the proposal. - **Status** *(string) --* The status of the proposal. Values are as follows: * ``IN_PROGRESS`` - The proposal is active and open for member voting. * ``APPROVED`` - The proposal was approved with sufficient ``YES`` votes among members according to the ``VotingPolicy`` specified for the ``Network`` . The specified proposal actions are carried out. * ``REJECTED`` - The proposal was rejected with insufficient ``YES`` votes among members according to the ``VotingPolicy`` specified for the ``Network`` . The specified ``ProposalActions`` are not carried out. * ``EXPIRED`` - Members did not cast the number of votes required to determine the proposal outcome before the proposal expired. The specified ``ProposalActions`` are not carried out. * ``ACTION_FAILED`` - One or more of the specified ``ProposalActions`` in a proposal that was approved could not be completed because of an error. - **CreationDate** *(datetime) --* The date and time that the proposal was created. - **ExpirationDate** *(datetime) --* The date and time that the proposal expires. This is the ``CreationDate`` plus the ``ProposalDurationInHours`` that is specified in the ``ProposalThresholdPolicy`` . After this date and time, if members have not cast enough votes to determine the outcome according to the voting policy, the proposal is ``EXPIRED`` and ``Actions`` are not carried out. - **NextToken** *(string) --* The pagination token that indicates the next set of results to retrieve. :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network. :type MaxResults: integer :param MaxResults: The maximum number of proposals to return. :type NextToken: string :param NextToken: The pagination token that indicates the next set of results to retrieve. :rtype: dict :returns: """ pass def reject_invitation(self, InvitationId: str) -> Dict: """ Rejects an invitation to join a network. This action can be called by a principal in an AWS account that has received an invitation to create a member and join a network. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/RejectInvitation>`_ **Request Syntax** :: response = client.reject_invitation( InvitationId='string' ) **Response Syntax** :: {} **Response Structure** - *(dict) --* :type InvitationId: string :param InvitationId: **[REQUIRED]** The unique identifier of the invitation to reject. :rtype: dict :returns: """ pass def vote_on_proposal(self, NetworkId: str, ProposalId: str, VoterMemberId: str, Vote: str) -> Dict: """ Casts a vote for a specified ``ProposalId`` on behalf of a member. The member to vote as, specified by ``VoterMemberId`` , must be in the same AWS account as the principal that calls the action. See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/VoteOnProposal>`_ **Request Syntax** :: response = client.vote_on_proposal( NetworkId='string', ProposalId='string', VoterMemberId='string', Vote='YES'|'NO' ) **Response Syntax** :: {} **Response Structure** - *(dict) --* :type NetworkId: string :param NetworkId: **[REQUIRED]** The unique identifier of the network. :type ProposalId: string :param ProposalId: **[REQUIRED]** The unique identifier of the proposal. :type VoterMemberId: string :param VoterMemberId: **[REQUIRED]** The unique identifier of the member casting the vote. :type Vote: string :param Vote: **[REQUIRED]** The value of the vote. :rtype: dict :returns: """ pass
python
4 In(A) the seventh year, Jehoiada(B) sent for the commanders of hundreds, the Carites, and the guards.(C) He had them come to him in the Lord’s temple, where he made a covenant with them and put them under oath. He showed them the king’s son 5 and commanded them, “This is what you are to do: A third of you who come on duty on the Sabbath(D) are to provide protection for the king’s palace. 6 A third are to be at the Foundation[a] Gate and a third at the gate behind the guards. You are to take turns providing protection for the palace.[b](E) 7 “Your two divisions that go off duty on the Sabbath are to provide the king protection at the Lord’s temple. 8 Completely surround the king with weapons in hand. Anyone who approaches the ranks is to be put to death. Be with the king in all his daily tasks.”[c](F) 9 So the commanders of hundreds did everything the priest Jehoiada commanded. They each brought their men—those coming on duty on the Sabbath and those going off duty—and came to the priest Jehoiada.(G) 10 The priest gave to the commanders of hundreds King David’s spears and shields(H) that were in the Lord’s temple. 11 Then the guards stood with their weapons in hand surrounding the king—from the right side of the temple to the left side, by the altar and by the temple. 12 Jehoiada brought out the king’s son, put the crown(I) on him, gave him the testimony,[d](J) and made him king. They anointed(K) him and clapped their hands and cried, “Long live the king!” (L) 13 When Athaliah(M) heard the noise from the guard and the crowd, she went out to the people at the Lord’s temple.(N) 14 She looked, and there was the king standing by the pillar(O) according to the custom. The commanders and the trumpeters were by the king, and all the people of the land were rejoicing and blowing trumpets.(P) Athaliah tore her clothes and screamed “Treason! Treason!” (Q) 15 Then the priest Jehoiada(R) ordered the commanders of hundreds(S) in charge of the army, “Take her out between the ranks, and put to death by the sword anyone who follows her,” for the priest had said, “She is not to be put to death in the Lord’s temple.”(T) 16 So they arrested her, and she went through the horse entrance(U) to the king’s palace, where she was put to death.(V) 17 Then(W) Jehoiada made a covenant between the Lord, the king, and the people that they would be the Lord’s people(X) and another covenant between the king and the people.[e](Y) 18 So all the people of the land went to the temple of Baal and tore it down. They smashed its altars and images to pieces,(Z) and they killed Mattan, the priest of Baal, at the altars.(AA) The Christian Standard Bible. Copyright © 2017 by Holman Bible Publishers. Used by permission. Christian Standard Bible®, and CSB® are federally registered trademarks of Holman Bible Publishers, all rights reserved.
english
{ "posts": [ { "title": "Post 1", "id": 1, "public": true, "author": "vamosgs", "content": "sheets containing Lorem Ipsum passages, and moresheets containing Lorem Ipsum passages, and more sheets containing Lorem Ipsum passages, and more sheets containing Lorem Ipsum passages, and more" }, { "title": "Post 2", "id": 2, "author": "vamosgs", "public": true, "content": "sheets containing Lorem Ipsum passages, and moresheets containing Lorem Ipsum passages, and more sheets containing Lorem Ipsum passages, and more sheets containing Lorem Ipsum passages, and more" }, { "title": "Post 3", "id": 3, "author": "admin", "public": false, "content": "sheets containing Lorem Ipsum passages, and moresheets containing Lorem Ipsum passages, and more sheets containing Lorem Ipsum passages, and more sheets containing Lorem Ipsum passages, and more" } ] }
json
Begin typing your search above and press return to search. Haflong, April 9: Seeking intervention in implementing the guidelines on procurement and distribution of two pairs of school uniform at elementary level in Dima Hasao district, the All Dimasa Students’ Union, Maibang Branch submitted a memorandum to Aru Rajoria, Mission Director, Asom Sarva Siksha Abhiyan Mission, recently. The representation signed by Prinish Daolagupu, president of All Dimasa Students’ Union, Maibang Branch, stated that the guideline of the SSA regarding issuing two pairs of uniform at elementary level was issued on February 14 to various districts of Assam but it had not been executed in all the five blocks of Dima Hasao district. No school maging committee was issued guideline or has proper knowledge how to execute the process, and instead of monitoring the process, the Cluster Resource Co-orditor, especially of the Maibang Block schools like Kalibari LP School, Maibang Government ME School and Kritipur Assamese School were seen working as a communicator by supplying the quotation of the uniform supplier to the Headmaster for their persol monetary benefit. The students’ body urged the SSA Mission to take action against those cluster resource coorditors for their unfair deeds.
english
At the core of any meaningful life and legacy has to be a vision for generosity, an understanding of what it means to be a blessing for others. The value of giving to church, to mission, to people must first be modeled, then taught so that the next generation embraces generosity as their calling. Once a person embraces a concept, like generosity, as their own, then it’s much easier to understand the responsibility attached to it. In my own journey, I’ve discovered that the timing of generosity reveals your heart to God. That step of writing the check or hitting the “donate” button online can seem daunting. But it all comes down to trust. Do I really trust that God is the same God who stayed Abraham’s hand from slaughtering his son and provided a ram in the thicket for the sacrifice? If my answer is yes, then that carries consequences. Good ones, too. It means that as a consequence of God’s provisional faithfulness, I can take joy in giving even in hard times. Often, God just wants us to take the first step. It can be as simple as making a plan to get out of debt or a plan to support a missionary family for a decade. It’s the first step. Once we commit, I’ve found that God is quick to reveal himself in that endeavor. It doesn’t matter whether we give out of wealth or humble circumstance. God can’t wait for us to step into the joy of generosity. We just need to trust him and take that first step. Application: Was there a time you knew God wanted you to do something hard and with extreme faith? Did you go through with it, or did you end up regretting not doing it?
english
<div class="container"> <h2 class="section-heading text-center">Geschenke</h2> <hr class="primary"> <div class="row"> <div class="col-lg-6"> <div class="text-center"><i class="fa fa-4x fa-file-text"></i></div> <br> <h3 class="section-heading text-center">Hochzeitsgeschenke</h3> <hr class="light"> <p> blablabla Geld </p> <p><small>(In order to make up for the lack of paper invitations, Cory spent more time than he’d care to admit making this website.)</small></p> </div> <div class="col-lg-6"> <div class="text-center"><i class="fa fa-4x fa-cutlery"></i></div> <br> <h3 class="section-heading text-center">Kuchen</h3> <hr class="light"> <p> Das Kuchenbuffet nach dem Sektempfang stellen wir selbst. Wenn ihr Lust und Zeit zum Backen habt, dann freuen wir uns sehr über mitgebrachte Kuchen. Bitte schreibt uns zur besseren Planbarkeit eine Email an .... </p> <p> blablabla </p> </div> </div> </div>
html
/* * The MIT License (MIT) * * Copyright (c) 2017 <EMAIL> * Copyright (c) 2017 contributors * * 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. */ package com.gmail.socraticphoenix.shnap.program.context; import com.gmail.socraticphoenix.parse.Strings; import com.gmail.socraticphoenix.shnap.parse.ShnapLoc; import com.gmail.socraticphoenix.shnap.run.env.ShnapEnvironment; import com.gmail.socraticphoenix.shnap.type.object.ShnapObject; import com.gmail.socraticphoenix.shnap.type.object.ShnapResolver; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; public class ShnapContext { private ShnapContext parent; private Map<String, ShnapObject> variables; private Map<String, List<Flag>> flags; private boolean ceiling; public ShnapContext() { this.variables = new LinkedHashMap<>(); this.flags = new LinkedHashMap<>(); this.ceiling = false; } public ShnapContext(ShnapContext parent) { this(); this.parent = parent; } public boolean isCeiling() { return this.ceiling; } public void setCeiling(boolean ceiling) { this.ceiling = ceiling; } public Map<String, ShnapObject> getVariables() { return this.variables; } public boolean hasFlag(String name, Flag flag) { List<Flag> flags = this.getFlags(name); return flags != null && flags.contains(flag); } public void setLocally(String name, ShnapObject object) { this.variables.remove(name); this.flags.remove(name); if (name.startsWith("^")) { this.getParentSafely().setLocally(Strings.cutFirst(name), object); return; } this.variables.put(name, object); } public boolean containsScopeWise(String name) { if (name.startsWith("^")) { if (this.parent == null) { return false; } else { return this.parent.containsScopeWise(name); } } else if (name.startsWith(":")) { return this.variables.containsKey(Strings.cutFirst(name)); } boolean flag = this.variables.containsKey(name); if (!flag) { if (this.parent != null) { return this.parent.containsScopeWise(name); } return false; } else { return true; } } public ShnapObject getExactly(String name) { if (name.startsWith("^")) { if (this.parent == null) { return ShnapObject.getVoid(); } else { return this.parent.getExactly(Strings.cutFirst(name)); } } else if (name.startsWith(":")) { ShnapObject theObj = this.variables.get(Strings.cutFirst(name)); return theObj == null ? ShnapObject.getVoid() : theObj; } ShnapObject obj = this.variables.get(name); if (obj == null) { if (this.parent != null) { return this.parent.getExactly(name); } return ShnapObject.getVoid(); } else { return obj; } } public void set(String name, ShnapObject object) { if (name.startsWith("^")) { this.getParentSafely().set(Strings.cutFirst(name), object); return; } else if (name.startsWith(":")) { this.variables.put(Strings.cutFirst(name), object); return; } if (this.parent != null && !this.ceiling && this.parent.containsCeilingWise(name)) { this.parent.set(name, object); } else { this.variables.put(name, object); } } public void del(String name) { if (name.startsWith("^")) { this.getParentSafely().del(Strings.cutFirst(name)); } else if (name.startsWith(":")) { name = Strings.cutFirst(name); this.variables.remove(name); this.flags.remove(name); } else { if (this.parent != null && !this.ceiling && this.parent.containsCeilingWise(name)) { this.parent.del(name); } else { this.variables.remove(name); this.flags.remove(name); } } } public void setFlag(String name, Flag flag) { if (name.startsWith("^")) { this.getParentSafely().setFlag(Strings.cutFirst(name), flag); return; } else if (name.startsWith(":")) { name = Strings.cutFirst(name); if (this.variables.containsKey(name)) { this.flags.computeIfAbsent(name, k -> new ArrayList<>()).add(flag); } return; } if (this.parent != null && !this.ceiling && this.parent.containsCeilingWise(name)) { this.parent.setFlag(name, flag); } else if (this.variables.containsKey(name)) { this.flags.computeIfAbsent(name, k -> new ArrayList<>()).add(flag); } } public ShnapExecution get(String name, ShnapEnvironment environment) { if (name.startsWith("^")) { if (this.parent == null) { return ShnapExecution.normal(ShnapObject.getVoid(), environment, ShnapLoc.BUILTIN); } else { return this.parent.get(Strings.cutFirst(name), environment); } } else if (name.startsWith(":")) { name = Strings.cutFirst(":"); ShnapObject obj = this.variables.get(name); return obj == null ? ShnapExecution.normal(ShnapObject.getVoid(), environment, ShnapLoc.BUILTIN) : ShnapExecution.normal(obj, environment, ShnapLoc.BUILTIN); } ShnapObject obj = this.variables.get(name); if (obj == null) { if (this.parent != null) { return this.parent.get(name, environment); } return ShnapExecution.normal(ShnapObject.getVoid(), environment, ShnapLoc.BUILTIN); } else if (obj instanceof ShnapResolver) { return obj.resolve(environment); } else { return ShnapExecution.normal(obj, environment, ShnapLoc.BUILTIN); } } private List<Flag> getFlags(String name) { if (name.startsWith("^")) { if (this.parent == null) { return null; } else { return this.parent.getFlags(Strings.cutFirst(name)); } } else if (name.startsWith(":")) { return this.flags.get(Strings.cutFirst(name)); } List<Flag> flag = this.flags.get(name); if (flag == null) { if (this.parent != null) { return this.parent.getFlags(name); } return null; } else { return flag; } } public ShnapContext getParentSafely() { if (this.parent == null) { this.parent = new ShnapContext(); } return this.parent; } public boolean directlyContains(String name) { return this.variables.containsKey(name); } public boolean contains(String name) { return this.variables.containsKey(name) || (this.parent != null && this.parent.contains(name)); } public boolean containsCeilingWise(String name) { return this.variables.containsKey(name) || (!this.ceiling && this.parent != null && this.parent.contains(name)); } public Collection<String> names() { return this.variables.keySet(); } public static ShnapContext childOf(ShnapContext other) { return new ShnapContext(other); } public ShnapContext copy() { ShnapContext other = new ShnapContext(this.parent); for (String name : this.names()) { other.set(name, this.variables.get(name)); } return other; } public boolean isChildOf(ShnapContext targetContext) { return targetContext == this || this.parent != null && this.parent.isChildOf(targetContext); } public enum Flag { DONT_IMPORT("noimport"), PRIVATE("private"), FINALIZED("final"); String rep; Flag(String rep) { this.rep = rep; } public String getRep() { return rep; } public static Flag getByRep(String rep) { for (Flag flag : values()) { if (flag.rep.equals(rep)) { return flag; } } return null; } } }
java
When ex Haryana Director General of Police, SPS Rathore, was spotted at a Republic Day function in Panchkula, seated in the front row, and taking the guard of honour with all senior officials of police and civil administration, it created a furore. And rightly so, because Rathore who had molested 14-year-old Ruchika Girhotra in 1990, was convicted of the crime by a special CBI court in 2009; that conviction was upheld by the Supreme Court in 2016. Aradhana Gupta, Girhotra’s best friend and sole witness to the molestation, whose testimony led to Rathore’s conviction in the trial court, told leading publications that Rathore’s presence at the event was a “disgrace” to the Tricolour and that it was “shameless on the part of the local administration. By endorsing such criminals, who have been convicted by the Supreme Court, the administration is directly encouraging such crimes,” she said. “A chance meeting at a grocery store in 1989 brought Ruchika and me together. We were both there to buy chocolates. We soon got talking and there was an instant connection between us. We were giggly 13-year-olds, full of life. By the time we returned home, it was as if we had always been friends and we exchanged our chocolates to seal the bond. “I always wanted to do my MBA and maybe become a businesswoman; Ruchika wanted to be a tennis player. On August 11, 1990, a Saturday, Ruchika came over to my house. She was very excited because the then inspector general of police and president of the Haryana Lawn Tennis Association (HLTA), SPS Rathore, had come to her house. He told her father that he’d heard how talented Ruchika was and that he wanted to arrange special coaching for her. Rathore was a respected man and we thought it was wonderful that he was taking special interest in Ruchika’s career. “So the next day, when we went to play at HLTA and Rathore called Ruchika to his room, there was no reason to suspect anything. However, Ruchika insisted that I accompany her. On seeing me with Ruchika, Rathore sent me off to look for the coach. I couldn’t find him, so I went back. And met with the most horrifying sight. Rathore had overpowered Ruchika and she was struggling to free herself. I could not believe what I was seeing. Here was this seemingly respectable middleaged man, whose daughter studied in the same school as Ruchika, groping and pawing at her. It was awful. “After that day, we realised that we were dealing with a seasoned player who would not stop till he got Ruchika. We had to confide in an adult. Since Ruchika was a little shy of revealing all the sordid details to her dad (her mother had died of an illness a year earlier), she decided to talk to my mother. My mother was outraged and said that a complaint should immediately be filed against Rathore. So, after ‘consulting Ruchika’s father and asking us if we had the courage to see the case through, a presentation was made to the chief minister and later a complaint was lodged at the Panchkula police station. “However, Ruchika was completely shattered. She was scared, dejected and depressed. The cheerful, bold girl we knew had vanished overnight. But what really broke Ruchika, was her unfair expulsion from school. She never recovered from the injustice of it. Her schoolmates and acquaintances started to shun her. To make things worse, Rathore started sending his goons after Ruchika to harass her, so it was almost as if she was placed under house arrest. “On some days, she would call to say that there were goons outside her house throwing stones or that a group of men had followed her back from the market and tormented her with lewd comments. “After the incident, Rathore kept harassing Ruchika’s family and threatening my parents. He was relentless. The next three years were a blur during which time my father was forced to take a demotion from chief engineer to superintendent engineer and had false cases of corruption filed against him. Ruchika’s father had civil cases filed against him and her brother, Ashu, was arrested on false car theft charges. But no matter how depressed we were, we knew that we wanted this man punished. “However, on December 28, 1993, Ruchika called to say that Ashu had been paraded in front of her house, handcuffed and half-naked, with bruises all over his body. She was crying hysterically and she said that the goons had threatened to do the same to her father. I didn’t know what to do other than offer consolation. I could not even go to her house because my exams were on at that time. I could never have imagined that Ruchika would commit suicide that night. “In my final year in college I met my husband, Aman. We became friends, but it took me a long time to open up to him because subconsciously, I had become distrustful of all men. Initially, he had no clue about my involvement in the case, but I had to go to the court often and soon he found out. He was naturally very worried about my security, but once I explained to him my commitment to see Rathore behind bars, he understood my position and has supported me ever since. November 11, 2010: The Supreme Court grants bail to S P S Rathore on the condition that he remain in Chandigarh. September 23, 2016: The Supreme Court upholds Rathore’s conviction but reduces his jail sentence from 18 months to six months, already undergone by Rathore, in view of his advanced years.
english
Qayamat Ki Raat actress Daljiet Kaur says she is planning to tie the knot very soon. By India Today Web Desk: Qayamat Ki Raat actress Daljiet Kaur who went through a bitter separation from actor Shaleen Bhanot in 2015 is ready to give marriage a second chance. The actress got married to her Kulvadhu co-star in 2009; she later accused him and his family of domestic violence. The couple also has a son Jaydon together. The actress in an interview to Bombay Times said that her parents are looking for a suitable groom for her and added that she might go for a businessman and not an actor this time, as she's looking for stability. "I want to get married and it will happen soon. My parents are looking for Mr Right. I have also been meeting a couple of guys. But it is a little different this time. Now I have a huge responsibility, I am a mother first and then I will be a wife. It will be the other way round," the actress told the paper. "I am very humbled that good men are approaching me. I got quite a few offers from actors, but the guy will not be from the industry. Right now, I am looking for stability so he will probably be a businessman, someone who is well settled. I am looking for a good, respectable family and not someone who is still experimenting because I think woh age chali gayi hai," she added. Daljiet says her son is ready to have a father now and misses the companionship of a dad. "I got separated and moved out when he wasn’t even one. He doesn’t remember living with Shaleen. They only meet once in a while. Although Shaleen has been very respectful, we don’t meet him that often. I am the one dropping Jaydon, picking him up, he travels with me. There is a huge void definitely. My son keeps talking about his friends and their fathers and he misses that companionship. I think he is prepared to have a father now, she told the publication.
english
<reponame>Unicornum/Db.Games :clipboard: 25.01.2022 Win10 x64 ## Risen 3: Titan Lords :star: :star: :star: :star: :star: ### Игра https://www.gog.com/ru/game/risen_3_titan_lords - Проблема с белыми текстурами решается установкой в настройках видеокарты "использовать настройки приложения". - Игра не любит пути с русскими буквами и пробелами, поэтому если имя пользователя Windows содержит то или другое, то в файле **data\ini\mount_packed.xml** нужно заменить путь к папке сохранений > PhysicalPath="$(savedgames)/Risen3/SaveGames" на, например > PhysicalPath="D:/Risen3/SaveGames" ### Widescreen Для установки разрешения 2560x1080 перед первым запуском игры: 1. Открыть с помощью [hex редактора](https://github.com/Unicornum/Db.Games/releases/download/Risen/HxD.zip) файл **system\Risen3.exe**. 2. Найти в нем hex последовательность **39 8E E3 3F** (будет в двух местах) и заменить на **26 B4 17 40**. 3. В файле **data/ini/ConfigDefault.xml** в разделе **Aspect16x9** изменить параметр "VirtalWidth=2560". > Для сброса настроек игры удалить папку **$(localappdata)/Risen3**. ### Русская озвучка > Мод **Risen 3 Remaster** с этой озвучкой работать не будет (и он уже включает в себя адаптированную версию), поэтому если планируется его установка, то ставить эту озвучку не нужно. [Скачать](https://www.gamesvoice.ru/risen3) ### Risen 3 Remaster Ссылка на мод: https://www.nexusmods.com/risen3/mods/10 > Мод содержит возможность указать в файле настроек любое разрешение, но заставить его работать в разрешении 2560x1080 не удалось, поэтому следует прежде проделать с оригинальной игрой то, что описано в разделе **Widescreen** и только потом устанавливать мод. 1. Запустить игру файлом **system\Risen3.exe** и выйти из игры (моду нужен сформированный игрой файл настроек). 2. Скачать архив Risen_3_Remaster_Launcher и распаковать его в папку system игры. 3. Запустить файл **system\Riren3_Remaster_Launcher.exe** и убедиться, что игра запускается и работает; если нет, то скачивать остальные файлы не нужно, мод работать не будет. 4. Скачать архивы Textures, Update, Russian_Sound и распаковать их в папку игры именно в этой последовательности. 5. В файле **system\Risen3_Remaster.ini** раскомментировать и дополнить строку > [GAME TEXT = RUSSIAN]
markdown
<filename>tests/unit/serializers/event-sub-topic-test.js import { moduleForModel, test } from 'ember-qunit'; moduleForModel('event-sub-topic', 'Unit | Serializer | event sub topic', { needs: [ 'serializer:event-sub-topic', 'serializer:event', 'model:event-topic', 'model:event', 'model:custom-placeholder' ] }); test('it serializes records', function(assert) { let record = this.subject(); let serializedRecord = record.serialize(); assert.ok(serializedRecord); });
javascript
<filename>routing/road_access.hpp<gh_stars>1-10 #pragma once #include "routing/segment.hpp" #include "routing/vehicle_mask.hpp" #include "base/assert.hpp" #include <cstdint> #include <string> #include <unordered_map> #include <utility> #include <vector> #include "3party/skarupke/flat_hash_map.hpp" #include "3party/opening_hours/opening_hours.hpp" namespace routing { // This class provides information about road access classes. // One instance of RoadAccess holds information about one // mwm and one router type (also known as VehicleType). class RoadAccess final { public: // The road access types are selected by analyzing the most // popular tags used when mapping roads in OSM. enum class Type : uint8_t { // Moving through the road is prohibited. No, // Moving through the road requires a special permission. Private, // No pass through the road is allowed; however, it can // be used if it is close enough to the destination point // of the route. Destination, // No restrictions, as in "access=yes". Yes, // The number of different road types. Count }; class Conditional { public: struct Access { Access(RoadAccess::Type type, osmoh::OpeningHours && openingHours) : m_type(type), m_openingHours(std::move(openingHours)) { } bool operator==(Access const & rhs) const { return m_type == rhs.m_type && m_openingHours == rhs.m_openingHours; } RoadAccess::Type m_type = RoadAccess::Type::Count; osmoh::OpeningHours m_openingHours; }; Conditional() = default; void Insert(RoadAccess::Type type, osmoh::OpeningHours && openingHours) { m_accesses.emplace_back(type, std::move(openingHours)); } size_t Size() const { return m_accesses.size(); } bool IsEmpty() const { return m_accesses.empty(); } std::vector<Access> const & GetAccesses() const { return m_accesses; } bool operator==(Conditional const & rhs) const { return m_accesses == rhs.m_accesses; } bool operator!=(Conditional const & rhs) const { return !(*this == rhs); } private: std::vector<Access> m_accesses; }; using WayToAccess = ska::flat_hash_map<uint32_t, RoadAccess::Type>; using PointToAccess = ska::flat_hash_map<RoadPoint, RoadAccess::Type, RoadPoint::Hash>; using WayToAccessConditional = ska::flat_hash_map<uint32_t, Conditional>; using PointToAccessConditional = ska::flat_hash_map<RoadPoint, Conditional, RoadPoint::Hash>; RoadAccess(); WayToAccess const & GetWayToAccess() const { return m_wayToAccess; } PointToAccess const & GetPointToAccess() const { return m_pointToAccess; } WayToAccessConditional const & GetWayToAccessConditional() const { return m_wayToAccessConditional; } PointToAccessConditional const & GetPointToAccessConditional() const { return m_pointToAccessConditional; } Type GetAccess(uint32_t featureId) const; Type GetAccess(RoadPoint const & point) const; template <typename WayToAccess, typename PointToAccess> void SetAccess(WayToAccess && wayToAccess, PointToAccess && pointToAccess) { m_wayToAccess = std::forward<WayToAccess>(wayToAccess); m_pointToAccess = std::forward<PointToAccess>(pointToAccess); } template <typename WayConditional, typename PointConditional> void SetAccessConditional(WayConditional && wayToAccessConditional, PointConditional && pointToAccessConditional) { m_wayToAccessConditional = std::forward<WayConditional>(wayToAccessConditional); m_pointToAccessConditional = std::forward<PointConditional>(pointToAccessConditional); } bool operator==(RoadAccess const & rhs) const; template <typename WayToAccess> void SetWayToAccessForTests(WayToAccess && wayToAccess) { m_wayToAccess = std::forward<WayToAccess>(wayToAccess); } template <typename T> void SetCurrentTimeGetter(T && getter) { m_currentTimeGetter = std::forward<T>(getter); } private: std::function<time_t()> m_currentTimeGetter; // If segmentIdx of a key in this map is 0, it means the // entire feature has the corresponding access type. // Otherwise, the information is about the segment with number (segmentIdx-1). WayToAccess m_wayToAccess; PointToAccess m_pointToAccess; WayToAccessConditional m_wayToAccessConditional; PointToAccessConditional m_pointToAccessConditional; }; time_t GetCurrentTimestamp(); std::string ToString(RoadAccess::Type type); void FromString(std::string const & s, RoadAccess::Type & result); std::string DebugPrint(RoadAccess::Conditional const & conditional); std::string DebugPrint(RoadAccess::Type type); std::string DebugPrint(RoadAccess const & r); } // namespace routing
cpp
<reponame>Denel91/Object-Oriented-Programming<filename>src/main/java/Design_Pattern/Factory/Pentagon.java package Design_Pattern.Factory; public class Pentagon implements Polygon { @Override public String getType() { return "I'm a Pentagon"; } }
java
{"Lcontrol + V": {"keys": ["Lcontrol", "V"], "count": 1, "ignore": false}, "Lcontrol + S": {"keys": ["Lcontrol", "S"], "count": 2, "ignore": false}}
json
Your Outdoor space is like an extra room for your home, where your imagination can run wild. Just as you decorate your indoor spaces with care, your outdoor area deserves attention, too, especially when you have experts like Landscaping Harrisburg PA, to lend a hand. Imagine your garden softly lit as the sun sets or your walkways shining brightly like moonlit paths. That’s what landscape Lighting can do. It’s like a magic touch that turns your outdoor area into a beautiful wonderland where you can enjoy the scenery even after dark. In this article, we’ll explore the world of Landscape Lighting. We’ll talk about the good things it brings, look at the different types of lights you can use, and explain why it’s often smart to let professionals, like Landscaping Harrisburg, PA, handle the tricky parts, especially regarding electricity. We’re here to reveal the secrets of creating a stunning outdoor space with the help of experts who know the way. 1. Enhanced Aesthetics: Landscape lighting transforms your outdoor space into a visual masterpiece, highlighting architectural features, trees, and gardens. A room bathed in a soft, gentle glow can feel welcoming and intimate, while festively colored lights can offer a dash of playfulness. 2. Improved Safety: Properly lit pathways and stairs reduce the risk of accidents and make your property safer for guests and family. A well-lit landscape also deters unwanted visitors by eliminating hiding spots. 3. Extended Usability: With well-planned lighting, you can enjoy your outdoor space even after sunset, whether for gatherings, romantic dinners, or simply unwinding on your patio. This extends your usable living space and enhances your overall quality of life. 4. Increased Property Value: A well-lit landscape enhances curb appeal, potentially boosting your property’s value. It makes a strong impression on potential buyers or renters, making your home stand out in the real estate market. 1. Path Lights: These guide the way along walkways and driveways, providing safety and a charming glow. Choose from various designs and heights to match your landscape’s style. 2. Spotlights: Ideal for highlighting focal points like statues, trees, or architectural elements. Adjustable spotlights can create dramatic effects by focusing light precisely where you want it. 3. Floodlights: Used for broad illumination, they can cover large areas and deter potential intruders. They are often used for security purposes, but when strategically placed, they can also contribute to your landscape’s beauty. 4. Deck and Patio Lights: Designed for creating cozy, intimate spaces, these fixtures are often built into the structure. They provide subtle illumination for outdoor seating areas, enhancing the ambiance of your outdoor living spaces. 5. Underwater Lights: Perfect for ponds and water features, these lights create a mesmerizing underwater effect. They can showcase the tranquility of your water feature and add a touch of magic to your landscape. Why Professionals Should Handle Landscape Lighting Installation? While DIY is an option, there are compelling reasons to hire professionals, especially when dealing with electricity: 1. Design Expertise: Professionals understand the nuances of lighting design, ensuring your space looks its best. Placement, beam angle, and color temperature are all considered to produce the appropriate mood. 2. Safety First: Electricians can safely handle the wiring and connections, minimizing electrical issues or accident risks. They ensure that your lighting system adheres to safety standards. 3. Energy Efficiency: Pros can recommend energy-efficient fixtures and solutions, saving you money in the long run. They can also integrate intelligent lighting controls, allowing you to remotely adjust lighting levels and schedules. 4. Warranty and Maintenance: Most professionals offer warranties and maintenance services, ensuring your system stays in top condition. This reduces the hassle of troubleshooting and repairs. 5. Compliance with Codes: They are well-versed in local regulations and ensure your installation meets all safety and legal requirements. This prevents potential issues with inspections and permits. Landscape lighting involves working with electricity, so it’s crucial to consider factors like voltage, cable type, and weatherproofing to ensure a safe and long-lasting system. Ensure all electrical components are rated for outdoor use and properly grounded to protect against electrical hazards. Landscape lighting Harrisburg PAserves more than just an aesthetic purpose; it fundamentally transforms your outdoor area, enhancing its safety and functionality. Lighting can turn your garden and pathways into warm, inviting spaces when daylight fades. Engaging professionals like Landscaping Harrisburg PA is a wise choice. They possess the expertise to carefully plan, install, and maintain outdoor lighting, including handling the sometimes complex electrical aspects. So, as you contemplate illuminating your outdoor space, consider the practical advantages. It’s not solely about appearances; it’s about creating a welcoming and helpful environment. With skilled professionals like Landscaping Harrisburg PA, your outdoor area can become a secure, aesthetically pleasing, and highly functional part of your home, offering a delightful setting for your evenings to unfold.
english
The dream finally came true for Bangladesh women footballers, who earned their maiden victory over South Asian powerhouse India in the SAFF Women's Championship at the Dasarath Rangasala in Kathmandu yesterday. Sirat Jahan Swapna struck a brace while Krishna Rani Sarker scored the other as Bangladesh beat India 3-0 to pull up the biggest surprise in the region's women's football. The result not only ended India's enviable 25-match unbeaten run in the regional championship, but also helped Bangladesh top Group A and set up a semifinal clash against Bhutan, a potentially much lesser opposition. The semifinal will be held on September 16 while five-time defending champions India will square off against Group A winners and hosts Nepal in the other semifinal on the same day. Apart from a goalless draw against India in the fourth edition of the championship in 2016, Bangladesh lost 11 matches against their mighty neighbours, including a 4-0 defeat in the last edition in 2019. Yesterday's result is not just a massive victory for Bangladesh, but might be dubbed as the biggest upset in South Asian women's football, where India had proved to be the unbeatable powerhouse over the years. India may be 89 places above Bangladesh's lowly FIFA ranking of 147, but there was no reflection of that gulf in ranking on the pitch as it was the Bangladeshi players who dominated right from the word go in front of a big crowd, which boasted quite a few Bangladeshi fans too. After having survived a bit of initial pressure from India, Bangladesh played positive football to press for the lead and found the back of the net in the eighth minute, but Swapna's effort was ruled out as Krishna had pushed India goalkeeper Aditi Chauhan in the build-up. Bangladesh, though, took the lead four minutes later following a brilliant move, with captain Sabina Khatun setting up Krishna outside the box and Krishna releasing a defence-splitting through-pass for Swapna, who beat Chauhan with a placing shot. The lead was doubled 10 minutes later when an excellent link-up play between Swapna and Krishna saw the latter enter from the left and the striker from Tangail placed the ball at near post, with Chauhan's outstretched leg failing to stop the attempt. India had some sporadic attacks but the Bangladesh defence, marshalled by Akhi Khatun, Masura Parvin, Sheuli Azim and Shamsunnahar Sr, played tremendously well to foil almost every attack while helping the forwards go quick counter attacks. Sabina, playing behind the forwards, turned into provider for the third goal in the 53rd minute as she released a clever through-ball for Swapna, who finished the move with another placing shot past the keeper. "I would like to salute the girls, who made history with this victory over India," head coach Golam Rabbani Choton said at the post-match press conference. "The girls showed their ability today as they have been working really hard for last the five to six years. " "We were confident, especially after the way they performed against Maldives and Pakistan and we believed they could win if they carried the momentum from the previous matches," said Choton. Player-of-the-match Krishna termed the victory as a result of teamwork and dividend for years of hard work.
english
<gh_stars>0 .container { display: flex; flex-direction: column; } label{ display: inline-block; } label button{ margin-top: 20px; margin-left: 20px; width: 80px; height: 80px; border-radius: 50%; } input[type="file"]{ position: fixed; top: 5px; left: 5px; text-align: right; outline: none; cursor: inherit; } #text { text-align: left; vertical-align: middle; font-size: 60px; } #file-input:hover { filter: drop-shadow(0 0 10px white); } /*.form-input { margin-left: 20px; margin-top: 10px; }*/ .center { overflow: auto; height: 200px; } .send svg{ position: absolute; bottom: 0; left: 40%; }
css
Another lost talent from the 2000 batch. The spirited Reetinder Singh Sodhi was the player of the final as India won the trophy beating hosts, Sri Lanka, by six wickets. He conceded only 26 runs in his 10 overs, and then scored an unbeaten 39 from 43 to lead India to the title triumph. In the tournament, Sodhi contributed 134 runs in eight games at an average of 33.50, and also bowled some tight spells. He was brilliant in the field as well. Having made a name for his dedication and effervescence, Singh was handed an India debut in December 2000. However, Sodhi failed to live up to expectations. In 18 ODIs, he managed only 280 runs at an average of 25.45, and five wickets at an average of 73. He played his last ODI for India in November 2002 and, with no comeback in the offing, tried his hand at the Indian Cricket League (ICL). Sodhi went on to become one of the youngest match-referees in India. Former medium-pacer Amit Bhandari impressed in the 1998 edition of the U-19 World Cup. He ended up as India’s highest wicket-taker in the event with 11 wickets in six matches at an average of 15.18 and a strike rate of 22.3. Just a couple of years later, he made his debut with the senior Indian side. It was a forgettable debut though as he was taken for 75 runs in 10 overs against Pakistan at Dhaka in June 2000 even though he claimed two wickets. He played his second match for India after four years. And even though he claimed 3 for 31 against Zimbabwe at Perth in February 2004, he never turned out in Indian colours again. Bhandari had an impressive first-class career, with 314 wickets in 95 matches for Delhi at an average of 26.78. He later turned Delhi chief selector, and last made news in February 2019 when he was assaulted for not picking a player.
english
<reponame>AxeyGabriel/mpd-ng <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <TITLE>General mpd commands</TITLE> </HEAD> <BODY text="#000000" bgcolor="#ffffff"> <A HREF="mpd.html"><EM>Mpd 5.9 User Manual</EM></A> <b>:</b> <A HREF="mpd17.html"><EM>Configuring Mpd</EM></A> <b>:</b> <EM>General mpd commands</EM><BR> <b>Previous:</b> <A HREF="mpd17.html"><EM>Configuring Mpd</EM></A><BR> <b>Next:</b> <A HREF="mpd19.html"><EM>Mpd Layers</EM></A> <HR NOSHADE> <H2><A NAME="18"></A>4.1. General mpd commands<A NAME="gencmd"></A></H2> <p>This chapter describes general mpd commands that do not apply to a specific layer.</p> <p> <dl> <dt><b><code>create bundle [ template | static ] <em>name</em> [ <em>template</em> ] </code></b><dd><p>Create new bundle with specified name, optionally based on specified template. If 'template' option is specified, bundle will not operate itself, but will be used to create new bundles on demand. If 'static' option is specified, it will be a permanent bundle which will not disappear after operation completes. Maximum name length is 10 characters for templates and 15 characters for the rest of bundles.</p> <dt><b><code>create link [ template | static ] <em>name</em> ( <em>type</em> | <em>template</em> ) </code></b><dd><p>Create new link with specified name and type, optionally based on specified template. If 'template' option is specified, link will not operate itself, but will be used to create new links on demand. If 'static' option is specified, it will be a permanent link which will not disapear after operation complete. Maximum name length is 10 characters for templates and 15 characters for the rest of links.</p> <dt><b><code><br>destroy bundle [ <em>name</em> ]<br> destroy link [ <em>name</em> ]</code></b><dd><p>Destroy existing link/bundle. Note that if link is in use, it may not disapear after command returns, it may take some time to properly close it.</p> <dt><b><code>bundle [ <em>name</em> ] </code></b><dd><p>This command changes the currently active bundle to the bundle named <code><em>name</em></code>. The currently active link is also changed, to the first link of the bundle. If no <code><em>name</em></code> is given, this command lists all of the defined bundles and their constituent links. The new bundle will be reflected in the prompt.</p> <dt><b><code>link [ <em>name</em> | <em>[number]</em> ] </code></b><dd><p>This command changes the currenly active link to the link named <code><em>name</em></code>. If this link does not belong to the currently active bundle, then the currently active bundle is changed to the bundle that owns link <code><em>name</em></code>. The new link will be reflected in the prompt. Link <em>number</em> (RAD_NAS_PORT) can be specified in hex form in square brackets in place of name.</p> <dt><b><code>repeater [ <em>name</em> ] </code></b><dd><p>This command changes the currenly active repeater to the repeater named <code><em>name</em></code>. The currently active phys is also changed, to the first phys of the repeater. If no <code><em>name</em></code> is given, this command lists all of the defined repeaters and their constituent physes. The new phys will be reflected in the prompt.</p> <dt><b><code>iface [ <em>iface</em> ] </code></b><dd><p>This command changes the currenly active bundle to the bundle using interface <code><em>iface</em></code>.</p> <dt><b><code>msession [ <em>msesid</em> ] </code></b><dd><p>This command changes the currenly active bundle to the bundle holding session with multilink session ID <code><em>msesid</em></code>.</p> <dt><b><code>session [ <em>sesid</em> ] </code></b><dd><p>This command changes the currenly active link to the link holding session with session ID <code><em>sesid</em></code>.</p> <dt><b><code>authname [ <em>name</em> ] </code></b><dd><p>This command changes the currenly active link to the link holding session with peer auth name <code><em>name</em></code>. If CI argument is present login comparasion will be case insensitive.</p> <dt><b><code>load [ <em>file</em> ] <em>label</em></code></b><dd><p>This command causes mpd to read the entry for <code><em>label</em></code> out of <code>mpd.conf</code> or other file if specified and execute the corresponding commands. <em>file</em> can be relative or absolute file path or http/https/ftp URL. Note, that remote file access may be less reliable.</p> <dt><b><code>show [ <em>item</em> ] </code></b><dd><p>This command displays various status information. The valid values for <code><em>item</em></code> are:</p> <p> <dl> <dt><b>bundle</b><dd><p>Show status information about the currently active bundle.</p> <dt><b>link</b><dd><p>Show status information about the currently active link.</p> <dt><b>repeater</b><dd><p>Show status information about the currently active repeater.</p> <dt><b>iface</b><dd><p>Show status information about the interface layer associated with the currently active bundle.</p> <dt><b>routes</b><dd><p>Show the current IP routing table.</p> <dt><b>ipcp</b><dd><p>Show status information about the IP control protocol associated with the currently active bundle.</p> <dt><b>ippool</b><dd><p>Show status information about configures IP pools.</p> <dt><b>ccp</b><dd><p>Show status information about the compression control protocol associated with the currently active bundle.</p> <dt><b>lcp</b><dd><p>Show status information about the link control protocol associated with the currently active link.</p> <dt><b>nat</b><dd><p>Show information about NAT on the currently active bundle.</p> <dt><b>auth</b><dd><p>Show status information about Authentication.</p> <dt><b>eap</b><dd><p>Show status information about EAP.</p> <dt><b>radius</b><dd><p>Information relating to RADIUS authentication.</p> <dt><b>proto</b><dd><p>Show protocol statistics for the currently active bundle and link.</p> <dt><b>types</b><dd><p>Show the device types supported by this version of mpd.</p> <dt><b>layers</b><dd><p>Show the names of the layers that are valid as arguments to the <code>open</code> and <code>close</code> commands.</p> <dt><b>l2tp</b><dd><p>Show active L2TP tunnels.</p> <dt><b>pptp</b><dd><p>Show active PPTP tunnels.</p> <dt><b>events</b><dd><p>Show all pending events (for debugging mpd).</p> <dt><b>mem</b><dd><p>Show distribution of dynamically allocated memory (for debugging mpd).</p> <dt><b>version</b><dd><p>Show running mpd version and supported features.</p> <dt><b>sessions [ <em>param</em> <em>value</em> ]</b><dd><p>Show active sessions conforming specified param/value. Available params: iface, ip, bundle, msession, link, session, user, peer.</p> <dt><b>customer</b><dd><p>Show active customer details.</p> <dt><b>summary</b><dd><p>Show status summary.</p> <dt><b>console</b><dd><p>Show console summary.</p> <dt><b>web</b><dd><p>Show web server summary.</p> <dt><b>user</b><dd><p>Show defined console users.</p> <dt><b>netflow</b><dd><p>Show status information about NetFlow.</p> </dl> </p> <dt><b><code>set ...</code></b><dd> <p>This command sets various configuration information. Further details are contained in later sections in this chapter. The valid completions for <code>set</code> are:</p> <p> <dl> <dt><b><code>set global startrule <em>num</em><br> set global startpipe <em>num</em><br> set global startqueue <em>num</em><br> set global starttable <em>num</em></code></b><dd><p>These commands define initial values for autonumeration of ipfw rules, pipes, queues and tables. Defaults are 10000, 10000, 10000 and 32 accordingly.</p> <dt><b><code>set global pptptimeout <em>seconds</em><br> set global l2tptimeout <em>seconds</em></code></b><dd><p>Set PPTP/L2TP tunnels inactivity shutdown delay.</p> <p>Default is 10 seconds.</p> <dt><b><code>set global pptplimit <em>num</em><br> set global l2tplimit <em>num</em></code></b><dd><p>Limit maximum number of calls per PPTP/L2TP tunnel. When limit is reached new tunnel will be created for the next call. This option violates PPTP RFC which requires only one tunnel existing for the PAC/PNS pair, but it can increase busy tunnels stability.</p> <p>Defaults are 100 (10 for L2TP before FreeBSD 6.3-STABLE and 7.0-RELEASE).</p> <dt><b><code>set global max-children <em>num</em></code></b><dd><p>This option specifies global maximum number of links, created using template, that could exist at the same time.</p> <p>The default value is 10000.</p> <dt><b><code>set global qthreshold <em>min</em> <em>max</em></code></b><dd><p>This option specifies global message queue limit thresholds.</p> <p>The default values are 64 and 256.</p> <dt><b><code>set global filter <em>num</em> add <em>fltnum</em> <em>flt</em><br> set global filter <em>num</em> clear</code></b><dd><p>These commands define or clear traffic filters to be used by rules submitted by <A HREF="mpd30.html#radius">AAA</A> during authentication.</p> <dt><b><code>set global enable <em>option ...</em><br> set global disable <em>option ...</em></code></b><dd><p>These commands configure various global options.</p> <p>The <code><b>enable</b></code> and <code><b>disable</b></code> commands determine whether or not we want the corresponding option.</p> <p>The options available are:</p> <dt><b><code>one-shot</code></b><dd><p>This option forces mpd terminate itself after the last link disappear. Link templates are not counted as links.</p> <p>The default is disable.</p> <dt><b><code>tcp-wrapper</code></b><dd><p>With this option mpd uses <code>/etc/hosts.allow</code> everytime a connection is made from the client. This is useful if you would like to restrict access to mpd. This option affects all TCP connections, including PPTP and the TCP device layer.</p> <p>The default is disable.</p> <dt><b><code>agent-cid</code></b><dd><p>Display PPPoE <em>ADSL-Agent-Circuit-Id</em> option in <em>show session</em> command.</p> <p>The default is disable.</p> <dt><b><code>session-time</code></b><dd><p>Display session time in seconds in <em>show session</em> command.</p> <p>The default is disable.</p> <dt><b><code>set user <em>username</em> <em>password</em> [<em>admin</em>|<em>operator</em>|<em>user</em>]</code></b><dd><p>This command configures which users are allowed to connect to the console. It may be invoked multiple times with different usernames.</p> <dt><b><code>set bundle ...</code></b><dd><p>Set bundle layer configuration parameters for the currently active bundle.</p> <dt><b><code>set link ...</code></b><dd><p>Set link layer configuration parameters for the currently active link.</p> <dt><b><code>set iface ...</code></b><dd><p>Set interface layer configuration parameters for the currently active bundle.</p> <dt><b><code>set nat ...</code></b><dd><p>Set NAT configuration parameters for the currently active bundle.</p> <dt><b><code>set ipcp ...</code></b><dd><p>Set IP control protocol configuration parameters for the currently active bundle.</p> <dt><b><code>set ccp ...</code></b><dd><p>Set compression control protocol configuration parameters for the currently active bundle.</p> <dt><b><code>set auth ...</code></b><dd><p>Configures the authentication subsystem.</p> <dt><b><code>set radius ...</code></b><dd><p>Configures RADIUS.</p> <dt><b><code>set eap ...</code></b><dd><p>Configures the EAP.</p> <dt><b><code>set debug ...<em>level</em></code></b><dd><p>Sets the <code>netgraph(3)</code> debugging level. Default is zero.</p> <dt><b><code>set modem ...</code></b><dd><p>Sets device specific configuration parameters for the currently active link, which must have type <b>modem</b>.</p> <dt><b><code>set ng ...</code></b><dd><p>Sets device specific configuration parameters for the currently active link, which must have type <b>netgraph</b>.</p> <dt><b><code>set tcp ...</code></b><dd><p>Sets device specific configuration parameters for the currently active link, which must have type <b>tcp</b>.</p> <dt><b><code>set udp ...</code></b><dd><p>Sets device specific configuration parameters for the currently active link, which must have type <b>udp</b>.</p> <dt><b><code>set pptp ...</code></b><dd><p>Sets device specific configuration parameters for the currently active link, which must have type <b>pptp</b>.</p> <dt><b><code>set l2tp ...</code></b><dd><p>Sets device specific configuration parameters for the currently active link, which must have type <b>l2tp</b>.</p> <dt><b><code>set pppoe ...</code></b><dd><p>Sets device specific configuration parameters for the currently active link, which must have type <b>pppoe</b>.</p> <dt><b><code>set console ...</code></b><dd><p>Sets console specific configuration parameters</p> <dt><b><code>set web ...</code></b><dd><p>Sets web server specific configuration parameters</p> </dl> </p> <dt><b><code>unset ...</code></b><dd> <p>This command allows to unsets some of configuration information set using <code>set</code> command.</p> <dt><b><code>open [ <em>layer</em> ] </code></b><dd><p>This command causes an OPEN event to be sent to the corresponding layer or finite state machine (FSM). The valid layers are:</p> <p> <dl> <dt><b>iface</b><dd><p>Interface layer. Opening this layer configures the interface and installs any routes. If dial-on-demand is enabled, nothing else happens until there is outgoing traffic. If dial-on-demand is disabled there no reason to open this layer manually.</p> <dt><b>bund</b><dd><p>Bundle layer. This layer represents the multi-link bundle ``virtual link'' and is normally opened and closed automatically.</p> <dt><b>ipcp</b><dd><p>IP control protocol FSM. This is normally opened and closed automatically.</p> <dt><b>ccp</b><dd><p>Compression control protocol FSM. This is normally opened and closed automatically.</p> <dt><b>link</b><dd><p>Link control protocol FSM. This is default layer for open/close commands. Opening of this layer initiates outgoing call by this link.</p> <dt><b>device</b><dd><p>Device layer. This is normally opened and closed automatically.</p> </dl> </p> <p>Normally, only the <code>iface</code> and <code>link</code> layers should be explicitly opened or closed. This is because the other layers are programmed to automatically open and close when appropriate. Note that the <b>SIGUSR1</b> and <b>SIGUSR2</b> signals are an alternative way to open and close the first link.</p> <dt><b><code>close [ <em>layer</em> ] </code></b><dd><p>This command causes a CLOSE event to be sent to the corresponding layer or finite state machine (FSM).</p> <dt><b><code>log [ <em>+/-flag ...</em> ] </code></b><dd><p>Mpd supports several different logging flags. Every line logged by mpd is tagged with one (or more) of these flags. By turning the flags on or off, that particular type of logging is enabled or disabled. This allows you to customize logging verbosity.</p> <p>Without any arguments, the <code>log</code> command shows the current set of logging flags. To enable a logging flag, add the <code>+<em>flag</em></code> argument. To disable a logging flag, add the <code>-<em>flag</em></code> argument.</p> <p>These are the various flags supported by mpd and their corresponding categories:</p> <p> <dl> <dt><b>auth*</b><dd><p>Link authentication events</p> <dt><b>bund*</b><dd><p>Bundle layer events</p> <dt><b>ccp*</b><dd><p>Compression events and negotiation</p> <dt><b>chat*</b><dd><p>Modem chat script</p> <dt><b>console*</b><dd><p>Log to the console as well as the log file</p> <dt><b>echo</b><dd><p>Echo/reply packets for all FSM's</p> <dt><b>ecp*</b><dd><p>Encryption events and negotiation</p> <dt><b>frame</b><dd><p>Dump all frames transmitted and received</p> <dt><b>fsm*</b><dd><p>All FSM events (except echo and resets)</p> <dt><b>iface*</b><dd><p>Interface layer events</p> <dt><b>ipcp*</b><dd><p>IP control protocol events and negotiation</p> <dt><b>ipv6cp*</b><dd><p>IPv6 control protocol events and negotiation</p> <dt><b>lcp*</b><dd><p>Link control protocol events and negotiation</p> <dt><b>link*</b><dd><p>Link layer events</p> <dt><b>phys*</b><dd><p>Device layer events</p> <dt><b>radius*</b><dd><p>RADIUS authentication events</p> <dt><b>rep*</b><dd><p>Repeater layer events</p> </dl> </p> <dt><b><code>help [ <em>command</em> ] </code></b><dd><p>This gives a brief description of the supplied command, or if an incomplete command is given, lists the available alternatives.</p> <dt><b><code>exit</code></b><dd><p>This command exits the console, but does not quit the mpd process. This command is useful for disconnecting a telnet connection.</p> <dt><b><code>shutdown</code></b><dd><p>Close down all connections and quit the mpd process.</p> </dl> </p> <HR NOSHADE> <A HREF="mpd.html"><EM>Mpd 5.9 User Manual</EM></A> <b>:</b> <A HREF="mpd17.html"><EM>Configuring Mpd</EM></A> <b>:</b> <EM>General mpd commands</EM><BR> <b>Previous:</b> <A HREF="mpd17.html"><EM>Configuring Mpd</EM></A><BR> <b>Next:</b> <A HREF="mpd19.html"><EM>Mpd Layers</EM></A> </BODY> </HTML>
html
<reponame>FunnyLiu/layademo /* * name; */ var Item = (function (superClass) { var Rectangle = laya.maths.Rectangle; function Item(opts) { Item.super(this); this.x = opts.x || 0; this.y = opts.y || 0; this.setBounds(new Rectangle(0, 0, gameConfig.node.WIDTH, gameConfig.node.HEIGHT)); this.graphics.drawRect(0, 0, gameConfig.node.WIDTH, gameConfig.node.HEIGHT, opts.color || '#dddddd'); } Laya.class(Item, 'item', superClass); var _proto = Item.prototype; // 当被英雄碰到时触发 _proto.onHeroFound = function(hero) { console.log('Hero被找到啦'); var hero = new Hero({}); ObjectHolder.heroLink.addHero(hero); } return Item; }(Laya.Sprite));
javascript
{ "AddVoicesToBots": { "assault": { "ReplaceDefaultOnes": false, "AddFollowingVoices": [ "Bandit_1" ] }, "cursedassault": { "ReplaceDefaultOnes": false, "AddFollowingVoices": [ "Bandit_1" ] }, "marksman": { "ReplaceDefaultOnes": false, "AddFollowingVoices": [ "Bandit_1" ] }, "bosskojaniy": { "ReplaceDefaultOnes": true, "AddFollowingVoices": [ "Freedom_1" ] }, "followerkojaniy": { "ReplaceDefaultOnes": true, "AddFollowingVoices": [ "Stalker_2" ] }, "followergluharsecurity": { "ReplaceDefaultOnes": true, "AddFollowingVoices": [ "ClearSky_1" ] }, "followergluharassault": { "ReplaceDefaultOnes": true, "AddFollowingVoices": [ "ClearSky_1" ] }, "followergluharscout": { "ReplaceDefaultOnes": true, "AddFollowingVoices": [ "ClearSky_1" ] }, "bear": { "ReplaceDefaultOnes": false, "AddFollowingVoices": [ "Duty_1" ] }, "test": { "ReplaceDefaultOnes": false, "AddFollowingVoices": [ "Duty_1" ] }, "BotName": { "ReplaceDefaultOnes": false, "AddFollowingVoices": [ "VoiceId" ] } } }
json
<reponame>jimmydief/babel-plugin-transform-async-to-promises async function(foo) { function baz() { return bar; } var bar = await foo(); return baz(); }
javascript
{"Department":"Прокуратура Харківської області","Region":"Харківська область","Position":"Прокурор Відділу процесуального керівництва Управління процесуального керівництва у кримінальних провадженнях слідчих регіональної прокуратури Прокуратури Харківської області","Name":"<NAME>","Декларації 2013":"","Декларації 2014":"","Декларації 2015":"https://public.nazk.gov.ua/declaration/31b034b5-69e1-417a-b10a-302f569a5def","Декларації 2016":"https://public.nazk.gov.ua/declaration/d0a5ba20-3a2a-490b-abaf-814b64604f64","Фото":"","Як живе":"","Декларації доброчесності":"https://www.gp.gov.ua/integrity_profile/files/6f6d59365775bc2c73efa53e582c5ee0.pdf","type":"prosecutor","key":"soroka_mikola_kostyantinovich","analytics":[{"y":2015,"c":1,"k":0.16,"ka":1,"fi":113192,"fc":1,"fh":0.35,"fha":1},{"y":2016,"i":127917,"c":1,"k":0.16,"ka":1,"fc":1,"fh":0.35,"fha":1},{"y":2017,"i":306792,"c":1,"k":0.16,"ka":1,"fc":1,"fh":0.35,"fha":1}],"declarationsLinks":[{"id":"nacp_60791e79-7d05-4294-88c3-8ac4dd95cba9","year":2015,"provider":"declarations.com.ua.opendata"},{"id":"nacp_d0a5ba20-3a2a-490b-abaf-814b64604f64","year":2016,"provider":"declarations.com.ua.opendata"},{"id":"nacp_e7176661-dfd0-49ac-aa05-9e5a7a14d1be","year":2017,"provider":"declarations.com.ua.opendata"}]}
json
package com.scindapsus.log; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.annotation.JSONField; import lombok.Builder; import lombok.Getter; import lombok.Setter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author wyh * @since 1.0 */ @Getter @Setter @Builder public class LogBase { private static final Logger LOGGER = LoggerFactory.getLogger(LogBase.class); /** * 请求路径 */ @JSONField(ordinal = 1) private String path; /** * 事件名称,一般就是业务方法名称 */ @JSONField(ordinal = 2) private String eventName; /** * 调用链id */ @JSONField(ordinal = 3) private String traceId; /** * C端用户id */ @JSONField(ordinal = 4) private Object userId; /** * 接口响应时间 */ @JSONField(ordinal = 5) private long costTime; /** * 接口请求入参 */ @JSONField(ordinal = 6) private Object request; /** * 接口返回值 */ @JSONField(ordinal = 7) private Object response; /** * 其他业务参数 */ @JSONField(ordinal = 8) private Object others; /** * 日志打印 */ public void print() { debugPrint(); } /** * 用debug日志打印 */ public void debugPrint() { if (LOGGER.isDebugEnabled()) { LOGGER.debug(JSON.toJSONString(this)); } } /** * 用info日志打印 */ public void infoPrint() { if (LOGGER.isInfoEnabled()) { LOGGER.info(JSON.toJSONString(this)); } } /** * 用warn日志打印 */ public void warnPrint() { if (LOGGER.isWarnEnabled()) { LOGGER.warn(JSON.toJSONString(this)); } } /** * 用error日志打印 */ public void errorPrint() { if (LOGGER.isErrorEnabled()) { LOGGER.error(JSON.toJSONString(this)); } } }
java
// Copyright 2022 The Sigstore Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package main import ( "fmt" "io/ioutil" "log" "net/http" "github.com/kelseyhightower/envconfig" "sigs.k8s.io/release-utils/version" ) type envConfig struct { FileName string `envconfig:"OIDC_FILE" default:"/var/run/sigstore/cosign/oidc-token" required:"true"` } func tokenWriter(filename string) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, req *http.Request) { getToken(filename, w, req) } } func getToken(tokenFile string, w http.ResponseWriter, req *http.Request) { content, err := ioutil.ReadFile(tokenFile) if err != nil { log.Print("failed to read token file", err) http.Error(w, err.Error(), http.StatusInternalServerError) return } _, err = fmt.Fprint(w, string(content)) if err != nil { log.Print("failed to write token file to response", err) http.Error(w, err.Error(), http.StatusInternalServerError) } } func main() { var env envConfig if err := envconfig.Process("", &env); err != nil { log.Fatalf("failed to process env var: %s", err) } versionInfo := version.GetVersionInfo() log.Printf("running get_oidc_token Version: %s GitCommit: %s BuildDate: %s", versionInfo.GitVersion, versionInfo.GitCommit, versionInfo.BuildDate) http.HandleFunc("/", tokenWriter(env.FileName)) if err := http.ListenAndServe(":8080", nil); err != nil { panic(err) } }
go
<gh_stars>0 const fs = require('fs') const fetch = require('node-fetch') let timeout = 120000 let poin = 500 let handler = async (m, { conn, usedPrefix, command, args }) => { conn.poke = conn.poke ? conn.poke : {} let id = m.chat if (id in conn.poke) { conn.reply(m.chat, 'Masih ada yang melakukan Poke Find', conn.tebakgambar[id][0]) throw false } if(db.data.users[m.sender].resin === '0') throw `Resin kamu habis. Mekanik untuk menambahkan resin belum di tambahkan, Tunggu update selanjutnya.` let pokemon = JSON.parse(fs.readFileSync(`./src/pokemon.json`)) let json = pokemon[Math.floor(Math.random() * pokemon.length)] let res = await fetch(`https://zekais-api.herokuapp.com/pokemon?query=${json.name}&apikey=grqgD6pU`) if (!res.ok) throw `API nya belom di bayar bang.\nDonasi ke owner biar di bayar API nya\n\nHaruno: [402]` let hyaku = await res.json() let caption = ` *Pokemon FOUND* - Name: *${hyaku.title}* - Stats Attack: ${hyaku.stats.attack} Defense: ${hyaku.stats.defense} HP: ${hyaku.stats.hp} Total Power: ${hyaku.stats.total} `.trim() db.data.users[m.sender].resin -= 20 conn.poke[id] = [ await conn.send2ButtonImg(m.chat, caption, await (await fetch(hyaku.image)).buffer(), '© Haruno', 'Catch', `.poke-catch ${json.name}, 'Skip`, '.delpoke-find', m) , setTimeout(async () => { if (conn.poke[id]) await conn.sendButton(m.chat, `Waktu habis!\nManfaatkan waktu sebaik mungkin.`, '© Haruno', 'Poke-find', '.poke-find') delete conn.poke[id] }, timeout) ] } handler.help = ['poke-find'] handler.tags = ['game'] handler.command = /^poke-find/i module.exports = handler
javascript
<filename>kla.py import zipfile import subprocess import requests import urllib import io import json import base64 import os import sys import stat from pathlib import Path # print environment, the results should be there # print("--------------------- ENVIRONMENT ------------------------") # print (os.environ) # print("--------------------- ENVIRONMENT ------------------------") # Params used in the call to the baseline analysis. # All the parameters set in the action are stored as environment variables with INPUT_ prefix PARAM_KLA_KIUWANBASEURL = os.environ['INPUT_KIUWANBASEURL'] PARAM_KLA_USERNAME = os.environ['INPUT_USERID'] PARAM_KLA_PASSWORD = os.environ['INPUT_PASSWORD'] PARAM_KLA_APPNAME = os.environ['INPUT_PROJECT'] PARAM_KLA_SOURCEDIR = os.environ['GITHUB_WORKSPACE'] PARAM_KLA_CHANGEREQUEST = os.environ['INPUT_CHANGEREQUEST'] PARAM_KLA_BRANCH = os.environ['INPUT_BRANCH'] PARAM_KLA_TYPE = os.environ['INPUT_TYPE'] PARAM_KLA_STATUS = os.environ['INPUT_STATUS'] PARAM_KLA_DATABASETYPE = os.environ['INPUT_DATABASETYPE'] PARAM_KLA_ADVANCEDPARAMS = os.environ['INPUT_ADVANCEDPARAMS'] KLA_URL = PARAM_KLA_KIUWANBASEURL + '/pub/analyzer/KiuwanLocalAnalyzer.zip' TMP_EXTRACTION_DIR = os.environ['WORKSPACE'] + '/kla' KLA_EXE_DIR = TMP_EXTRACTION_DIR + "/KiuwanLocalAnalyzer/bin" # Function to create the Kiuwan KLA line command. # It is created with the minimum amount of parameters. # Then the advanced parameters are passed in, the User is responsible for a good format def getKLACmd(tmp_dir=TMP_EXTRACTION_DIR, appname=PARAM_KLA_APPNAME, sourcedir=PARAM_KLA_SOURCEDIR, user=PARAM_KLA_USERNAME, password=<PASSWORD>, scope=PARAM_KLA_TYPE, changerequest=PARAM_KLA_CHANGEREQUEST, status=PARAM_KLA_STATUS, branch=PARAM_KLA_BRANCH, dbtype=PARAM_KLA_DATABASETYPE, advanced=PARAM_KLA_ADVANCEDPARAMS): prefix = tmp_dir + '/KiuwanLocalAnalyzer/bin/' agent = prefix + 'agent.sh' os.chmod(agent, stat.S_IRWXU) klablcmd = '{} -n {} -s {} --user {} --pass {} -as {} -cr {} -crs {} -bn {} -wr transactsql.parser.valid.list={} {}'.format(agent, appname, sourcedir, user, password, scope, changerequest, status, branch, dbtype, advanced) return klablcmd # Function to download and extract the Kiuwan Local Analyzer from kiuwan server # TODO: parametrize the URL to support Kiuwan on premises installations def downloadAndExtractKLA(tmp_dir=TMP_EXTRACTION_DIR, klaurl=KLA_URL): print('Downloading KLA zip from ', klaurl, ' at [', os.getcwd(), ']', '...') resp = urllib.request.urlopen(klaurl) zipf = zipfile.ZipFile(io.BytesIO(resp.read())) for item in zipf.namelist(): print("\tFile in zip: ", item) print('Extracting zip to [', tmp_dir, ']', '...') # Luis: para probar crear dirs Path(tmp_dir).mkdir(parents=True, exist_ok=True) zipf.extractall(tmp_dir) # Parse the output of the analysis resutl to get the analysis code def getBLAnalysisCodeFromKLAOutput(output_to_parse): return output_to_parse.split("Analysis created in Kiuwan with code:", 1)[1].split()[0] # Function to call the Kiuwan API to get the actual URL def getBLAnalysisResultsURL(a_c, kla_user=PARAM_KLA_USERNAME, kla_password=PARAM_KLA_PASSWORD, advanced=PARAM_KLA_ADVANCEDPARAMS): apicall = "https://api.kiuwan.com" if not PARAM_KLA_KIUWANBASEURL: apicall = PARAM_KLA_KIUWANBASEURL + "/saas/rest/v1" apicall = apicall + "/apps/analysis/" + a_c print('Calling REST API [', apicall, '] ...') kla_password = kla_password.replace("\\", "") authString = base64.encodebytes(('%s:%s' % (kla_user,kla_password)).encode()).decode().strip() if "domain-id" in advanced: posDomain = advanced.find("domain-id") value_domain_id = advanced[posDomain+10:] ##remove domain-id word posWhitespace = value_domain_id.find(" ") if posWhitespace != -1: value_domain_id = value_domain_id[:posWhitespace] my_headers = { "Authorization": 'Basic {}'.format(authString), "X-KW-CORPORATE-DOMAIN-ID": value_domain_id } else: my_headers = { "Authorization": 'Basic {}'.format(authString) } response = requests.get(url=apicall,headers=my_headers) print(response) print('Contenido', response.content) jdata = json.loads(response.content) return jdata['auditResultURL'] # Function to get the result of the Audit (pass or fail) def getAuditResult(a_c, kla_user=PARAM_KLA_USERNAME, kla_password=PARAM_KLA_PASSWORD): apicall = "https://api.kiuwan.com" if not PARAM_KLA_KIUWANBASEURL: apicall = PARAM_KLA_KIUWANBASEURL + "/saas/rest/v1" apicall = apicall + "/auditResult?deliveryCode=" + a_c print('Calling REST API [', apicall, '] ...') response = requests.get(apicall, auth=requests.auth.HTTPBasicAuth(kla_user, kla_password)) print(response) print('Contenido', response.content) jdata = json.loads(response.content) return jdata['passAudit'] # Function to excetute the actual Kiuwan Local Analyzer command line and get the resutls. def executeKLA(cmd): print('Executing [', cmd, '] ...') pipe = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) # (output, err) = pipe.communicate() output_text = '' try: nextline = pipe.stdout.readline() while (pipe.poll() == None): output_text = output_text + nextline.decode('utf-8') sys.stdout.write(nextline.decode('utf-8')) sys.stdout.flush() nextline = pipe.stdout.readline() except KeyboardInterrupt: print("Keyboard interrupt... why??") return output_text, pipe.returncode #return_code = pipe.wait() return output_text, pipe.returncode # Actual executing code after defining the functions # Extract and download KLA from kiuwan.com (or from on-premise site) downloadAndExtractKLA(tmp_dir=TMP_EXTRACTION_DIR) # Build the KLA CLI command kla_bl_cmd = getKLACmd(tmp_dir=TMP_EXTRACTION_DIR) # Execute CLA KLI and set results as outputs output, rc = executeKLA(kla_bl_cmd) print("::set-output name=result::{}".format(rc)) print('{}{}'.format('KLA return code: ', rc)) if rc==0: analysis_code = getBLAnalysisCodeFromKLAOutput(output) print('Analysis code [', analysis_code, ']') url_analysis = getBLAnalysisResultsURL(analysis_code) audit_result = getAuditResult(analysis_code) #print traces and set output parameters... print('URL del analisis: ', url_analysis) print('Resultado de la auditoria: ', audit_result) print("::set-output name=analysisurl::{}".format(url_analysis)) print("::set-oputut name=auditresult::{}".format(audit_result)) print('::set-output name=message::Delivery analysis successful.') elif rc == 1: print('::set-output name=message::Analyzer execution error.') elif rc == 10: print('::set-output name=message::Audit overall result = FAIL.') elif rc == 11: print('::set-output name=message::Invalid analysis configuration.') elif rc == 12: print('::set-output name=message::The downloaded model does not support any of the discovered languages.') elif rc == 13: print('::set-output name=message::Timeout waiting for analysis results.') elif rc == 14: print('::set-output name=message::Analysis finished with an error in Kiuwan.') elif rc == 15: print('::set-output name=message::Timeout: killed the subprocess.') elif rc == 16: print('::set-output name=message::Baseline analysis not permitted for current user.') elif rc == 17: print('::set-output name=message::Delivery analysis not permitted for current user.') elif rc == 18: print('::set-output name=message::No analyzable extensions found.') elif rc == 19: print('::set-output name=message::Error checking license.') elif rc == 21: print('::set-output name=message::Invalid CLI parameter .') elif rc == 22: print('::set-output name=message::Access denied.') elif rc == 23: print('::set-output name=message::Bad Credentials.') elif rc == 24: print('::set-output name=message::Application Not Found.') elif rc == 25: print('::set-output name=message::Limit Exceeded for Calls to Kiuwan API.') elif rc == 26: print('::set-output name=message::Quota Limit Reached .') elif rc == 27: print('::set-output name=message::Analysis Not Found.') elif rc == 28: print('::set-output name=message::Application already exists.') elif rc == 30: #we should not be here, this is a baseline print('::set-output name=message::Delivery analysis not permitted: baseline analysis not found.') elif rc == 31: print('::set-output name=message::No engine available.') elif rc == 32: print('::set-output name=message::Unexpected error .') elif rc == 33: print('::set-output name=message::Out of Memory.') elif rc == 34: print('::set-output name=message::JVM Error .') else: print('::set-output name=message::No error message found.')
python
North east India has a deeper connection with its mystique and overwhelming organic aesthetics. I have traveled most of its states,although some were still in my list. And thus, Sikkim happened. Sikkim is a small state of northeast India bordering Bhutan, China, Nepal and is a part of the Himalayas. Our main focus was northern part of Sikkim ,especially Gurudongmar lake which in itself was a slice of heaven. I have heard many accounts of adventurous journeys to Gurudongmar lake, it's spiritual value and many unsuccessful attempts of people to reach it because of the challenging road and frequent road blocks due to its inhospitable terrain and landslides. Without much planning, me and my friend packed up our bags and reached NJP. We took a shared vehicle at cost 250 per person from NJP to Gangtok which took about 6 hours with about a 15 min halt for snacks. The local food stalls served delicious noodles and veg thukpas ( also called thuppas, basically a spicy vegetable soup mixed with noodles) which was a real treat to our taste buds. As we resumed our journey, the altitude increased gradually as we entered Sikkim. The beauty of both sides of the road and the ever accompanying turquoise teesta river was something that was indescribable. After reaching Gangtok at about 3pm in the afternoon, we searched for a hotel which we found very easily. Being a tourist oriented place, there are multiple options for staying in Gangtok ranging from economical to delux hotels along with multiple homestays and comfortable cottages. We took a stroll around MG marg and Lalbazar. The places were crowded and full of life. After enjoying some steaming momos and packing some, we returned to our hotel. Our north Sikkim package started from 2nd day which we booked prior to coming Gangtok.After sleeping like a log, I got up early to a bright may morning, really excited. Without much delay, we contacted our tour operator. The tour vehicle picked us up and soon we were heading towards our destination. The journey from Gangtok to north Sikkim was another 6-7 hours. The journey towards north Sikkim itself was very intriguing and adventurous, with the thrill of high altitude, narrow cut roads, steep canyons and shaky vehicle. There were frequent halts for photography near beautiful waterfalls and scenic landscapes. We had a brief lunch in a local resort and resumed our long journey. We reached our hotel in lachen which was a small village in north Sikkim , at about 6 pm. It got pretty darker and colder by then. We rushed to our rooms shivering and were served hot tea. The owner of the hotel Tso Lamo, where we halted was very friendly. Since we were really tired, they served us a hot delicious dinner really quick. I rushed to my bed and literally jumped into it. We were instructed to get ready by 5am next morning for our much awaited journey to gurudongmar lake. I woke up at about 3am and couldn't sleep further. So I decided to go outside to have a better view of the surrounding. For the first time I was amazed by the serenity and scenic beauty of lachen. The dawn was about to crack.The ice capped mountains,the colour of dawn cracking sky, the gurgling of a stream nearby and a chilled wind accompanying,made me realise of being in an utopian charm. I came back to reality when I saw our vehicle getting ready. We got ready hurrily after sipping hot ginger tea and thus began our journey towards gurudongmar lake. Gurudongmar lake holds a special significance to Buddhists, Sikhs and Hindus. It is one of the highest lakes in India at an altitude of 17800 ft. About 5km north of the lake lies the Tibet border. Special permit was needed to enter the place which was arranged by our tour operators. The journey to gurudongmar lake will always be a memorable one. The road was bumpy and broken due to landslides. But the driver was very expert. He was quiet initially but as we started talking to him more, he opened up and shared us various tales and experiences. The journey continued through alpine pastures ,yaks, rhododendron trees and flowers ,small villages until I dozed off. I woke up when we halted for breakfast with toasts, pakodas and tea near an army camp. That was an altitude of 17000 ft. As we resumed our remaining journey, we reached a barren ,stony rugged area with ice capped mountains which looked like a live canvas. After about 30 min later, I saw many vehicles parked in a high area facing below. As we got close, I came to know that we reached our destination. I got down from vehicle and as I inched nearby and there it was ! The gurudongmar lake below , with its magnificent blue with sunny touch,half frozen, bordered by icy mountains. It felt like a dream and literally made me speechless. There's a belief that even in winter one part of the lake remains unfrozen because of being blessed. Though the weather was spine shivering chilly, but it was sunny and bright that made the visibility of the sacred lake really beautiful. We offered prayer to a nearby Buddha temple. I was so struck and enchanted that I forgot that I was in an altitude of 17800ft, but soon realised it when I started feeling dizzy due to scarcity of oxygen. The trick is to do less activity, talk less to conserve the necessity of oxygen. I took my camera and climbed the stairs downward towards the lake. Every moment was priceless. During my last visit to Bhutan, I was awed by Buddhism. That might be one of the reasons for my natural attraction towards gurudongmar lake. There were many stones, piled one above another which was kept by people to make their wishes come true. There were many monks doing parikrama of the lake. Each parikrama around the lake takes about 2.5 hours. Although it was not possible for me to do a parikrama with limited time, I was determined to go as far as possible. Few people,probably adventurous like me, were walking by the lake too. But most of them stayed back. The lake was extended towards the mountains and the walk was a long one as it was difficult to walk fast due to fear of being dizzy owing to scarcity of oxygen. Some people(who tried to walk by the lake or wanted to have a good view ) were sitting holding their heads,probably due to dizziness or nausea .As I reached the frozen part of lake ,I decided to turn back as it was getting late. I returned to the usual spot,climbed up the stairs with slow pace and reached our vehicle. We were served hot coffee and snacks. But I was feeling too nauseous to have anything. I clicked some more pictures,sat by a stone had a relaxed time lost in my thoughts. Finally it was time to return and with a heavy heart we bid adieu. Flashbacks of the place dominated my mind in most part of the return journey. It was one of those moments when we actually fall in love with places and couldn't get our mind off it . Internally I thanked the Almighty for letting me witness the phenomenal beauty without any roadblocks, rain or poor visibility. We returned to our hotel and after lunch, packed our bags and started our journey to lachung for another amazing day in north Sikkim ,which I'll write later. Tips: Try engaging in conversations with the locals, they will give the best, honest advices. Take your Id proof and lots of passport size photographs for permit into restricted area. Carry anti emetics and analgesic because of motion sickness and headache due to low oxygen. Enjoy the local food. And bargain,it works!
english
/* SOCIAL STYLES */ .social-link { background: rgba(150, 150, 150, 0.5); border-radius: 99px; . . . } .social-list { list-style: none; padding: 0; text-align: center; } .social-list > li { display: inline-block; margin: 0 0.5em; }
css
Yes you read that right. And no, Mahindra Satyam is not venturing into the retail sector. As it turns out, eight apartments owned by aides of Ramalinga Raju in the ‘Satyam block’ of Ramaraju Nagar in Medchal that were raided by CID sleuths after Raju’s confession last year are now being used for, well, selling soaps and pulses. A little birdie at Ramaraju Nagar tells us that the eight apartments, which were in the prescam days used for putting up EMRI trainees (and, as sleuths suspected, to hide crucial documents) have now been converted into a sprawling supermarket, selling groceries and fresh vegetables. The apartments, we are told, now sport ‘Spencer’ brand and the outlet is becoming popular among local residents. Now who would have thought that the closets once used to possibly hide papers of a multi-crore scam are now being brought to a rather non-exciting pedestrian use: to store milk and eggs. Such are times.
english
1 Tawamhã wahub ahâ na ãma wahu pari, ma tô Zuwã Batita hã mo a'ubuni u, Zudeza na danhipti'a nho'õmo nhisi ãma, 'Re ĩhâimana u'âsi mono zadawa wasu'u na te te dama ãma sãna'rata da. 2 Ãne te dama rowasu'u: — Ma'ãpé, aiwasété wi aipizari za'ra wa'aba. 'Re ĩhâimana u'âsi mono, da'ãma 're ĩsib'a'uwẽ mono zéb u hã romhuture di oto. — Ãne te dama rowahutu, Zuwã Batita hã. 3 Duréihã Iza'iza hã ma tô Zuwã Batitaha ãma rob'ui'éré siro, 'Re ĩhâimana u'âsi mono zadawa wasu'u 'rata 'wa hã. Ãne ĩsimi'ui'éré hã: “Ni'wa hã te za te te dama 're rob'mahârâ, a'ubuni wi: Bâdâdi hã asiwi ropese aba, Wanhib'apito zô. Ãne ma tô Iza'iza hã ãma rob'ui'éré, romhâ ré. 4 Zuwã hã awaru ba'õmore zéré 'manharĩ na te 're si'uza. Duré romhâ 'manharĩ hâiwaré na te 're si'usisi. 'Riti na si te 're sa. Duré rom na ropĩni na zama te 're sa. 5 Tawamhã Zeruzarẽ ãma 're ĩdasi'ubumroi mono norĩ hã, duré Zudeza na danhipti'a nho'õmo nhisi ãma daza'rui mono bâ 're ĩdahâimana za'ra mono hã, duré Zodã pa nhisi 'rata 're ĩdahâimana za'ra mono norĩ zama, ma tô ĩtẽme 're dasito, daro mono bâ. Ĩsimirowasu'u hã da te 're wapari za'ra mono da, ma tô ĩtẽme 're dasito. 6 Taha wa, dawasété na ma tô 're dasiwẽ'õ za'ra 'râwi, sõ'awi, 'Re ĩhâimana u'âsi mono ma. Dawasété na 're dasiwẽ'õ za'ra mono sidâpâsi, ma tô Zuwã Batita hã â dawabzuri hã te te dama 're ab'manharĩ, Zodã pa ãma. 7 Tawamhã Zuwã hã ma tô 'madâ'â za'ra, parisezu norĩ hã ahâ uptabi na, duré sadusezu norĩ hã. Te ĩtẽme ai'aba'ré, â dawabzuri te te dame 'manharĩ za'ra da. Tawamhã Zuwã hã te te 'madâ'â za'ra wamhã, te tãma nharĩ za'ra, parisezu norĩ ma: — A norĩ wa'wa hã wahi ne te 're anomro aba mo. E 'wa simiroti zarina, te we ĩ̱tẽme ai'aba'réi wa'wa bété, â dawabzuri si ĩ'manharĩ za'ra wa'aba zém na, 'Re ĩhâimana u'âsi mono nhimihâzé wi, asisõ'reptu za'ra wa'aba da bâ, aiwasédé hã rẽme za'ra wa'aba õ nherẽ. 8 Sena na aiwasédé hã ĩrẽme za'ra wa'aba zém na, da te 're aiwaihu'u za'ra wa'aba mono da, te za oto 're anomro wẽ wa'aba mo. 9 Duré Abra'ãhã nhihudu wẽ te, asina 're rosa'rata za'ra wa'aba mono õ di za, 'Re ĩhâimana u'âsi mono te te 're ĩ'aihâ za'ra wa'aba mono õ na hã. 'Re ĩhâimana u'âsi mono ma, waihu'u pese di, ã ẽtẽ norĩ ma, te te nharĩ da, tãma si'a'uwẽ za'ra da, Abra'ãhã nhihudu oto 're hâimana za'ra mono da, ẽne hã. 10 Hâtâra hã te za oto ni'wa hã sarõtõ, wedepa nhihârizéb da hã. Uburé wede hã 're ĩ'rãi pese za'ra mono õ hã te za te te ãma 're anhihâri. Tawamhã unhama u te za te te 're anhamra. — Ãne te dama ãma simiré'é Zuwã hã, 'Re ĩhâimana u'âsi mono nhimihâzém na hã. 11 Te duré dama tinha: — Wa hã wa tô â uptabi na si te 're aihâiba ubu za'ra wa'wa, â dawabzuri hã te aima 're ab'manharĩ aba mono wamhã, aiwasété wi 're aipizari za'ra wa'aba mono zém na, da te oto ãma 're aiwaihu'u za'ra wa'aba mono da. Tane nherẽ, ĩ̱za'u si te za ĩ̱ma ĩpire uptabi hã wei wi. Taha si te za oto 'Re ĩhâimana u'âsi mono pẽ'ẽzani na te te duré 're aihâiba ubu za'ra wa'wa, unhama ne na zama, â na te aima 're ĩ'ab'manharĩ aba mono ne hã. Ta hã ĩ̱ma pire uptabi wa, ĩpara'uza hã te tãma mrami waihu'u õ di za, tãma ĩ̱wapure wa. 12 Wei morĩ wapsi, te za da'ãma aipo'o. Buru nho, da te 're upõrĩ za'ra mono parimhã, te za da te 're sa'wari za'ra, ĩsa'warizéb 're. Tawamhã ĩtomhâ na te za da te ãma 're ro'o za'ra. Ĩro hã sa'ẽtẽ nherẽ, da te wĩrĩ waihu'u õ di za. Tane ĩ̱ma ĩpire hã wei morĩ wapsi, te za da'ãma aipo'o, tridu upõrĩ za'wari ne, ĩtomhâ za'wari ne. — Ãne ma tô dama rowasu'u, Zuwã Batita hã. 13 Tawamhã Zezusi hã ma tô mo, Darireza na danhipti'a nho'õmo nhisi hawi, Zodã pa u, tame Zuwã Batita, â dawabzuri hã te te tãma 'manharĩ da. 14 Tane nherẽ, ma tô pibu Zuwã Batita hã, ĩsimirosa'rada hã te te tiwi ãma saprĩ da, â dawabzuri te te tãma 'manharĩ tõ da. Ãne te tãma tinha: — E marĩ da, te ĩ̱ma aipire uptabi nherẽ, ĩ̱ma asi'ru, â dawabzuri hã te aima 'manharĩ da. A hã te aré ĩ̱ma ĩ'manha. 15 Tawamhã Zezusi hã asa te tãma tinha: — Tane tô. Ĩbâ ma te asina ĩ̱ma ĩwaihu. Tane nherẽ, te za ĩ̱ma ĩ'manha, 'Re ĩhâimana u'âsi mono te te wama ĩpisutuzéb zarina, wa te wasina uwaimrami da. — Ãne ma tô tãma waihu'u Zezusi hã, Zuwã Batitaha ma. Taha wa, Zuwã hã ma tô ãma saze. Ma tô â dawabzuri hã tãma 'manha, Zezusihi ma. 16 Tawamhã â dawabzuri te te tãma 'manharĩ pari, ma tô â hawi watobro, Zezusi hã. Watobro wi, ma tô hâiwa hã tãma si'ridawa. Tawamhã Zezusi hã ma tô tisã, 'Re ĩhâimana u'âsi mono pẽ'ẽzani hã we ĩtẽme ĩmorĩ hã hâiwa hawi, utu'u ne hã. Tawamhã ma tô ãma za. 17 Tawamhã hâiwa hawi te we ãma tinha: — Ã hã ĩ̱'ra. Ĩ̱ma sawi uptabi di. Tãma ĩ̱to za'ẽtẽ uptabi di. — Ãne te we tinha, Ĩmama hã.
english
SHAH, J.C. RAMASWAMI, V. CITATOR INFO : Income-tax Act (11 of 1922), s. 66(1), (2) and (4)--question not raised before Tribunal either in appeal or application to state a case-If High Court can direct reference on such question-If High Court must answer question referred-Power to reframe question and call for additional statement from Tribunal when to be exercised. The husband of the respondent died in October 1944. For the assessment year 1945-46, his estate was assessed to income- tax on a total income of Rs. 22,160. In January 1946, the respondent encashed 584 high denomination notes of the value of Rs. 5,84,000. There were proceedings for re-assessment of the total income of the assessee, wherein it was stated before the Income-tax Officer, on behalf of the respondent, that during the previous 30 years, her husband was giving gifts to the respondent and was also setting apart money exclusively for her and their children and, that the fund so accumulated amounting to Rs. 5,84,000 remained in a cupboard and was found after his death, and therefore, the amount was not liable to tax as the income of her husband in the previous year. The Income-tax Officer disbelieved her explanation and brought the amount of Rs. 5,84,000 to tax as tre income of the respondents' husband from an undisclosed source in the year of account 1944-45. The order was con- firmed by the Appellate Assistant Commissioner who also referred to the respondent's declaration under the High Denomination Bank Notes (Demonetisation) Ordinance that the amount was made over by the de,ceased, some time before his death, to her for her benefit and that of her 8 minor sons. The Appellate Tribunal also upheld the order of the Income- tax Officer. The respondent then filed an application under s. 66 (1) to state a case to the High Court. In that application she asserted that 494 out of the 584 notes were received from a Bank in Calcutta in realisation of a cheque drawn for Rs. 4,94,000 in September 1945 by her eldest son. The Tribunal rejected the application. The High Court, under S. 66(2) directed the Tribunal to state a case on the question6n:-Whether the Tribunal erred in law by basing its decision on a part of the evidence ignoring the 'statement made as regards the withdrawal of Rs. 4,94,000 by 494 pieces of Rs. 1,000 notes from the bank. The Tribunal, while submitting the statement of case, pointed out that the statement in the petition under s. 66(1) was materially different from that made before the Income-tax Officer and that the Tribunal was not invited to consider, at the hearing of the appeal, the truth of that statement. The High Court, thereafter, heard the reference and decided in favour of the assessee, holding that: (1) the Tribunal ignored a part of the declaration made by the respondent that 494 high denomination notes were received from the bank in Calcutta in September 1945; (2) no opportunity was given by the Tribunal to the respondent to clear up the discrepancies in her statements made at the time of the disclosure of the high denomination notes and before the Income-tax Officer; and (3) it was not open to the Court hearing a reference under s. 66(2) to hold, contrary to the decision recorded at the time when the Tribunal was directed to state the case on a question, that the question did not arise out of the order of the Tribunal. 467 In appeal to this Court, HELD : (1) In the question which was directed to be referred it was assumed that the Tribunal had before it the statement about the receipt of 494 currency notes from the bank at Calcutta. But that evidence was not before the Tribunal. No such statement was made either before the Income-tax Officer, or before the Appellate Assistant Commissioner or in the appeal before the Tribunal. The statement was made for the first time in the petition under s. 66(1). Even in the application it was not suggested that the finding of the Tribunal was vitiated because some relevant evidence was ignored. The order of the Tribunal was not therefore open to the objection that the appeal before it was decided on a partial review of the evidence. [471 B, D-F] (2) The plea of want of opportunity was not raised before the Tribunal, and therefore, the validity of the conclusion of the Tribunal on the evidence could not be assailed before the High Court on the ground that the departmental authorities had violated the basic rules of natural justice, without raising that question before the Tribunal. [472 H] (3) The High Court was in error in holding that at the hearing of a reference pursuant to an order calling upon the Tribunal to state a case, the High Court must proceed to answer the question without considering whether it arises out of the order of the Tribunal or whether it is a question of law, or whether it is academic, unnecessary or irrelevant especially when by an erroneous order the High Court directed the Tribunal to state a case on a question which did not arise out of the order of the Tribunal. [472 D-E] Observations contra in Chainrup Sampatram v. Commissioner of Income-tax, West Bengal, 20 I.T.R. 484. overruled. (4) When the Tribunal was not invited to state a case on a question of law alleged to arise out of its order, the High Court could not direct the Tribunal to state it on that question. [471 G-H] Commissioner of Income-tax v. Scindia Steam Navigation Co. Ltd., 24 I.T.R. 589 followed. (5) The irregularities in the judgment of the High Court could not be cured by reframing the question referred to the High Court and calling for a supplementary statement from the Tribunal The power to reframe a question may be exercised only to clarify some obscurity in the question referred or to pinpoint the real issue between the tax payer and the department or for similar other reasons. It cannot be exercised for reopening an enquiry on questions of fact, which was closed by the order of the Tribunal. Similarly, a supplementary statement could be ordered only on a question arising out of the order of the Tribunal if the court is satisfied that the original statement is not sufficient to enable it to determine the question raised thereby, and, when directed the supplementary statement may be only on such material and evidence as may already 1 on record, but not included in the statement initially made. [473 B-D] Keshav Mills Ltd. v. Commissioner of Income-tax, Bombay North, Ahmedabad, 56 I.T.R. 365 and Narain Swadeshi Weaving Mills Y. Commissioner of Excess Profits Tax, 26 I.T.R. 765, referred to. (6) The Tribunal was not in- error in failing to raise and state a case on the question whether the amount of Rs. 5,84,000 was taxable in the accounting year 1944-45. That question was considered by the Incometax Officer and by the Appellate Assistant Commissioner and the explana- 468 tion of the respondent was rejected by them, and no argument was raised before the tribunal that the amount, though taxable, was not the income of the year of account 1944-45. CIVIL APPELLATE JURISDICTION:. Civil Appeal No. 2457 of 1966. Appeal from the judgment and order dated September 13, 1963 of the Calcutta High Court in Income-tax Reference No. 29 of 1959. S. T. Desai, B. R. L. Iyengar and R. N. Sachthey, for the appellant. A. K. Sen, R. M. Hazarnavis, and K. L. Hathi, for the respon- dent. The Judgment of the Court was delivered by Shah, J. One Amritlal died on October 18, 1944. For the assessment year 1945-46 his estate was assessed to tax on a total income of Rs. 22,160/- from salary and other sources. In January 1946, Anusuya Devi widow of Amritlal encashed high denomination notes of the value of Rs. 5,84,000/-, and made a declaration as required by the High Denomination Bank Notes (Demonetisation) Ordinance, 1946 that: "A sum of Rs. 5,84,000/- in notes were made over and/or directed to be made over by the declarant's deceased husband Amritlal Ojha at Rajkot in April, 1944, sometime before his death for the benefit of declarant and her 8 minor sons." In a proceeding for reassessment of the income of Amritlal for the assessment year 1945-46 the attorney who appeared on behalf of Anusuya Devi stated that "Amritlal was from time to time, during the last 30. years of his life, giving gifts to his wife and also setting apart money exclusively for his wife and children and that the fund so accumulated which remained in a cupboard" was found after his death. The Income-tax Officer disbelieved the explanation furnished and brought the amount of Rs. 5,84,000/- to tax as income of Amritlal in the year of account 1944-45 from an undisclosed source, and with his decision the Appellate Assistant Commissioner agreed. 5. "From time -to, time during our married life, late Sri Amritlal Ojha used to make presents of cash moneys to me on occasion of birthday of myself and of my sons and daughter by him and also on the occasion of his own birthday and on the anniversary of our marriage." 6. "My husband late Sri Amritlal Ojha used to tell me that these presents of cash money that he made was to make provisions for me and my minor sons and daughter and also to meet the expenses of their education and marriage in the event of his death." 8. "The total amount of the money so paid by late Sri Amritlal Ojha was Rs. 5 84,600/-. This amount was my stridhan property and was all along in my possession." This affidavit was admitted in evidence by the Tribunal, but the Tribunal declined to admit an affidavit of Gunvantray one of the sons of Amritlal, because in their view an attempt was made to bring on record a large number of new facts which were not disclosed before the departmental authorities. The Tribunal declined to accept the case set up by Anusuya Devi. Beside pointing out the discrepancies in the statements made from time to time, which rendered her case unreliable, the Tribunal expressed the view that gifts made during a long period of "20 to 30 years" could not all have been made only in thousand rupee notes. The Tribunal accordingly upheld that order bringing to tax Rs. 5,84,000/- as income from an undisclosed source in the account year 1944-45. In her application for stating a case to the High Court on eleven questions set out therein Anusuya Devi asserted that in her declaration under s. 6 of the High Denomination Bank Notes (Demonetisation) Ordinance, 1946, she had given information pursuant to the queries as follows : Reasons for keeping above in No bank account. The high denomination notes rather amount is held in trust than in current account, fixed for minors and as prices deposit or securities. of securities very so for greater safety the amount is held in cash for the benifit of the defandent and in trust for the minors. When and from what source did A sum of Rs. 5,84,000 in declarant come into possession notes were made over and or of bank notes now tendered. directed to be made over by the declarant's deceased husband Amritlal Ojha at Rajkot in April 1944 sometime before his death for benefit of the declarant and her eight minor sons. in the latter part of August and beginning 470 of September 1945, Rs.4,94,000/was deposited with the Bank of India Ltd. at its Bombay Branch and transferred by T.T. to their Calcutta Branch in the account of the declarant's major son Bhupatray Ojha who drew a self cheque for Rs. 4,94,000/- received payment by 494 pieces of 1,0001- notes (included in the list) and made them over to the declarant. The Tribunal rejected the application. The High Court of Judicature at Calcutta however directed the Income-tax Appellate Tribunal to state a case on the following question : "Whether the Tribunal erred in law by basing their decision on part of the evidence ignoring the statement made as regards the withdrawal of Rs. 4,94,000/- by 494 pieces of Rs. 1,000/- notes from the bank?" In compliance with the order, the Tribunal observed that the extract from the statement incorporated in the petition under s. 66(1) was materially different from the statement reproduced in the order of the Income-tax Officer and that the Tribunal was not invited to consider at the hearing of the appeal the truth or otherwise of the alleged copy of the declaration incorporated in the petition under S. 66(1) and that at the hearing of the appeal the original declaration had not been produced. The learned Judges of the High Court who heard the reference were apparently of the view that the question referred did not arise out of the order of the Tribunal, but they felt bound by the view expressed in Chainrup Sampatram v. Commissioner of Income-tax, West Bengal(1) that it is not open to the Court hearing a reference under s. 66(2) to hold, contrary to the decision recorded at the time when the Tribunal was directed to state the case on a question, that the question did not arise out of the order of the Tribunal. Bijayesh Mukherji, J., who delivered the principal judgment of the Court observed that the Tribunal had apparently ignored a part of the declaration made by Anusuya Devi that 494 high denomination notes out of those encashed in January 1946 were received from a Bank in Calcutta in realization of a cheque for Rs. 4,94,000/- drawn in September 1945 by Bhupatray her eldest son; that there was reason to doubt that statements referred to in his order by the Appellate Assistant Commissioner were made by Anusuya Devi or her attorney; and that in any event opportunity to "clear up the discrepancies" between the statement made at the time of the disclosure of the high denomination notes and the statements said to have been made before the Income-tax Officer or before the Appellate Assistant Commissioner ought to have been given to her. Holding that the (1) 20 I.T.R 484. 471 order of the Tribunal suffered from those infirmities the learned Judges of the High Court answered the question in the affirmative. In our, judgment the order of the High Court cannot be sus- tained. The statement that out of 584 high denomination notes disclosed by Anusuya Devi 494 notes were received in realization of a cheque drawn by Bhupatray at Rajkot was made for the first time in a petition under s. 66(1): it did not find place in the statement before the Income-tax Officer, nor in the grounds of objection raised before the Appellate Assistant Commissioner, and. not even in the affidavit filed before the Tribunal. The Tribunal was never apprised of that part of the case, and had no opportunity to test the correctness of that statement. On the statements made before the Income-tax Officer and in the affidavit there can be no doubt that it was the case of Anusuya Devi that she had encashed high denomination notes which she had received from her husband. No fault can therefore be found with the observations of the Tribunal that it was "a peculiar fact that all the money stated to have been received and found in the cupboard was all in high denomination notes and the entire amount had to be exchanged under the High Denomination Bank Notes (Demonetisation) Ordinance". In the question which was referred under the direction of the High Court, it was assumed that the Tribunal had before it the statement about the receipt of 494 currency notes of Rs. 1,000/each from a Bank at Calcutta in realization of a cheque. But that evidence was not before the Tribunal, and the order of the Tribunal was not open to the objection that it had decided the appeal before it on a partial review of the evidence. Even in the application made to the Tribunal under s. 66(1) in the large number of, questions which it was claimed arose out of the order of the Tribunal it was not suggested that the finding of the Tribunal was vitiated because some relevant evidence was ignored. If the Tribunal refuses to state a case under sub-s. (1) of s. 66 on the ground that no question of law arises, and the High Court is not satisfied with the correctness of that decision, the High Court -nay in exercise of the power under s. 66(2) require the Tribunal to state a case, and refer it. When the Tribunal is not invited to state a case on a question of law alleged to arise out of its order, the High Court cannot direct the Tribunal to state it on that ques- tion: see Commissioner of Income-tax v. Scindia Steam Navigation Co. Ltd. (1). The reason of the rule is clear: the High Court cannot hold that the decision of the Tribunal refusing to state a case on a particular question is incorrect if the Tribunal was not asked to consider whether the question arose out of its order, and whether it was a question of law. 472 We find it difficult to uphold the view of the Calcutta High Court that if an order is passed by the High Court calling upon the Tribunal to state a, case on a question which does not arise out of the order of the Tribunal, the High Court is bound to advise the Tribunal on that question even if the question does not arise out of the order of the Tribunal. The High Court may only answer a question referred to it by the Tribunal : the High Court is however not bound to answer a question merely because it is raised and referred. It is well-settled that the High Court may decline to answer a question of fact or a question of law which is purely academic, or has no bearing on the dispute between the parties or though referred by the Tribunal does not arise out of its order. The High Court may also decline to answer a question arising out of the order of the Tribunal, if it is unnecessary or irrelevant or is not calculated to dispose of the real issue between the tax-payer and the department. If the power of the High Court to refuse to answer questions other than those which are questions of law directly related to the dispute between the tax-payer and the department, and which when answered would determine qua that question the dispute, be granted, we fail to see any ground for restricting that power when by, an erroneous order the High Court has directed the Tribunal to state a case on a question which did not arise out of the order of the Tribunal. We are unable therefore to hold that at the hearing of a reference pursuant to an order calling upon the Tribunal to state a case, the High Court must proceed to answer the question without considering whether it arises out of the order of the Tribunal, whether it is a question of law, or whether it is academic, unnecessary or irrelevant. We are of the opinion that the very basis of the question on which the Tribunal was called upon to submit a statement of the case did not exist. The Tribunal cannot in this case be charged with recording its decision without considering all the evidence on the record : the decision of the Tribunal was clearly based on appreciation of evidence on the record before it, and the High Court was, in our view, incompetent to direct the Tribunal to state the case on- the question which was directed to be, referred and dealt with by the High Court. We are also unable, to agree with the observation of the High Court that the explanation which the Assistant Commissioner says was made by Anusuya Devi was not made by her or by her attorney. No such plea was apparently raised before the Tribunal. There is also no ground for believing that Anusuya Devi was not given an opportunity to " clear up the discrepancies" between the statements made by her or on her behalf from time to time in connection with the encashment of the high denomination notes. That plea was not raised before the Tribunal, and the validity of the conclusion of the Tribunal on appreciation of evidence cannot be assailed before 473 the High Court on the ground that departmental authorities had violated the basic rules of natural justice without raising that question before the Tribunal. Counsel for Anusuya Devi requested that in any event the question which has been referred by the Tribunal in pursuance of the order of the High Court may be reframed and a supplementary statement may be ordered to be submitted by the Tribunal. But power to reframe a question may be exercised to clarify some obscurity in the question referred, or to pinpoint the real issue between the tax- payer and the department or for similar other reasons : it cannot be exercised for reopening an enquiry on questions of fact which is closed by the order of the Tribunal. Again, a supplementary statement may be ordered only on the question arising out of the order of the Tribunal, and if the Court is satisfied that the statements are not sufficient to enable the Court to determine the question raised thereby, and when directed may be only on such material and evidence as may already be on the record but which has not been included in the statement initially made: Keshav Mills Ltd. v. Commissioner of Income-tax, Bombay North, Ahmedabad(1). We do not think that the judgment of this Court in Narain Swedeshi Weaving Mills v. Commissioner of Excess Profits Tax(2) lays down any general proposition that the High Court hearing a reference is entitled to amend or reframe a question and call for a supplementary statement so as to enable a party to lead evidence which has not been led before the Tribunal or the departmental authorities. In Narain Swadeshi Weaving Mills' case(2) this Court merely reframed the question so as to bring out the real issue between the parties. Finally counsel for Anusuya Devi submitted that the Tribunal was bound to state a case on the following question which was. set out in the application under s. 66 (1) : 6. "Whether there is any material before the Tribunal to hold that the said sum of Rs. 5,84,000/representing the value of the encashed high denomination notes was the income of the deceased Amritlal Ojha of the period of the year 1944-45 prior to his death ?" Counsel submitted that since the Tribunal had failed to raise and state a case on that question, and the High Court had also in directing that a statement of case be submitted, ignored that question, in the interest of justice and for a final and satisfactory disposal of the case this Court may order a statement on that question. Counsel said that merely because on the findings-of (1) 56 I.T.R. 365. (2) 26 I.T. R. 765. 474 the Tribunal Amritlal was on April 30, 1944, possessed of a large sum of money it could not be assumed that the whole amount was earned after April 1, 1944, and was on that account taxable in its entirely in the year of assessment 1945-46. The question whether the amount of-Rs. 5,84,000/- was taxable in the proceeding for assessment for the year 1945- 46 was considered by the Income-tax Officer and by the Appellate Assistant Commissioner. The Income-tax Officer observed that by the explanation submitted on behalf of Anusuya Devi before him, contrary to what was stated at the time of encashment of the high denomination notes, it was attempted "as an afterthought, to spread over the amount over a number of years". The contention that the amount of Rs. 5,84,000/- was not taxable in the .year of assessment 1945-46 was rejected. The Appellate Assistant Commissioner observed that on the statement made by Anusuya Devi that she had received the amount from her husband in the year of account 1944-45 and that it was unfortunate that there was ' no complete record of the "earnings and withdrawals" .,of Amritlal from the various businesses in which he was interested, and that in the absence of such a record all that was to be done was to examine whether the explanation was credible. He observed that "the accounting year was very favourable for all types ..of business, and in all probability the sum represented some income earned by the deceased in some ventures which were not known to the Department and therefore the sum could be treated as income of Amritlal from undisclosed sources". The Tribunal observed that they were unable to believe the version of Anusuya Devi that the amount was accumulated by her husband during a long period, and since the assessee and his legal representatives had failed to prove the source of the fund, it "must be considered as of income character". Apparently, no argument was raised before the Tribunal that the amount though taxable was not income of the year of account 1944-45 and could obviously not he referred. The High Court may answer only those questions which are ,actually referred to it. New questions which have not been referred cannot be raised and answered by the High Court. If the Tribunal refuses to refer a case under S. 66(1) which arises out of its order, the proper course is for the aggrieved party to move the High Court to require the Tribunal under S. 66(2) to refer the same. The question whether Rs. 5,84,000/- represented income of the year of account 1944-45 was not submitted by the, Tribunal to the High Court. Even if it be assumed that the High Court was moved to direct the Tribunal to state a case on the sixth question which was set out in the, application filed -'before the Tribunal under S. 66(1), the application must be 475 deemed to have been rejected, and the order of rejection has become final. We have no power, without an appeal by the assessee, to set aside that order of the High Court and to direct the Tribunal to state a case on that question. The appeal must therefore be allowed, and the order passed by the High Court set aside. The answer to the question will be in the negative. This case discloses a very disturbing state of affairs prevailing in the Income-tax Department. It is a startling revelation that the entire record of an assessee's case both before the Income-tax Officer and the Appellate Assistant Commissioner was found missing, and has not been traced thereafter. Even if collusion be ruled out, the persons concerned in looking after the safety of the important record of proceedings of assessment cannot escape a charge of gross negligence. In the circumstances of the case. -we think there shall be no order as to costs in the High Court and in this Court. Appeal allowed.
english
import loginPage from '../../Page objects/Login.page'; import navigationMenuPage from '../../Page objects/NavigationMenu.page'; import myEformsPage from '../../Page objects/MyEforms.page'; const expect = require('chai').expect; describe('Navigation menu - Delete item', function () { before(function () { loginPage.open('/'); loginPage.login(); myEformsPage.Navbar.goToMenuEditorPage(); }); it('element must be created from custom dropdown which elements and create templates elements', function () { const count = navigationMenuPage.menuItemsChilds.length; navigationMenuPage.collapseTemplates(1); const dropdown = { securityGroups: [], translations: ['test1', 'test', 'test3'] }; navigationMenuPage.createCustomDropdown(dropdown); // create 2 items from templates menu navigationMenuPage.collapseTemplates(0); navigationMenuPage.createMenuItemFromTemplate(2); navigationMenuPage.createMenuItemFromTemplate(3); navigationMenuPage.collapseTemplates(0); // check, how match created elements expect(count + 3).eq(navigationMenuPage.menuItemsChilds.length); navigationMenuPage.collapseMenuItemDropdown(navigationMenuPage.menuItemsChilds.length - 1); // open dropdown in menu items navigationMenuPage.dropdownBody(navigationMenuPage.menuItemsChilds.length - 1).scrollIntoView(); // scroll to dropdown body navigationMenuPage.dragTemplateOnElementInCreatedDropdown(1, navigationMenuPage.menuItemsChilds.length - 1); navigationMenuPage.dragTemplateOnElementInCreatedDropdown(2, navigationMenuPage.menuItemsChilds.length - 1); navigationMenuPage.dragTemplateOnElementInCreatedDropdown(3, navigationMenuPage.menuItemsChilds.length - 1); // check, how match created items in dropdown expect(3).eq(navigationMenuPage.dropdownBodyChilds(navigationMenuPage.menuItemsChilds.length - 1).length); // save menu navigationMenuPage.clickSaveMenuBtn(); }); it('should before deleted items from custom dropdown and items menu', function() { // remember count elements in dropdown const countInDropdown = navigationMenuPage.dropdownBodyChilds(navigationMenuPage.menuItemsChilds.length - 1).length; // delete elements in dropdown navigationMenuPage.deleteElementFromDropdown(navigationMenuPage.menuItemsChilds.length - 1, 0); navigationMenuPage.deleteElementFromDropdown(navigationMenuPage.menuItemsChilds.length - 1, 0); navigationMenuPage.deleteElementFromDropdown(navigationMenuPage.menuItemsChilds.length - 1, 0); navigationMenuPage.clickSaveMenuBtn(); // check how many items are left in the dropdown expect(countInDropdown - 3).eq(navigationMenuPage.dropdownBodyChilds(navigationMenuPage.menuItemsChilds.length - 1).length); // remember count elements in menu items const countInMenuItems = navigationMenuPage.menuItemsChilds.length; navigationMenuPage.deleteElementFromMenuItems(0); navigationMenuPage.deleteElementFromMenuItems(0); // delete 2 template elements navigationMenuPage.deleteElementFromMenuItems(navigationMenuPage.menuItemsChilds.length - 1); // delete created dropdown navigationMenuPage.clickSaveMenuBtn(); // check how many items are left in the menu items expect(countInMenuItems - 3).eq(navigationMenuPage.menuItemsChilds.length); navigationMenuPage.resetMenu(); }); });
typescript
<filename>README.md # LMXB Reconstructing the evolutionary histories of observed LMXBs
markdown
New Delhi: Nine states, including Telangana and Meghalaya, have withdrawn general consent given to the Central Bureau of Investigation for probing certain offences, Union Minister Jitendra Singh said on Wednesday. As per section 6 of the Delhi Special Police Establishment (DSPE) Act, 1946, the CBI needs consent from the respective state governments to conduct investigations in their jurisdiction, he said in reply to a written question in Lok Sabha. In terms of the provision of section 6 of the DSPE Act, 1946, the state governments have granted general consent to the CBI for the investigation of a specified class of offences against specified categories of persons, enabling the agency to register and investigate those specified matters, Singh, the Minister of State for Personnel, said. This report is auto-generated from PTI news service. ThePrint holds no responsibility for its content.
english
# -*- coding: utf-8 -*- __author__ = 'raek' __updated__ = 'kmu' import requests # import datetime # import getdangers as gd # import makelogs as md # import types def get_warnings_as_json(region_ids, start_date, end_date, lang_key=1, simple=False, recursive_count=5): """Selects warnings and returns the json structured result as given on the api. :param region_id: [int or list of ints] RegionID as given in the forecast api [1-99] or in regObs [101-199] :param start_date: [date or string as yyyy-mm-dd] :param end_date: [date or string as yyyy-mm-dd] :param simple: [bool] default "False" - returns a minimum of data when True (used for speed-up) :param recursive_count [int] by default atempt the same request # times before giving up :return warnings: [string] String as json Eg. http://api01.nve.no/hydrology/forecast/avalanche/v2.0.2/api/AvalancheWarningByRegion/Detail/10/1/2013-01-10/2013-01-20 """ # If input isn't a list, make it so if not isinstance(region_ids, list): region_ids = [region_ids] warnings = [] recursive_count_default = recursive_count # need the default for later for region_id in region_ids: if len(region_ids) > 1: # if we are looping the initial list make sure each item gets the recursive count default recursive_count = recursive_count_default # if region_id > 100: # region_id = region_id - 100 if simple: api_type = 'Simple' else: api_type = 'Detail' # md.log_and_print("getForecastApi -> get_warnings_as_json: Getting AvalancheWarnings for {0} from {1} til {2}"\ # .format(region_id, start_date, end_date)) url = "https://api01.nve.no/hydrology/forecast/avalanche/v4.0.0/api/AvalancheWarningByRegion/{4}/{0}/{3}/{1}/{2}"\ .format(region_id, start_date, end_date, lang_key, api_type) # If at first you don't succeed, try and try again. try: warnings += requests.get(url).json() # md.log_and_print("getForecastApi -> get_warnings_as_json: {0} warnings found for {1}.".format(len(warnings), region_id)) except: # md.log_and_print("getForecastApi -> get_warnings_as_json: EXCEPTION. RECURSIVE COUNT {0}".format(recursive_count)) if recursive_count > 1: recursive_count -= 1 # count down warnings += get_warnings_as_json(region_id, start_date, end_date, lang_key, recursive_count=recursive_count) # TODO: remove line below and use proper logging print("Rec", recursive_count) return warnings, url ''' def get_warnings(region_ids, start_date, end_date, lang_key=1): """Selects warnings and returns a list of AvalancheDanger Objects. This method does NOT add the avalanche problems to the warning. :param region_id: [int or list of ints] RegionID as given in the forecast api [1-99] or in regObs [101-199] :param start_date: [date or string as yyyy-mm-dd] :param end_date: [date or string as yyyy-mm-dd] :return avalanche_danger_list: List of AvalancheDanger objects """ warnings = get_warnings_as_json(region_ids,start_date, end_date, lang_key=lang_key) avalanche_danger_list = [] for w in warnings: region_id = int(w['RegionId']) region_name = w['RegionName'] date = datetime.datetime.strptime(w['ValidFrom'][0:10], '%Y-%m-%d').date() danger_level = int(w['DangerLevel']) danger_level_name = w['DangerLevelName'] author = w['Author'] avalanche_forecast = w['AvalancheDanger'] avalanche_nowcast = w['AvalancheWarning'] danger = gd.AvalancheDanger(region_id, region_name, 'Forecast API', date, danger_level, danger_level_name) danger.set_source('Varsel') danger.set_nick(author) danger.set_avalanche_nowcast(avalanche_nowcast) danger.set_avalanche_forecast(avalanche_forecast) if lang_key == 1: danger.set_main_message_no(w['MainText']) if lang_key == 2: danger.set_main_message_en(w['MainText']) avalanche_danger_list.append(danger) # Sort by date avalanche_danger_list = sorted(avalanche_danger_list, key=lambda AvalancheDanger: AvalancheDanger.date) return avalanche_danger_list ''' def get_valid_regids(region_id, start_date, end_date): """Method looks up all forecasts for a region and selects and returns the RegIDs used in regObs. Thus, the list of RegIDs are for published forecasts. :param region_id: [int] RegionID as given in the forecast api [1-99] or in regObs [101-199] :param start_date: [string] date as yyyy-mm-dd :param end_date: [string] date as yyyy-mm-dd :return: {RegID:date, RegID:date, ...} """ warnings = get_warnings_as_json(region_id, start_date, end_date) valid_regids = {} for w in warnings: danger_level = int(w["DangerLevel"]) if danger_level > 0: valid_regids[w["RegId"]] = w["ValidFrom"] return valid_regids if __name__ == "__main__": import datetime as dt import pandas as pd # get data for Bardu (112) and Tamokdalen (129) # warnings_for_129 = get_warnings([129, 118, 131], dt.date(2016, 4, 1), dt.date(2016, 4, 2)) warns_json = get_warnings_as_json([129, 118, 131], dt.date(2016, 4, 1), dt.date(2016, 4, 2), simple=True, lang_key=1, recursive_count=5) # p = get_valid_regids(10, "2013-03-01", "2013-03-09") # Retrieve danger level for a specific region # TODO: make the output two separate lists - one containing DL the other date dl = [{warns['ValidFrom']: warns['DangerLevel']} for warns in warns_json if warns['RegionId']==29] df = pd.DataFrame(warns_json[0]) # all elements get doubled when converting to DataFrame # conversion to dataframe does not work with api_type='Simple' - but maybe I don't need the dataframe at all. print(warns_json[0]['DangerLevel'], warns_json[0]['AvalancheWarning']) print('---') print(df['DangerLevel'], df['AvalancheWarning']) a = 1
python
<reponame>JefferyLukas/SRIs {"angular-translate-storage-local.js":"<KEY>,"angular-translate-storage-local.min.js":"<KEY>}
json
Kaappaan Movie Review: Racy & Entertaining Despite Mediocre Writing! KV Anand's knack to carve entertainers embellished with social messages is known to all. There were many reasons to get excited when we got to know that Kaappaan is on its way; a film that narrates the story of SPG commandos. With Suriya and Mohanlal in the lead star cast, it wouldn't be wrong to expect a strong film that would stand the test of time. Has Kaappaan lived up to the expectations? Read our take on the movie to get answers about this. Prime Minister Chandrakanth Verma's life is in danger with serious threats looming over his head. Enter Kathir, who is an SPG Commando, assigned to protect the PM. Will he be able to save the PM's life? Kaappaan revolves around this and more. Every film of KV Anand's, proves why he is one of the most vigilant and socially-committed filmmakers around. The minute nuances and detailing in Kaappaan do talk about the extensive research that he has done for this movie. Be it the life of SPG commandos or some of the core social issues addressed in the film; he has tried to delve into each matter convincingly. It is interesting to see how Suriya's character has been developed in the initial phases of the film and that too in a parallel narrative. The chemistry between PM and Kathir also has been tracked pretty well, which is essential for the narrative. In the first half, the proceedings are interesting even though the romantic track between Suriya And Sayyesha looked entirely out of context and jaded. We have too many characters in the film over which the suspense factor revolves and such a placing has helped in increasing curiosity. But, some of the characters have been added just for the sake of it. However, in the second half of the film, where the film's narrative takes a sharp turn after the interval, the writer in KV Anand, tries to infuse a whole lot of elements, including too many social issues, which is beyond the scope of the film. Too much of information does spoil the proceedings of the film, which affects the runtime of the movie as such. Interestingly, KV Anand, the director, overcomes the writing flaws, up to an extent. KV Anand manages to strike a balance by infusing those solid action sequences. He has packaged the film in a racy manner, which doesn't allow the audiences to think much and thus skates away from the logical questions. He has also enveloped the twists in store in an exciting manner, even though one would feel that they were pretty predictable on second thoughts. Suriya looks stylish, sophisticated, and super confident as the lead character, who is on a mission. It is a multi-layered role, and the ever-dependable actor makes a considerable mark. It is always a treat to see this man in well-choreographed action sequences, and Kaappaan has many such sequences. Mohanlal steals the show with his portrayal as PM Chandrakanth Verma. He makes a massive impact even with minute expressions. Watch out for his performance in the conference sequence; it is subtle yet impactful. Arya looks suitable in his role, but it was pretty disappointing to see his character left somewhat half-baked. Similar is the case of Sayyesha, whose character had the scope for more but was left underdeveloped in due course. Boman Irani is solid, but one needs to say that his lip-sync was pretty disappointing. Samuthirakkani too has come up with a reliable performance. Kaappaan scores high marks as far as technical aspects are concerned. The action sequences have been executed to perfection, and even the CG works in them looked convincing. Cinematography is solid and racy in most parts. Songs set to tune by Harris Jayaraj are average. Meanwhile, it was surprising to see the BGM not crossing the median. Editing could have been a lot better, especially in the second half of the film. Kaappaan is an entertaining affair, but it is not something that is beyond the predictable lines. However, KV Anand has managed to make it a safe bet, despite the flaws in the writing.
english
Power and technology distribution firm reported a net profit of Rs 52.78 crore for the quarter compared with Rs 36.12 crore in the same quarter last year. The company reported its fourth quarter results post market hours on Monday. Following the announcement, the scrip rose 8.87 per cent to hit a 52-week-high of Rs 214 on BSE. However, during the day it lost some ground to close 4.32% higher, at Rs 205.05. "Our profit was higher than sales, partly due to the Rs 16.37 crore income from forward contracts in this quarter attributed to better profitability," PTI reported Director Sharan Bansal as saying. During the quarter, the company’s sales rose 8 per cent to Rs 564.66 crore, compared with last year's Rs 522.73 crore. The company announced said its engineering and infrastructure business bagged fresh orders worth Rs. 500.21 crore and added presence in two more countries Bostwana and Philipenes, apart from the 20 countries it is already present in. Demonetisation had minor impact on the engineering products business and hoped to maintain topline growth of minimum 15 per cent in the current fiscal said Bansal in a note to PTI. Download The Economic Times News App to get Daily Market Updates & Live Business News. Subscribe to The Economic Times Prime and read the Economic Times ePaper Online.and Sensex Today.
english
<reponame>mohiit1502/bookstore-angular<filename>store-front/src/app/components/hours/hours.component.ts import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-hours', templateUrl: './hours.component.html', styleUrls: ['./hours.component.css'] }) export class HoursComponent implements OnInit { constructor() { } ngOnInit() { } }
typescript
Honorable Chief Minister of Jharkhand, Shri Raghubar Das, inaugurated the mobile bill payment app for Jharkhand Bijli Vitran Nigam Limited (JBVNL), which is powered by Next Gen Digital Payments Platform developed by TechProcess Payment Services Ltd, India’s leading electronic payments platform. The citizens of Jharkhand will now be able to pay for utility services conveniently on the Jharkhand Bijli Vitran Nigam Limited mobile app compatible with Android operating system. The Next Generation Digital Payments Platform enables payment gateway services that accept debit and credit cards along with internet banking services. The platform provides a real time response for all requests on payment gateway of mobile app.
english
Of late, Chris Gayle has become a most consistent batsman for Windies in the limited overs setup. He found his touch when it mattered the most by smashing the opposition bowlers to all corners of the park. The flamboyant batsman is confident of making things fall in place for his side during the upcoming ICC World Cup 2019. The upcoming ICC World Cup 2019 set to watch quite a few legendary players calling curtains on their International career. One of them would be Chris Gayle, who recently confirmed that he is not going to don Windies Jersey in ODI format after the completion of ICC World Cup 2019. The swashbuckling batsman quoted that the youngsters are trying to get into his head. However, Gayle isn’t worried about that as he knew that youngsters are aware of what he is capable of doing on the field. Further, he went on to add saying that the fast bowlers would fear of him while delivering in the middle. Chris Gayle also challenged the reporter asking them to give a question to youngsters. He stated that those players will not confess on the camera but of the camera, they would surely do. The stylish southpaw quoted that those challenges with the bowlers will push him to go hard in the middle. Chris Gayle wants to take them as the pick-me-up thing. Gayle feels that he is in a good nick ahead of the tournament and wants to focus on his fitness. Chris Gayle holds the record for most centuries by a West Indian in ODIs, with 25, as well as the highest score of 215, which he scored in the last edition of the ICC Cricket World Cup in 2015 against Zimbabwe. Gayle is also handy with the ball, picking up 165 wickets.
english
{"title": "Resource-Constrained Scheduling for Maritime Traffic Management.", "fields": ["scheduling", "distributed computing", "computer science", "artificial intelligence", "machine learning"], "abstract": null, "citation": "Not cited", "departments": ["Singapore Management University", "Singapore Management University", "Singapore Management University"], "authors": ["<NAME>.....http://dblp.org/pers/hd/a/Agussurja:Lucas", "<NAME>.....http://dblp.org/pers/hd/k/Kumar:Akshat", "<NAME>.....http://dblp.org/pers/hd/l/Lau:Hoong_Chuin"], "conf": "aaai", "year": "2018", "pages": 8}
json
3305 Written Answers NAVAL BASE AT MURMAGAO SHRI MEENA: Will the Minister of DEFENCE be pleased to state the stage at which the proposal to set up a Naval Base at Murmagao stands at present ? THE MINISTER OF DEFENCE (SHRI SWARAN SINGH): Development of naval facilities in the Murmagao port forms part of the integrated development of the port for naval as well as other purposes. This matter is receiving the attention of Government in the Ministries of Defence and Transport. FUNDS FOR DEVELOPMENT OF BORDER 4734. SHRI RAMACHANDRA Will the Minister of DEFENCE be pleased to state the amount set apart for the development of border in the Eastern and other border areas of the country during the current year? THE MINISTER OF DEFENCE (SHRI SWARAN SINGH): The amount earmarked for allotment under 'Capital Outlay' for the development of border roads in the Eastern and other borders of the country included in the programme of Border Roads Development Board during the current financial year is Rs. 45.52 ATTACK ON INDIAN TROOPS BY CHINESE TROOPS AT NATHULA Will the Minister of DEFENCE be pleased to state: (a) whether the Chinese troops attached Indian troops recently near Nathula; and (b) if so, the action taken by Government thereon ? THE MINISTER OF DEFENCE (SHRI SWARAN SINGH): (a) No, Sir. (b) Does not arise. Written Answers 3305 SAMACHAR BHARATI AND HINDUSTAN 4736. SHRI S. C SAMANTA: Will the Minister of INFORMATION AND BROADCASTING be pleased to state : news agencies entitled the "Samachar Bharati" and "Hindustan Samachar" have made any significant progress in their work; (b) what financial assistance Government have given to these agencies up-to-date; and (c) what are the reasons that the "Samachar Bharati" has not convened any general meeting of its shareholders nor presented its annual accounts for more than last two years? THE MINISTER OF INFORMATION AND BROADCASTING (SHRI K. K. SHAH): (a) Samachar Bharati a multi-lingual News Agency which commenced its operation early in 1967 is so far catering in Hindi, Marathi and Gujarati languages. It has plans to set up a Dev Nagari network all over the country which are likely to materialise with the availability of Dev Nagari teleprinters. The Hindustan Samachar which is purveying news in Hindi, English and eight othe Indian languages has a wide spread organisation located at all state capitals and important cities most of which are linked with teleprinter circuits. It has introduced a 'feature service' with effect from January this year and there has been an increase in number of subscribers to its service. (b) Government have so far given a loan of Rs. 75,000 to the Samachar Bharati. No financial assistance has been given to the Hindustan Samachar so far. A request for Government loan is under consideration. The All India Radio have also decided to purchase both their services. (c) It has been ascertained from Samachar Bharati that the annual meeting was held on 31st July, 1968 in which accounts were presented. SETTING UP OF INDUSTRIAL UNDERTAKINGS IN DROUGHT HIT AREAS OF U.P. AND BIHAR 4737. SHRI GADILINGANA GOWD: Will the PRIME MINISTER be pleased to state: (a) whether any proposals for setting up industrial undertakings during Written Answers SRAVANA 30, 1890 (SAKA) Written Answers 3308 the Fourth Five Year Plan period in the drought-hit areas of Uttar Pradesh and Bihar are under consideration of Government with a view to remove unemployment; (b) if so, the details thereof, Statewise and the outlay estimated for the same; and (c) the number of persons likely to be employed in such undertakings? THE PRIME MINISTER, MINISTER OF ATOMIC ENERGY, MINISTER OF PLANNING AND MINISTER OF EXTERNAL AFFAIRS (SHRIMATI INDIRA GANDHI): (a) to (c). The Fourth Five Year Plan is still under preparation and the industrial development programmes proposed to be incorporated in the Fourth Plan have not yet been finalised. ATLASES PUBLISHED BY VARIOUS COUNTRIES 4738. SHRI GADILINGANA GOWD: Will the Minister of EXTERNAL AFFAIRS be pleased to state: (a) whether Government are aware that the various countries have published their Atlases showing large portion of the Indian territory into the hands of Pakistan and China; (b) if so, the names of those countries with details thereof; and (c) the action taken by Government in the matter? THE PRIME MINISTER, MINISTER OF ATOMIC ENERGY, MINISTER OF PLANNING AND MINISTER OF EXTERNAL AFFAIRS (SHRIMATI INDIRA GANDHI): (a) Yes, Sir. (b) Some of such atlases that have come to our notice have been published in the U.K., U.S.A., West Germany, Australia, Sweden, Hong Kong, Brazil, Rumania, Hungary, the U.S.S.R., Poland and Czechoslovakia, etc. In some of these atlases. (i) Kashmir has been shown as a separate entity from both India and Pakistan with its boundaries marked either by international boundary symbol or by other symbols, in some cases it has even been shown as a part of Pakistan or as a part of India. In some other cases the Cease-fire Line has been shown as international boundary between India and Pakistan. (ii) Parts of North Eastern Fronteir Agency and Ladakh region of Kashmir have either been depicted as disputed territories or territories clamied by China. In some cases these parts have been partly or wholly included in China. (c) The Government of India has taken up the matter with both the Foreign Governments concerned and the unofficial agencies. In the past some of them have agreed to make necessary corrections while replies from others are awaited. In the case of those publishers who do not agree to make the necessary corrections, necessary action is taken under our laws. EXPLOSIONS IN DEFENCE 4739. SHRI GADILINGANA GOWD: Will the Minister of DEFENCE be pleased to state: (a) the number of explosions which occurred in the various Defence factories/laboratories during the last 5 years factory/laboratory wise; (b) the reasons for explosion in each case; (c) the details of losses sustained; and (d) the measures adopted to minimise such occurrences ? THE MINISTER OF STATE IN THE MINISTRY OF DEFENCE (SHRI L. N. MISHRA): (a) to (d). The information is being collected and will be laid on the Table of the House as soon as possible. MALTREATMENT OF RESIDENTS IN HAJI PIR AREA BY PAKISTAN 4740. SHRI M. L. SONDHI : Will the Minister of EXTERNAL AFFAIRS be pleased to state: (a) whether Government are aware of the protests made by the residents 3309 Written Answers in the Haji Pir area against maltreatment by Pakistan authorities; (b) whether at the time of withdrawal of Indian troops from Haji Pir area under the Tashkent Agreement, any assurances were received by India from the Soviet Union or from Pakistan in regard to treatment to be meted but to the residents in that area; and (c) whether Government propose to offer some relief to the residents of Haji Pir area on humanitarian ground through the International Red Cross ? THE PRIME MINISTER, MINISTER OF ATOMIC ENERGY, MINISTER OF PLANNING AND MINISTER OF EXTERNAL AFFAIRS (SHRMATI INDIRA GANDHI): (a) Government have seen press reports to this effect. (b) No, Sir. (c) No such proposal is under consideration. STATEMENT OF PRESIDENT AYUB KHAN ABOUT MUSLIMS IN INDIA 4741. SHRI M. L. SONDHI: Will the Minister of EXTERNAL AFFAIRS be pleased to state: (a) whether Government's attention has been drawn to a statement by President Ayub Khan of Pakistan in which he said "Since the time of Emperor Aurangzeb Muslims in India were ill-treated"; (b) whether Government regard this statement as a violation of the Tashkent spirit; and (c) if so, the steps taken by Government to present a correct picture of the treatment of Muslims in India? THE PRIME MINISTER, MINISTER OF ATOMIC ENERGY, MINISTER OF PLANNING AND MINISTER OF EXTERNAL AFFAIRS (SHRIMATI INDIRA GANDHI): (a) to (c). The Government have seen some press reports about a recent statement made by President Ayub Khan wherein he had alleged that the sufferings of the Indian Muslims are on the increase. Some other leaders of Pakistan well as its press have also made similar allegations. These charges have been refuted and the Government of Written Answers 3310 Pakistan have been told that the propaganda and the distorted stories about the communal situation in India, carried on by the leaders and the news media of Pakistan are in violation of the Nehru-Liaquat Pact as well as the Tashkent Declaration. The Government have also taken adequate steps through our Missions abroad to counter the Pakistani propaganda. INQUIRY AGAINST PRINCIPAL, FILM INSTITUTE OF INDIA 4742. SHRI GEORGE FERNANDES: Will the Minister of INFORMATION AND BROADCASTING be pleased to state: (a) whether Government's attention has been drawn to the judgment of the Judicial Magistrate of Poona in Criminal Case No. 493 of 1965 delivered on the 8th November, 1965 in which the learned Magistrate has suggested that the Government should make an enquiry into the activities of the Principal of the Film Institute of India at Poona; (b) if so, the circumstances in which these comments were made and what Government have done in the matter; (c) if the enquiry has not so far been instituted, the reasons therefor? THE MINISTER OF INFORMATION AND BROADCASTING (SHRI K. K. SHAH): (a) to (c). It is true that the learned Magistrate in criminal case No. 493 of 1965 has passed the remarks that 'this case deserves that full enquiry should be made and pursued in the matter'. The judgment also inter alia stated that the letters involve not only the writer of the letter but also the accused himsef and also the Government itself. It was ordered that the letters be handed over to the Police Officer Deccan Gymkhana Police Station with a direction to make a full and thorough enquiry in the matter and, if necessary, to get necessary sanction from the Government'. The direction was that Police should enquire and not this Ministry. When the case went before the Additional Sessions Judge the Judge, while dismissing the revision application, remarked that even apart from
english
<reponame>valentina2095/nanopore-sp-id<gh_stars>0 #! /usr/bin/env python3 import os import os.path import sys from Bio import Entrez from Bio import SeqIO import datetime import time import glob import argparse parser = argparse.ArgumentParser(description='download specific database from\ GenBank.', formatter_class=(argparse .ArgumentDefaultsHelpFormatter)) parser.add_argument('email', metavar='<EMAIL>', type=str, help='email\ for NCBI Entrez tools') parser.add_argument('--org', metavar='ORGANISM', type=str, help='add organism\ scientific name, Genbank common name or Taxonomy ID. (e.g.\ Rodentia, 9989)') parser.add_argument('--strain', type=str, help='add the\ strain to search for. (e.g. HUSEC2011)') parser.add_argument('--start', type=int, help='starting point for esearch.', default=0) args = parser.parse_args() Entrez.email = args.email organism = args.org strain = args.strain keywords = '' search_phrase = '' if ',' in keywords: keywords = keywords.split(',') ncbi_terms = ['[organism:exp]', '[strain]', '[keyword]'] ncbi_values = [organism, strain, keywords] for index, n in enumerate(ncbi_values): if index == 0 and n != '': search_phrase = '(' + n + ncbi_terms[index] + ')' else: if n != '' and index != len(ncbi_values)-1: search_phrase = search_phrase + ' AND (' + n + ncbi_terms[index] + \ ')' if index == len(ncbi_values)-1 and n != '' and type(n) is not list: search_phrase = search_phrase + ' AND (' + n + ncbi_terms[index] + ')' if index == len(ncbi_values)-1 and n != '' and type(n) is list: for name in n: name = name.lstrip() search_phrase = search_phrase + ' AND (' + name + ncbi_terms[index]\ + ')' print('\n Here is the complete search line that will be used: \n', search_phrase) unprocessed = [] rstart = args.start rmax = 2000 for i in range(5): handle = Entrez.esearch(db='nuccore', term=search_phrase, retstart = rstart+i*rmax, retmax=rmax, rettype='gbwithparts', retmode="text",idtype="acc") print('\nThe esearch is complete') result = Entrez.read(handle, validate=False) handle.close() acc_numbers = result['IdList'] new_path = 'Genbank_Rodentia_casa/' if not os.path.exists(new_path): os.makedirs(new_path) else: previous = os.listdir(new_path) start_day = datetime.date.today().weekday() # 0 is Monday, 6 is Sunday start_time = datetime.datetime.now().time() if ((start_day < 5 and start_time > datetime.time(hour=21)) or (start_day < 5 and start_time < datetime.time(hour=5)) or start_day >= 5 or len(acc_numbers) <= 100 ): print('\nCalling Entrez...') auxiliar = 1 for acc in acc_numbers: if ((datetime.date.today().weekday() < 5 and datetime.datetime.now().time() > datetime.time(hour=21)) or (datetime.date.today().weekday() < 5 and datetime.datetime.now().time() < datetime.time(hour=5)) or (datetime.date.today().weekday() == start_day + 1 and datetime.datetime.now().time() < datetime.time(hour=5)) or (datetime.date.today().weekday() >= 5) or len(acc_numbers) <= 100) and (not acc in previous): print('Downloading file %s of %s (%s' %(auxiliar, len(acc_numbers), 100*auxiliar/len(acc_numbers)) + '%)') try: handle=Entrez.efetch(db='nuccore', rettype='gbwithparts', retmode='text', id=acc) FILENAME = new_path + acc + '.fna' local_file=open(FILENAME,'w') SeqIO.write(SeqIO.parse(handle, 'genbank'), local_file, "fasta") handle.close() local_file.close() auxiliar += 1 except: unprocessed.append(acc) else: print('\nYou have too many files to download at the time. Try again later.') print('The last accession we were able to download was %s, corresponding to %s of nuccore' %(acc, rstart+auxiliar)) print('unprocessed files:', unprocessed)
python
use crate::config::KubeConfig; use crate::errors::KubernetesError; use base64; use chrono::DateTime; use chrono::DateTime; use http::StatusCode; use isahc::{ config::CaCertificate, config::ClientCertificate, config::Configurable, config::PrivateKey, config::SslOption, Body, HttpClient, Request, }; use k8s_openapi::{api::core::v1 as api, ResponseBody}; use std::env; use std::env; use std::fs; use std::{io::Read, io::Write}; use tempfile::NamedTempFile; #[derive(Debug)] pub struct Kubernetes { pub kubeconfig: Result<KubeConfig, KubernetesError>, pub http_client: HttpClient, pub base_uri: String, } impl Kubernetes { pub fn connect( kubeconfig_path: Option<String>, scheme: Option<String>, host: Option<String>, port: Option<u32>, search_uri: bool, ) -> Result<Kubernetes, KubernetesError> { let kubeconfig = KubeConfig::load(kubeconfig_path); let token_file = "/var/run/secrets/kubernetes.io/serviceaccount/token"; let http_client; if std::path::Path::new(token_file).exists() { let service_account_token = fs::read_to_string(token_file) .map_err(|err| KubernetesError::IoError { source: err })?; let http_client_builder = HttpClient::builder() .default_header("Authorization", format!("Bearer {}", service_account_token)) .ssl_ca_certificate(CaCertificate::file( "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt", )) .ssl_options(SslOption::DANGER_ACCEPT_INVALID_CERTS); http_client = match http_client_builder.build() { Ok(client) => client, Err(err) => { return Err(KubernetesError::HttpClientBuildError { message: format!( "Failed to initialize http client with service account token: {}", err ), }) } }; } else if let Ok(conf) = &kubeconfig { //TODO add options, guessed from config if let Some(cluster) = conf.clusters.first() { if let Some(auth_info) = conf.auth_infos.first() { let user = &auth_info.auth_info; if let Some(crt) = &user.client_certificate_data { if let Some(ca) = &cluster.cluster.certificate_authority_data { if let Some(key) = &user.client_key_data { let mut tmpfile = NamedTempFile::new() .map_err(|err| KubernetesError::IoError { source: err })?; writeln!(tmpfile, "{}", ca) .map_err(|err| KubernetesError::IoError { source: err })?; let http_client_builder = HttpClient::builder() .ssl_client_certificate(ClientCertificate::pem( base64::decode(crt).map_err(|err| { KubernetesError::Base64DecodeError { source: err } })?, PrivateKey::pem( base64::decode(key).map_err(|err| { KubernetesError::Base64DecodeError { source: err } })?, None, ), )) .ssl_ca_certificate(CaCertificate::file( tmpfile.into_temp_path().to_path_buf(), )) .ssl_options(SslOption::DANGER_ACCEPT_INVALID_CERTS); http_client = match http_client_builder.build() { Ok(client) => client, Err(err) => return Err(KubernetesError::HttpClientBuildError { message: format!("Failed to initialize http client with client certificate: {}", err) }) }; } else { return Err(KubernetesError::HttpClientBuildError { message: String::from( "Couldn't get client key from kubeconfig.", ), }); } } else { return Err(KubernetesError::HttpClientBuildError { message: String::from( "Couldn't get CA certificate from kubeconfig.", ), }); } } else { return Err(KubernetesError::HttpClientBuildError { message: String::from("Couldn't get client private key."), }); } } else { return Err(KubernetesError::HttpClientBuildError { message: String::from("No auth_info item found in kubeconfig."), }); } } else { return Err(KubernetesError::ConfigLoadError); } } else { return Err(KubernetesError::HttpClientBuildError { message: String::from("Couldn't gather kubeconfig content."), }); } let scheme_part; let host_part; let port_part; if search_uri { if let Ok(host_var) = env::var("KUBERNETES_SERVICE_HOST") { host_part = host_var; } else { host_part = host.unwrap_or(String::from("localhost")); } if let Ok(port_var) = env::var("KUBERNETES_SERVICE_PORT") { port_part = port_var; scheme_part = match port_part.as_str() { "443" => String::from("https"), "80" => String::from("http"), _ => String::from("https"), } } else { scheme_part = String::from("https"); port_part = port.unwrap_or(6443).to_string(); } } else { scheme_part = scheme.unwrap_or(String::from("https")); host_part = host.unwrap_or(String::from("localhost")); port_part = port.unwrap_or(6443).to_string(); } let base_uri = format!("{}://{}:{}", scheme_part, host_part, port_part); Ok(Kubernetes { kubeconfig, http_client, base_uri, }) } fn request<T>( &self, request: Request<Vec<u8>>, response_body: fn(StatusCode) -> ResponseBody<T>, ) -> Result<(Body, ResponseBody<T>), KubernetesError> { let (parts, body) = request.into_parts(); let uri_str = format!("{}{}", self.base_uri, parts.uri); let request = Request::builder().uri(uri_str).body(body).map_err(|err| { KubernetesError::HttpClientBuildError { message: format!("Couldn't build request. Error: {:?}", err), } })?; let response = self .http_client .send(request) .map_err(|_| KubernetesError::HttpClientRequestError)?; let status_code = response.status(); if !status_code.is_success() { return Err(KubernetesError::HttpClientRequestError); } let response_body = response_body(status_code); let body = response.into_body(); Ok((body, response_body)) } pub fn get_events(&self, since: Option<String>) -> Result<Vec<api::Event>, KubernetesError> { let (request, response_body) = match api::Event::list_event_for_all_namespaces(Default::default()) { Ok((request, response_body)) => (request, response_body), Err(err) => return Err(KubernetesError::ApiRequestError { source: err }), }; let (mut body, mut response_body) = self.request(request, response_body)?; let mut buf = Box::new([0u8; 4096]); let events_list_raw = loop { let read = body.read(&mut *buf).map_err(|err| { KubernetesError::HttpClientParseResponseError { message: format!("Got error: {}", err), } })?; response_body.append_slice(&buf[..read]); let response = response_body.parse(); match response { Ok(k8s_openapi::ListResponse::Ok(events_list)) => break events_list, Ok(other) => { return Err(KubernetesError::HttpClientParseResponseError { message: format!("expected Ok but got {:?}", other), }) } Err(k8s_openapi::ResponseError::NeedMoreData) => continue, Err(err) => { return Err(KubernetesError::HttpClientParseResponseError { message: format!("error: {:?}", err), }) } } }; let events = events_list_raw.items; let mut since_datetime = None; if let Some(since) = since { since_datetime = Some( DateTime::parse_from_rfc3339(&since) .map_err(|source| KubernetesError::WrongDatetimeFormat { source })?, ); } Ok(events .into_iter() .filter(move |e| match &e.event_time { Some(time) => { if let Some(since_dt) = since_datetime { if time.0.ge(&since_dt) { return true; } else { return false; } } else { return true; } } None => false, }) .collect()) } pub fn list_pods(&self, namespace: String) -> Result<Vec<api::Pod>, KubernetesError> { let (request, response_body) = match api::Pod::list_namespaced_pod(&namespace, Default::default()) { Ok((request, response_body)) => (request, response_body), Err(err) => return Err(KubernetesError::ApiRequestError { source: err }), }; let (parts, body) = request.into_parts(); let uri_str = format!("{}{}", self.base_uri, parts.uri); let request = Request::builder().uri(uri_str).body(body).map_err(|err| { KubernetesError::HttpClientBuildError { message: format!("Couldn't build request. Error: {:?}", err), } })?; let response = self .http_client .send(request) .map_err(|_| KubernetesError::HttpClientRequestError)?; let status_code = response.status(); if !status_code.is_success() { return Err(KubernetesError::HttpClientRequestError); } let mut response_body = response_body(status_code); let mut buf = Box::new([0u8; 4096]); let mut body = response.into_body(); let pods_list_raw = loop { let read = body.read(&mut *buf).map_err(|err| { KubernetesError::HttpClientParseResponseError { message: format!("Got error : {}", err), } })?; response_body.append_slice(&buf[..read]); let response = response_body.parse(); match response { Ok(k8s_openapi::ListResponse::Ok(pod_list)) => break pod_list, Ok(other) => { return Err(KubernetesError::HttpClientParseResponseError { message: format!("expected Ok but got {} {:?}", status_code, other), }) } Err(k8s_openapi::ResponseError::NeedMoreData) => continue, Err(err) => { return Err(KubernetesError::HttpClientParseResponseError { message: format!("error: {} {:?}", status_code, err), }) } } }; Ok(pods_list_raw.items) } }
rust
<reponame>bbqsrc/pathos use crate::Error; use std::env::{split_paths, var_os}; use std::path::PathBuf; #[inline(always)] pub fn home_dir() -> Result<PathBuf, Error> { #[allow(deprecated)] std::env::home_dir().ok_or_else(|| Error::NotFound("Home")) } #[inline(always)] pub fn data_home() -> Result<PathBuf, Error> { let value = var_os("XDG_DATA_HOME") .map(|x| PathBuf::from(x)) .filter(|x| x.is_absolute()); match value { Some(v) => Ok(v), None => home_dir().map(|x| x.join(".local/share")), } } #[inline(always)] pub fn config_home() -> Result<PathBuf, Error> { let value = var_os("XDG_CONFIG_HOME") .map(|x| PathBuf::from(x)) .filter(|x| x.is_absolute()); match value { Some(v) => Ok(v), None => home_dir().map(|x| x.join(".config")), } } #[inline(always)] pub fn data_dirs() -> Vec<PathBuf> { var_os("XDG_DATA_DIRS") .map(|x| split_paths(&x).filter(|x| x.is_absolute()).collect()) .unwrap_or_else(|| { vec![ PathBuf::from("/usr/local/share/"), PathBuf::from("/usr/share/"), ] }) } #[inline(always)] pub fn config_dirs() -> Vec<PathBuf> { var_os("XDG_CONFIG_DIRS") .map(|x| split_paths(&x).filter(|x| x.is_absolute()).collect()) .unwrap_or_else(|| vec![PathBuf::from("/etc/xdg/")]) } #[inline(always)] pub fn cache_home() -> Result<PathBuf, Error> { let value = var_os("XDG_CACHE_HOME") .map(|x| PathBuf::from(x)) .filter(|x| x.is_absolute()); match value { Some(v) => Ok(v), None => home_dir().map(|x| x.join(".cache")), } } #[cfg(unix)] #[derive(Debug, Clone, thiserror::Error)] pub enum RuntimeDirError { #[error("XDG_RUNTIME_DIR environment variable is not defined.")] Undefined, #[error("Could not resolve metadata for XDG_RUNTIME_DIR.")] Metadata(#[from] eieio::Error), #[error("Invalid ownership. Requires ownership by {}, got: {0}.")] InvalidOwnership(u32, u32), #[error("Invalid access mode. Requires 0700, got {0:o}.")] InvalidAccessMode(u32), } #[cfg(unix)] #[inline(always)] pub fn runtime_dir() -> Result<PathBuf, RuntimeDirError> { let dir = var_os("XDG_RUNTIME_DIR") .map(|x| PathBuf::from(x)) .filter(|x| x.is_absolute()) .ok_or_else(|| RuntimeDirError::Undefined)?; use std::os::unix::fs::MetadataExt; let meta = std::fs::metadata(&dir).map_err(eieio::Error::from)?; let uid = unsafe { libc::getuid() }; if meta.uid() != uid { return Err(RuntimeDirError::InvalidOwnership(uid, meta.uid())); } if meta.mode() != 0o700 { return Err(RuntimeDirError::InvalidAccessMode(meta.mode())); } Ok(dir) } // #[inline] // pub fn app_data_dir<P: AsRef<Path>>(prefix: P) -> Result<PathBuf, Error> { // data_home().map(|x| x.join(prefix.as_ref())) // } // #[inline] // pub fn app_config_dir<P: AsRef<Path>>(prefix: P) -> Result<PathBuf, Error> { // config_home().map(|x| x.join(prefix.as_ref())) // } // #[inline] // pub fn app_log_dir<P: AsRef<Path>>(prefix: P) -> Result<PathBuf, Error> { // data_home().map(|x| x.join(prefix.as_ref()).join("log")) // } // #[inline] // pub fn app_cache_dir<P: AsRef<Path>>(prefix: P) -> Result<PathBuf, Error> { // cache_home().map(|x| x.join(prefix.as_ref())) // } // #[inline] // pub fn app_temporary_dir<P: AsRef<Path>>(prefix: P) -> Result<PathBuf, Error> { // cache_home().map(|x| x.join(prefix.as_ref()).join("tmp")) // }
rust
Barcelona new boy Pablo Torre does not wish to play in the third division and could be loaned out to his former club Racing Santander, according to Ara’s Sergi Escudero. The Blaugrana signed Torre for €5 million from Santander in July this year, registering him as a Barca Atletic player. However, the total transfer fee could climb to €20 million if the 19-year-old meets some targets with the first team. He was included in Xavi’s squad for the pre-season tour of the United States but rarely played. With competition for places fierce in the middle of the park at the Camp Nou, Torre’s fate is unlikely to improve in the coming days. According to the aforementioned report, Torre could play for Barca Atletic, who play in the third division of Spanish football. The player, however, is not open to the arrangement, as he does not see himself dropping down to the third division. So, a loan transfer is seemingly the only option at this point, with the young midfielder valueing a return to his old club. The Blaugrana have reportedly not had a conversation with the player about his future, as the club are still monitoring the developments in the first team. However, they are aware of Torre’s reluctance to play in the third division as they mull an acceptable solution to all parties. The teenager recorded ten goals and 11 assists in 34 games for Santander last season. He has signed a four-year contract with Barcelona this summer. Xavi’s Barcelona kicked off their 2022-23 La Liga campaign with a home game against Rayo Vallecano on Saturday (August 14). The Blaugrana were suffocated by their visitors as the game ended goalless. Robert Lewandowski made his competitive debut for his new club at the Camp Nou as he got his first taste of Spanish football. The Poland international had five shots, only one of which was on target, missed a big chance, and lost possession 13 times. He played the entire game but didn't produce anything to write home about.
english
{ "layout-false":{ "layout": false }, "layout-false-alt.json":{ "layout": false } }
json
<gh_stars>100-1000 import pickle import inflect p = inflect.engine() words = set(['first','second','third','fourth','fifth','sixth','seventh','eighth','ninth','tenth','eleventh','twelfth','thirteenth','fourteenth','fifteenth', 'sixteenth','seventeenth','eighteenth','nineteenth','twentieth','twenty-first','twenty-second','twenty-third','twenty-fourth','twenty-fifth']) pickle.dump(words, open("../data/constants/word_ordinals.p", "wb"))
python
For instance, not only do organisations need to put in place a clear privacy policy to be provided to anyone it holds data on, but they also need to be able to provide them with a copy of their personal data in a format that can be easily electronically transmitted. Organisations will also need the capability to delete all customer data on request under the 'right to be forgotten'. This part of the regulation is already influencing the behavior of search and social companies, such as Google and Facebook, as they prepare for GDPR. TRP Are organisations prepared for the roll-out? LT It seems that few are indeed ready. According to a recent Ipswitch survey of 316 European organisations, more than half (56 percent) of respondents could not accurately identify what 'GDPR' means. Over half of respondents (52%) admitted they were not ready for GDPR, and over a third (35%) confessed to not knowing whether their IT policies and process were up to the job. Only 14 percent of respondents could correctly identify that the GDPR is due to come into effect in late 2014/early 2015. Despite the lack of awareness of regulatory change, when asked about priorities for 2015, only 13 percent said they planned to spend more time understanding and preparing for regulation. A quarter (26%) said they wanted to spend more time reviewing and tightening security policies and a further quarter (26%) said they wanted to be able to spend less time on manual reporting and auditing. In addition to testing the readiness of IT professionals, the survey also revealed that very little thought has been given to whether an organisation's Cloud Service Provider (CSP) is ready for the change. Although 79 percent of those surveyed retained the services of a CSP, only six percent of them said that they had thought to ask them whether they were ready for the GDPR. TRP What can organisations do to ensure they meet these new regulations? LT GDPR includes an obligation to protect personal data across the borderless enterprise. IT professionals should review and bolster their data processing policies and practices now, before the regulation comes into effect. There are practical steps that can be taken now to ensure that policies, procedures and technologies run by organisations are up to the job of complying with the GDPR. Contracts with data processors and Cloud Service Providers need to be reviewed. Set out to know exactly where your cloud data is hosted and understand how it is backed up and encrypted. Begin to set up procedures now to start securing explicit consent for the collection and processing of personal data. Once confident in their systems and procedures, organisations will be able to apply for an EU Data Protection Seal which will be a five year certification of their processes. - As VP of International Sales, Loic Triger is overlooking all activities related to sales in EMEA, APAC, and Latin America for Ipswitch File Transfer. Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
english
{"geometry": {"type": "Point", "coordinates": [-89.46, 46.03]}, "type": "Feature", "id": "54561", "properties": {"other_cities": "", "city": "Star Lake", "state": "WI", "county": "Vilas County"}}
json
var switchLanguageStringToES = function() { "use strict"; /* -------------------------------------------------- */ /* ERROR MESSAGES /* -------------------------------------------------- */ var errorNoscript = $("noscript"); var errorWindowTooSmall = $("#error-parent div"); $(errorNoscript).html("Si usted est&aacute; viendo este mensaje, que significa <span>JavaScript ha sido desactivado en su navegador</span>, por favor, habilite JS para continuar utilizando este sitio Web."); $(errorWindowTooSmall).html("Por favor, redimensione su ventana."); /* -------------------------------------------------- */ /* MODAL: LANGUAGE OPTIONS /* -------------------------------------------------- */ var lanuageOptionsModalHeader = $("#language-options div p:first-of-type"); // var lanuageOptionsModalText01 = $("#language-options div p:nth-of-type(2)"); // var lanuageOptionsModalText02 = $("#language-options div p:nth-of-type(3)"); /* var buttonLanguageDebug = $(".button-language-debug a"); var buttonLanguageClear = $(".button-language-clear a"); var buttonLanguageSkip = $(".button-language-skip a"); */ var buttonLanguageEN = $(".button-language-english a"); var buttonLanguageES = $(".button-language-spanish a"); $(lanuageOptionsModalHeader).html("Language / El Idioma"); // $(lanuageOptionsModalText01).html("Por favor seleccione su idioma. S&oacute;lo le pediremos una vez que configure su idioma preferido. Utilizamos cookies para guardar sus preferencias ling&uuml;&iacute;sticas y mejorar su experiencia. Al continuar hojeando este sitio usted acepta nuestro <a href='http://es.tdclasercenter.com/privacy-and-terms#cookies' target='_blank' class='text-accent text-primary-hover'>pol&iacute;tica</a> de uso de cookies."); /* $(buttonLanguageDebug).html("Debug"); $(buttonLanguageClear).html("Clear"); $(buttonLanguageSkip).html("Skip"); */ $(buttonLanguageEN).html("English"); $(buttonLanguageES).html("Espa&ntilde;ol"); /* -------------------------------------------------- */ /* NAVBAR: LEFT PANEL (MAIN MOBILE NAV) /* -------------------------------------------------- */ var buttonTheTDCProgram = $(".button-the-tdc-program a"); var buttonTreatments = $(".button-treatments a"); var buttonAppointments = $(".button-appointments a"); var buttonAbout = $(".button-about a"); var buttonOurOffices = $(".button-our-offices a"); $(buttonTheTDCProgram).html("the TDC Program"); $(buttonTreatments).html("Tratamientos Adicionales"); $(buttonAppointments).html("Cita"); $(buttonAbout).html("Acerca de"); $(buttonOurOffices).html("Nuestras Oficinas"); // $(buttonLanguageEN).html("English"); // $(buttonLanguageES).html("Espa&ntilde;ol"); /* -------------------------------------------------- */ /* PANEL: LEFT (MAIN MOBILE SUBNAV) /* -------------------------------------------------- */ var buttonTheDoctorIsIn = $(".button-the-doctor-is-in a"); var buttonAPioneerInTheMaking = $(".button-a-pioneer-in-the-making a"); var buttonOhForThatPerfectLook = $(".button-oh-for-that-perfect-look a"); var buttonWorldwideRecognition = $(".button-worldwide-recognition a"); var buttonAFamilyMan = $(".button-a-family-man a"); $(buttonTheDoctorIsIn).html("El m&eacute;dico est&aacute; en"); $(buttonAPioneerInTheMaking).html("Un pionero en el campo"); $(buttonOhForThatPerfectLook).html("Oh! Para esa mirada perfecta"); $(buttonWorldwideRecognition).html("Reconocimiento mundial"); $(buttonAFamilyMan).html("Un hombre de familia"); /* -------------------------------------------------- */ /* PANEL: RIGHT (LOCATIONS) /* -------------------------------------------------- */ var locationMexicoCityMex = $("#location-mex .accordion-item-content div ul li:nth-of-type(2) a"); var locationSanMarcosCA = $("#location-ca .accordion-item-content div ul li:nth-of-type(2) a"); $(locationMexicoCityMex).html("Cerrado <span class='padding-lr-xxs'>&bull;</span> Domingo<br>9am - 6pm <span class='padding-lr-xxs'>&bull;</span> Lunes - Viernes<br>10am - 5pm <span class='padding-lr-xxs'>&bull;<span> S&aacute;bado<br>"); $(locationSanMarcosCA).html("Cerrado <span class='padding-lr-xxs'>&bull;</span> Domingo<br>9am - 6pm <span class='padding-lr-xxs'>&bull;</span> Lunes - Viernes<br>10am - 5pm <span class='padding-lr-xxs'>&bull;<span> S&aacute;bado<br>"); /* -------------------------------------------------- */ /* DESKTOP: RIGHT /* -------------------------------------------------- */ var desktopRightButtonAppointments = $("#nav-desktop .navbar-inner nav ul.nav-right-items li.button-appointments a"); // $(desktopRightButtonAppointments).html("Appointments"); var desktopRightButtonAppointmentsAddIcon = function() { if (Modernizr.mq("(max-width: 767px)")) { // console.log("iPhone"); $("#nav-desktop div nav ul.nav-right-items").addClass("icon"); $(desktopRightButtonAppointments).html(""); } else { // console.log("Desktop"); $("#nav-desktop div nav ul.nav-right-items").removeClass("icon"); $(desktopRightButtonAppointments).html("Cita"); } }; $(window).resize(desktopRightButtonAppointmentsAddIcon); // Call once on initial load. desktopRightButtonAppointmentsAddIcon(); /* -------------------------------------------------- */ /* FOOTER /* -------------------------------------------------- */ var footerHeaderQuickLinks = $("#footer #footer-nav-items div:nth-of-type(1) div:nth-of-type(1)"); var footerHeaderNavigation = $("#footer #footer-nav-items div:nth-of-type(2) div:nth-of-type(1)"); var footerHeaderOurOffices = $("#footer #footer-nav-items div:nth-of-type(3) div:nth-of-type(1)"); var footerButtonBookAnAppointment = $("#footer #footer-nav-items div:nth-of-type(1) ul li:nth-of-type(1) a"); var buttonScrollToTop = $("#footer #footer-nav-items div:nth-of-type(1) ul li:nth-of-type(4) a"); var footerPrivacyAndTerms = $("#footer #footer-legal div:nth-of-type(2) ul li:nth-of-type(4) a"); $(footerHeaderQuickLinks).html("Enlaces del sitio"); $(footerHeaderNavigation).html("Navegaci&oacute;n"); $(footerHeaderOurOffices).html("Nuestras Oficinas"); $(footerButtonBookAnAppointment).html("Reserve una cita"); $(buttonScrollToTop).html("Volver al principio de la p&aacute;gina"); $(footerPrivacyAndTerms).html("Pol&iacute;tica de Privacidad"); /* -------------------------------------------------- */ /* TOOLBAR /* -------------------------------------------------- */ var toolbarButtonAppointments = $("#toolbar .toolbar-inner div:nth-of-type(1) a div"); var toolbarButtonPhone = $("#toolbar .toolbar-inner div:nth-of-type(2) a div"); var toolbarButtonLocations = $("#toolbar .toolbar-inner div:nth-of-type(3) a div"); $(toolbarButtonAppointments).html("Acerca de"); $(toolbarButtonPhone).html("Tel&eacute;fono"); $(toolbarButtonLocations).html("Ubicaci&oacute;n"); };
javascript
<filename>src/hooks/Tokens.ts import { ChainId, Currency, NATIVE, Token, WNATIVE, WNATIVE_ADDRESS, currencyEquals } from '@mistswapdex/sdk' import { NEVER_RELOAD, useSingleCallResult } from '../state/multicall/hooks' import { TokenAddressMap, useAllLists, useInactiveListUrls, useUnsupportedTokenList } from './../state/lists/hooks' import { useBytes32TokenContract, useTokenContract } from './useContract' import { WrappedTokenInfo } from './../state/lists/wrappedTokenInfo' import { arrayify } from '@ethersproject/bytes' import { createTokenFilterFunction } from '../functions/filtering' import { isAddress } from '../functions/validate' import { parseBytes32String } from '@ethersproject/strings' import { useActiveWeb3React } from './useActiveWeb3React' import { useCombinedActiveList } from '../state/lists/hooks' import { useMemo } from 'react' import { useUserAddedTokens } from '../state/user/hooks' // reduce token map into standard address <-> Token mapping, optionally include user added tokens function useTokensFromMap(tokenMap: TokenAddressMap, includeUserAdded: boolean): { [address: string]: Token } { const { chainId } = useActiveWeb3React() const userAddedTokens = useUserAddedTokens() return useMemo(() => { if (!chainId) return {} if (typeof tokenMap[chainId] === 'undefined') { return {}; } // reduce to just tokens const mapWithoutUrls = Object.keys(tokenMap[chainId]).reduce<{ [address: string]: Token }>((newMap, address) => { newMap[address] = tokenMap[chainId][address].token return newMap }, {}) if (includeUserAdded) { return ( userAddedTokens // reduce into all ALL_TOKENS filtered by the current chain .reduce<{ [address: string]: Token }>( (tokenMap, token) => { tokenMap[token.address] = token return tokenMap }, // must make a copy because reduce modifies the map, and we do not // want to make a copy in every iteration { ...mapWithoutUrls } ) ) } return mapWithoutUrls }, [chainId, userAddedTokens, tokenMap, includeUserAdded]) } export function useAllTokens(): { [address: string]: Token } { const allTokens = useCombinedActiveList() return useTokensFromMap(allTokens, true) } export function useTokens(): { [address: string]: Token } { const allTokens = useCombinedActiveList() return useTokensFromMap(allTokens, false) } export function useUnsupportedTokens(): { [address: string]: Token } { const unsupportedTokensMap = useUnsupportedTokenList() return useTokensFromMap(unsupportedTokensMap, false) } export function useSearchInactiveTokenLists(search: string | undefined, minResults = 10): WrappedTokenInfo[] { const lists = useAllLists() const inactiveUrls = useInactiveListUrls() const { chainId } = useActiveWeb3React() const activeTokens = useAllTokens() return useMemo(() => { if (!search || search.trim().length === 0) return [] const tokenFilter = createTokenFilterFunction(search) const result: WrappedTokenInfo[] = [] const addressSet: { [address: string]: true } = {} for (const url of inactiveUrls) { const list = lists[url].current if (!list) continue for (const tokenInfo of list.tokens) { if (tokenInfo.chainId === chainId && tokenFilter(tokenInfo)) { const wrapped = new WrappedTokenInfo(tokenInfo, list) if (!(wrapped.address in activeTokens) && !addressSet[wrapped.address]) { addressSet[wrapped.address] = true result.push(wrapped) if (result.length >= minResults) return result } } } } return result }, [activeTokens, chainId, inactiveUrls, lists, minResults, search]) } export function useIsTokenActive(token: Token | undefined | null): boolean { const activeTokens = useAllTokens() if (!activeTokens || !token) { return false } return !!activeTokens[token.address] } // Check if currency is included in custom list from user storage export function useIsUserAddedToken(currency: Currency | undefined | null): boolean { const userAddedTokens = useUserAddedTokens() if (!currency) { return false } return !!userAddedTokens.find((token) => currency.equals(token)) } // parse a name or symbol from a token response const BYTES32_REGEX = /^0x[a-fA-F0-9]{64}$/ function parseStringOrBytes32(str: string | undefined, bytes32: string | undefined, defaultValue: string): string { return str && str.length > 0 ? str : // need to check for proper bytes string and valid terminator bytes32 && BYTES32_REGEX.test(bytes32) && arrayify(bytes32)[31] === 0 ? parseBytes32String(bytes32) : defaultValue } // undefined if invalid or does not exist // null if loading // otherwise returns the token export function useToken(tokenAddress?: string): Token | undefined | null { const { chainId } = useActiveWeb3React() const tokens = useAllTokens() const address = isAddress(tokenAddress) const tokenContract = useTokenContract(address ? address : undefined, false) const tokenContractBytes32 = useBytes32TokenContract(address ? address : undefined, false) const token: Token | undefined = address ? tokens[address] : undefined const tokenName = useSingleCallResult(token ? undefined : tokenContract, 'name', undefined, NEVER_RELOAD) const tokenNameBytes32 = useSingleCallResult( token ? undefined : tokenContractBytes32, 'name', undefined, NEVER_RELOAD ) const symbol = useSingleCallResult(token ? undefined : tokenContract, 'symbol', undefined, NEVER_RELOAD) const symbolBytes32 = useSingleCallResult(token ? undefined : tokenContractBytes32, 'symbol', undefined, NEVER_RELOAD) const decimals = useSingleCallResult(token ? undefined : tokenContract, 'decimals', undefined, NEVER_RELOAD) return useMemo(() => { if (token) return token if (!chainId || !address) return undefined if (decimals.loading || symbol.loading || tokenName.loading) return null if (decimals.result) { return new Token( chainId, address, decimals.result[0], parseStringOrBytes32(symbol.result?.[0], symbolBytes32.result?.[0], 'UNKNOWN'), parseStringOrBytes32(tokenName.result?.[0], tokenNameBytes32.result?.[0], 'Unknown Token') ) } return undefined }, [ address, chainId, decimals.loading, decimals.result, symbol.loading, symbol.result, symbolBytes32.result, token, tokenName.loading, tokenName.result, tokenNameBytes32.result, ]) } export function useCurrency(currencyId: string | undefined): Currency | null | undefined { const { chainId } = useActiveWeb3React() const useNative = currencyId?.toUpperCase() === 'BCH' if (useNative) { currencyId = WNATIVE_ADDRESS[chainId] } const token = useToken(useNative ? undefined : currencyId) // const extendedEther = useMemo(() => (chainId ? ExtendedEther.onChain(chainId) : undefined), [chainId]) // const weth = chainId ? WBCH_EXTENDED[chainId] : undefined const native = useMemo(() => (chainId ? NATIVE[chainId] : undefined), [chainId]) if (useNative) return native; const wnative = chainId ? WNATIVE[chainId] : undefined if (wnative?.address?.toLowerCase() === currencyId?.toLowerCase()) return wnative return token }
typescript
<filename>node/src/signingidentity.test.ts /* * Copyright 2020 IBM All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 */ import { msp } from '@hyperledger/fabric-protos'; import { Identity } from './identity/identity'; import { Signer } from './identity/signer'; import { SigningIdentity } from './signingidentity'; describe('SigningIdentity', () => { let identity: Identity; beforeEach(() => { identity = { mspId: 'MSP_ID', credentials: Uint8Array.from(Buffer.from('CREDENTIALS')) }; }); describe('identity', () => { it('changes to returned identity do not modify signing identity', () => { const expectedMspId = identity.mspId; const expectedCredentials = Uint8Array.from(identity.credentials); // Copy const signingIdentity = new SigningIdentity({ identity }); const output = signingIdentity.getIdentity(); output.mspId = 'wrong'; output.credentials.fill(0); const actual = signingIdentity.getIdentity(); expect(actual.mspId).toBe(expectedMspId); const actualCredentials = Uint8Array.from(actual.credentials); // Ensure it's really a Uint8Array expect(actualCredentials).toEqual(expectedCredentials); }); it('changes to supplied identity do not modify signing identity', () => { const expectedMspId = identity.mspId; const expectedCredentials = Uint8Array.from(identity.credentials); // Copy const signingIdentity = new SigningIdentity({ identity }); identity.mspId = 'wrong'; identity.credentials.fill(0); const actual = signingIdentity.getIdentity(); expect(actual.mspId).toBe(expectedMspId); const actualCredentials = Uint8Array.from(actual.credentials); // Ensure it's really a Uint8Array expect(actualCredentials).toEqual(expectedCredentials); }); }); describe('creator', () => { it('returns a valid SerializedIdentity protobuf', () => { const signingIdentity = new SigningIdentity({ identity }); const creator = signingIdentity.getCreator(); const actual = msp.SerializedIdentity.deserializeBinary(creator); expect(actual.getMspid()).toBe(identity.mspId); const credentials = Uint8Array.from(actual.getIdBytes_asU8()); // Ensure it's really a Uint8Array expect(credentials).toEqual(identity.credentials); }); it('changes to returned creator do not modify signing identity', () => { const signingIdentity = new SigningIdentity({ identity }); const expected = Uint8Array.from(signingIdentity.getCreator()); // Ensure it's really a Uint8Array const creator = signingIdentity.getCreator(); creator.fill(0); const actual = Uint8Array.from(signingIdentity.getCreator()); // Ensure it's really a Uint8Array expect(actual).toEqual(expected); }); }); describe('signing', () => { it('default signer throws', async () => { const signingIdentity = new SigningIdentity({ identity }); const digest = Buffer.from('DIGEST'); await expect(signingIdentity.sign(digest)).rejects.toThrowError(); }); it('uses supplied signer', async () => { const expected = Uint8Array.from(Buffer.from('SIGNATURE')); const signer: Signer = async () => Promise.resolve(expected); const digest = Buffer.from('DIGEST'); const signingIdentity = new SigningIdentity({ identity, signer }); const actual = await signingIdentity.sign(digest); expect(actual).toEqual(expected); }); }); describe('hashing', () => { it('hashes of identical values are identical', () => { const message = Buffer.from('MESSAGE'); const signingIdentity = new SigningIdentity({ identity }); const first = signingIdentity.hash(message); const second = signingIdentity.hash(message); expect(first).toEqual(second); }); it('hashes of different values are different', () => { const message1 = Buffer.from('FOO'); const message2 = Buffer.from('BAR'); const signingIdentity = new SigningIdentity({ identity }); const first = signingIdentity.hash(message1); const second = signingIdentity.hash(message2); expect(first).not.toEqual(second); }); }); });
typescript
Recently purchased Tata Tiago, excellent car for a small family as hatchback segment. Spacious seating. Wonderful Harman system, lovely music experience. - Performance (155) - Interior (175) Best safe compact Hatchback. The best car in the segment.
english
Khabib Nurmagomedov regards his win over Justin Gaethje at UFC 254 as a psychological triumph. The Eagle believes that he is levels above his peers in the mental aspect of the fight game which empowered him to break Gaethje mentally when they fought. During a February 22 interview with RT Sport MMA, Khabib Nurmagomedov shared his account of his mid-fight interactions with The Highlight that ensured his victory. The UFC lightweight champion explained that the hot and arid region of Abu Dhabi is not easy to get acclimatized to. Having been through the process for the Dustin Poirier fight, Khabib said he knew Justin would be struggling to acclimatize to the climate and used this for his advantage. "During the fight, I asked him, 'Acclimatization, isn't it? ' (Justin said) 'No, no. It isn't. ' And I was thinking to myself 'why are you replying to my questions? we are in a fight,'. . . I knew he just gave it up. So I pushed forward. He landed two to three more shots but with every single punch, he had less power. If I had dodged those shots, they would not have landed. But I walked through them just to break him mentally and when I took him down, he didn't even try to fight back. He gave up mentally. I won that fight not by physical reasons, but psychological," read the RT Sport transcript. Khabib Nurmagomedov's claims are substantiated by the fact that Justin Gaethje is one of the most offensive-minded fighters in the UFC. The Highlight has been through some of the most gruelling wars in his 25-fight MMA career. Despite a strong NCAA Division 1 wrestling background, he has never resorted to wrestling to defend himself even in the most vulnerable moments due to his never-back-down approach to fighting. In the lead-up to UFC 254, Gaethje had mentioned on multiple occassions that he would not tap to any submission hold but failed to keep his composure when trapped in the triangle choke and ended up tapping before passing out. The win over Justin Gaethje at UFC 254 was Khabib Nurmagomedov's third successful title defense and his final appearance in the UFC octagon. He announced his retirement from professional MMA following the win. It was later revealed that mumps and a horrendous leg injury suffered by Khabib during the training camp could have potentially resulted in the bout cancellation. But Khabib Nurmagomedov chose to make the walk to the octagon amid the worst fight camp of his career and put on a near-perfect performance against a very elite opponent. Khabib Nurmagomedov announced his retirement in the post-fight interview and has clarified on multiple occasions that he does not intend to fight professionally again.
english
package com.juzi.oerp.model.vo; import com.juzi.oerp.model.po.UserInfoPO; import lombok.Data; import lombok.experimental.Accessors; /** * 用户登录成功后返回的信息 * * @author Juzi * @date 2020/7/14 15:35 */ @Data @Accessors(chain = true) public class UserLoginVO { /** * access token */ private String token; /** * 用户信息 */ private UserInfoPO userInfo; }
java
#traffic-light { position: absolute; display:block; left: 50%; top: 50%; margin-left: -60px; margin-top: -160px; background-color:#333; width:120px; height:320px; } input { appearance: none; position: relative; left: 50%; width:80px; height:80px; margin-top: 20px; margin-left:-40px; background-color: grey; border-radius: 100%; display: block; } .color1{ background-color: #AAAA00;; } .color2{ background-color: #AAAA00; } .color3{ background-color: #AAAA00;; } .color4{ background-color: #AAAA00;; }
css
<filename>Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Exercises/Solutions/P08_FishTank.py<gh_stars>0 length = int(input()) width = int(input()) height = int(input()) occupied = float(input()) occupied_percent = occupied / 100 full_capacity = length * width * height occupied_total = occupied_percent * full_capacity remaining = full_capacity - occupied_total capacity_in_dm = remaining / 1000 water = capacity_in_dm print(water)
python
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "GizsAdventure.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, GizsAdventure, "GizsAdventure" ); //General Log DEFINE_LOG_CATEGORY(General); //Logging during game startup DEFINE_LOG_CATEGORY(Startup); //Logging for your AI system DEFINE_LOG_CATEGORY(AI); //Logging for Critical Errors that must always be addressed DEFINE_LOG_CATEGORY(CriticalErrors);
cpp